Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult

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

Overview

Resource that represents completion results.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult

Returns a new instance of GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult.



1738
1739
1740
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1738

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

Instance Attribute Details

#attributesHash<String,Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaCustomAttribute>

Custom attributes for the suggestion term. * For "user-data", the attributes are additional custom attributes ingested through BigQuery. * For "cloud- retail", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly. Corresponds to the JSON property attributes



1716
1717
1718
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1716

def attributes
  @attributes
end

#facetsArray<Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseFacet>

Facet information for the suggestion term. Gives the number of items resulting from a search with this suggestion term for each facet. This is an experimental feature for limited customers. If you want to receive this facet information, reach out to the Retail support team. Corresponds to the JSON property facets



1724
1725
1726
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1724

def facets
  @facets
end

#suggestionString

The suggestion for the query. Corresponds to the JSON property suggestion

Returns:

  • (String)


1729
1730
1731
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1729

def suggestion
  @suggestion
end

#total_product_countFixnum

Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. If you want to receive this product count information, reach out to the Retail support team. Corresponds to the JSON property totalProductCount

Returns:

  • (Fixnum)


1736
1737
1738
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1736

def total_product_count
  @total_product_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1743
1744
1745
1746
1747
1748
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 1743

def update!(**args)
  @attributes = args[:attributes] if args.key?(:attributes)
  @facets = args[:facets] if args.key?(:facets)
  @suggestion = args[:suggestion] if args.key?(:suggestion)
  @total_product_count = args[:total_product_count] if args.key?(:total_product_count)
end