Class ProductSearchParams (2.1.1)

public final class ProductSearchParams extends GeneratedMessageV3 implements ProductSearchParamsOrBuilder

Parameters for a product search request.

Protobuf type google.cloud.vision.v1p3beta1.ProductSearchParams

Static Fields

BOUNDING_POLY_FIELD_NUMBER

public static final int BOUNDING_POLY_FIELD_NUMBER
Field Value
TypeDescription
int

CATALOG_NAME_FIELD_NUMBER

public static final int CATALOG_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

CATEGORY_FIELD_NUMBER

public static final int CATEGORY_FIELD_NUMBER
Field Value
TypeDescription
int

FILTER_FIELD_NUMBER

public static final int FILTER_FIELD_NUMBER
Field Value
TypeDescription
int

NORMALIZED_BOUNDING_POLY_FIELD_NUMBER

public static final int NORMALIZED_BOUNDING_POLY_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_CATEGORIES_FIELD_NUMBER

public static final int PRODUCT_CATEGORIES_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_CATEGORY_FIELD_NUMBER

public static final int PRODUCT_CATEGORY_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_SET_FIELD_NUMBER

public static final int PRODUCT_SET_FIELD_NUMBER
Field Value
TypeDescription
int

VIEW_FIELD_NUMBER

public static final int VIEW_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ProductSearchParams getDefaultInstance()
Returns
TypeDescription
ProductSearchParams

getDescriptor()

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

newBuilder()

public static ProductSearchParams.Builder newBuilder()
Returns
TypeDescription
ProductSearchParams.Builder

newBuilder(ProductSearchParams prototype)

public static ProductSearchParams.Builder newBuilder(ProductSearchParams prototype)
Parameter
NameDescription
prototypeProductSearchParams
Returns
TypeDescription
ProductSearchParams.Builder

parseDelimitedFrom(InputStream input)

public static ProductSearchParams parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ProductSearchParams parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ProductSearchParams parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ProductSearchParams parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ProductSearchParams parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ProductSearchParams parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ProductSearchParams parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ProductSearchParams
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ProductSearchParams> parser()
Returns
TypeDescription
Parser<ProductSearchParams>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBoundingPoly()

public BoundingPoly getBoundingPoly()

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

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

Returns
TypeDescription
BoundingPoly

The boundingPoly.

getBoundingPolyOrBuilder()

public BoundingPolyOrBuilder getBoundingPolyOrBuilder()

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

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

Returns
TypeDescription
BoundingPolyOrBuilder

getCatalogName()

public String getCatalogName()

The resource name of the catalog to search. Format is: productSearch/catalogs/CATALOG_NAME.

string catalog_name = 1;

Returns
TypeDescription
String

The catalogName.

getCatalogNameBytes()

public ByteString getCatalogNameBytes()

The resource name of the catalog to search. Format is: productSearch/catalogs/CATALOG_NAME.

string catalog_name = 1;

Returns
TypeDescription
ByteString

The bytes for catalogName.

getCategory()

public ProductSearchCategory getCategory()

The category to search in. Optional. It is inferred by the system if it is not specified. [Deprecated] Use product_category.

.google.cloud.vision.v1p3beta1.ProductSearchCategory category = 2;

Returns
TypeDescription
ProductSearchCategory

The category.

getCategoryValue()

public int getCategoryValue()

The category to search in. Optional. It is inferred by the system if it is not specified. [Deprecated] Use product_category.

.google.cloud.vision.v1p3beta1.ProductSearchCategory category = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for category.

getDefaultInstanceForType()

public ProductSearchParams getDefaultInstanceForType()
Returns
TypeDescription
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. For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but not "(color = red OR brand = Google)" or "color: red".

string filter = 8;

Returns
TypeDescription
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. For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but not "(color = red OR brand = Google)" or "color: red".

string filter = 8;

Returns
TypeDescription
ByteString

The bytes for filter.

getNormalizedBoundingPoly()

public NormalizedBoundingPoly getNormalizedBoundingPoly()

The bounding polygon around the area of interest in the image. Optional. If it is not specified, system discretion will be applied. [Deprecated] Use bounding_poly.

.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly normalized_bounding_poly = 3;

Returns
TypeDescription
NormalizedBoundingPoly

The normalizedBoundingPoly.

getNormalizedBoundingPolyOrBuilder()

public NormalizedBoundingPolyOrBuilder getNormalizedBoundingPolyOrBuilder()

The bounding polygon around the area of interest in the image. Optional. If it is not specified, system discretion will be applied. [Deprecated] Use bounding_poly.

.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly normalized_bounding_poly = 3;

Returns
TypeDescription
NormalizedBoundingPolyOrBuilder

getParserForType()

public Parser<ProductSearchParams> getParserForType()
Returns
TypeDescription
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" or "apparel" should be specified.

repeated string product_categories = 7;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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" or "apparel" should be specified.

repeated string product_categories = 7;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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" or "apparel" should be specified.

repeated string product_categories = 7;

Returns
TypeDescription
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" or "apparel" should be specified.

repeated string product_categories = 7;

Returns
TypeDescription
ProtocolStringList

A list containing the productCategories.

getProductCategory()

public String getProductCategory()

The product category to search in. Optional. It is inferred by the system if it is not specified. Supported values are bag, shoe, sunglasses, dress, outerwear, skirt, top, shorts, and pants.

string product_category = 5;

Returns
TypeDescription
String

The productCategory.

getProductCategoryBytes()

public ByteString getProductCategoryBytes()

The product category to search in. Optional. It is inferred by the system if it is not specified. Supported values are bag, shoe, sunglasses, dress, outerwear, skirt, top, shorts, and pants.

string product_category = 5;

Returns
TypeDescription
ByteString

The bytes for productCategory.

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
TypeDescription
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
TypeDescription
ByteString

The bytes for productSet.

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getView()

public ProductSearchResultsView getView()

Specifies the verbosity of the product search results. Optional. Defaults to BASIC.

.google.cloud.vision.v1p3beta1.ProductSearchResultsView view = 4;

Returns
TypeDescription
ProductSearchResultsView

The view.

getViewValue()

public int getViewValue()

Specifies the verbosity of the product search results. Optional. Defaults to BASIC.

.google.cloud.vision.v1p3beta1.ProductSearchResultsView view = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for view.

hasBoundingPoly()

public boolean hasBoundingPoly()

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

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

Returns
TypeDescription
boolean

Whether the boundingPoly field is set.

hasNormalizedBoundingPoly()

public boolean hasNormalizedBoundingPoly()

The bounding polygon around the area of interest in the image. Optional. If it is not specified, system discretion will be applied. [Deprecated] Use bounding_poly.

.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly normalized_bounding_poly = 3;

Returns
TypeDescription
boolean

Whether the normalizedBoundingPoly field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ProductSearchParams.Builder newBuilderForType()
Returns
TypeDescription
ProductSearchParams.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ProductSearchParams.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ProductSearchParams.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ProductSearchParams.Builder toBuilder()
Returns
TypeDescription
ProductSearchParams.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException