product_sets
Creates, updates, deletes, gets or lists a product_sets
resource.
Overview
Name | product_sets |
Type | Resource |
Id | google.vision.product_sets |
Fields
Name | Datatype | Description |
---|---|---|
name | string | 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. |
displayName | string | The user-provided name for this ProductSet. Must not be empty. Must be at most 4096 characters long. |
indexError | object | The 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. |
indexTime | string | Output 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_product_sets_get | SELECT | locationsId, productSetsId, projectsId | Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. |
projects_locations_product_sets_list | SELECT | locationsId, projectsId | Lists 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_create | INSERT | locationsId, projectsId | Creates 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_delete | DELETE | locationsId, productSetsId, projectsId | Permanently 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_patch | UPDATE | locationsId, productSetsId, projectsId | 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. |
projects_locations_product_sets_import | EXEC | locationsId, projectsId | 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. |
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.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.vision.product_sets (
locationsId,
projectsId,
name,
displayName
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ name }}',
'{{ displayName }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: displayName
value: string
- name: indexTime
value: string
- name: indexError
value:
- name: code
value: integer
- name: message
value: string
- name: details
value:
- object
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 }}';