Class: Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponse

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

Response of the auto-complete query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2betaCompleteQueryResponse

Returns a new instance of GoogleCloudRetailV2betaCompleteQueryResponse.



1371
1372
1373
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1371

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

Instance Attribute Details

#attribution_tokenString

A unique complete token. This should be included in the SearchRequest resulting from this completion, which enables accurate attribution of complete model performance. Corresponds to the JSON property attributionToken

Returns:

  • (String)


1350
1351
1352
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1350

def attribution_token
  @attribution_token
end

#completion_resultsArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult>

Results of the matching suggestions. The result list is ordered and the first result is top suggestion. Corresponds to the JSON property completionResults



1356
1357
1358
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1356

def completion_results
  @completion_results
end

#recent_search_resultsArray<Google::Apis::RetailV2beta::GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult>

Matched recent searches of this user. The maximum number of recent searches is

  1. This field is a restricted feature. Contact Retail Search support team if you are interested in enabling it. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively.
  2. They are transformed to lower cases. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens. Corresponds to the JSON property recentSearchResults


1369
1370
1371
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1369

def recent_search_results
  @recent_search_results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1376
1377
1378
1379
1380
# File 'lib/google/apis/retail_v2beta/classes.rb', line 1376

def update!(**args)
  @attribution_token = args[:attribution_token] if args.key?(:attribution_token)
  @completion_results = args[:completion_results] if args.key?(:completion_results)
  @recent_search_results = args[:recent_search_results] if args.key?(:recent_search_results)
end