Class ProductSearchParams.Builder (2.1.4)

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

Parameters for a product search request.

Protobuf type google.cloud.vision.v1p4beta1.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
TypeDescription
ProductSearchParams.Builder

This builder for chaining.

addProductCategories(String value)

public ProductSearchParams.Builder addProductCategories(String value)

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
valueString

The productCategories to add.

Returns
TypeDescription
ProductSearchParams.Builder

This builder for chaining.

addProductCategoriesBytes(ByteString value)

public ProductSearchParams.Builder addProductCategoriesBytes(ByteString value)

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
valueByteString

The bytes of the productCategories to add.

Returns
TypeDescription
ProductSearchParams.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ProductSearchParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns