Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponseConversationalSearchResult

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 related information that is needed on client side for UI rendering of conversational retail search.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaSearchResponseConversationalSearchResult

Returns a new instance of GoogleCloudRetailV2betaSearchResponseConversationalSearchResult.



9016
9017
9018
# File 'lib/google/apis/retail_v2beta/classes.rb', line 9016

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

Instance Attribute Details

#additional_filterGoogle::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter

Additional filter that client side need to apply. Corresponds to the JSON property additionalFilter



8979
8980
8981
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8979

def additional_filter
  @additional_filter
end

#additional_filtersArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponseConversationalSearchResultAdditionalFilter>

This field is deprecated but will be kept for backward compatibility. There is expected to have only one additional filter and the value will be the same to the same as field additional_filter. Corresponds to the JSON property additionalFilters



8986
8987
8988
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8986

def additional_filters
  @additional_filters
end

#conversation_idString

Conversation UUID. This field will be stored in client side storage to maintain the conversation session with server and will be used for next search request's SearchRequest.ConversationalSearchSpec.conversation_id to restore conversation state in server. Corresponds to the JSON property conversationId

Returns:

  • (String)


8994
8995
8996
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8994

def conversation_id
  @conversation_id
end

#followup_questionString

The follow-up question. e.g., What is the color? Corresponds to the JSON property followupQuestion

Returns:

  • (String)


8999
9000
9001
# File 'lib/google/apis/retail_v2beta/classes.rb', line 8999

def followup_question
  @followup_question
end

#refined_queryString

The current refined query for the conversational search. This field will be used in customer UI that the query in the search bar should be replaced with the refined query. For example, if SearchRequest.query is dress and next SearchRequest.ConversationalSearchSpec.UserAnswer.text_answer is red color, which does not match any product attribute value filters, the refined query will be dress, red color. Corresponds to the JSON property refinedQuery

Returns:

  • (String)


9009
9010
9011
# File 'lib/google/apis/retail_v2beta/classes.rb', line 9009

def refined_query
  @refined_query
end

#suggested_answersArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaSearchResponseConversationalSearchResultSuggestedAnswer>

The answer options provided to client for the follow-up question. Corresponds to the JSON property suggestedAnswers



9014
9015
9016
# File 'lib/google/apis/retail_v2beta/classes.rb', line 9014

def suggested_answers
  @suggested_answers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9021
9022
9023
9024
9025
9026
9027
9028
# File 'lib/google/apis/retail_v2beta/classes.rb', line 9021

def update!(**args)
  @additional_filter = args[:additional_filter] if args.key?(:additional_filter)
  @additional_filters = args[:additional_filters] if args.key?(:additional_filters)
  @conversation_id = args[:conversation_id] if args.key?(:conversation_id)
  @followup_question = args[:followup_question] if args.key?(:followup_question)
  @refined_query = args[:refined_query] if args.key?(:refined_query)
  @suggested_answers = args[:suggested_answers] if args.key?(:suggested_answers)
end