NAME
Google::Cloud::Vision::V1::ProductSearch - Compiled Protocol Buffers messages for google/cloud/vision/v1/product_search.proto
SYNOPSIS
use Google::Cloud::Vision::V1::ProductSearch;
my $msg = Google::Cloud::Vision::V1::ProductSearch::ProductSearchParams->new({
bounding_poly => $bounding_poly,
product_set => $product_set,
product_categories => $product_categories,
filter => $filter,
});
# Read or update a field
my $val = $msg->bounding_poly();
# Binary wire-format roundtrip
my $bytes = $msg->serialize();
my $decoded = Google::Cloud::Vision::V1::ProductSearch::ProductSearchParams->parse($bytes);
# Canonical ProtoJSON
my $json = $msg->to_json();
DESCRIPTION
Auto-generated Protobuf message classes compiled from google/cloud/vision/v1/product_search.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().
MESSAGES
Google::Cloud::Vision::V1::ProductSearch::ProductSearchParams
Parameters for a product search request.
Inherits from Protobuf::Message.
Accessors
$msg->bounding_poly()/$msg->bounding_poly($value)Type:
Message(Google::Cloud::Vision::V1::Geometry::BoundingPoly)The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
$msg->product_set()/$msg->product_set($value)Type:
StringThe resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.
Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.
$msg->product_categories()/$msg->product_categories($value)Type:
StringThe list of product categories to search in. Currently, we only consider the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1", or "general-v1" should be specified. The legacy categories "homegoods", "apparel", and "toys" are still supported but will be deprecated. For new products, please use "homegoods-v2", "apparel-v2", or "toys-v2" for better product search accuracy. It is recommended to migrate existing products to these categories as well.
$msg->filter()/$msg->filter($value)Type:
StringThe filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An '=' should be used to connect the key and value.
For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but "(color = red OR brand = Google)" is not acceptable. "color: red" is not acceptable because it uses a ':' instead of an '='.
Google::Cloud::Vision::V1::ProductSearch::ProductSearchResults
Results for a product search request.
Inherits from Protobuf::Message.
Accessors
$msg->index_time()/$msg->index_time($value)Type:
Message(Google::Protobuf::Timestamp::Timestamp)Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.
$msg->results()/$msg->results($value)Type:
Message(Google::Cloud::Vision::V1::ProductSearch::ProductSearchResults::Result)List of results, one for each product match.
$msg->product_grouped_results()/$msg->product_grouped_results($value)Type:
Message(Google::Cloud::Vision::V1::ProductSearch::ProductSearchResults::GroupedResult)List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.
SEE ALSO
Protobuf, Protobuf::Message, Google::Cloud::Vision::V1::ProductSearch::Types, https://protobuf.dev/
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.