Skip to main content

product_sets

Creates, updates, deletes, gets or lists a product_sets resource.

Overview

Nameproduct_sets
TypeResource
Idgoogle.vision.product_sets

Fields

NameDatatypeDescription
namestringThe 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.
displayNamestringThe user-provided name for this ProductSet. Must not be empty. Must be at most 4096 characters long.
indexErrorobjectThe Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.
indexTimestringOutput only. The time at which this ProductSet was last indexed. Query results will reflect all updates before this time. If this ProductSet has never been indexed, this timestamp is the default value "1970-01-01T00:00:00Z". This field is ignored when creating a ProductSet.

Methods

NameAccessible byRequired ParamsDescription
projects_locations_product_sets_getSELECTlocationsId, productSetsId, projectsIdGets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.
projects_locations_product_sets_listSELECTlocationsId, projectsIdLists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.
projects_locations_product_sets_createINSERTlocationsId, projectsIdCreates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.
projects_locations_product_sets_deleteDELETElocationsId, productSetsId, projectsIdPermanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.
projects_locations_product_sets_patchUPDATElocationsId, productSetsId, projectsIdMakes 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.
projects_locations_product_sets_importEXEClocationsId, projectsIdAsynchronous 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.

SELECT examples

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

SELECT
name,
displayName,
indexError,
indexTime
FROM google.vision.product_sets
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new product_sets resource.

/*+ create */
INSERT INTO google.vision.product_sets (
locationsId,
projectsId,
name,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}'
;

UPDATE example

Updates a product_sets resource.

/*+ update */
UPDATE google.vision.product_sets
SET
name = '{{ name }}',
displayName = '{{ displayName }}'
WHERE
locationsId = '{{ locationsId }}'
AND productSetsId = '{{ productSetsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified product_sets resource.

/*+ delete */
DELETE FROM google.vision.product_sets
WHERE locationsId = '{{ locationsId }}'
AND productSetsId = '{{ productSetsId }}'
AND projectsId = '{{ projectsId }}';