public static final class ProductSearchParams.Builder extends GeneratedMessageV3.Builder<ProductSearchParams.Builder> implements ProductSearchParamsOrBuilder
Parameters for a product search request.Protobuf type
google.cloud.vision.v1p4beta1.ProductSearchParams
Modifier and Type | Method and Description |
---|---|
ProductSearchParams.Builder |
addAllProductCategories(Iterable<String> values)
The list of product categories to search in.
|
ProductSearchParams.Builder |
addProductCategories(String value)
The list of product categories to search in.
|
ProductSearchParams.Builder |
addProductCategoriesBytes(ByteString value)
The list of product categories to search in.
|
ProductSearchParams.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value) |
ProductSearchParams |
build() |
ProductSearchParams |
buildPartial() |
ProductSearchParams.Builder |
clear() |
ProductSearchParams.Builder |
clearBoundingPoly()
The bounding polygon around the area of interest in the image.
|
ProductSearchParams.Builder |
clearField(Descriptors.FieldDescriptor field) |
ProductSearchParams.Builder |
clearFilter()
The filtering expression.
|
ProductSearchParams.Builder |
clearOneof(Descriptors.OneofDescriptor oneof) |
ProductSearchParams.Builder |
clearProductCategories()
The list of product categories to search in.
|
ProductSearchParams.Builder |
clearProductSet()
The resource name of a
[ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
similar images.
|
ProductSearchParams.Builder |
clone() |
BoundingPoly |
getBoundingPoly()
The bounding polygon around the area of interest in the image.
|
BoundingPoly.Builder |
getBoundingPolyBuilder()
The bounding polygon around the area of interest in the image.
|
BoundingPolyOrBuilder |
getBoundingPolyOrBuilder()
The bounding polygon around the area of interest in the image.
|
ProductSearchParams |
getDefaultInstanceForType() |
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType() |
String |
getFilter()
The filtering expression.
|
ByteString |
getFilterBytes()
The filtering expression.
|
String |
getProductCategories(int index)
The list of product categories to search in.
|
ByteString |
getProductCategoriesBytes(int index)
The list of product categories to search in.
|
int |
getProductCategoriesCount()
The list of product categories to search in.
|
ProtocolStringList |
getProductCategoriesList()
The list of product categories to search in.
|
String |
getProductSet()
The resource name of a
[ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
similar images.
|
ByteString |
getProductSetBytes()
The resource name of a
[ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
similar images.
|
boolean |
hasBoundingPoly()
The bounding polygon around the area of interest in the image.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
ProductSearchParams.Builder |
mergeBoundingPoly(BoundingPoly value)
The bounding polygon around the area of interest in the image.
|
ProductSearchParams.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
ProductSearchParams.Builder |
mergeFrom(Message other) |
ProductSearchParams.Builder |
mergeFrom(ProductSearchParams other) |
ProductSearchParams.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields) |
ProductSearchParams.Builder |
setBoundingPoly(BoundingPoly.Builder builderForValue)
The bounding polygon around the area of interest in the image.
|
ProductSearchParams.Builder |
setBoundingPoly(BoundingPoly value)
The bounding polygon around the area of interest in the image.
|
ProductSearchParams.Builder |
setField(Descriptors.FieldDescriptor field,
Object value) |
ProductSearchParams.Builder |
setFilter(String value)
The filtering expression.
|
ProductSearchParams.Builder |
setFilterBytes(ByteString value)
The filtering expression.
|
ProductSearchParams.Builder |
setProductCategories(int index,
String value)
The list of product categories to search in.
|
ProductSearchParams.Builder |
setProductSet(String value)
The resource name of a
[ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
similar images.
|
ProductSearchParams.Builder |
setProductSetBytes(ByteString value)
The resource name of a
[ProductSet][google.cloud.vision.v1p4beta1.ProductSet] to be searched for
similar images.
|
ProductSearchParams.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value) |
ProductSearchParams.Builder |
setUnknownFields(UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder clear()
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public Descriptors.Descriptor getDescriptorForType()
getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams getDefaultInstanceForType()
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public ProductSearchParams build()
build
in interface Message.Builder
build
in interface MessageLite.Builder
public ProductSearchParams buildPartial()
buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public ProductSearchParams.Builder clone()
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder setField(Descriptors.FieldDescriptor field, Object value)
setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder clearField(Descriptors.FieldDescriptor field)
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder clearOneof(Descriptors.OneofDescriptor oneof)
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder mergeFrom(Message other)
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder mergeFrom(ProductSearchParams other)
public final boolean isInitialized()
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public ProductSearchParams.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<ProductSearchParams.Builder>
IOException
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.v1p4beta1.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.v1p4beta1.BoundingPoly bounding_poly = 9;
getBoundingPoly
in interface ProductSearchParamsOrBuilder
public ProductSearchParams.Builder setBoundingPoly(BoundingPoly value)
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;
public ProductSearchParams.Builder setBoundingPoly(BoundingPoly.Builder builderForValue)
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;
public ProductSearchParams.Builder mergeBoundingPoly(BoundingPoly value)
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;
public ProductSearchParams.Builder clearBoundingPoly()
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;
public BoundingPoly.Builder getBoundingPolyBuilder()
The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.
.google.cloud.vision.v1p4beta1.BoundingPoly bounding_poly = 9;
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.v1p4beta1.BoundingPoly bounding_poly = 9;
getBoundingPolyOrBuilder
in interface ProductSearchParamsOrBuilder
public String getProductSet()
The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.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.v1p4beta1.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 ProductSearchParams.Builder setProductSet(String value)
The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.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) = { ... }
value
- The productSet to set.public ProductSearchParams.Builder clearProductSet()
The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.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) = { ... }
public ProductSearchParams.Builder setProductSetBytes(ByteString value)
The resource name of a [ProductSet][google.cloud.vision.v1p4beta1.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) = { ... }
value
- The bytes for productSet to set.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 ProductSearchParams.Builder setProductCategories(int index, String value)
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;
index
- The index to set the value at.value
- The productCategories to set.public ProductSearchParams.Builder addProductCategories(String value)
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;
value
- The productCategories to add.public ProductSearchParams.Builder addAllProductCategories(Iterable<String> values)
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;
values
- The productCategories to add.public ProductSearchParams.Builder clearProductCategories()
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;
public ProductSearchParams.Builder addProductCategoriesBytes(ByteString value)
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;
value
- The bytes of the productCategories to add.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 ProductSearchParams.Builder setFilter(String value)
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;
value
- The filter to set.public ProductSearchParams.Builder clearFilter()
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;
public ProductSearchParams.Builder setFilterBytes(ByteString value)
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;
value
- The bytes for filter to set.public final ProductSearchParams.Builder setUnknownFields(UnknownFieldSet unknownFields)
setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
public final ProductSearchParams.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<ProductSearchParams.Builder>
Copyright © 2022 Google LLC. All rights reserved.