Class ProductSearchClientImpl (2.5.0)

public sealed class ProductSearchClientImpl : ProductSearchClient

ProductSearch client wrapper implementation, for convenient use.

Inheritance

Object > ProductSearchClient > ProductSearchClientImpl

Namespace

Google.Cloud.Vision.V1

Assembly

Google.Cloud.Vision.V1.dll

Remarks

Manages Products and ProductSets of reference images for use in product search. It uses the following resource model:

  • The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named projects/*/locations/*/productSets/*, which acts as a way to put different products into groups to limit identification.

In parallel,

  • The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named projects/*/locations/*/products/*

  • Each [Product][google.cloud.vision.v1.Product] has a collection of [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named projects/*/locations/*/products/*/referenceImages/*

Constructors

ProductSearchClientImpl(ProductSearch.ProductSearchClient, ProductSearchSettings)

public ProductSearchClientImpl(ProductSearch.ProductSearchClient grpcClient, ProductSearchSettings settings)

Constructs a client wrapper for the ProductSearch service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientProductSearch.ProductSearchClient

The underlying gRPC client.

settingsProductSearchSettings

The base ProductSearchSettings used within this client.

Properties

GrpcClient

public override ProductSearch.ProductSearchClient GrpcClient { get; }

The underlying gRPC ProductSearch client

Property Value
TypeDescription
ProductSearch.ProductSearchClient
Overrides

ImportProductSetsOperationsClient

public override OperationsClient ImportProductSetsOperationsClient { get; }

The long-running operations client for ImportProductSets.

Property Value
TypeDescription
OperationsClient
Overrides

PurgeProductsOperationsClient

public override OperationsClient PurgeProductsOperationsClient { get; }

The long-running operations client for PurgeProducts.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

AddProductToProductSet(AddProductToProductSetRequest, CallSettings)

public override void AddProductToProductSet(AddProductToProductSetRequest request, CallSettings callSettings = null)

Adds a Product to the specified ProductSet. If the Product is already present, no change is made.

One Product can be added to at most 100 ProductSets.

Possible errors:

  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
Parameters
NameDescription
requestAddProductToProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

AddProductToProductSetAsync(AddProductToProductSetRequest, CallSettings)

public override Task AddProductToProductSetAsync(AddProductToProductSetRequest request, CallSettings callSettings = null)

Adds a Product to the specified ProductSet. If the Product is already present, no change is made.

One Product can be added to at most 100 ProductSets.

Possible errors:

  • Returns NOT_FOUND if the Product or the ProductSet doesn't exist.
Parameters
NameDescription
requestAddProductToProductSetRequest

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.

Overrides

CreateProduct(CreateProductRequest, CallSettings)

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

Creates and returns a new product resource.

Possible errors:

  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters.
  • Returns INVALID_ARGUMENT if product_category is missing or invalid.
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.

Overrides

CreateProductAsync(CreateProductRequest, CallSettings)

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

Creates and returns a new product resource.

Possible errors:

  • Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if description is longer than 4096 characters.
  • Returns INVALID_ARGUMENT if product_category is missing or invalid.
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.

Overrides

CreateProductSet(CreateProductSetRequest, CallSettings)

public override ProductSet CreateProductSet(CreateProductSetRequest request, CallSettings callSettings = null)

Creates and returns a new ProductSet resource.

Possible errors:

  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.
Parameters
NameDescription
requestCreateProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ProductSet

The RPC response.

Overrides

CreateProductSetAsync(CreateProductSetRequest, CallSettings)

public override Task<ProductSet> CreateProductSetAsync(CreateProductSetRequest request, CallSettings callSettings = null)

Creates and returns a new ProductSet resource.

Possible errors:

  • Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.
Parameters
NameDescription
requestCreateProductSetRequest

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<ProductSet>

A Task containing the RPC response.

Overrides

CreateReferenceImage(CreateReferenceImageRequest, CallSettings)

public override ReferenceImage CreateReferenceImage(CreateReferenceImageRequest request, CallSettings callSettings = null)

Creates and returns a new ReferenceImage resource.

The bounding_poly field is optional. If bounding_poly is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles.

Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP).

Possible errors:

  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if the product does not exist.
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected.
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
Parameters
NameDescription
requestCreateReferenceImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ReferenceImage

The RPC response.

Overrides

CreateReferenceImageAsync(CreateReferenceImageRequest, CallSettings)

public override Task<ReferenceImage> CreateReferenceImageAsync(CreateReferenceImageRequest request, CallSettings callSettings = null)

Creates and returns a new ReferenceImage resource.

The bounding_poly field is optional. If bounding_poly is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles.

Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP).

Possible errors:

  • Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if the product does not exist.
  • Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected.
  • Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.
Parameters
NameDescription
requestCreateReferenceImageRequest

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<ReferenceImage>

A Task containing the RPC response.

Overrides

DeleteProduct(DeleteProductRequest, CallSettings)

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

Permanently deletes a product and its reference images.

Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.

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.

Overrides

DeleteProductAsync(DeleteProductRequest, CallSettings)

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

Permanently deletes a product and its reference images.

Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.

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.

Overrides

DeleteProductSet(DeleteProductSetRequest, CallSettings)

public override void DeleteProductSet(DeleteProductSetRequest request, CallSettings callSettings = null)

Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted.

The actual image files are not deleted from Google Cloud Storage.

Parameters
NameDescription
requestDeleteProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteProductSetAsync(DeleteProductSetRequest, CallSettings)

public override Task DeleteProductSetAsync(DeleteProductSetRequest request, CallSettings callSettings = null)

Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted.

The actual image files are not deleted from Google Cloud Storage.

Parameters
NameDescription
requestDeleteProductSetRequest

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.

Overrides

DeleteReferenceImage(DeleteReferenceImageRequest, CallSettings)

public override void DeleteReferenceImage(DeleteReferenceImageRequest request, CallSettings callSettings = null)

Permanently deletes a reference image.

The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed.

The actual image files are not deleted from Google Cloud Storage.

Parameters
NameDescription
requestDeleteReferenceImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteReferenceImageAsync(DeleteReferenceImageRequest, CallSettings)

public override Task DeleteReferenceImageAsync(DeleteReferenceImageRequest request, CallSettings callSettings = null)

Permanently deletes a reference image.

The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed.

The actual image files are not deleted from Google Cloud Storage.

Parameters
NameDescription
requestDeleteReferenceImageRequest

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.

Overrides

GetProduct(GetProductRequest, CallSettings)

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

Gets information associated with a Product.

Possible errors:

  • Returns NOT_FOUND if the Product does not exist.
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.

Overrides

GetProductAsync(GetProductRequest, CallSettings)

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

Gets information associated with a Product.

Possible errors:

  • Returns NOT_FOUND if the Product does not exist.
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.

Overrides

GetProductSet(GetProductSetRequest, CallSettings)

public override ProductSet GetProductSet(GetProductSetRequest request, CallSettings callSettings = null)

Gets information associated with a ProductSet.

Possible errors:

  • Returns NOT_FOUND if the ProductSet does not exist.
Parameters
NameDescription
requestGetProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ProductSet

The RPC response.

Overrides

GetProductSetAsync(GetProductSetRequest, CallSettings)

public override Task<ProductSet> GetProductSetAsync(GetProductSetRequest request, CallSettings callSettings = null)

Gets information associated with a ProductSet.

Possible errors:

  • Returns NOT_FOUND if the ProductSet does not exist.
Parameters
NameDescription
requestGetProductSetRequest

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<ProductSet>

A Task containing the RPC response.

Overrides

GetReferenceImage(GetReferenceImageRequest, CallSettings)

public override ReferenceImage GetReferenceImage(GetReferenceImageRequest request, CallSettings callSettings = null)

Gets information associated with a ReferenceImage.

Possible errors:

  • Returns NOT_FOUND if the specified image does not exist.
Parameters
NameDescription
requestGetReferenceImageRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ReferenceImage

The RPC response.

Overrides

GetReferenceImageAsync(GetReferenceImageRequest, CallSettings)

public override Task<ReferenceImage> GetReferenceImageAsync(GetReferenceImageRequest request, CallSettings callSettings = null)

Gets information associated with a ReferenceImage.

Possible errors:

  • Returns NOT_FOUND if the specified image does not exist.
Parameters
NameDescription
requestGetReferenceImageRequest

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<ReferenceImage>

A Task containing the RPC response.

Overrides

ImportProductSets(ImportProductSetsRequest, CallSettings)

public override Operation<ImportProductSetsResponse, BatchOperationMetadata> ImportProductSets(ImportProductSetsRequest request, CallSettings callSettings = null)

Asynchronous API that imports a list of reference images to specified product sets based on a list of image information.

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress) Operation.response contains ImportProductSetsResponse. (results)

The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].

Parameters
NameDescription
requestImportProductSetsRequest

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<ImportProductSetsResponse, BatchOperationMetadata>

The RPC response.

Overrides

ImportProductSetsAsync(ImportProductSetsRequest, CallSettings)

public override Task<Operation<ImportProductSetsResponse, BatchOperationMetadata>> ImportProductSetsAsync(ImportProductSetsRequest request, CallSettings callSettings = null)

Asynchronous API that imports a list of reference images to specified product sets based on a list of image information.

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress) Operation.response contains ImportProductSetsResponse. (results)

The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].

Parameters
NameDescription
requestImportProductSetsRequest

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<ImportProductSetsResponse, BatchOperationMetadata>>

A Task containing the RPC response.

Overrides

ListProducts(ListProductsRequest, CallSettings)

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

Lists products in an unspecified order.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
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.

Overrides

ListProductsAsync(ListProductsRequest, CallSettings)

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

Lists products in an unspecified order.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
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.

Overrides

ListProductSets(ListProductSetsRequest, CallSettings)

public override PagedEnumerable<ListProductSetsResponse, ProductSet> ListProductSets(ListProductSetsRequest request, CallSettings callSettings = null)

Lists ProductSets in an unspecified order.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.
Parameters
NameDescription
requestListProductSetsRequest

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<ListProductSetsResponse, ProductSet>

A pageable sequence of ProductSet resources.

Overrides

ListProductSetsAsync(ListProductSetsRequest, CallSettings)

public override PagedAsyncEnumerable<ListProductSetsResponse, ProductSet> ListProductSetsAsync(ListProductSetsRequest request, CallSettings callSettings = null)

Lists ProductSets in an unspecified order.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.
Parameters
NameDescription
requestListProductSetsRequest

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<ListProductSetsResponse, ProductSet>

A pageable asynchronous sequence of ProductSet resources.

Overrides

ListProductsInProductSet(ListProductsInProductSetRequest, CallSettings)

public override PagedEnumerable<ListProductsInProductSetResponse, Product> ListProductsInProductSet(ListProductsInProductSetRequest request, CallSettings callSettings = null)

Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
Parameters
NameDescription
requestListProductsInProductSetRequest

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<ListProductsInProductSetResponse, Product>

A pageable sequence of Product resources.

Overrides

ListProductsInProductSetAsync(ListProductsInProductSetRequest, CallSettings)

public override PagedAsyncEnumerable<ListProductsInProductSetResponse, Product> ListProductsInProductSetAsync(ListProductsInProductSetRequest request, CallSettings callSettings = null)

Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty.

Possible errors:

  • Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.
Parameters
NameDescription
requestListProductsInProductSetRequest

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<ListProductsInProductSetResponse, Product>

A pageable asynchronous sequence of Product resources.

Overrides

ListReferenceImages(ListReferenceImagesRequest, CallSettings)

public override PagedEnumerable<ListReferenceImagesResponse, ReferenceImage> ListReferenceImages(ListReferenceImagesRequest request, CallSettings callSettings = null)

Lists reference images.

Possible errors:

  • Returns NOT_FOUND if the parent product does not exist.
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.
Parameters
NameDescription
requestListReferenceImagesRequest

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<ListReferenceImagesResponse, ReferenceImage>

A pageable sequence of ReferenceImage resources.

Overrides

ListReferenceImagesAsync(ListReferenceImagesRequest, CallSettings)

public override PagedAsyncEnumerable<ListReferenceImagesResponse, ReferenceImage> ListReferenceImagesAsync(ListReferenceImagesRequest request, CallSettings callSettings = null)

Lists reference images.

Possible errors:

  • Returns NOT_FOUND if the parent product does not exist.
  • Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.
Parameters
NameDescription
requestListReferenceImagesRequest

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<ListReferenceImagesResponse, ReferenceImage>

A pageable asynchronous sequence of ReferenceImage resources.

Overrides

PurgeProducts(PurgeProductsRequest, CallSettings)

public override Operation<Empty, BatchOperationMetadata> PurgeProducts(PurgeProductsRequest request, CallSettings callSettings = null)

Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet.

If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted.

It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted.

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion.

If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet.

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress)

Parameters
NameDescription
requestPurgeProductsRequest

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<Empty, BatchOperationMetadata>

The RPC response.

Overrides

PurgeProductsAsync(PurgeProductsRequest, CallSettings)

public override Task<Operation<Empty, BatchOperationMetadata>> PurgeProductsAsync(PurgeProductsRequest request, CallSettings callSettings = null)

Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet.

If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted.

It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted.

It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion.

If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet.

The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress)

Parameters
NameDescription
requestPurgeProductsRequest

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<Empty, BatchOperationMetadata>>

A Task containing the RPC response.

Overrides

RemoveProductFromProductSet(RemoveProductFromProductSetRequest, CallSettings)

public override void RemoveProductFromProductSet(RemoveProductFromProductSetRequest request, CallSettings callSettings = null)

Removes a Product from the specified ProductSet.

Parameters
NameDescription
requestRemoveProductFromProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

RemoveProductFromProductSetAsync(RemoveProductFromProductSetRequest, CallSettings)

public override Task RemoveProductFromProductSetAsync(RemoveProductFromProductSetRequest request, CallSettings callSettings = null)

Removes a Product from the specified ProductSet.

Parameters
NameDescription
requestRemoveProductFromProductSetRequest

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.

Overrides

UpdateProduct(UpdateProductRequest, CallSettings)

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

Makes changes to a Product resource. Only the display_name, description, and labels fields can be updated right now.

If labels are updated, the change will not be reflected in queries until the next index time.

Possible errors:

  • Returns NOT_FOUND if the Product does not exist.
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters.
  • Returns INVALID_ARGUMENT if product_category is present in update_mask.
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.

Overrides

UpdateProductAsync(UpdateProductRequest, CallSettings)

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

Makes changes to a Product resource. Only the display_name, description, and labels fields can be updated right now.

If labels are updated, the change will not be reflected in queries until the next index time.

Possible errors:

  • Returns NOT_FOUND if the Product does not exist.
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters.
  • Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters.
  • Returns INVALID_ARGUMENT if product_category is present in update_mask.
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.

Overrides

UpdateProductSet(UpdateProductSetRequest, CallSettings)

public override ProductSet UpdateProductSet(UpdateProductSetRequest request, CallSettings callSettings = null)

Makes changes to a ProductSet resource. Only display_name can be updated currently.

Possible errors:

  • Returns NOT_FOUND if the ProductSet does not exist.
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.
Parameters
NameDescription
requestUpdateProductSetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ProductSet

The RPC response.

Overrides

UpdateProductSetAsync(UpdateProductSetRequest, CallSettings)

public override Task<ProductSet> UpdateProductSetAsync(UpdateProductSetRequest request, CallSettings callSettings = null)

Makes changes to a ProductSet resource. Only display_name can be updated currently.

Possible errors:

  • Returns NOT_FOUND if the ProductSet does not exist.
  • Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.
Parameters
NameDescription
requestUpdateProductSetRequest

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<ProductSet>

A Task containing the RPC response.

Overrides