class ProjectsLocationsProductSets extends Resource (View source)

The "productSets" collection of methods.

Typical usage is:

 $visionService = new Google\Service\Vision(...);
 $productSets = $visionService->projects_locations_productSets;

Methods

addProduct(string $name, AddProductToProductSetRequest $postBody, array $optParams = [])

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. (productSets.addProduct)

create(string $parent, ProductSet $postBody, array $optParams = [])

Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. (productSets.create)

delete(string $name, array $optParams = [])

Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage. (productSets.delete)

get(string $name, array $optParams = [])

Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. (productSets.get)

import(string $parent, ImportProductSetsRequest $postBody, array $optParams = [])

Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The google.longrunning.Operation API can be used to keep track of the progress and results of the request.

listProjectsLocationsProductSets(string $parent, array $optParams = [])

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

patch(string $name, ProductSet $postBody, array $optParams = [])

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.

removeProduct(string $name, RemoveProductFromProductSetRequest $postBody, array $optParams = [])

Removes a Product from the specified ProductSet. (productSets.removeProduct)

Details

VisionEmpty addProduct(string $name, AddProductToProductSetRequest $postBody, array $optParams = [])

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. (productSets.addProduct)

Parameters

string $name

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

AddProductToProductSetRequest $postBody
array $optParams

Optional parameters.

Return Value

VisionEmpty

Exceptions

Exception

ProductSet create(string $parent, ProductSet $postBody, array $optParams = [])

Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters. (productSets.create)

Parameters

string $parent

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

ProductSet $postBody
array $optParams

Optional parameters.

Return Value

ProductSet

Exceptions

Exception

VisionEmpty delete(string $name, array $optParams = [])

Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage. (productSets.delete)

Parameters

string $name

Required. Resource name of the ProductSet to delete. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

array $optParams

Optional parameters.

Return Value

VisionEmpty

Exceptions

Exception

ProductSet get(string $name, array $optParams = [])

Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. (productSets.get)

Parameters

string $name

Required. Resource name of the ProductSet to get. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

array $optParams

Optional parameters.

Return Value

ProductSet

Exceptions

Exception

Operation import(string $parent, ImportProductSetsRequest $postBody, array $optParams = [])

Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The 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. (productSets.import)

Parameters

string $parent

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

ImportProductSetsRequest $postBody
array $optParams

Optional parameters.

Return Value

Operation

Exceptions

Exception

ListProductSetsResponse listProjectsLocationsProductSets(string $parent, array $optParams = [])

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

(productSets.listProjectsLocationsProductSets)

Parameters

string $parent

Required. The project from which ProductSets should be listed. Format is projects/PROJECT_ID/locations/LOC_ID.

array $optParams

Optional parameters.

Return Value

ListProductSetsResponse

Exceptions

Exception

ProductSet patch(string $name, ProductSet $postBody, array $optParams = [])

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.

(productSets.patch)

Parameters

string $name

The resource name of the ProductSet. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID. This field is ignored when creating a ProductSet.

ProductSet $postBody
array $optParams

Optional parameters.

Return Value

ProductSet

Exceptions

Exception

VisionEmpty removeProduct(string $name, RemoveProductFromProductSetRequest $postBody, array $optParams = [])

Removes a Product from the specified ProductSet. (productSets.removeProduct)

Parameters

string $name

Required. The resource name for the ProductSet to modify. Format is: projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID

RemoveProductFromProductSetRequest $postBody
array $optParams

Optional parameters.

Return Value

VisionEmpty

Exceptions

Exception