public final class Product extends GeneratedMessageV3 implements ProductOrBuilder
A Product contains ReferenceImages.
Protobuf type google.cloud.vision.v1.Product
Static Fields
DESCRIPTION_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
Field Value
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
Field Value
PRODUCT_CATEGORY_FIELD_NUMBER
public static final int PRODUCT_CATEGORY_FIELD_NUMBER
Field Value
PRODUCT_LABELS_FIELD_NUMBER
public static final int PRODUCT_LABELS_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Product getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Product.Builder newBuilder()
Returns
newBuilder(Product prototype)
public static Product.Builder newBuilder(Product prototype)
Parameter
Returns
public static Product parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Product parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Product parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Product parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Product parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Product parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Product parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Product parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Product parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Product parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Product> parser()
Returns
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public Product getDefaultInstanceForType()
Returns
getDescription()
public String getDescription()
User-provided metadata to be stored with this product. Must be at most 4096
characters long.
string description = 3;
Returns
Type | Description |
String | The description.
|
getDescriptionBytes()
public ByteString getDescriptionBytes()
User-provided metadata to be stored with this product. Must be at most 4096
characters long.
string description = 3;
Returns
Type | Description |
ByteString | The bytes for description.
|
getDisplayName()
public String getDisplayName()
The user-provided name for this Product. Must not be empty. Must be at most
4096 characters long.
string display_name = 2;
Returns
Type | Description |
String | The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
The user-provided name for this Product. Must not be empty. Must be at most
4096 characters long.
string display_name = 2;
Returns
Type | Description |
ByteString | The bytes for displayName.
|
getName()
The resource name of the product.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID
.
This field is ignored when creating a product.
string name = 1;
Returns
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
The resource name of the product.
Format is:
projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID
.
This field is ignored when creating a product.
string name = 1;
Returns
getParserForType()
public Parser<Product> getParserForType()
Returns
Overrides
getProductCategory()
public String getProductCategory()
Immutable. The category for the product identified by the reference image. This should
be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
"general-v1". The legacy categories "homegoods", "apparel", and "toys" are
still supported, but these should not be used for new products.
string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE];
Returns
Type | Description |
String | The productCategory.
|
getProductCategoryBytes()
public ByteString getProductCategoryBytes()
Immutable. The category for the product identified by the reference image. This should
be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or
"general-v1". The legacy categories "homegoods", "apparel", and "toys" are
still supported, but these should not be used for new products.
string product_category = 4 [(.google.api.field_behavior) = IMMUTABLE];
Returns
Type | Description |
ByteString | The bytes for productCategory.
|
getProductLabels(int index)
public Product.KeyValue getProductLabels(int index)
Key-value pairs that can be attached to a product. At query time,
constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. "1199". Only
strings with integer values can match a range-based restriction which is
to be supported soon.
Multiple values can be assigned to the same key. One product may have up to
500 product_labels.
Notice that the total number of distinct product_labels over all products
in one ProductSet cannot exceed 1M, otherwise the product search pipeline
will refuse to work for that ProductSet.
repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;
Parameter
Returns
getProductLabelsCount()
public int getProductLabelsCount()
Key-value pairs that can be attached to a product. At query time,
constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. "1199". Only
strings with integer values can match a range-based restriction which is
to be supported soon.
Multiple values can be assigned to the same key. One product may have up to
500 product_labels.
Notice that the total number of distinct product_labels over all products
in one ProductSet cannot exceed 1M, otherwise the product search pipeline
will refuse to work for that ProductSet.
repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;
Returns
getProductLabelsList()
public List<Product.KeyValue> getProductLabelsList()
Key-value pairs that can be attached to a product. At query time,
constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. "1199". Only
strings with integer values can match a range-based restriction which is
to be supported soon.
Multiple values can be assigned to the same key. One product may have up to
500 product_labels.
Notice that the total number of distinct product_labels over all products
in one ProductSet cannot exceed 1M, otherwise the product search pipeline
will refuse to work for that ProductSet.
repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;
Returns
getProductLabelsOrBuilder(int index)
public Product.KeyValueOrBuilder getProductLabelsOrBuilder(int index)
Key-value pairs that can be attached to a product. At query time,
constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. "1199". Only
strings with integer values can match a range-based restriction which is
to be supported soon.
Multiple values can be assigned to the same key. One product may have up to
500 product_labels.
Notice that the total number of distinct product_labels over all products
in one ProductSet cannot exceed 1M, otherwise the product search pipeline
will refuse to work for that ProductSet.
repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;
Parameter
Returns
getProductLabelsOrBuilderList()
public List<? extends Product.KeyValueOrBuilder> getProductLabelsOrBuilderList()
Key-value pairs that can be attached to a product. At query time,
constraints can be specified based on the product_labels.
Note that integer values can be provided as strings, e.g. "1199". Only
strings with integer values can match a range-based restriction which is
to be supported soon.
Multiple values can be assigned to the same key. One product may have up to
500 product_labels.
Notice that the total number of distinct product_labels over all products
in one ProductSet cannot exceed 1M, otherwise the product search pipeline
will refuse to work for that ProductSet.
repeated .google.cloud.vision.v1.Product.KeyValue product_labels = 5;
Returns
Type | Description |
List<? extends com.google.cloud.vision.v1.Product.KeyValueOrBuilder> | |
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Product.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Product.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Product.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions