Package com.google.cloud.vision.v1
Class ProductSearchParams
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.vision.v1.ProductSearchParams
-
- All Implemented Interfaces:
ProductSearchParamsOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
public final class ProductSearchParams extends com.google.protobuf.GeneratedMessageV3 implements ProductSearchParamsOrBuilder
Parameters for a product search request.
Protobuf typegoogle.cloud.vision.v1.ProductSearchParams
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProductSearchParams.Builder
Parameters for a product search request.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
BOUNDING_POLY_FIELD_NUMBER
static int
FILTER_FIELD_NUMBER
static int
PRODUCT_CATEGORIES_FIELD_NUMBER
static int
PRODUCT_SET_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
BoundingPoly
getBoundingPoly()
The bounding polygon around the area of interest in the image.BoundingPolyOrBuilder
getBoundingPolyOrBuilder()
The bounding polygon around the area of interest in the image.static ProductSearchParams
getDefaultInstance()
ProductSearchParams
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getFilter()
The filtering expression.com.google.protobuf.ByteString
getFilterBytes()
The filtering expression.com.google.protobuf.Parser<ProductSearchParams>
getParserForType()
String
getProductCategories(int index)
The list of product categories to search in.com.google.protobuf.ByteString
getProductCategoriesBytes(int index)
The list of product categories to search in.int
getProductCategoriesCount()
The list of product categories to search in.com.google.protobuf.ProtocolStringList
getProductCategoriesList()
The list of product categories to search in.String
getProductSet()
The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.com.google.protobuf.ByteString
getProductSetBytes()
The resource name of a [ProductSet][google.cloud.vision.v1.ProductSet] to be searched for similar images.int
getSerializedSize()
boolean
hasBoundingPoly()
The bounding polygon around the area of interest in the image.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static ProductSearchParams.Builder
newBuilder()
static ProductSearchParams.Builder
newBuilder(ProductSearchParams prototype)
ProductSearchParams.Builder
newBuilderForType()
protected ProductSearchParams.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static ProductSearchParams
parseDelimitedFrom(InputStream input)
static ProductSearchParams
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ProductSearchParams
parseFrom(byte[] data)
static ProductSearchParams
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ProductSearchParams
parseFrom(com.google.protobuf.ByteString data)
static ProductSearchParams
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ProductSearchParams
parseFrom(com.google.protobuf.CodedInputStream input)
static ProductSearchParams
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ProductSearchParams
parseFrom(InputStream input)
static ProductSearchParams
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static ProductSearchParams
parseFrom(ByteBuffer data)
static ProductSearchParams
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<ProductSearchParams>
parser()
ProductSearchParams.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
BOUNDING_POLY_FIELD_NUMBER
public static final int BOUNDING_POLY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRODUCT_SET_FIELD_NUMBER
public static final int PRODUCT_SET_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PRODUCT_CATEGORIES_FIELD_NUMBER
public static final int PRODUCT_CATEGORIES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
FILTER_FIELD_NUMBER
public static final int FILTER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
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.v1.BoundingPoly bounding_poly = 9;
- Specified by:
hasBoundingPoly
in interfaceProductSearchParamsOrBuilder
- Returns:
- Whether the boundingPoly field is set.
-
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.v1.BoundingPoly bounding_poly = 9;
- Specified by:
getBoundingPoly
in interfaceProductSearchParamsOrBuilder
- Returns:
- 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.v1.BoundingPoly bounding_poly = 9;
- Specified by:
getBoundingPolyOrBuilder
in interfaceProductSearchParamsOrBuilder
-
getProductSet
public String getProductSet()
The 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`.
string product_set = 6 [(.google.api.resource_reference) = { ... }
- Specified by:
getProductSet
in interfaceProductSearchParamsOrBuilder
- Returns:
- The productSet.
-
getProductSetBytes
public com.google.protobuf.ByteString getProductSetBytes()
The 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`.
string product_set = 6 [(.google.api.resource_reference) = { ... }
- Specified by:
getProductSetBytes
in interfaceProductSearchParamsOrBuilder
- Returns:
- The bytes for productSet.
-
getProductCategoriesList
public com.google.protobuf.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;
- Specified by:
getProductCategoriesList
in interfaceProductSearchParamsOrBuilder
- Returns:
- A list containing the productCategories.
-
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;
- Specified by:
getProductCategoriesCount
in interfaceProductSearchParamsOrBuilder
- Returns:
- The count of productCategories.
-
getProductCategories
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;
- Specified by:
getProductCategories
in interfaceProductSearchParamsOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The productCategories at the given index.
-
getProductCategoriesBytes
public com.google.protobuf.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;
- Specified by:
getProductCategoriesBytes
in interfaceProductSearchParamsOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the productCategories at the given index.
-
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;
- Specified by:
getFilter
in interfaceProductSearchParamsOrBuilder
- Returns:
- The filter.
-
getFilterBytes
public com.google.protobuf.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;
- Specified by:
getFilterBytes
in interfaceProductSearchParamsOrBuilder
- Returns:
- The bytes for filter.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static ProductSearchParams parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static ProductSearchParams parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductSearchParams parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ProductSearchParams parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static ProductSearchParams parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductSearchParams parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static ProductSearchParams parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public ProductSearchParams.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static ProductSearchParams.Builder newBuilder()
-
newBuilder
public static ProductSearchParams.Builder newBuilder(ProductSearchParams prototype)
-
toBuilder
public ProductSearchParams.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected ProductSearchParams.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static ProductSearchParams getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<ProductSearchParams> parser()
-
getParserForType
public com.google.protobuf.Parser<ProductSearchParams> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public ProductSearchParams getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-