Class ProductSearchParams (3.52.0)

public final class ProductSearchParams extends GeneratedMessageV3 implements ProductSearchParamsOrBuilder

Parameters for a product search request.

Protobuf type google.cloud.vision.v1p4beta1.ProductSearchParams

Static Fields

BOUNDING_POLY_FIELD_NUMBER

public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
Type Description
int

FILTER_FIELD_NUMBER

public static final int FILTER_FIELD_NUMBER
Field Value
Type Description
int

PRODUCT_CATEGORIES_FIELD_NUMBER

public static final int PRODUCT_CATEGORIES_FIELD_NUMBER
Field Value
Type Description
int

PRODUCT_SET_FIELD_NUMBER

public static final int PRODUCT_SET_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ProductSearchParams getDefaultInstance()
Returns
Type Description
ProductSearchParams

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ProductSearchParams.Builder newBuilder()
Returns
Type Description
ProductSearchParams.Builder

newBuilder(ProductSearchParams prototype)

public static ProductSearchParams.Builder newBuilder(ProductSearchParams prototype)
Parameter
Name Description
prototype ProductSearchParams
Returns
Type Description
ProductSearchParams.Builder

parseDelimitedFrom(InputStream input)

public static ProductSearchParams parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ProductSearchParams parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductSearchParams parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductSearchParams parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ProductSearchParams parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ProductSearchParams parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ProductSearchParams
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ProductSearchParams> parser()
Returns
Type Description
Parser<ProductSearchParams>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBoundingPoly()

public BoundingPoly getBoundingPoly()

The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;

Returns
Type Description
BoundingPoly

The boundingPoly.

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;

Returns
Type Description
BoundingPolyOrBuilder

getDefaultInstanceForType()

public ProductSearchParams getDefaultInstanceForType()
Returns
Type Description
ProductSearchParams

getFilter()

public String getFilter()

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

string filter = 8;

Returns
Type Description
String

The filter.

getFilterBytes()

public ByteString getFilterBytes()

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

string filter = 8;

Returns
Type Description
ByteString

The bytes for filter.

getParserForType()

public Parser<ProductSearchParams> getParserForType()
Returns
Type Description
Parser<ProductSearchParams>
Overrides

getProductCategories(int index)

public String getProductCategories(int index)

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
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The productCategories at the given index.

getProductCategoriesBytes(int index)

public ByteString getProductCategoriesBytes(int index)

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
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the productCategories at the given index.

getProductCategoriesCount()

public int getProductCategoriesCount()

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;

Returns
Type Description
int

The count of productCategories.

getProductCategoriesList()

public ProtocolStringList getProductCategoriesList()

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;

Returns
Type Description
ProtocolStringList

A list containing the productCategories.

getProductSet()

public String getProductSet()

The resource name of a ProductSet to be searched for similar images.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID.

string product_set = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The productSet.

getProductSetBytes()

public ByteString getProductSetBytes()

The resource name of a ProductSet to be searched for similar images.

Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID.

string product_set = 6 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for productSet.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBoundingPoly()

public boolean hasBoundingPoly()

The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.

.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;

Returns
Type Description
boolean

Whether the boundingPoly field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ProductSearchParams.Builder newBuilderForType()
Returns
Type Description
ProductSearchParams.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductSearchParams.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ProductSearchParams.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ProductSearchParams.Builder toBuilder()
Returns
Type Description
ProductSearchParams.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException