Class ProductServiceGrpc.ProductServiceImplBase (2.11.0)

public abstract static class ProductServiceGrpc.ProductServiceImplBase implements BindableService

Service for ingesting Product information of the customer's website.

Inheritance

java.lang.Object > ProductServiceGrpc.ProductServiceImplBase

Implements

io.grpc.BindableService

Constructors

ProductServiceImplBase()

public ProductServiceImplBase()

Methods

addFulfillmentPlaces(AddFulfillmentPlacesRequest request, StreamObserver<Operation> responseObserver)

public void addFulfillmentPlaces(AddFulfillmentPlacesRequest request, StreamObserver<Operation> responseObserver)

Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

addLocalInventories(AddLocalInventoriesRequest request, StreamObserver<Operation> responseObserver)

public void addLocalInventories(AddLocalInventoriesRequest request, StreamObserver<Operation> responseObserver)

Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddLocalInventoriesRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

bindService()

public final ServerServiceDefinition bindService()
Returns
TypeDescription
io.grpc.ServerServiceDefinition

createProduct(CreateProductRequest request, StreamObserver<Product> responseObserver)

public void createProduct(CreateProductRequest request, StreamObserver<Product> responseObserver)

Creates a Product.

Parameters
NameDescription
requestCreateProductRequest
responseObserverio.grpc.stub.StreamObserver<Product>

deleteProduct(DeleteProductRequest request, StreamObserver<Empty> responseObserver)

public void deleteProduct(DeleteProductRequest request, StreamObserver<Empty> responseObserver)

Deletes a Product.

Parameters
NameDescription
requestDeleteProductRequest
responseObserverio.grpc.stub.StreamObserver<Empty>

getProduct(GetProductRequest request, StreamObserver<Product> responseObserver)

public void getProduct(GetProductRequest request, StreamObserver<Product> responseObserver)

Gets a Product.

Parameters
NameDescription
requestGetProductRequest
responseObserverio.grpc.stub.StreamObserver<Product>

importProducts(ImportProductsRequest request, StreamObserver<Operation> responseObserver)

public void importProducts(ImportProductsRequest request, StreamObserver<Operation> responseObserver)

Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.

Parameters
NameDescription
requestImportProductsRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

listProducts(ListProductsRequest request, StreamObserver<ListProductsResponse> responseObserver)

public void listProducts(ListProductsRequest request, StreamObserver<ListProductsResponse> responseObserver)

Gets a list of Products.

Parameters
NameDescription
requestListProductsRequest
responseObserverio.grpc.stub.StreamObserver<ListProductsResponse>

purgeProducts(PurgeProductsRequest request, StreamObserver<Operation> responseObserver)

public void purgeProducts(PurgeProductsRequest request, StreamObserver<Operation> responseObserver)

Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.

Parameters
NameDescription
requestPurgeProductsRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

removeFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, StreamObserver<Operation> responseObserver)

public void removeFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, StreamObserver<Operation> responseObserver)

Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

removeLocalInventories(RemoveLocalInventoriesRequest request, StreamObserver<Operation> responseObserver)

public void removeLocalInventories(RemoveLocalInventoriesRequest request, StreamObserver<Operation> responseObserver)

Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

setInventory(SetInventoryRequest request, StreamObserver<Operation> responseObserver)

public void setInventory(SetInventoryRequest request, StreamObserver<Operation> responseObserver)

Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete after one day, and the GetOperation API returns NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestSetInventoryRequest
responseObserverio.grpc.stub.StreamObserver<Operation>

updateProduct(UpdateProductRequest request, StreamObserver<Product> responseObserver)

public void updateProduct(UpdateProductRequest request, StreamObserver<Product> responseObserver)

Updates a Product.

Parameters
NameDescription
requestUpdateProductRequest
responseObserverio.grpc.stub.StreamObserver<Product>