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.
-
#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.
2961 2962 2963 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2961 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
Product.id of the searched Product.
Corresponds to the JSON property id
2922 2923 2924 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2922 def id @id end |
#matching_variant_count ⇒ Fixnum
The count of matched variant Products.
Corresponds to the JSON property matchingVariantCount
2927 2928 2929 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2927 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
2936 2937 2938 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2936 def matching_variant_fields @matching_variant_fields end |
#product ⇒ Google::Apis::RetailV2::GoogleCloudRetailV2Product
Product captures all metadata information of items to be recommended or
searched.
Corresponds to the JSON property product
2942 2943 2944 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2942 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 propertyvariantRollupValues`
2959 2960 2961 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2959 def variant_rollup_values @variant_rollup_values end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2966 2967 2968 2969 2970 2971 2972 |
# File 'lib/google/apis/retail_v2/classes.rb', line 2966 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) @product = args[:product] if args.key?(:product) @variant_rollup_values = args[:variant_rollup_values] if args.key?(:variant_rollup_values) end |