Retail v2 API - Class ProductServiceClientImpl (2.12.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
Name Description
grpcClient ProductServiceProductServiceClient

The underlying gRPC client.

settings ProductServiceSettings

The base ProductServiceSettings used within this client.

logger ILogger

Optional ILogger to use within this client.

Properties

AddFulfillmentPlacesOperationsClient

public override OperationsClient AddFulfillmentPlacesOperationsClient { get; }

The long-running operations client for AddFulfillmentPlaces.

Property Value
Type Description
OperationsClient
Overrides

AddLocalInventoriesOperationsClient

public override OperationsClient AddLocalInventoriesOperationsClient { get; }

The long-running operations client for AddLocalInventories.

Property Value
Type Description
OperationsClient
Overrides

GrpcClient

public override ProductService.ProductServiceClient GrpcClient { get; }

The underlying gRPC ProductService client

Property Value
Type Description
ProductServiceProductServiceClient
Overrides

ImportProductsOperationsClient

public override OperationsClient ImportProductsOperationsClient { get; }

The long-running operations client for ImportProducts.

Property Value
Type Description
OperationsClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient
Overrides

PurgeProductsOperationsClient

public override OperationsClient PurgeProductsOperationsClient { get; }

The long-running operations client for PurgeProducts.

Property Value
Type Description
OperationsClient
Overrides

RemoveFulfillmentPlacesOperationsClient

public override OperationsClient RemoveFulfillmentPlacesOperationsClient { get; }

The long-running operations client for RemoveFulfillmentPlaces.

Property Value
Type Description
OperationsClient
Overrides

RemoveLocalInventoriesOperationsClient

public override OperationsClient RemoveLocalInventoriesOperationsClient { get; }

The long-running operations client for RemoveLocalInventories.

Property Value
Type Description
OperationsClient
Overrides

SetInventoryOperationsClient

public override OperationsClient SetInventoryOperationsClient { get; }

The long-running operations client for SetInventory.

Property Value
Type Description
OperationsClient
Overrides

Methods

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of the [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] method. [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
Name Description
request AddFulfillmentPlacesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationAddFulfillmentPlacesResponseAddFulfillmentPlacesMetadata

The RPC response.

Overrides

AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the [ProductService.AddLocalInventories][google.cloud.retail.v2.ProductService.AddLocalInventories] method instead of the [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2.ProductService.AddFulfillmentPlaces] method. [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
Name Description
request AddFulfillmentPlacesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request AddLocalInventoriesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request AddLocalInventoriesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request CreateProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request CreateProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request DeleteProductRequest

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

callSettings CallSettings

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
Name Description
request DeleteProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request GetProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ImportProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ImportProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ListProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request ListProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
PagedAsyncEnumerableListProductsResponseProduct

A pageable asynchronous sequence of Product resources.

Overrides

PurgeProducts(PurgeProductsRequest, CallSettings)

public override Operation<PurgeProductsResponse, PurgeProductsMetadata> PurgeProducts(PurgeProductsRequest request, CallSettings callSettings = null)

Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s 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 [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. Before the operation completes, some [Product][google.cloud.retail.v2.Product]s may still be returned by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that would be deleted, set [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false.

Parameters
Name Description
request PurgeProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationPurgeProductsResponsePurgeProductsMetadata

The RPC response.

Overrides

PurgeProductsAsync(PurgeProductsRequest, CallSettings)

public override Task<Operation<PurgeProductsResponse, PurgeProductsMetadata>> PurgeProductsAsync(PurgeProductsRequest request, CallSettings callSettings = null)

Permanently deletes all selected [Product][google.cloud.retail.v2.Product]s 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 [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. Before the operation completes, some [Product][google.cloud.retail.v2.Product]s may still be returned by [ProductService.GetProduct][google.cloud.retail.v2.ProductService.GetProduct] or [ProductService.ListProducts][google.cloud.retail.v2.ProductService.ListProducts].

Depending on the number of [Product][google.cloud.retail.v2.Product]s, this operation could take hours to complete. To get a sample of [Product][google.cloud.retail.v2.Product]s that would be deleted, set [PurgeProductsRequest.force][google.cloud.retail.v2.PurgeProductsRequest.force] to false.

Parameters
Name Description
request PurgeProductsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationPurgeProductsResponsePurgeProductsMetadata

A Task containing the RPC response.

Overrides

RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of the [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] method. [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
Name Description
request RemoveFulfillmentPlacesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationRemoveFulfillmentPlacesResponseRemoveFulfillmentPlacesMetadata

The RPC response.

Overrides

RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the [ProductService.RemoveLocalInventories][google.cloud.retail.v2.ProductService.RemoveLocalInventories] method instead of the [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces] method. [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
Name Description
request RemoveFulfillmentPlacesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request RemoveLocalInventoriesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request RemoveLocalInventoriesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request SetInventoryRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request SetInventoryRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UpdateProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
request UpdateProductRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskProduct

A Task containing the RPC response.

Overrides