Class ProductSearchParams.Builder (2.1.1)

public static final class ProductSearchParams.Builder extends GeneratedMessageV3.Builder<ProductSearchParams.Builder> implements ProductSearchParamsOrBuilder

Parameters for a product search request.

Protobuf type google.cloud.vision.v1.ProductSearchParams

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllProductCategories(Iterable<String> values)

public ProductSearchParams.Builder addAllProductCategories(Iterable<String> values)

The 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.

repeated string product_categories = 7;

Parameter
NameDescription
valuesIterable<String>

The productCategories to add.

Returns