Retail v2 API - Class ProductServiceClient (2.4.0)

public abstract class ProductServiceClient

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

ProductService client wrapper, for convenient use.

Inheritance

Object > ProductServiceClient

Derived Types

Namespace

Google.Cloud.Retail.V2

Assembly

Google.Cloud.Retail.V2.dll

Remarks

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

Properties

AddFulfillmentPlacesOperationsClient

public virtual OperationsClient AddFulfillmentPlacesOperationsClient { get; }

The long-running operations client for AddFulfillmentPlaces.

Property Value
TypeDescription
OperationsClient

AddLocalInventoriesOperationsClient

public virtual OperationsClient AddLocalInventoriesOperationsClient { get; }

The long-running operations client for AddLocalInventories.

Property Value
TypeDescription
OperationsClient

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
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ProductService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default ProductService scopes are:

GrpcClient

public virtual ProductService.ProductServiceClient GrpcClient { get; }

The underlying gRPC ProductService client

Property Value
TypeDescription
ProductService.ProductServiceClient

ImportProductsOperationsClient

public virtual OperationsClient ImportProductsOperationsClient { get; }

The long-running operations client for ImportProducts.

Property Value
TypeDescription
OperationsClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

RemoveFulfillmentPlacesOperationsClient

public virtual OperationsClient RemoveFulfillmentPlacesOperationsClient { get; }

The long-running operations client for RemoveFulfillmentPlaces.

Property Value
TypeDescription
OperationsClient

RemoveLocalInventoriesOperationsClient

public virtual OperationsClient RemoveLocalInventoriesOperationsClient { get; }

The long-running operations client for RemoveLocalInventories.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

SetInventoryOperationsClient

public virtual OperationsClient SetInventoryOperationsClient { get; }

The long-running operations client for SetInventory.

Property Value
TypeDescription
OperationsClient

Methods

AddFulfillmentPlaces(AddFulfillmentPlacesRequest, CallSettings)

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

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddFulfillmentPlacesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddLocalInventoriesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddLocalInventoriesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestAddLocalInventoriesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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 using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProductServiceClientBuilder.

Returns
TypeDescription
ProductServiceClient

The created ProductServiceClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a ProductServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProductServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ProductServiceClient>

The task representing the created 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
NameDescription
parentBranchName

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

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
NameDescription
parentString

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentBranchName

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentBranchName

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestCreateProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestCreateProductRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
parentString

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
parentString

Required. The parent catalog resource name, such as projects/*/locations/global/catalogs/default_catalog/branches/default_branch.

productProduct

Required. The [Product][google.cloud.retail.v2.Product] to create.

productIdString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestDeleteProductRequest

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

callSettingsCallSettings

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
NameDescription
nameProductName

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.

callSettingsCallSettings

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
NameDescription
nameString

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.

callSettingsCallSettings

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
NameDescription
requestDeleteProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

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
NameDescription
requestDeleteProductRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestGetProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

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
NameDescription
nameProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestGetProductRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
nameString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
nameString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestImportProductsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ImportProductsResponse, 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
NameDescription
requestImportProductsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ImportProductsResponse, 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
NameDescription
requestImportProductsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ImportProductsResponse, 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, Nullable<Int32>, 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
NameDescription
parentBranchName

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.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListProductsResponse, Product>

A pageable sequence of 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
NameDescription
requestListProductsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListProductsResponse, Product>

A pageable sequence of 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, Nullable<Int32>, 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
NameDescription
parentString

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.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListProductsResponse, Product>

A pageable sequence of 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, Nullable<Int32>, 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
NameDescription
parentBranchName

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.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListProductsResponse, Product>

A pageable asynchronous sequence of 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
NameDescription
requestListProductsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListProductsResponse, Product>

A pageable asynchronous sequence of 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, Nullable<Int32>, 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
NameDescription
parentString

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.

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListProductsResponse, Product>

A pageable asynchronous sequence of 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddFulfillmentPlacesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddFulfillmentPlacesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<AddLocalInventoriesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<AddLocalInventoriesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ImportProductsResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ImportProductsResponse, ImportMetadata>>

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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveFulfillmentPlacesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveLocalInventoriesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<SetInventoryResponse, 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
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<SetInventoryResponse, SetInventoryMetadata>>

A task representing the result of polling the operation.

RemoveFulfillmentPlaces(ProductName, CallSettings)

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

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveFulfillmentPlacesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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)

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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveFulfillmentPlacesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productProductName

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestRemoveLocalInventoriesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
productString

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<RemoveLocalInventoriesResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
inventoryProduct

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.

setMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<SetInventoryResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestSetInventoryRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<SetInventoryResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
inventoryProduct

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.

setMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<SetInventoryResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
inventoryProduct

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.

setMaskFieldMask

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<SetInventoryResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestSetInventoryRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<SetInventoryResponse, 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.

This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.

Parameters
NameDescription
requestSetInventoryRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<SetInventoryResponse, 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() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(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
NameDescription
productProduct

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.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestUpdateProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Product

The RPC response.

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
NameDescription
productProduct

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.

updateMaskFieldMask

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
productProduct

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.

updateMaskFieldMask

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateProductRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<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
NameDescription
requestUpdateProductRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<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);