Show / Hide Table of Contents

Class ProjectsResource.LocationsResource.ProductsResource

The "products" collection of methods.

Inheritance
object
ProjectsResource.LocationsResource.ProductsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Vision.v1
Assembly: Google.Apis.Vision.v1.dll
Syntax
public class ProjectsResource.LocationsResource.ProductsResource

Constructors

ProductsResource(IClientService)

Constructs a new resource.

Declaration
public ProductsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Properties

ReferenceImages

Gets the ReferenceImages resource.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.ReferenceImagesResource ReferenceImages { get; }
Property Value
Type Description
ProjectsResource.LocationsResource.ProductsResource.ReferenceImagesResource

Methods

Create(Product, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.CreateRequest Create(Product body, string parent)
Parameters
Type Name Description
Product body

The body of the request.

string parent

Required. The project in which the Product should be created. Format is projects/PROJECT_ID/locations/LOC_ID.

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.CreateRequest

Delete(string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.DeleteRequest Delete(string name)
Parameters
Type Name Description
string name

Required. Resource name of product to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.DeleteRequest

Get(string)

Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.GetRequest Get(string name)
Parameters
Type Name Description
string name

Required. Resource name of the Product to get. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.GetRequest

List(string)

Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.ListRequest List(string parent)
Parameters
Type Name Description
string parent

Required. The project OR ProductSet from which Products should be listed. Format: projects/PROJECT_ID/locations/LOC_ID

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.ListRequest

Patch(Product, string)

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.

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.PatchRequest Patch(Product body, string name)
Parameters
Type Name Description
Product body

The body of the request.

string name

The resource name of the product. Format is: projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID. This field is ignored when creating a product.

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.PatchRequest

Purge(PurgeProductsRequest, string)

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 API can be used to keep track of the progress and results of the request. Operation.metadata contains BatchOperationMetadata. (progress)

Declaration
public virtual ProjectsResource.LocationsResource.ProductsResource.PurgeRequest Purge(PurgeProductsRequest body, string parent)
Parameters
Type Name Description
PurgeProductsRequest body

The body of the request.

string parent

Required. The project and location in which the Products should be deleted. Format is projects/PROJECT_ID/locations/LOC_ID.

Returns
Type Description
ProjectsResource.LocationsResource.ProductsResource.PurgeRequest
In this article
Back to top Generated by DocFX