Google Cloud Retail V2 Client - Class ConversationalSearchResponse (2.4.0)

Reference documentation and code samples for the Google Cloud Retail V2 Client class ConversationalSearchResponse.

Response message for ConversationalSearchService.ConversationalSearch method.

Generated from protobuf message google.cloud.retail.v2.ConversationalSearchResponse

Namespace

Google \ Cloud \ Retail \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ user_query_types array

The types Retail classifies the search query as. Supported values are: - "ORDER_SUPPORT" - "SIMPLE_PRODUCT_SEARCH" - "INTENT_REFINEMENT" - "PRODUCT_DETAILS" - "PRODUCT_COMPARISON" - "DEALS_AND_COUPONS" - "STORE_RELEVANT" - "BLOCKLISTED" - "BEST_PRODUCT" - "RETAIL_SUPPORT" - "DISABLED"

↳ conversational_text_response string

The conversational answer-based text response generated by the Server.

↳ followup_question ConversationalSearchResponse\FollowupQuestion

The conversational followup question generated for Intent refinement.

↳ conversation_id string

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 ConversationalSearchRequest.conversation_id to restore conversation state in server.

↳ refined_search array<ConversationalSearchResponse\RefinedSearch>

The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.

↳ conversational_filtering_result ConversationalSearchResponse\ConversationalFilteringResult

This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.

↳ state int

Output only. The state of the response generation.

getUserQueryTypes

The types Retail classifies the search query as.

Supported values are:

  • "ORDER_SUPPORT"
  • "SIMPLE_PRODUCT_SEARCH"
  • "INTENT_REFINEMENT"
  • "PRODUCT_DETAILS"
  • "PRODUCT_COMPARISON"
  • "DEALS_AND_COUPONS"
  • "STORE_RELEVANT"
  • "BLOCKLISTED"
  • "BEST_PRODUCT"
  • "RETAIL_SUPPORT"
  • "DISABLED"
Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setUserQueryTypes

The types Retail classifies the search query as.

Supported values are:

  • "ORDER_SUPPORT"
  • "SIMPLE_PRODUCT_SEARCH"
  • "INTENT_REFINEMENT"
  • "PRODUCT_DETAILS"
  • "PRODUCT_COMPARISON"
  • "DEALS_AND_COUPONS"
  • "STORE_RELEVANT"
  • "BLOCKLISTED"
  • "BEST_PRODUCT"
  • "RETAIL_SUPPORT"
  • "DISABLED"
Parameter
Name Description
var string[]
Returns
Type Description
$this

getConversationalTextResponse

The conversational answer-based text response generated by the Server.

Returns
Type Description
string

setConversationalTextResponse

The conversational answer-based text response generated by the Server.

Parameter
Name Description
var string
Returns
Type Description
$this

getFollowupQuestion

The conversational followup question generated for Intent refinement.

Returns
Type Description
ConversationalSearchResponse\FollowupQuestion|null

hasFollowupQuestion

clearFollowupQuestion

setFollowupQuestion

The conversational followup question generated for Intent refinement.

Parameter
Name Description
var ConversationalSearchResponse\FollowupQuestion
Returns
Type Description
$this

getConversationId

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 ConversationalSearchRequest.conversation_id to restore conversation state in server.

Returns
Type Description
string

setConversationId

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 ConversationalSearchRequest.conversation_id to restore conversation state in server.

Parameter
Name Description
var string
Returns
Type Description
$this

getRefinedSearch

The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRefinedSearch

The proposed refined search queries. They can be used to fetch the relevant search results. When using CONVERSATIONAL_FILTER_ONLY mode, the refined_query from search response will be populated here.

Parameter
Name Description
var array<ConversationalSearchResponse\RefinedSearch>
Returns
Type Description
$this

getConversationalFilteringResult

This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.

Returns
Type Description
ConversationalSearchResponse\ConversationalFilteringResult|null

hasConversationalFilteringResult

clearConversationalFilteringResult

setConversationalFilteringResult

This field specifies all related information that is needed on client side for UI rendering of conversational filtering search.

Parameter
Name Description
var ConversationalSearchResponse\ConversationalFilteringResult
Returns
Type Description
$this

getState

Output only. The state of the response generation.

Returns
Type Description
int Enum of type State.

setState

Output only. The state of the response generation.

Parameter
Name Description
var int

Enum of type State.

Returns
Type Description
$this