product_sets
Creates, updates, deletes, gets or lists a product_sets
resource.
Overview
Name | product_sets |
Type | Resource |
Id | google.vision.product_sets |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_product_sets_get
- projects_locations_product_sets_list
Successful response
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 | Output only. If there was an error with indexing the product set, the field is populated. This field is ignored when creating a ProductSet. (id: Status) |
indexTime | string (google-datetime) | 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. |
Successful response
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 | Output only. If there was an error with indexing the product set, the field is populated. This field is ignored when creating a ProductSet. (id: Status) |
indexTime | string (google-datetime) | 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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_product_sets_get | select | projectsId , locationsId , productSetsId | Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. | |
projects_locations_product_sets_list | select | projectsId , locationsId | pageSize , pageToken | 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 | projectsId , locationsId | productSetId | 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_patch | update | projectsId , locationsId , productSetsId | updateMask | 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_delete | delete | projectsId , locationsId , productSetsId | 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_import | exec | projectsId , locationsId | 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. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
productSetsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
productSetId | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_product_sets_get
- projects_locations_product_sets_list
Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.
SELECT
name,
displayName,
indexError,
indexTime
FROM google.vision.product_sets
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND productSetsId = '{{ productSetsId }}' -- required;
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 projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_product_sets_create
- Manifest
Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.
INSERT INTO google.vision.product_sets (
data__name,
data__displayName,
projectsId,
locationsId,
productSetId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ productSetId }}'
RETURNING
name,
displayName,
indexError,
indexTime
;
# Description fields are for documentation purposes
- name: product_sets
props:
- name: projectsId
value: string
description: Required parameter for the product_sets resource.
- name: locationsId
value: string
description: Required parameter for the product_sets resource.
- name: name
value: string
description: >
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.
- name: displayName
value: string
description: >
The user-provided name for this ProductSet. Must not be empty. Must be at most 4096 characters long.
- name: productSetId
value: string
UPDATE
examples
- projects_locations_product_sets_patch
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.
UPDATE google.vision.product_sets
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND productSetsId = '{{ productSetsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
indexError,
indexTime;
DELETE
examples
- projects_locations_product_sets_delete
Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.
DELETE FROM google.vision.product_sets
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND productSetsId = '{{ productSetsId }}' --required;
Lifecycle Methods
- projects_locations_product_sets_import
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.
EXEC google.vision.product_sets.projects_locations_product_sets_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required
@@json=
'{
"inputConfig": "{{ inputConfig }}"
}';