Class: Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseSearchResult
- Inherits:
-
Object
- Object
- Google::Apis::RetailV2::GoogleCloudRetailV2SearchResponseSearchResult
- 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
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::RetailV2::GoogleCloudRetailV2Product
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) ⇒ GoogleCloudRetailV2SearchResponseSearchResult
constructor
A new instance of GoogleCloudRetailV2SearchResponseSearchResult.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudRetailV2SearchResponseSearchResult
Returns a new instance of GoogleCloudRetailV2SearchResponseSearchResult.
5331 5332 5333 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5331 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
Product.id of the searched Product.
Corresponds to the JSON property id
5283 5284 5285 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5283 def id @id end |
#matching_variant_count ⇒ Fixnum
The count of matched variant Products.
Corresponds to the JSON property matchingVariantCount
5288 5289 5290 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5288 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
5297 5298 5299 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5297 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
5306 5307 5308 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5306 def personal_labels @personal_labels end |
#product ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Product captures all metadata information of items to be recommended or
searched.
Corresponds to the JSON property product
5312 5313 5314 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5312 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`
5329 5330 5331 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5329 def variant_rollup_values @variant_rollup_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5336 5337 5338 5339 5340 5341 5342 5343 |
# File 'lib/google/apis/retail_v2/classes.rb', line 5336 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 |