Class: Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponse

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

Overview

Response of the autocomplete query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2CompleteQueryResponse

Returns a new instance of GoogleCloudRetailV2CompleteQueryResponse.



1075
1076
1077
# File 'lib/google/apis/retail_v2/classes.rb', line 1075

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

Instance Attribute Details

#attribute_resultsHash<String,Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponseAttributeResult>

A map of matched attribute suggestions. This field is only available for " cloud-retail" dataset. Current supported keys: * brands * categories Corresponds to the JSON property attributeResults



1047
1048
1049
# File 'lib/google/apis/retail_v2/classes.rb', line 1047

def attribute_results
  @attribute_results
end

#attribution_tokenString

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

Returns:

  • (String)


1054
1055
1056
# File 'lib/google/apis/retail_v2/classes.rb', line 1054

def attribution_token
  @attribution_token
end

#completion_resultsArray<Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponseCompletionResult>

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



1060
1061
1062
# File 'lib/google/apis/retail_v2/classes.rb', line 1060

def completion_results
  @completion_results
end

#recent_search_resultsArray<Google::Apis::RetailV2::GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult>

Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. 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.

  • They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens. Corresponds to the JSON property recentSearchResults


1073
1074
1075
# File 'lib/google/apis/retail_v2/classes.rb', line 1073

def recent_search_results
  @recent_search_results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1080
1081
1082
1083
1084
1085
# File 'lib/google/apis/retail_v2/classes.rb', line 1080

def update!(**args)
  @attribute_results = args[:attribute_results] if args.key?(:attribute_results)
  @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