# Retail v2 API - Class ProductServiceClient (2.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.16.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.15.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.15.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.14.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.13.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.12.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.11.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.10.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.9.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.8.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.7.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.6.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.5.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.4.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.3.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.2.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.1.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/2.0.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.6.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.5.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.4.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.3.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.2.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.1.0/Google.Cloud.Retail.V2.ProductServiceClient)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/1.0.0/Google.Cloud.Retail.V2.ProductServiceClient)

    public abstract class ProductServiceClient

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

ProductService client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ProductServiceClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ProductServiceClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClientImpl)

## Namespace

[Google.Cloud.Retail.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2)

## Assembly

Google.Cloud.Retail.V2.dll

## Remarks

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

## Properties

### AddFulfillmentPlacesOperationsClient

    public virtual OperationsClient AddFulfillmentPlacesOperationsClient { get; }

The long-running operations client for `AddFulfillmentPlaces`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### AddLocalInventoriesOperationsClient

    public virtual OperationsClient AddLocalInventoriesOperationsClient { get; }

The long-running operations client for `AddLocalInventories`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ProductService service, which is a host of "retail.googleapis.com" and a port
of 443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ProductService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default ProductService scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ProductService.ProductServiceClient GrpcClient { get; }

The underlying gRPC ProductService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductService.ProductServiceClient` |   |

### ImportProductsOperationsClient

    public virtual OperationsClient ImportProductsOperationsClient { get; }

The long-running operations client for `ImportProducts`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.html` |   |

### PurgeProductsOperationsClient

    public virtual OperationsClient PurgeProductsOperationsClient { get; }

The long-running operations client for `PurgeProducts`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### RemoveFulfillmentPlacesOperationsClient

    public virtual OperationsClient RemoveFulfillmentPlacesOperationsClient { get; }

The long-running operations client for `RemoveFulfillmentPlaces`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### RemoveLocalInventoriesOperationsClient

    public virtual OperationsClient RemoveLocalInventoriesOperationsClient { get; }

The long-running operations client for `RemoveLocalInventories`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### SetInventoryOperationsClient

    public virtual OperationsClient SetInventoryOperationsClient { get; }

The long-running operations client for `SetInventory`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

## Methods

### AddFulfillmentPlaces(AddFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    AddFulfillmentPlacesRequest request = new AddFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = productServiceClient.AddFulfillmentPlaces(request);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceAddFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlaces(ProductName, CallSettings)

    public virtual Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> AddFulfillmentPlaces(ProductName product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = productServiceClient.AddFulfillmentPlaces(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceAddFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlaces(string, CallSettings)

    public virtual Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> AddFulfillmentPlaces(string product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = productServiceClient.AddFulfillmentPlaces(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceAddFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddFulfillmentPlacesRequest request = new AddFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest, CancellationToken)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(AddFulfillmentPlacesRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddFulfillmentPlacesRequest request = new AddFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(ProductName, CallSettings)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(ProductName product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(ProductName, CancellationToken)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(ProductName product, CancellationToken cancellationToken)

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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(string, CallSettings)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(string product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
method instead of the
\[ProductService.AddFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.AddFulfillmentPlaces\]
method.
\[ProductService.AddLocalInventories\]\[google.cloud.retail.v2.ProductService.AddLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the added place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddFulfillmentPlacesAsync(string, CancellationToken)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> AddFulfillmentPlacesAsync(string product, CancellationToken cancellationToken)

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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> response = await productServiceClient.AddFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceAddFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventories(AddLocalInventoriesRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    AddLocalInventoriesRequest request = new AddLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        LocalInventories =
        {
            new LocalInventory(),
        },
        AddMask = new FieldMask(),
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = productServiceClient.AddLocalInventories(request);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceAddLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventories(ProductName, CallSettings)

    public virtual Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> AddLocalInventories(ProductName product, 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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = productServiceClient.AddLocalInventories(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceAddLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventories(string, CallSettings)

    public virtual Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> AddLocalInventories(string product, 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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = productServiceClient.AddLocalInventories(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceAddLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(AddLocalInventoriesRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddLocalInventoriesRequest request = new AddLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        LocalInventories =
        {
            new LocalInventory(),
        },
        AddMask = new FieldMask(),
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(AddLocalInventoriesRequest, CancellationToken)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(AddLocalInventoriesRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    AddLocalInventoriesRequest request = new AddLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        LocalInventories =
        {
            new LocalInventory(),
        },
        AddMask = new FieldMask(),
        AddTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(ProductName, CallSettings)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(ProductName product, 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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(ProductName, CancellationToken)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(ProductName product, CancellationToken cancellationToken)

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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(string, CallSettings)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(string product, 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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### AddLocalInventoriesAsync(string, CancellationToken)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> AddLocalInventoriesAsync(string product, CancellationToken cancellationToken)

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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> response = await productServiceClient.AddLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    AddLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceAddLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        AddLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### Create()

    public static ProductServiceClient Create()

Synchronously creates a [ProductServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ProductServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient` | The created [ProductServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient). |

### CreateAsync(CancellationToken)

    public static Task<ProductServiceClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ProductServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ProductServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient` | The task representing the created [ProductServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient). |

### CreateProduct(BranchName, Product, string, CallSettings)

    public virtual Product CreateProduct(BranchName parent, Product product, string productId, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    BranchName parent = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = productServiceClient.CreateProduct(parent, product, productId);

### CreateProduct(CreateProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    CreateProductRequest request = new CreateProductRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Product = new Product(),
        ProductId = "",
    };
    // Make the request
    Product response = productServiceClient.CreateProduct(request);

### CreateProduct(string, Product, string, CallSettings)

    public virtual Product CreateProduct(string parent, Product product, string productId, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]";
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = productServiceClient.CreateProduct(parent, product, productId);

### CreateProductAsync(BranchName, Product, string, CallSettings)

    public virtual Task<Product> CreateProductAsync(BranchName parent, Product product, string productId, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    BranchName parent = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(parent, product, productId);

### CreateProductAsync(BranchName, Product, string, CancellationToken)

    public virtual Task<Product> CreateProductAsync(BranchName parent, Product product, string productId, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    BranchName parent = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(parent, product, productId);

### CreateProductAsync(CreateProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateProductRequest request = new CreateProductRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Product = new Product(),
        ProductId = "",
    };
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(request);

### CreateProductAsync(CreateProductRequest, CancellationToken)

    public virtual Task<Product> CreateProductAsync(CreateProductRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.CreateProductRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    CreateProductRequest request = new CreateProductRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Product = new Product(),
        ProductId = "",
    };
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(request);

### CreateProductAsync(string, Product, string, CallSettings)

    public virtual Task<Product> CreateProductAsync(string parent, Product product, string productId, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]";
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(parent, product, productId);

### CreateProductAsync(string, Product, string, CancellationToken)

    public virtual Task<Product> CreateProductAsync(string parent, Product product, string productId, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`. |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The \[Product\]\[google.cloud.retail.v2.Product\] to create. |
| `productId` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The ID to use for the \[Product\]\[google.cloud.retail.v2.Product\], which will become the final component of the \[Product.name\]\[google.cloud.retail.v2.Product.name\]. If the caller does not have permission to create the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all \[Product\]\[google.cloud.retail.v2.Product\]s with the same \[parent\]\[google.cloud.retail.v2.CreateProductRequest.parent\]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]";
    Product product = new Product();
    string productId = "";
    // Make the request
    Product response = await productServiceClient.CreateProductAsync(parent, product, productId);

### DeleteProduct(DeleteProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.DeleteProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    DeleteProductRequest request = new DeleteProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    productServiceClient.DeleteProduct(request);

### DeleteProduct(ProductName, CallSettings)

    public virtual void DeleteProduct(ProductName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    productServiceClient.DeleteProduct(name);

### DeleteProduct(string, CallSettings)

    public virtual void DeleteProduct(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    productServiceClient.DeleteProduct(name);

### DeleteProductAsync(DeleteProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.DeleteProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteProductRequest request = new DeleteProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    await productServiceClient.DeleteProductAsync(request);

### DeleteProductAsync(DeleteProductRequest, CancellationToken)

    public virtual Task DeleteProductAsync(DeleteProductRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.DeleteProductRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    DeleteProductRequest request = new DeleteProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    await productServiceClient.DeleteProductAsync(request);

### DeleteProductAsync(ProductName, CallSettings)

    public virtual Task DeleteProductAsync(ProductName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    await productServiceClient.DeleteProductAsync(name);

### DeleteProductAsync(ProductName, CancellationToken)

    public virtual Task DeleteProductAsync(ProductName name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    await productServiceClient.DeleteProductAsync(name);

### DeleteProductAsync(string, CallSettings)

    public virtual Task DeleteProductAsync(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    await productServiceClient.DeleteProductAsync(name);

### DeleteProductAsync(string, CancellationToken)

    public virtual Task DeleteProductAsync(string name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to delete does not exist, a NOT_FOUND error is returned. The \[Product\]\[google.cloud.retail.v2.Product\] to delete can neither be a \[Product.Type.COLLECTION\]\[google.cloud.retail.v2.Product.Type.COLLECTION\] \[Product\]\[google.cloud.retail.v2.Product\] member nor a \[Product.Type.PRIMARY\]\[google.cloud.retail.v2.Product.Type.PRIMARY\] \[Product\]\[google.cloud.retail.v2.Product\] with more than one \[variants\]\[google.cloud.retail.v2.Product.Type.VARIANT\]. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named \[Product\]\[google.cloud.retail.v2.Product\] will be deleted. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    await productServiceClient.DeleteProductAsync(name);

### GetProduct(GetProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.GetProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    GetProductRequest request = new GetProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    Product response = productServiceClient.GetProduct(request);

### GetProduct(ProductName, CallSettings)

    public virtual Product GetProduct(ProductName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Product response = productServiceClient.GetProduct(name);

### GetProduct(string, CallSettings)

    public virtual Product GetProduct(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Product response = productServiceClient.GetProduct(name);

### GetProductAsync(GetProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.GetProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetProductRequest request = new GetProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    Product response = await productServiceClient.GetProductAsync(request);

### GetProductAsync(GetProductRequest, CancellationToken)

    public virtual Task<Product> GetProductAsync(GetProductRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.GetProductRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    GetProductRequest request = new GetProductRequest
    {
        ProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
    };
    // Make the request
    Product response = await productServiceClient.GetProductAsync(request);

### GetProductAsync(ProductName, CallSettings)

    public virtual Task<Product> GetProductAsync(ProductName name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Product response = await productServiceClient.GetProductAsync(name);

### GetProductAsync(ProductName, CancellationToken)

    public virtual Task<Product> GetProductAsync(ProductName name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName name = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Product response = await productServiceClient.GetProductAsync(name);

### GetProductAsync(string, CallSettings)

    public virtual Task<Product> GetProductAsync(string name, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Product response = await productServiceClient.GetProductAsync(name);

### GetProductAsync(string, CancellationToken)

    public virtual Task<Product> GetProductAsync(string name, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested \[Product\]\[google.cloud.retail.v2.Product\] does not exist, a NOT_FOUND error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string name = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Product response = await productServiceClient.GetProductAsync(name);

### ImportProducts(ImportProductsRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ImportProductsRequest request = new ImportProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        InputConfig = new ProductInputConfig(),
        ErrorsConfig = new ImportErrorsConfig(),
        UpdateMask = new FieldMask(),
        ReconciliationMode = ImportProductsRequest.Types.ReconciliationMode.Unspecified,
        NotificationPubsubTopic = "",
    };
    // Make the request
    Operation<ImportProductsResponse, ImportMetadata> response = productServiceClient.ImportProducts(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportProductsResponse, ImportMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    ImportProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportProductsResponse, ImportMetadata> retrievedResponse = productServiceClient.PollOnceImportProducts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportProductsResponse retrievedResult = retrievedResponse.Result;
    }

### ImportProductsAsync(ImportProductsRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportProductsRequest request = new ImportProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        InputConfig = new ProductInputConfig(),
        ErrorsConfig = new ImportErrorsConfig(),
        UpdateMask = new FieldMask(),
        ReconciliationMode = ImportProductsRequest.Types.ReconciliationMode.Unspecified,
        NotificationPubsubTopic = "",
    };
    // Make the request
    Operation<ImportProductsResponse, ImportMetadata> response = await productServiceClient.ImportProductsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportProductsResponse, ImportMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportProductsResponse, ImportMetadata> retrievedResponse = await productServiceClient.PollOnceImportProductsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportProductsResponse retrievedResult = retrievedResponse.Result;
    }

### ImportProductsAsync(ImportProductsRequest, CancellationToken)

    public virtual Task<Operation<ImportProductsResponse, ImportMetadata>> ImportProductsAsync(ImportProductsRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ImportProductsRequest request = new ImportProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        InputConfig = new ProductInputConfig(),
        ErrorsConfig = new ImportErrorsConfig(),
        UpdateMask = new FieldMask(),
        ReconciliationMode = ImportProductsRequest.Types.ReconciliationMode.Unspecified,
        NotificationPubsubTopic = "",
    };
    // Make the request
    Operation<ImportProductsResponse, ImportMetadata> response = await productServiceClient.ImportProductsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<ImportProductsResponse, ImportMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    ImportProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<ImportProductsResponse, ImportMetadata> retrievedResponse = await productServiceClient.PollOnceImportProductsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        ImportProductsResponse retrievedResult = retrievedResponse.Result;
    }

### ListProducts(BranchName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListProductsResponse, Product> ListProducts(BranchName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName` Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list \[Product\]\[google.cloud.retail.v2.Product\]s under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    BranchName parent = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    // Make the request
    PagedEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProducts(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Product item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListProductsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListProducts(ListProductsRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ListProductsRequest request = new ListProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Filter = "",
        ReadMask = new FieldMask(),
    };
    // Make the request
    PagedEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProducts(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Product item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListProductsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListProducts(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ListProductsResponse, Product> ListProducts(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list \[Product\]\[google.cloud.retail.v2.Product\]s under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]";
    // Make the request
    PagedEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProducts(parent);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Product item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ListProductsResponse page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListProductsAsync(BranchName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListProductsResponse, Product> ListProductsAsync(BranchName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.BranchName` Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list \[Product\]\[google.cloud.retail.v2.Product\]s under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable asynchronous sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    BranchName parent = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    // Make the request
    PagedAsyncEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProductsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Product item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListProductsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListProductsAsync(ListProductsRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable asynchronous sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ListProductsRequest request = new ListProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Filter = "",
        ReadMask = new FieldMask(),
    };
    // Make the request
    PagedAsyncEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProductsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Product item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListProductsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListProductsAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListProductsResponse, Product> ListProductsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://learn.microsoft.com/dotnet/api/system.string` Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list \[Product\]\[google.cloud.retail.v2.Product\]s under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ListProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A pageable asynchronous sequence of [Product](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product) resources. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string parent = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]";
    // Make the request
    PagedAsyncEnumerable<ListProductsResponse, Product> response = productServiceClient.ListProductsAsync(parent);

    // Iterate over all response items, lazily performing RPCs as required
    await response.ForEachAsync((Product item) =>
    {
        // Do something with each item
        Console.WriteLine(item);
    });

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await response.AsRawResponses().ForEachAsync((ListProductsResponse page) =>
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Product item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    });

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Product> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Product item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### PollOnceAddFulfillmentPlaces(string, CallSettings)

    public virtual Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata> PollOnceAddFulfillmentPlaces(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `AddFulfillmentPlaces`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | The result of polling the operation. |

### PollOnceAddFulfillmentPlacesAsync(string, CallSettings)

    public virtual Task<Operation<AddFulfillmentPlacesResponse, AddFulfillmentPlacesMetadata>> PollOnceAddFulfillmentPlacesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`AddFulfillmentPlaces`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddFulfillmentPlacesMetadata` | A task representing the result of polling the operation. |

### PollOnceAddLocalInventories(string, CallSettings)

    public virtual Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata> PollOnceAddLocalInventories(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `AddLocalInventories`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | The result of polling the operation. |

### PollOnceAddLocalInventoriesAsync(string, CallSettings)

    public virtual Task<Operation<AddLocalInventoriesResponse, AddLocalInventoriesMetadata>> PollOnceAddLocalInventoriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`AddLocalInventories`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.AddLocalInventoriesMetadata` | A task representing the result of polling the operation. |

### PollOnceImportProducts(string, CallSettings)

    public virtual Operation<ImportProductsResponse, ImportMetadata> PollOnceImportProducts(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `ImportProducts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportMetadata` | The result of polling the operation. |

### PollOnceImportProductsAsync(string, CallSettings)

    public virtual Task<Operation<ImportProductsResponse, ImportMetadata>> PollOnceImportProductsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`ImportProducts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ImportMetadata` | A task representing the result of polling the operation. |

### PollOncePurgeProducts(string, CallSettings)

    public virtual Operation<PurgeProductsResponse, PurgeProductsMetadata> PollOncePurgeProducts(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `PurgeProducts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsMetadata` | The result of polling the operation. |

### PollOncePurgeProductsAsync(string, CallSettings)

    public virtual Task<Operation<PurgeProductsResponse, PurgeProductsMetadata>> PollOncePurgeProductsAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`PurgeProducts`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsMetadata` | A task representing the result of polling the operation. |

### PollOnceRemoveFulfillmentPlaces(string, CallSettings)

    public virtual Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> PollOnceRemoveFulfillmentPlaces(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`RemoveFulfillmentPlaces`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | The result of polling the operation. |

### PollOnceRemoveFulfillmentPlacesAsync(string, CallSettings)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> PollOnceRemoveFulfillmentPlacesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`RemoveFulfillmentPlaces`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A task representing the result of polling the operation. |

### PollOnceRemoveLocalInventories(string, CallSettings)

    public virtual Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> PollOnceRemoveLocalInventories(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`RemoveLocalInventories`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | The result of polling the operation. |

### PollOnceRemoveLocalInventoriesAsync(string, CallSettings)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> PollOnceRemoveLocalInventoriesAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`RemoveLocalInventories`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A task representing the result of polling the operation. |

### PollOnceSetInventory(string, CallSettings)

    public virtual Operation<SetInventoryResponse, SetInventoryMetadata> PollOnceSetInventory(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `SetInventory`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | The result of polling the operation. |

### PollOnceSetInventoryAsync(string, CallSettings)

    public virtual Task<Operation<SetInventoryResponse, SetInventoryMetadata>> PollOnceSetInventoryAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`SetInventory`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | A task representing the result of polling the operation. |

### PurgeProducts(PurgeProductsRequest, CallSettings)

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

Permanently deletes all selected \[Product\]\[google.cloud.retail.v2.Product\]s
under a branch.

This process is asynchronous. If the request is valid, the removal will be
enqueued and processed offline. Depending on the number of
\[Product\]\[google.cloud.retail.v2.Product\]s, this operation could take hours
to complete. Before the operation completes, some
\[Product\]\[google.cloud.retail.v2.Product\]s may still be returned by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    PurgeProductsRequest request = new PurgeProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Filter = "",
        Force = false,
    };
    // Make the request
    Operation<PurgeProductsResponse, PurgeProductsMetadata> response = productServiceClient.PurgeProducts(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeProductsResponse, PurgeProductsMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    PurgeProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeProductsResponse, PurgeProductsMetadata> retrievedResponse = productServiceClient.PollOncePurgeProducts(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeProductsResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeProductsAsync(PurgeProductsRequest, CallSettings)

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

Permanently deletes all selected \[Product\]\[google.cloud.retail.v2.Product\]s
under a branch.

This process is asynchronous. If the request is valid, the removal will be
enqueued and processed offline. Depending on the number of
\[Product\]\[google.cloud.retail.v2.Product\]s, this operation could take hours
to complete. Before the operation completes, some
\[Product\]\[google.cloud.retail.v2.Product\]s may still be returned by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeProductsRequest request = new PurgeProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Filter = "",
        Force = false,
    };
    // Make the request
    Operation<PurgeProductsResponse, PurgeProductsMetadata> response = await productServiceClient.PurgeProductsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeProductsResponse, PurgeProductsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeProductsResponse, PurgeProductsMetadata> retrievedResponse = await productServiceClient.PollOncePurgeProductsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeProductsResponse retrievedResult = retrievedResponse.Result;
    }

### PurgeProductsAsync(PurgeProductsRequest, CancellationToken)

    public virtual Task<Operation<PurgeProductsResponse, PurgeProductsMetadata>> PurgeProductsAsync(PurgeProductsRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.PurgeProductsMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    PurgeProductsRequest request = new PurgeProductsRequest
    {
        ParentAsBranchName = BranchName.FromProjectLocationCatalogBranch("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]"),
        Filter = "",
        Force = false,
    };
    // Make the request
    Operation<PurgeProductsResponse, PurgeProductsMetadata> response = await productServiceClient.PurgeProductsAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<PurgeProductsResponse, PurgeProductsMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    PurgeProductsResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<PurgeProductsResponse, PurgeProductsMetadata> retrievedResponse = await productServiceClient.PollOncePurgeProductsAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        PurgeProductsResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlaces(ProductName, CallSettings)

    public virtual Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> RemoveFulfillmentPlaces(ProductName product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = productServiceClient.RemoveFulfillmentPlaces(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    RemoveFulfillmentPlacesRequest request = new RemoveFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        RemoveTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = productServiceClient.RemoveFulfillmentPlaces(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlaces(string, CallSettings)

    public virtual Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> RemoveFulfillmentPlaces(string product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = productServiceClient.RemoveFulfillmentPlaces(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveFulfillmentPlaces(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(ProductName, CallSettings)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(ProductName product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(ProductName, CancellationToken)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(ProductName product, CancellationToken cancellationToken)

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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, CallSettings)

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

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    RemoveFulfillmentPlacesRequest request = new RemoveFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        RemoveTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest, CancellationToken)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(RemoveFulfillmentPlacesRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    RemoveFulfillmentPlacesRequest request = new RemoveFulfillmentPlacesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        Type = "",
        PlaceIds = { "", },
        RemoveTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(string, CallSettings)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(string product, CallSettings callSettings = null)

We recommend that you use the
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
method instead of the
\[ProductService.RemoveFulfillmentPlaces\]\[google.cloud.retail.v2.ProductService.RemoveFulfillmentPlaces\]
method.
\[ProductService.RemoveLocalInventories\]\[google.cloud.retail.v2.ProductService.RemoveLocalInventories\]
achieves the same results but provides more fine-grained control over
ingesting local inventory data.

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

This process is asynchronous and does not require the
\[Product\]\[google.cloud.retail.v2.Product\] to exist before updating
fulfillment information. If the request is valid, the update will be
enqueued and processed downstream. As a consequence, when a response is
returned, the removed place IDs are not immediately manifested in the
\[Product\]\[google.cloud.retail.v2.Product\] queried by
\[ProductService.GetProduct\]\[google.cloud.retail.v2.ProductService.GetProduct\]
or
\[ProductService.ListProducts\]\[google.cloud.retail.v2.ProductService.ListProducts\].

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveFulfillmentPlacesAsync(string, CancellationToken)

    public virtual Task<Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata>> RemoveFulfillmentPlacesAsync(string product, CancellationToken cancellationToken)

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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveFulfillmentPlacesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> response = await productServiceClient.RemoveFulfillmentPlacesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveFulfillmentPlacesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveFulfillmentPlacesResponse, RemoveFulfillmentPlacesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveFulfillmentPlacesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveFulfillmentPlacesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventories(ProductName, CallSettings)

    public virtual Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> RemoveLocalInventories(ProductName product, 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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = productServiceClient.RemoveLocalInventories(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventories(RemoveLocalInventoriesRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    RemoveLocalInventoriesRequest request = new RemoveLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        PlaceIds = { "", },
        AllowMissing = false,
        RemoveTime = new Timestamp(),
    };
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = productServiceClient.RemoveLocalInventories(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventories(string, CallSettings)

    public virtual Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> RemoveLocalInventories(string product, 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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = productServiceClient.RemoveLocalInventories(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = productServiceClient.PollOnceRemoveLocalInventories(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(ProductName, CallSettings)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(ProductName product, 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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(ProductName, CancellationToken)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(ProductName product, CancellationToken cancellationToken)

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** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductName` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    ProductName product = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    RemoveLocalInventoriesRequest request = new RemoveLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        PlaceIds = { "", },
        AllowMissing = false,
        RemoveTime = new Timestamp(),
    };
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest, CancellationToken)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(RemoveLocalInventoriesRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    RemoveLocalInventoriesRequest request = new RemoveLocalInventoriesRequest
    {
        ProductAsProductName = ProductName.FromProjectLocationCatalogBranchProduct("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]"),
        PlaceIds = { "", },
        AllowMissing = false,
        RemoveTime = new Timestamp(),
    };
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(string, CallSettings)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(string product, 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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### RemoveLocalInventoriesAsync(string, CancellationToken)

    public virtual Task<Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata>> RemoveLocalInventoriesAsync(string product, CancellationToken cancellationToken)

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** |
| `product` | `https://learn.microsoft.com/dotnet/api/system.string` Required. Full resource name of \[Product\]\[google.cloud.retail.v2.Product\], such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.RemoveLocalInventoriesMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    string product = "projects/[PROJECT]/locations/[LOCATION]/catalogs/[CATALOG]/branches/[BRANCH]/products/[PRODUCT]";
    // Make the request
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> response = await productServiceClient.RemoveLocalInventoriesAsync(product);

    // Poll until the returned long-running operation is complete
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    RemoveLocalInventoriesResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<RemoveLocalInventoriesResponse, RemoveLocalInventoriesMetadata> retrievedResponse = await productServiceClient.PollOnceRemoveLocalInventoriesAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        RemoveLocalInventoriesResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventory(Product, FieldMask, CallSettings)

    public virtual Operation<SetInventoryResponse, SetInventoryMetadata> SetInventory(Product inventory, FieldMask setMask, 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** |
| `inventory` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The inventory information to update. The allowable fields to update are: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The updated inventory fields must be specified in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\]. If \[SetInventoryRequest.inventory.name\]\[google.cloud.retail.v2.Product.name\] is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\] named in \[Product.name\]\[google.cloud.retail.v2.Product.name\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not have existing inventory information, the provided inventory information will be inserted. If the \[Product\]\[google.cloud.retail.v2.Product\] to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for \[SetInventoryRequest.set_time\]\[google.cloud.retail.v2.SetInventoryRequest.set_time\]. The caller can replace place IDs for a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types and corresponding place IDs to update in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The caller can clear all place IDs from a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types to clear in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] - Checks that only the desired fulfillment info types have empty \[SetInventoryRequest.inventory.fulfillment_info.place_ids\]\[google.cloud.retail.v2.FulfillmentInfo.place_ids\] The last update time is recorded for the following inventory fields: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] If a full overwrite of inventory information while ignoring timestamps is needed, \[ProductService.UpdateProduct\]\[google.cloud.retail.v2.ProductService.UpdateProduct\] should be invoked instead. |
| `setMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which inventory fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    Product inventory = new Product();
    FieldMask setMask = new FieldMask();
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = productServiceClient.SetInventory(inventory, setMask);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = productServiceClient.PollOnceSetInventory(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventory(SetInventoryRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    SetInventoryRequest request = new SetInventoryRequest
    {
        Inventory = new Product(),
        SetMask = new FieldMask(),
        SetTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = productServiceClient.SetInventory(request);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = productServiceClient.PollOnceSetInventory(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventoryAsync(Product, FieldMask, CallSettings)

    public virtual Task<Operation<SetInventoryResponse, SetInventoryMetadata>> SetInventoryAsync(Product inventory, FieldMask setMask, 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** |
| `inventory` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The inventory information to update. The allowable fields to update are: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The updated inventory fields must be specified in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\]. If \[SetInventoryRequest.inventory.name\]\[google.cloud.retail.v2.Product.name\] is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\] named in \[Product.name\]\[google.cloud.retail.v2.Product.name\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not have existing inventory information, the provided inventory information will be inserted. If the \[Product\]\[google.cloud.retail.v2.Product\] to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for \[SetInventoryRequest.set_time\]\[google.cloud.retail.v2.SetInventoryRequest.set_time\]. The caller can replace place IDs for a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types and corresponding place IDs to update in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The caller can clear all place IDs from a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types to clear in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] - Checks that only the desired fulfillment info types have empty \[SetInventoryRequest.inventory.fulfillment_info.place_ids\]\[google.cloud.retail.v2.FulfillmentInfo.place_ids\] The last update time is recorded for the following inventory fields: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] If a full overwrite of inventory information while ignoring timestamps is needed, \[ProductService.UpdateProduct\]\[google.cloud.retail.v2.ProductService.UpdateProduct\] should be invoked instead. |
| `setMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which inventory fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    Product inventory = new Product();
    FieldMask setMask = new FieldMask();
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = await productServiceClient.SetInventoryAsync(inventory, setMask);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = await productServiceClient.PollOnceSetInventoryAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventoryAsync(Product, FieldMask, CancellationToken)

    public virtual Task<Operation<SetInventoryResponse, SetInventoryMetadata>> SetInventoryAsync(Product inventory, FieldMask setMask, CancellationToken cancellationToken)

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** |
| `inventory` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The inventory information to update. The allowable fields to update are: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The updated inventory fields must be specified in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\]. If \[SetInventoryRequest.inventory.name\]\[google.cloud.retail.v2.Product.name\] is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\] named in \[Product.name\]\[google.cloud.retail.v2.Product.name\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not have existing inventory information, the provided inventory information will be inserted. If the \[Product\]\[google.cloud.retail.v2.Product\] to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for \[SetInventoryRequest.set_time\]\[google.cloud.retail.v2.SetInventoryRequest.set_time\]. The caller can replace place IDs for a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types and corresponding place IDs to update in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] The caller can clear all place IDs from a subset of fulfillment types in the following ways: - Adds "fulfillment_info" in \[SetInventoryRequest.set_mask\]\[google.cloud.retail.v2.SetInventoryRequest.set_mask\] - Specifies only the desired fulfillment types to clear in \[SetInventoryRequest.inventory.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] - Checks that only the desired fulfillment info types have empty \[SetInventoryRequest.inventory.fulfillment_info.place_ids\]\[google.cloud.retail.v2.FulfillmentInfo.place_ids\] The last update time is recorded for the following inventory fields: - \[Product.price_info\]\[google.cloud.retail.v2.Product.price_info\] - \[Product.availability\]\[google.cloud.retail.v2.Product.availability\] - \[Product.available_quantity\]\[google.cloud.retail.v2.Product.available_quantity\] - \[Product.fulfillment_info\]\[google.cloud.retail.v2.Product.fulfillment_info\] If a full overwrite of inventory information while ignoring timestamps is needed, \[ProductService.UpdateProduct\]\[google.cloud.retail.v2.ProductService.UpdateProduct\] should be invoked instead. |
| `setMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which inventory fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    Product inventory = new Product();
    FieldMask setMask = new FieldMask();
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = await productServiceClient.SetInventoryAsync(inventory, setMask);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = await productServiceClient.PollOnceSetInventoryAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventoryAsync(SetInventoryRequest, CallSettings)

    public virtual 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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    SetInventoryRequest request = new SetInventoryRequest
    {
        Inventory = new Product(),
        SetMask = new FieldMask(),
        SetTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = await productServiceClient.SetInventoryAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = await productServiceClient.PollOnceSetInventoryAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### SetInventoryAsync(SetInventoryRequest, CancellationToken)

    public virtual Task<Operation<SetInventoryResponse, SetInventoryMetadata>> SetInventoryAsync(SetInventoryRequest request, CancellationToken cancellationToken)

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` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryResponsehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.SetInventoryMetadata` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    SetInventoryRequest request = new SetInventoryRequest
    {
        Inventory = new Product(),
        SetMask = new FieldMask(),
        SetTime = new Timestamp(),
        AllowMissing = false,
    };
    // Make the request
    Operation<SetInventoryResponse, SetInventoryMetadata> response = await productServiceClient.SetInventoryAsync(request);

    // Poll until the returned long-running operation is complete
    Operation<SetInventoryResponse, SetInventoryMetadata> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    SetInventoryResponse result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    Operation<SetInventoryResponse, SetInventoryMetadata> retrievedResponse = await productServiceClient.PollOnceSetInventoryAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        SetInventoryResponse retrievedResult = retrievedResponse.Result;
    }

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient#Google_Cloud_Retail_V2_ProductServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient#Google_Cloud_Retail_V2_ProductServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient#Google_Cloud_Retail_V2_ProductServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.ProductServiceClient#Google_Cloud_Retail_V2_ProductServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.

### UpdateProduct(Product, FieldMask, CallSettings)

    public virtual Product UpdateProduct(Product product, FieldMask updateMask, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The product to update/create. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not exist and \[allow_missing\]\[google.cloud.retail.v2.UpdateProductRequest.allow_missing\] is not set, a NOT_FOUND error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as "attributes.${key_name}". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    Product product = new Product();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Product response = productServiceClient.UpdateProduct(product, updateMask);

### UpdateProduct(UpdateProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | The RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = ProductServiceClient.Create();
    // Initialize request argument(s)
    UpdateProductRequest request = new UpdateProductRequest
    {
        Product = new Product(),
        UpdateMask = new FieldMask(),
        AllowMissing = false,
    };
    // Make the request
    Product response = productServiceClient.UpdateProduct(request);

### UpdateProductAsync(Product, FieldMask, CallSettings)

    public virtual Task<Product> UpdateProductAsync(Product product, FieldMask updateMask, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The product to update/create. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not exist and \[allow_missing\]\[google.cloud.retail.v2.UpdateProductRequest.allow_missing\] is not set, a NOT_FOUND error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as "attributes.${key_name}". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    Product product = new Product();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Product response = await productServiceClient.UpdateProductAsync(product, updateMask);

### UpdateProductAsync(Product, FieldMask, CancellationToken)

    public virtual Task<Product> UpdateProductAsync(Product product, FieldMask updateMask, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `product` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` Required. The product to update/create. If the caller does not have permission to update the \[Product\]\[google.cloud.retail.v2.Product\], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the \[Product\]\[google.cloud.retail.v2.Product\] to update does not exist and \[allow_missing\]\[google.cloud.retail.v2.UpdateProductRequest.allow_missing\] is not set, a NOT_FOUND error is returned. |
| `updateMask` | `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.html` Indicates which fields in the provided \[Product\]\[google.cloud.retail.v2.Product\] to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as "attributes.${key_name}". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    Product product = new Product();
    FieldMask updateMask = new FieldMask();
    // Make the request
    Product response = await productServiceClient.UpdateProductAsync(product, updateMask);

### UpdateProductAsync(UpdateProductRequest, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateProductRequest request = new UpdateProductRequest
    {
        Product = new Product(),
        UpdateMask = new FieldMask(),
        AllowMissing = false,
    };
    // Make the request
    Product response = await productServiceClient.UpdateProductAsync(request);

### UpdateProductAsync(UpdateProductRequest, CancellationToken)

    public virtual Task<Product> UpdateProductAsync(UpdateProductRequest request, CancellationToken cancellationToken)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.UpdateProductRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Retail.V2/latest/Google.Cloud.Retail.V2.Product` | A Task containing the RPC response. |

**Example**

    // Create client
    ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
    // Initialize request argument(s)
    UpdateProductRequest request = new UpdateProductRequest
    {
        Product = new Product(),
        UpdateMask = new FieldMask(),
        AllowMissing = false,
    };
    // Make the request
    Product response = await productServiceClient.UpdateProductAsync(request);