Class ProductServiceClient
ProductService client wrapper, for convenient use.
Inherited Members
Namespace: Google.Cloud.Retail.V2
Assembly: Google.Cloud.Retail.V2.dll
Syntax
public abstract class ProductServiceClient
Remarks
Service for ingesting [Product][google.cloud.retail.v2.Product] information of the customer's website.
Properties
DefaultEndpoint
The default endpoint for the ProductService service, which is a host of "retail.googleapis.com" and a port of 443.
Declaration
public static string DefaultEndpoint { get; }
Property Value
Type | Description |
---|---|
System.String |
DefaultScopes
The default ProductService scopes.
Declaration
public static IReadOnlyList<string> DefaultScopes { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.String> |
Remarks
The default ProductService scopes are:
GrpcClient
The underlying gRPC ProductService client
Declaration
public virtual ProductService.ProductServiceClient GrpcClient { get; }
Property Value
Type | Description |
---|---|
ProductService.ProductServiceClient |
ImportProductsOperationsClient
The long-running operations client for ImportProducts
.
Declaration
public virtual OperationsClient ImportProductsOperationsClient { get; }
Property Value
Type | Description |
---|---|
OperationsClient |
Methods
Create()
Synchronously creates a ProductServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProductServiceClientBuilder.
Declaration
public static ProductServiceClient Create()
Returns
Type | Description |
---|---|
ProductServiceClient | The created ProductServiceClient. |
CreateAsync(CancellationToken)
Asynchronously creates a ProductServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ProductServiceClientBuilder.
Declaration
public static Task<ProductServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | The System.Threading.CancellationToken to use while creating the client. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ProductServiceClient> | The task representing the created ProductServiceClient. |
CreateProduct(BranchName, Product, String, CallSettings)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product CreateProduct(BranchName parent, Product product, string productId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BranchName | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | Required. The ID to use for the [Product][google.cloud.retail.v2.Product], which will become the final component of the [Product.name][google.cloud.retail.v2.Product.name]. If the caller does not have permission to create the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all [Product][google.cloud.retail.v2.Product]s with the same [parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product CreateProduct(CreateProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product CreateProduct(string parent, Product product, string productId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | Required. The ID to use for the [Product][google.cloud.retail.v2.Product], which will become the final component of the [Product.name][google.cloud.retail.v2.Product.name]. If the caller does not have permission to create the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all [Product][google.cloud.retail.v2.Product]s with the same [parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(BranchName parent, Product product, string productId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
BranchName | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | Required. The ID to use for the [Product][google.cloud.retail.v2.Product], which will become the final component of the [Product.name][google.cloud.retail.v2.Product.name]. If the caller does not have permission to create the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all [Product][google.cloud.retail.v2.Product]s with the same [parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(BranchName parent, Product product, string productId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
BranchName | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(CreateProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
CreateProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(CreateProductRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CreateProductRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(string parent, Product product, string productId, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | Required. The ID to use for the [Product][google.cloud.retail.v2.Product], which will become the final component of the [Product.name][google.cloud.retail.v2.Product.name]. If the caller does not have permission to create the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all [Product][google.cloud.retail.v2.Product]s with the same [parent][google.cloud.retail.v2.CreateProductRequest.parent]. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Creates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> CreateProductAsync(string parent, Product product, string productId, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. The parent catalog resource name, such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch". |
Product | product | Required. The [Product][google.cloud.retail.v2.Product] to create. |
System.String | productId | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual void DeleteProduct(DeleteProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual void DeleteProduct(ProductName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual void DeleteProduct(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(DeleteProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
DeleteProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(DeleteProductRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DeleteProductRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(ProductName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(ProductName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Deletes a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task DeleteProductAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product GetProduct(GetProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product GetProduct(ProductName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | Required. Full resource name of [Product][google.cloud.retail.v2.Product], such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id". If the caller does not have permission to access the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested [Product][google.cloud.retail.v2.Product] does not exist, a NOT_FOUND error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product GetProduct(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Full resource name of [Product][google.cloud.retail.v2.Product], such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id". If the caller does not have permission to access the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested [Product][google.cloud.retail.v2.Product] does not exist, a NOT_FOUND error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(GetProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
GetProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(GetProductRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
GetProductRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(ProductName name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | Required. Full resource name of [Product][google.cloud.retail.v2.Product], such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id". If the caller does not have permission to access the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested [Product][google.cloud.retail.v2.Product] does not exist, a NOT_FOUND error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(ProductName name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ProductName | name | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(string name, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Full resource name of [Product][google.cloud.retail.v2.Product], such as "projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id". If the caller does not have permission to access the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested [Product][google.cloud.retail.v2.Product] does not exist, a NOT_FOUND error is returned. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Gets a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> GetProductAsync(string name, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
Request processing may be synchronous. No partial updating is supported. 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.
Declaration
public virtual Operation<ImportProductsResponse, ImportMetadata> ImportProducts(ImportProductsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ImportProductsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<ImportProductsResponse, ImportMetadata> | The RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = ProductServiceClient.Create();
// Initialize request argument(s)
ImportProductsRequest request = new ImportProductsRequest
{
Parent = "",
InputConfig = new ProductInputConfig(),
ErrorsConfig = new ImportErrorsConfig(),
UpdateMask = new FieldMask(),
};
// 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)
Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
Request processing may be synchronous. No partial updating is supported. 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.
Declaration
public virtual Task<Operation<ImportProductsResponse, ImportMetadata>> ImportProductsAsync(ImportProductsRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
ImportProductsRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<ImportProductsResponse, ImportMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
// Initialize request argument(s)
ImportProductsRequest request = new ImportProductsRequest
{
Parent = "",
InputConfig = new ProductInputConfig(),
ErrorsConfig = new ImportErrorsConfig(),
UpdateMask = new FieldMask(),
};
// 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)
Bulk import of multiple [Product][google.cloud.retail.v2.Product]s.
Request processing may be synchronous. No partial updating is supported. 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.
Declaration
public virtual Task<Operation<ImportProductsResponse, ImportMetadata>> ImportProductsAsync(ImportProductsRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ImportProductsRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<ImportProductsResponse, ImportMetadata>> | A Task containing the RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
// Initialize request argument(s)
ImportProductsRequest request = new ImportProductsRequest
{
Parent = "",
InputConfig = new ProductInputConfig(),
ErrorsConfig = new ImportErrorsConfig(),
UpdateMask = new FieldMask(),
};
// 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;
}
PollOnceImportProducts(String, CallSettings)
Poll an operation once, using an operationName
from a previous invocation of ImportProducts
.
Declaration
public virtual Operation<ImportProductsResponse, ImportMetadata> PollOnceImportProducts(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Operation<ImportProductsResponse, ImportMetadata> | The result of polling the operation. |
PollOnceImportProductsAsync(String, CallSettings)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportProducts
.
Declaration
public virtual Task<Operation<ImportProductsResponse, ImportMetadata>> PollOnceImportProductsAsync(string operationName, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | operationName | The name of a previously invoked operation. Must not be |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Operation<ImportProductsResponse, ImportMetadata>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Declaration
public static Task ShutdownDefaultChannelsAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.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)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product UpdateProduct(Product product, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Product | product | Required. The product to update/create. If the caller does not have permission to update the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the [Product][google.cloud.retail.v2.Product] to update does not exist, a NOT_FOUND error is returned. |
FieldMask | updateMask | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// 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)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Product UpdateProduct(UpdateProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
Product | The RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = ProductServiceClient.Create();
// Initialize request argument(s)
UpdateProductRequest request = new UpdateProductRequest
{
Product = new Product(),
UpdateMask = new FieldMask(),
};
// Make the request
Product response = productServiceClient.UpdateProduct(request);
UpdateProductAsync(Product, FieldMask, CallSettings)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> UpdateProductAsync(Product product, FieldMask updateMask, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
Product | product | Required. The product to update/create. If the caller does not have permission to update the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the [Product][google.cloud.retail.v2.Product] to update does not exist, a NOT_FOUND error is returned. |
FieldMask | updateMask | 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. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> UpdateProductAsync(Product product, FieldMask updateMask, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
Product | product | Required. The product to update/create. If the caller does not have permission to update the [Product][google.cloud.retail.v2.Product], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the [Product][google.cloud.retail.v2.Product] to update does not exist, a NOT_FOUND error is returned. |
FieldMask | updateMask | 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. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// 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)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> UpdateProductAsync(UpdateProductRequest request, CallSettings callSettings = null)
Parameters
Type | Name | Description |
---|---|---|
UpdateProductRequest | request | The request object containing all of the parameters for the API call. |
CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateProductRequest request = new UpdateProductRequest
{
Product = new Product(),
UpdateMask = new FieldMask(),
};
// Make the request
Product response = await productServiceClient.UpdateProductAsync(request);
UpdateProductAsync(UpdateProductRequest, CancellationToken)
Updates a [Product][google.cloud.retail.v2.Product].
Declaration
public virtual Task<Product> UpdateProductAsync(UpdateProductRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
UpdateProductRequest | request | The request object containing all of the parameters for the API call. |
System.Threading.CancellationToken | cancellationToken | A System.Threading.CancellationToken to use for this RPC. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Product> | A Task containing the RPC response. |
Sample code
// Create client
ProductServiceClient productServiceClient = await ProductServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateProductRequest request = new UpdateProductRequest
{
Product = new Product(),
UpdateMask = new FieldMask(),
};
// Make the request
Product response = await productServiceClient.UpdateProductAsync(request);