Class: Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseSearchResult
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaSearchResponseSearchResult
- 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
Represents the search results.
Instance Attribute Summary collapse
-
#id ⇒ String
Product.id of the searched Product.
-
#matching_variant_count ⇒ Fixnum
The count of matched variant Products.
-
#matching_variant_fields ⇒ Hash<String,String>
If a variant Product matches the search query, this map indicates which Product fields are matched.
-
#personal_labels ⇒ Array<String>
Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id.
-
#product ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct
Product captures all metadata information of items to be recommended or searched.
-
#variant_rollup_values ⇒ Hash<String,Object>
The rollup matching variant Product attributes.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudRetailV2alphaSearchResponseSearchResult
constructor
A new instance of GoogleCloudRetailV2alphaSearchResponseSearchResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2alphaSearchResponseSearchResult
Returns a new instance of GoogleCloudRetailV2alphaSearchResponseSearchResult.
7291 7292 7293 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7291 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
Product.id of the searched Product.
Corresponds to the JSON property id
7243 7244 7245 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7243 def id @id end |
#matching_variant_count ⇒ Fixnum
The count of matched variant Products.
Corresponds to the JSON property matchingVariantCount
7248 7249 7250 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7248 def matching_variant_count @matching_variant_count end |
#matching_variant_fields ⇒ Hash<String,String>
If a variant Product matches the search query, this map indicates which
Product fields are matched. The key is the Product.name, the value is a field
mask of the matched Product fields. If matched attributes cannot be determined,
this map will be empty. For example, a key "sku1" with field mask "products.
color_info" indicates there is a match between "sku1" ColorInfo and the query.
Corresponds to the JSON property matchingVariantFields
7257 7258 7259 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7257 def matching_variant_fields @matching_variant_fields end |
#personal_labels ⇒ Array<String>
Specifies previous events related to this product for this user based on
UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set
only when SearchRequest.PersonalizationSpec.mode is SearchRequest.
PersonalizationSpec.Mode.AUTO. Possible values: * purchased
: Indicates that
this product has been purchased before.
Corresponds to the JSON property personalLabels
7266 7267 7268 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7266 def personal_labels @personal_labels end |
#product ⇒ Google::Apis::RetailV2alpha::GoogleCloudRetailV2alphaProduct
Product captures all metadata information of items to be recommended or
searched.
Corresponds to the JSON property product
7272 7273 7274 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7272 def product @product end |
#variant_rollup_values ⇒ Hash<String,Object>
The rollup matching variant Product attributes. The key is one of the
SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated
Product attributes. Notice that the rollup values are respect filter. For
example, when filtering by "colorFamilies:ANY(\"red\")" and rollup "
colorFamilies", only "red" is returned. For textual and numerical attributes,
the rollup values is a list of string or double values with type google.
protobuf.ListValue. For example, if there are two variants with colors "red"
and "blue", the rollup values are key: "colorFamilies" value
list_value
values
string_value: "red" values
string_value: "blue"
For
FulfillmentInfo, the rollup values is a double value with type google.protobuf.
Value. For example,
key: "pickupInStore.store1" value ` number_value: 10
means a there are 10 variants in this product are available in the store "
store1".
Corresponds to the JSON property
variantRollupValues`
7289 7290 7291 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7289 def variant_rollup_values @variant_rollup_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7296 7297 7298 7299 7300 7301 7302 7303 |
# File 'lib/google/apis/retail_v2alpha/classes.rb', line 7296 def update!(**args) @id = args[:id] if args.key?(:id) @matching_variant_count = args[:matching_variant_count] if args.key?(:matching_variant_count) @matching_variant_fields = args[:matching_variant_fields] if args.key?(:matching_variant_fields) @personal_labels = args[:personal_labels] if args.key?(:personal_labels) @product = args[:product] if args.key?(:product) @variant_rollup_values = args[:variant_rollup_values] if args.key?(:variant_rollup_values) end |