public sealed class ProductServiceClientImpl : ProductServiceClient
Reference documentation and code samples for the Retail v2 API class ProductServiceClientImpl.
ProductService client wrapper implementation, for convenient use.
Namespace
Google.Cloud.Retail.V2Assembly
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 |
AddLocalInventoriesOperationsClient
public override OperationsClient AddLocalInventoriesOperationsClient { get; }
The long-running operations client for AddLocalInventories
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public override ProductService.ProductServiceClient GrpcClient { get; }
The underlying gRPC ProductService client
Property Value | |
---|---|
Type | Description |
ProductServiceProductServiceClient |
ImportProductsOperationsClient
public override OperationsClient ImportProductsOperationsClient { get; }
The long-running operations client for ImportProducts
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
LocationsClient
public override LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
RemoveFulfillmentPlacesOperationsClient
public override OperationsClient RemoveFulfillmentPlacesOperationsClient { get; }
The long-running operations client for RemoveFulfillmentPlaces
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
RemoveLocalInventoriesOperationsClient
public override OperationsClient RemoveLocalInventoriesOperationsClient { get; }
The long-running operations client for RemoveLocalInventories
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
SetInventoryOperationsClient
public override OperationsClient SetInventoryOperationsClient { get; }
The long-running operations client for SetInventory
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
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 | |
---|---|
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. |
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 | |
---|---|
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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 | |
---|---|
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. |
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 | |
---|---|
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. |
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. |
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. |
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. |
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. |
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. |
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. |