Class ProductService.ProductServiceBase (1.5.0)

[BindServiceMethod(typeof(ProductService), "BindService")]
public abstract class ProductServiceBase

Base class for server-side implementations of ProductService

Inheritance

Object > ProductService.ProductServiceBase

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Methods

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, ServerCallContext)

public virtual Task<Operation> AddFulfillmentPlaces(AddFulfillmentPlacesRequest request, ServerCallContext context)

Incrementally adds place IDs to [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Operation>

The response to send back to the client (wrapped by a task).

CreateProduct(CreateProductRequest, ServerCallContext)

public virtual Task<Product> CreateProduct(CreateProductRequest request, ServerCallContext context)

Creates a [Product][google.cloud.retail.v2.Product].

Parameters
NameDescription
requestCreateProductRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Product>

The response to send back to the client (wrapped by a task).

DeleteProduct(DeleteProductRequest, ServerCallContext)

public virtual Task<Empty> DeleteProduct(DeleteProductRequest request, ServerCallContext context)

Deletes a [Product][google.cloud.retail.v2.Product].

Parameters
NameDescription
requestDeleteProductRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Empty>

The response to send back to the client (wrapped by a task).

GetProduct(GetProductRequest, ServerCallContext)

public virtual Task<Product> GetProduct(GetProductRequest request, ServerCallContext context)

Gets a [Product][google.cloud.retail.v2.Product].

Parameters
NameDescription
requestGetProductRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Product>

The response to send back to the client (wrapped by a task).

ImportProducts(ImportProductsRequest, ServerCallContext)

public virtual Task<Operation> ImportProducts(ImportProductsRequest request, ServerCallContext context)

Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.

Request processing may be synchronous. No partial updating is supported. Non-existing items are created.

Note that it is possible for a subset of the [Product][google.cloud.retail.v2.Product]s to be successfully updated.

Parameters
NameDescription
requestImportProductsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Operation>

The response to send back to the client (wrapped by a task).

ListProducts(ListProductsRequest, ServerCallContext)

public virtual Task<ListProductsResponse> ListProducts(ListProductsRequest request, ServerCallContext context)

Gets a list of [Product][google.cloud.retail.v2.Product]s.

Parameters
NameDescription
requestListProductsRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<ListProductsResponse>

The response to send back to the client (wrapped by a task).

RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, ServerCallContext)

public virtual Task<Operation> RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, ServerCallContext context)

Incrementally removes place IDs from a [Product.fulfillment_info.place_ids][google.cloud.retail.v2.FulfillmentInfo.place_ids].

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Operation>

The response to send back to the client (wrapped by a task).

SetInventory(SetInventoryRequest, ServerCallContext)

public virtual Task<Operation> SetInventory(SetInventoryRequest request, ServerCallContext context)

Updates inventory information for a [Product][google.cloud.retail.v2.Product] while respecting the last update timestamps of each inventory field.

This process is asynchronous and does not require the [Product][google.cloud.retail.v2.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, updates are not immediately manifested in the [Product][google.cloud.retail.v2.Product] queried by [GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

When inventory is updated with [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct], the specified inventory field value(s) will overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update time for the specified inventory fields will be overwritten to the time of the [CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] or [UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] request.

If no inventory fields are set in [CreateProductRequest.product][google.cloud.retail.v2.CreateProductRequest.product], then any pre-existing inventory information for this product will be used.

If no inventory fields are set in [UpdateProductRequest.set_mask][], then any existing inventory information will be preserved.

Pre-existing inventory information can only be updated with [SetInventory][google.cloud.retail.v2.ProductService.SetInventory], [AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces], and [RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces].

This feature is only available for users who have Retail Search enabled. Please submit a form here to contact cloud sales if you are interested in using Retail Search.

Parameters
NameDescription
requestSetInventoryRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Operation>

The response to send back to the client (wrapped by a task).

UpdateProduct(UpdateProductRequest, ServerCallContext)

public virtual Task<Product> UpdateProduct(UpdateProductRequest request, ServerCallContext context)

Updates a [Product][google.cloud.retail.v2.Product].

Parameters
NameDescription
requestUpdateProductRequest

The request received from the client.

contextServerCallContext

The context of the server-side call handler being invoked.

Returns
TypeDescription
Task<Product>

The response to send back to the client (wrapped by a task).