Retail v2 API - Class ProductService.ProductServiceClient (2.12.0)

public class ProductService.ProductServiceClient : ClientBase<ProductService.ProductServiceClient>

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

Client for ProductService

Inheritance

object > ClientBase > ClientBaseProductServiceProductServiceClient > ProductService.ProductServiceClient

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Constructors

ProductServiceClient()

protected ProductServiceClient()

Protected parameterless constructor to allow creation of test doubles.

ProductServiceClient(CallInvoker)

public ProductServiceClient(CallInvoker callInvoker)

Creates a new client for ProductService that uses a custom CallInvoker.

Parameter
Name Description
callInvoker CallInvoker

The callInvoker to use to make remote calls.

ProductServiceClient(ChannelBase)

public ProductServiceClient(ChannelBase channel)

Creates a new client for ProductService

Parameter
Name Description
channel ChannelBase

The channel to use to make remote calls.

ProductServiceClient(ClientBaseConfiguration)

protected ProductServiceClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration

The client configuration.

Methods

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, CallOptions)

public virtual Operation AddFulfillmentPlaces(AddFulfillmentPlacesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation AddFulfillmentPlaces(AddFulfillmentPlacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

AddLocalInventories(AddLocalInventoriesRequest, CallOptions)

public virtual Operation AddLocalInventories(AddLocalInventoriesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

AddLocalInventories(AddLocalInventoriesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation AddLocalInventories(AddLocalInventoriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

AddLocalInventoriesAsync(AddLocalInventoriesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> AddLocalInventoriesAsync(AddLocalInventoriesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

AddLocalInventoriesAsync(AddLocalInventoriesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> AddLocalInventoriesAsync(AddLocalInventoriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

CreateLocationsClient()

public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of Locations.LocationsClient using the same call invoker as this client.

Returns
Type Description
LocationsLocationsClient

A new Locations.LocationsClient for the same target as this client.

CreateOperationsClient()

public virtual Operations.OperationsClient CreateOperationsClient()

Creates a new instance of Operations.OperationsClient using the same call invoker as this client.

Returns
Type Description
OperationsOperationsClient

A new Operations client for the same target as this client.

CreateProduct(CreateProductRequest, CallOptions)

public virtual Product CreateProduct(CreateProductRequest request, CallOptions options)

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

Parameters
Name Description
request CreateProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Product

The response received from the server.

CreateProduct(CreateProductRequest, Metadata, DateTime?, CancellationToken)

public virtual Product CreateProduct(CreateProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request CreateProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Product

The response received from the server.

CreateProductAsync(CreateProductRequest, CallOptions)

public virtual AsyncUnaryCall<Product> CreateProductAsync(CreateProductRequest request, CallOptions options)

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

Parameters
Name Description
request CreateProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.

CreateProductAsync(CreateProductRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Product> CreateProductAsync(CreateProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request CreateProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.

DeleteProduct(DeleteProductRequest, CallOptions)

public virtual Empty DeleteProduct(DeleteProductRequest request, CallOptions options)

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

Parameters
Name Description
request DeleteProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Empty

The response received from the server.

DeleteProduct(DeleteProductRequest, Metadata, DateTime?, CancellationToken)

public virtual Empty DeleteProduct(DeleteProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request DeleteProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Empty

The response received from the server.

DeleteProductAsync(DeleteProductRequest, CallOptions)

public virtual AsyncUnaryCall<Empty> DeleteProductAsync(DeleteProductRequest request, CallOptions options)

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

Parameters
Name Description
request DeleteProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

DeleteProductAsync(DeleteProductRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Empty> DeleteProductAsync(DeleteProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request DeleteProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallEmpty

The call object.

GetProduct(GetProductRequest, CallOptions)

public virtual Product GetProduct(GetProductRequest request, CallOptions options)

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

Parameters
Name Description
request GetProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Product

The response received from the server.

GetProduct(GetProductRequest, Metadata, DateTime?, CancellationToken)

public virtual Product GetProduct(GetProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Product

The response received from the server.

GetProductAsync(GetProductRequest, CallOptions)

public virtual AsyncUnaryCall<Product> GetProductAsync(GetProductRequest request, CallOptions options)

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

Parameters
Name Description
request GetProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.

GetProductAsync(GetProductRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Product> GetProductAsync(GetProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request GetProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.

ImportProducts(ImportProductsRequest, CallOptions)

public virtual Operation ImportProducts(ImportProductsRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

ImportProducts(ImportProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation ImportProducts(ImportProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

ImportProductsAsync(ImportProductsRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> ImportProductsAsync(ImportProductsRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

ImportProductsAsync(ImportProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> ImportProductsAsync(ImportProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

ListProducts(ListProductsRequest, CallOptions)

public virtual ListProductsResponse ListProducts(ListProductsRequest request, CallOptions options)

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

Parameters
Name Description
request ListProductsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
ListProductsResponse

The response received from the server.

ListProducts(ListProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual ListProductsResponse ListProducts(ListProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListProductsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
ListProductsResponse

The response received from the server.

ListProductsAsync(ListProductsRequest, CallOptions)

public virtual AsyncUnaryCall<ListProductsResponse> ListProductsAsync(ListProductsRequest request, CallOptions options)

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

Parameters
Name Description
request ListProductsRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallListProductsResponse

The call object.

ListProductsAsync(ListProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<ListProductsResponse> ListProductsAsync(ListProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request ListProductsRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallListProductsResponse

The call object.

NewInstance(ClientBaseConfiguration)

protected override ProductService.ProductServiceClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given ClientBaseConfiguration.

Parameter
Name Description
configuration ClientBaseClientBaseConfiguration
Returns
Type Description
ProductServiceProductServiceClient
Overrides
Grpc.Core.ClientBase<Google.Cloud.Retail.V2.ProductService.ProductServiceClient>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

PurgeProducts(PurgeProductsRequest, CallOptions)

public virtual Operation PurgeProducts(PurgeProductsRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

PurgeProducts(PurgeProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation PurgeProducts(PurgeProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

PurgeProductsAsync(PurgeProductsRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> PurgeProductsAsync(PurgeProductsRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

PurgeProductsAsync(PurgeProductsRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> PurgeProductsAsync(PurgeProductsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, CallOptions)

public virtual Operation RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

RemoveLocalInventories(RemoveLocalInventoriesRequest, CallOptions)

public virtual Operation RemoveLocalInventories(RemoveLocalInventoriesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

RemoveLocalInventories(RemoveLocalInventoriesRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation RemoveLocalInventories(RemoveLocalInventoriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

SetInventory(SetInventoryRequest, CallOptions)

public virtual Operation SetInventory(SetInventoryRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Operation

The response received from the server.

SetInventory(SetInventoryRequest, Metadata, DateTime?, CancellationToken)

public virtual Operation SetInventory(SetInventoryRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Operation

The response received from the server.

SetInventoryAsync(SetInventoryRequest, CallOptions)

public virtual AsyncUnaryCall<Operation> SetInventoryAsync(SetInventoryRequest request, CallOptions options)

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 to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

SetInventoryAsync(SetInventoryRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Operation> SetInventoryAsync(SetInventoryRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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 to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallOperation

The call object.

UpdateProduct(UpdateProductRequest, CallOptions)

public virtual Product UpdateProduct(UpdateProductRequest request, CallOptions options)

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

Parameters
Name Description
request UpdateProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
Product

The response received from the server.

UpdateProduct(UpdateProductRequest, Metadata, DateTime?, CancellationToken)

public virtual Product UpdateProduct(UpdateProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request UpdateProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
Product

The response received from the server.

UpdateProductAsync(UpdateProductRequest, CallOptions)

public virtual AsyncUnaryCall<Product> UpdateProductAsync(UpdateProductRequest request, CallOptions options)

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

Parameters
Name Description
request UpdateProductRequest

The request to send to the server.

options CallOptions

The options for the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.

UpdateProductAsync(UpdateProductRequest, Metadata, DateTime?, CancellationToken)

public virtual AsyncUnaryCall<Product> UpdateProductAsync(UpdateProductRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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

Parameters
Name Description
request UpdateProductRequest

The request to send to the server.

headers Metadata

The initial metadata to send with the call. This parameter is optional.

deadline System.DateTime

An optional deadline for the call. The call will be cancelled if deadline is hit.

cancellationToken CancellationToken

An optional token for canceling the call.

Returns
Type Description
AsyncUnaryCallProduct

The call object.