public final class ProductSearchParams extends GeneratedMessageV3 implements ProductSearchParamsOrBuilder
Parameters for a product search request.Protobuf type
google.cloud.vision.v1.ProductSearchParams
Modifier and Type | Class and Description |
---|---|
static class |
ProductSearchParams.Builder
Parameters for a product search request.
|
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage,BuilderType extends GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageV3.ExtendableMessage<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageV3.ExtendableMessage>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameter
AbstractMessageLite.InternalOneOfEnum
Modifier and Type | Field and Description |
---|---|
static int |
BOUNDING_POLY_FIELD_NUMBER |
static int |
FILTER_FIELD_NUMBER |
static int |
PRODUCT_CATEGORIES_FIELD_NUMBER |
static int |
PRODUCT_SET_FIELD_NUMBER |
alwaysUseFieldBuilders, unknownFields
memoizedSize
memoizedHashCode
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public static final int BOUNDING_POLY_FIELD_NUMBER
public static final int PRODUCT_SET_FIELD_NUMBER
public static final int PRODUCT_CATEGORIES_FIELD_NUMBER
public static final int FILTER_FIELD_NUMBER
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance
in class GeneratedMessageV3
public final UnknownFieldSet getUnknownFields()
getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessageV3
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3
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;
hasBoundingPoly
in interface ProductSearchParamsOrBuilder
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;
getBoundingPoly
in interface ProductSearchParamsOrBuilder
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;
getBoundingPolyOrBuilder
in interface ProductSearchParamsOrBuilder
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) = { ... }
getProductSet
in interface ProductSearchParamsOrBuilder
public 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) = { ... }
getProductSetBytes
in interface ProductSearchParamsOrBuilder
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;
getProductCategoriesList
in interface ProductSearchParamsOrBuilder
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;
getProductCategoriesCount
in interface ProductSearchParamsOrBuilder
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;
getProductCategories
in interface ProductSearchParamsOrBuilder
index
- The index of the element to return.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;
getProductCategoriesBytes
in interface ProductSearchParamsOrBuilder
index
- The index of the value to return.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;
getFilter
in interface ProductSearchParamsOrBuilder
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;
getFilterBytes
in interface ProductSearchParamsOrBuilder
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3
public void writeTo(CodedOutputStream output) throws IOException
writeTo
in interface MessageLite
writeTo
in class GeneratedMessageV3
IOException
public int getSerializedSize()
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessageV3
public boolean equals(Object obj)
equals
in interface Message
equals
in class AbstractMessage
public int hashCode()
hashCode
in interface Message
hashCode
in class AbstractMessage
public static ProductSearchParams parseFrom(ByteBuffer data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static ProductSearchParams parseFrom(InputStream input) throws IOException
IOException
public static ProductSearchParams parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ProductSearchParams parseDelimitedFrom(InputStream input) throws IOException
IOException
public static ProductSearchParams parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static ProductSearchParams parseFrom(CodedInputStream input) throws IOException
IOException
public static ProductSearchParams parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public ProductSearchParams.Builder newBuilderForType()
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static ProductSearchParams.Builder newBuilder()
public static ProductSearchParams.Builder newBuilder(ProductSearchParams prototype)
public ProductSearchParams.Builder toBuilder()
toBuilder
in interface Message
toBuilder
in interface MessageLite
protected ProductSearchParams.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
newBuilderForType
in class GeneratedMessageV3
public static ProductSearchParams getDefaultInstance()
public static Parser<ProductSearchParams> parser()
public Parser<ProductSearchParams> getParserForType()
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessageV3
public ProductSearchParams getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
Copyright © 2022 Google LLC. All rights reserved.