Retail v2 API - Class ProductServiceClientImpl (2.8.0)

public sealed class ProductServiceClientImpl : ProductServiceClient

Reference documentation and code samples for the Retail v2 API class ProductServiceClientImpl.

ProductService client wrapper implementation, for convenient use.

Inheritance

object > ProductServiceClient > ProductServiceClientImpl

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

Service for ingesting [Product][google.cloud.retail.v2.Product] information of the customer's website.

Constructors

ProductServiceClientImpl(ProductServiceClient, ProductServiceSettings, ILogger)

public ProductServiceClientImpl(ProductService.ProductServiceClient grpcClient, ProductServiceSettings settings, ILogger logger)

Constructs a client wrapper for the ProductService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientProductServiceProductServiceClient

The underlying gRPC client.

settingsProductServiceSettings

The base ProductServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

AddFulfillmentPlacesOperationsClient

public override OperationsClient AddFulfillmentPlacesOperationsClient { get; }

The long-running operations client for AddFulfillmentPlaces.

Property Value
TypeDescription
OperationsClient
Overrides

AddLocalInventoriesOperationsClient

public override OperationsClient AddLocalInventoriesOperationsClient { get; }

The long-running operations client for AddLocalInventories.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override ProductService.ProductServiceClient GrpcClient { get; }

The underlying gRPC ProductService client

Property Value
TypeDescription
ProductServiceProductServiceClient
Overrides

ImportProductsOperationsClient

public override OperationsClient ImportProductsOperationsClient { get; }

The long-running operations client for ImportProducts.

Property Value
TypeDescription
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

RemoveFulfillmentPlacesOperationsClient

public override OperationsClient RemoveFulfillmentPlacesOperationsClient { get; }

The long-running operations client for RemoveFulfillmentPlaces.

Property Value
TypeDescription
OperationsClient
Overrides

RemoveLocalInventoriesOperationsClient

public override OperationsClient RemoveLocalInventoriesOperationsClient { get; }

The long-running operations client for RemoveLocalInventories.

Property Value
TypeDescription
OperationsClient
Overrides

SetInventoryOperationsClient

public override OperationsClient SetInventoryOperationsClient { get; }

The long-running operations client for SetInventory.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, CallSettings)

public override Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> AddFulfillmentPlaces(AddFulfillmentPlacesRequest request, CallSettings callSettings = null)

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data.

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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAddFulfillmentPlacesResponseAddFulfillmentPlacesMetadata

The RPC response.

Overrides

AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, CallSettings)

public override Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request, CallSettings callSettings = null)

It is recommended to use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces]. [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data.

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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAddFulfillmentPlacesResponseAddFulfillmentPlacesMetadata

A Task containing the RPC response.

Overrides

AddLocalInventories(AddLocalInventoriesRequest, CallSettings)

public override Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> AddLocalInventories(AddLocalInventoriesRequest request, CallSettings callSettings = null)

Updates local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories.

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestAddLocalInventoriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAddLocalInventoriesResponseAddLocalInventoriesMetadata

The RPC response.

Overrides

AddLocalInventoriesAsync(AddLocalInventoriesRequest, CallSettings)

public override Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(AddLocalInventoriesRequest request, CallSettings callSettings = null)

Updates local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Local inventory information can only be modified using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories.

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestAddLocalInventoriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAddLocalInventoriesResponseAddLocalInventoriesMetadata

A Task containing the RPC response.

Overrides

CreateProduct(CreateProductRequest, CallSettings)

public override Product CreateProduct(CreateProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

Overrides

CreateProductAsync(CreateProductRequest, CallSettings)

public override Task<Product> CreateProductAsync(CreateProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestCreateProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskProduct

A Task containing the RPC response.

Overrides

DeleteProduct(DeleteProductRequest, CallSettings)

public override void DeleteProduct(DeleteProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteProductAsync(DeleteProductRequest, CallSettings)

public override Task DeleteProductAsync(DeleteProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestDeleteProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

GetProduct(GetProductRequest, CallSettings)

public override Product GetProduct(GetProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

Overrides

GetProductAsync(GetProductRequest, CallSettings)

public override Task<Product> GetProductAsync(GetProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestGetProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskProduct

A Task containing the RPC response.

Overrides

ImportProducts(ImportProductsRequest, CallSettings)

public override Operation<ImportProductsResponse, ImportMetadata> ImportProducts(ImportProductsRequest request, CallSettings callSettings = null)

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

Request processing may be synchronous. 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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationImportProductsResponseImportMetadata

The RPC response.

Overrides

ImportProductsAsync(ImportProductsRequest, CallSettings)

public override Task<Operation<ImportProductsResponse, ImportMetadata>> ImportProductsAsync(ImportProductsRequest request, CallSettings callSettings = null)

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

Request processing may be synchronous. 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 object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationImportProductsResponseImportMetadata

A Task containing the RPC response.

Overrides

ListProducts(ListProductsRequest, CallSettings)

public override PagedEnumerable<ListProductsResponse, Product> ListProducts(ListProductsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListProductsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListProductsResponseProduct

A pageable sequence of Product resources.

Overrides

ListProductsAsync(ListProductsRequest, CallSettings)

public override PagedAsyncEnumerable<ListProductsResponse, Product> ListProductsAsync(ListProductsRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestListProductsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListProductsResponseProduct

A pageable asynchronous sequence of Product resources.

Overrides

RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, CallSettings)

public override Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, CallSettings callSettings = null)

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data.

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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRemoveFulfillmentPlacesResponseRemoveFulfillmentPlacesMetadata

The RPC response.

Overrides

RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, CallSettings)

public override Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request, CallSettings callSettings = null)

It is recommended to use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces]. [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] achieves the same results but provides more fine-grained control over ingesting local inventory data.

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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRemoveFulfillmentPlacesResponseRemoveFulfillmentPlacesMetadata

A Task containing the RPC response.

Overrides

RemoveLocalInventories(RemoveLocalInventoriesRequest, CallSettings)

public override Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> RemoveLocalInventories(RemoveLocalInventoriesRequest request, CallSettings callSettings = null)

Remove local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories.

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRemoveLocalInventoriesResponseRemoveLocalInventoriesMetadata

The RPC response.

Overrides

RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest, CallSettings)

public override Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest request, CallSettings callSettings = null)

Remove local inventory information for a [Product][google.cloud.retail.v2.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][google.cloud.retail.v2.Product] queried by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Local inventory information can only be removed using this method. [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.ProductService.UpdateProduct] has no effect on local inventories.

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates will not be marked as [done][google.longrunning.Operation.done] until being obsolete.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRemoveLocalInventoriesResponseRemoveLocalInventoriesMetadata

A Task containing the RPC response.

Overrides

SetInventory(SetInventoryRequest, CallSettings)

public override Operation<SetInventoryResponse, SetInventoryMetadata> SetInventory(SetInventoryRequest request, CallSettings callSettings = null)

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 is 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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.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][google.cloud.retail.v2.ProductService.CreateProduct] or [ProductService.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 is used.

If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], then any existing inventory information is preserved.

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

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete.

Parameters
NameDescription
requestSetInventoryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSetInventoryResponseSetInventoryMetadata

The RPC response.

Overrides

SetInventoryAsync(SetInventoryRequest, CallSettings)

public override Task<Operation<SetInventoryResponse, SetInventoryMetadata>> SetInventoryAsync(SetInventoryRequest request, CallSettings callSettings = null)

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 is 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 [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

When inventory is updated with [ProductService.CreateProduct][google.cloud.retail.v2.ProductService.CreateProduct] and [ProductService.UpdateProduct][google.cloud.retail.v2.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][google.cloud.retail.v2.ProductService.CreateProduct] or [ProductService.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 is used.

If no inventory fields are set in [SetInventoryRequest.set_mask][google.cloud.retail.v2.SetInventoryRequest.set_mask], then any existing inventory information is preserved.

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

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the [GetOperation][google.longrunning.Operations.GetOperation] API returns NOT_FOUND afterwards.

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated with the stale updates are not marked as [done][google.longrunning.Operation.done] until they are obsolete.

Parameters
NameDescription
requestSetInventoryRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSetInventoryResponseSetInventoryMetadata

A Task containing the RPC response.

Overrides

UpdateProduct(UpdateProductRequest, CallSettings)

public override Product UpdateProduct(UpdateProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

Overrides

UpdateProductAsync(UpdateProductRequest, CallSettings)

public override Task<Product> UpdateProductAsync(UpdateProductRequest request, CallSettings callSettings = null)

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

Parameters
NameDescription
requestUpdateProductRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskProduct

A Task containing the RPC response.

Overrides