public static final class ProductSearchGrpc.ProductSearchFutureStub extends AbstractFutureStub<ProductSearchGrpc.ProductSearchFutureStub>
Manages Products and ProductSets of reference images for use in product
search. It uses the following resource model:
- The API has a collection of
ProductSet resources, named
projects/*/locations/*/productSets/*
, which acts as a way to put different
products into groups to limit identification.
In parallel,
- The API has a collection of
Product resources, named
projects/*/locations/*/products/*
- Each Product has a collection of
ReferenceImage resources,
named
projects/*/locations/*/products/*/referenceImages/*
Inheritance
java.lang.Object >
io.grpc.stub.AbstractStub >
io.grpc.stub.AbstractFutureStub >
ProductSearchGrpc.ProductSearchFutureStub
Inherited Members
io.grpc.stub.AbstractFutureStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel)
io.grpc.stub.AbstractFutureStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.<T>withOption(io.grpc.CallOptions.Key<T>,T)
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.getCallOptions()
io.grpc.stub.AbstractStub.getChannel()
io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials)
io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel)
io.grpc.stub.AbstractStub.withCompression(java.lang.String)
io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline)
io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit)
io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor)
io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...)
io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int)
io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int)
io.grpc.stub.AbstractStub.withWaitForReady()
Methods
addProductToProductSet(AddProductToProductSetRequest request)
public ListenableFuture<Empty> addProductToProductSet(AddProductToProductSetRequest request)
Adds a Product to the specified ProductSet. If the Product is already
present, no change is made.
One Product can be added to at most 100 ProductSets.
Possible errors:
- Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Empty> | |
build(Channel channel, CallOptions callOptions)
protected ProductSearchGrpc.ProductSearchFutureStub build(Channel channel, CallOptions callOptions)
Parameters
Name | Description |
channel | io.grpc.Channel
|
callOptions | io.grpc.CallOptions
|
Returns
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
createProduct(CreateProductRequest request)
public ListenableFuture<Product> createProduct(CreateProductRequest request)
Creates and returns a new product resource.
Possible errors:
- Returns INVALID_ARGUMENT if display_name is missing or longer than 4096
characters.
- Returns INVALID_ARGUMENT if description is longer than 4096 characters.
- Returns INVALID_ARGUMENT if product_category is missing or invalid.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Product> | |
createProductSet(CreateProductSetRequest request)
public ListenableFuture<ProductSet> createProductSet(CreateProductSetRequest request)
Creates and returns a new ProductSet resource.
Possible errors:
- Returns INVALID_ARGUMENT if display_name is missing, or is longer than
4096 characters.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<ProductSet> | |
createReferenceImage(CreateReferenceImageRequest request)
public ListenableFuture<ReferenceImage> createReferenceImage(CreateReferenceImageRequest request)
Creates and returns a new ReferenceImage resource.
The bounding_poly
field is optional. If bounding_poly
is not specified,
the system will try to detect regions of interest in the image that are
compatible with the product_category on the parent product. If it is
specified, detection is ALWAYS skipped. The system converts polygons into
non-rotated rectangles.
Note that the pipeline will resize the image if the image resolution is too
large to process (above 50MP).
Possible errors:
- Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096
characters.
- Returns INVALID_ARGUMENT if the product does not exist.
- Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing
compatible with the parent product's product_category is detected.
- Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<ReferenceImage> | |
deleteProduct(DeleteProductRequest request)
public ListenableFuture<Empty> deleteProduct(DeleteProductRequest request)
Permanently deletes a product and its reference images.
Metadata of the product and all its images will be deleted right away, but
search queries against ProductSets containing the product may still work
until all related caches are refreshed.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Empty> | |
deleteProductSet(DeleteProductSetRequest request)
public ListenableFuture<Empty> deleteProductSet(DeleteProductSetRequest request)
Permanently deletes a ProductSet. Products and ReferenceImages in the
ProductSet are not deleted.
The actual image files are not deleted from Google Cloud Storage.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Empty> | |
deleteReferenceImage(DeleteReferenceImageRequest request)
public ListenableFuture<Empty> deleteReferenceImage(DeleteReferenceImageRequest request)
Permanently deletes a reference image.
The image metadata will be deleted right away, but search queries
against ProductSets containing the image may still work until all related
caches are refreshed.
The actual image files are not deleted from Google Cloud Storage.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Empty> | |
getProduct(GetProductRequest request)
public ListenableFuture<Product> getProduct(GetProductRequest request)
Gets information associated with a Product.
Possible errors:
- Returns NOT_FOUND if the Product does not exist.
Parameter
Returns
Type | Description |
com.google.common.util.concurrent.ListenableFuture<Product> | |
getProductSet(GetProductSetRequest request)