Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec

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

Overview

This field specifies all conversational related parameters addition to traditional retail search.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec

Returns a new instance of GoogleCloudRetailV2betaSearchRequestConversationalSearchSpec.



7683
7684
7685
# File 'lib/google/apis/retail_v2beta/classes.rb', line 7683

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

Instance Attribute Details

#conversation_idString

This field specifies the conversation id, which maintains the state of the conversation between client side and server side. Use the value from the previous ConversationalSearchResult.conversation_id. For the initial request, this should be empty. Corresponds to the JSON property conversationId

Returns:

  • (String)


7665
7666
7667
# File 'lib/google/apis/retail_v2beta/classes.rb', line 7665

def conversation_id
  @conversation_id
end

#followup_conversation_requestedBoolean Also known as: followup_conversation_requested?

This field specifies whether the customer would like to do conversational search. If this field is set to true, conversational related extra information will be returned from server side, including follow-up question, answer options, etc. Corresponds to the JSON property followupConversationRequested

Returns:

  • (Boolean)


7673
7674
7675
# File 'lib/google/apis/retail_v2beta/classes.rb', line 7673

def followup_conversation_requested
  @followup_conversation_requested
end

#user_answerGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchRequestConversationalSearchSpecUserAnswer

This field specifies the current user answer during the conversational search. This can be either user selected from suggested answers or user input plain text. Corresponds to the JSON property userAnswer



7681
7682
7683
# File 'lib/google/apis/retail_v2beta/classes.rb', line 7681

def user_answer
  @user_answer
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7688
7689
7690
7691
7692
# File 'lib/google/apis/retail_v2beta/classes.rb', line 7688

def update!(**args)
  @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
  @followup_conversation_requested = args[:followup_conversation_requested] if args.key?(:followup_conversation_requested)
  @user_answer = args[:user_answer] if args.key?(:user_answer)
end