Package com.google.cloud.vision.v1
Class Product.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Product.Builder>
com.google.cloud.vision.v1.Product.Builder
- All Implemented Interfaces:
ProductOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Product
public static final class Product.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Product.Builder>
implements ProductOrBuilder
A Product contains ReferenceImages.Protobuf type
google.cloud.vision.v1.Product-
Method Summary
Modifier and TypeMethodDescriptionaddAllProductLabels(Iterable<? extends Product.KeyValue> values) Key-value pairs that can be attached to a product.addProductLabels(int index, Product.KeyValue value) Key-value pairs that can be attached to a product.addProductLabels(int index, Product.KeyValue.Builder builderForValue) Key-value pairs that can be attached to a product.addProductLabels(Product.KeyValue value) Key-value pairs that can be attached to a product.addProductLabels(Product.KeyValue.Builder builderForValue) Key-value pairs that can be attached to a product.Key-value pairs that can be attached to a product.addProductLabelsBuilder(int index) Key-value pairs that can be attached to a product.build()clear()User-provided metadata to be stored with this product.The user-provided name for this Product.The resource name of the product.Immutable.Key-value pairs that can be attached to a product.User-provided metadata to be stored with this product.com.google.protobuf.ByteStringUser-provided metadata to be stored with this product.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe user-provided name for this Product.com.google.protobuf.ByteStringThe user-provided name for this Product.getName()The resource name of the product.com.google.protobuf.ByteStringThe resource name of the product.Immutable.com.google.protobuf.ByteStringImmutable.getProductLabels(int index) Key-value pairs that can be attached to a product.getProductLabelsBuilder(int index) Key-value pairs that can be attached to a product.Key-value pairs that can be attached to a product.intKey-value pairs that can be attached to a product.Key-value pairs that can be attached to a product.getProductLabelsOrBuilder(int index) Key-value pairs that can be attached to a product.List<? extends Product.KeyValueOrBuilder>Key-value pairs that can be attached to a product.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeProductLabels(int index) Key-value pairs that can be attached to a product.setDescription(String value) User-provided metadata to be stored with this product.setDescriptionBytes(com.google.protobuf.ByteString value) User-provided metadata to be stored with this product.setDisplayName(String value) The user-provided name for this Product.setDisplayNameBytes(com.google.protobuf.ByteString value) The user-provided name for this Product.The resource name of the product.setNameBytes(com.google.protobuf.ByteString value) The resource name of the product.setProductCategory(String value) Immutable.setProductCategoryBytes(com.google.protobuf.ByteString value) Immutable.setProductLabels(int index, Product.KeyValue value) Key-value pairs that can be attached to a product.setProductLabels(int index, Product.KeyValue.Builder builderForValue) Key-value pairs that can be attached to a product.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Product.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Product.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Product.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Product.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Product.Builder>
-
mergeFrom
public Product.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Product.Builder>- Throws:
IOException
-
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;- Specified by:
getNamein interfaceProductOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.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;- Specified by:
getNameBytesin interfaceProductOrBuilder- Returns:
- The bytes for name.
-
setName
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;- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
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:
- This builder for chaining.
-
setNameBytes
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;- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getDisplayName
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
string display_name = 2;- Specified by:
getDisplayNamein interfaceProductOrBuilder- Returns:
- The displayName.
-
getDisplayNameBytes
public com.google.protobuf.ByteString getDisplayNameBytes()The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
string display_name = 2;- Specified by:
getDisplayNameBytesin interfaceProductOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
string display_name = 2;- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
string display_name = 2;- Returns:
- This builder for chaining.
-
setDisplayNameBytes
The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.
string display_name = 2;- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
getDescription
User-provided metadata to be stored with this product. Must be at most 4096 characters long.
string description = 3;- Specified by:
getDescriptionin interfaceProductOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()User-provided metadata to be stored with this product. Must be at most 4096 characters long.
string description = 3;- Specified by:
getDescriptionBytesin interfaceProductOrBuilder- Returns:
- The bytes for description.
-
setDescription
User-provided metadata to be stored with this product. Must be at most 4096 characters long.
string description = 3;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
User-provided metadata to be stored with this product. Must be at most 4096 characters long.
string description = 3;- Returns:
- This builder for chaining.
-
setDescriptionBytes
User-provided metadata to be stored with this product. Must be at most 4096 characters long.
string description = 3;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
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];- Specified by:
getProductCategoryin interfaceProductOrBuilder- Returns:
- The productCategory.
-
getProductCategoryBytes
public com.google.protobuf.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];- Specified by:
getProductCategoryBytesin interfaceProductOrBuilder- Returns:
- The bytes for productCategory.
-
setProductCategory
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];- Parameters:
value- The productCategory to set.- Returns:
- This builder for chaining.
-
clearProductCategory
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:
- This builder for chaining.
-
setProductCategoryBytes
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];- Parameters:
value- The bytes for productCategory to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getProductLabelsListin interfaceProductOrBuilder
-
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;- Specified by:
getProductLabelsCountin interfaceProductOrBuilder
-
getProductLabels
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;- Specified by:
getProductLabelsin interfaceProductOrBuilder
-
setProductLabels
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; -
setProductLabels
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; -
addProductLabels
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; -
addProductLabels
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; -
addProductLabels
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; -
addProductLabels
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; -
addAllProductLabels
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; -
clearProductLabels
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; -
removeProductLabels
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; -
getProductLabelsBuilder
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; -
getProductLabelsOrBuilder
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;- Specified by:
getProductLabelsOrBuilderin interfaceProductOrBuilder
-
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;- Specified by:
getProductLabelsOrBuilderListin interfaceProductOrBuilder
-
addProductLabelsBuilder
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; -
addProductLabelsBuilder
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; -
getProductLabelsBuilderList
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;
-