custom_classes
Creates, updates, deletes, gets or lists a custom_classes
resource.
Overview
Name | custom_classes |
Type | Resource |
Id | google.speech.custom_classes |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the custom class. |
annotations | object | Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used. |
customClassId | string | If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. This field is not used. |
displayName | string | Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used. |
etag | string | Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used. |
expireTime | string (google-datetime) | Output only. The time at which this resource will be purged. This field is not used. |
items | array | A collection of class items. |
kmsKeyName | string | Output only. The KMS key name with which the content of the ClassItem is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} . |
kmsKeyVersionName | string | Output only. The KMS key version name with which content of the ClassItem is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} . |
reconciling | boolean | Output only. Whether or not this CustomClass is in the process of being updated. This field is not used. |
state | string | Output only. The CustomClass lifecycle state. This field is not used. |
uid | string | Output only. System-assigned unique identifier for the CustomClass. This field is not used. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | The resource name of the custom class. |
annotations | object | Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used. |
customClassId | string | If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. This field is not used. |
displayName | string | Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used. |
etag | string | Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used. |
expireTime | string (google-datetime) | Output only. The time at which this resource will be purged. This field is not used. |
items | array | A collection of class items. |
kmsKeyName | string | Output only. The KMS key name with which the content of the ClassItem is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} . |
kmsKeyVersionName | string | Output only. The KMS key version name with which content of the ClassItem is encrypted. The expected format is projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} . |
reconciling | boolean | Output only. Whether or not this CustomClass is in the process of being updated. This field is not used. |
state | string | Output only. The CustomClass lifecycle state. This field is not used. |
uid | string | Output only. System-assigned unique identifier for the CustomClass. This field is not used. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , customClassesId | Get a custom class. | |
list | select | projectsId , locationsId | pageSize , pageToken | List custom classes. |
create | insert | projectsId , locationsId | Create a custom class. | |
patch | update | projectsId , locationsId , customClassesId | updateMask | Update a custom class. |
delete | delete | projectsId , locationsId , customClassesId | Delete a custom class. |
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 |
---|---|---|
customClassesId | string | |
locationsId | string | |
projectsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Get a custom class.
SELECT
name,
annotations,
customClassId,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid
FROM google.speech.custom_classes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND customClassesId = '{{ customClassesId }}' -- required;
List custom classes.
SELECT
name,
annotations,
customClassId,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid
FROM google.speech.custom_classes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Create a custom class.
INSERT INTO google.speech.custom_classes (
data__customClassId,
data__customClass,
projectsId,
locationsId
)
SELECT
'{{ customClassId }}',
'{{ customClass }}',
'{{ projectsId }}',
'{{ locationsId }}'
RETURNING
name,
annotations,
customClassId,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid
;
# Description fields are for documentation purposes
- name: custom_classes
props:
- name: projectsId
value: string
description: Required parameter for the custom_classes resource.
- name: locationsId
value: string
description: Required parameter for the custom_classes resource.
- name: customClassId
value: string
description: >
Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.
- name: customClass
value: object
description: >
Required. The custom class to create.
UPDATE
examples
- patch
Update a custom class.
UPDATE google.speech.custom_classes
SET
data__name = '{{ name }}',
data__customClassId = '{{ customClassId }}',
data__items = '{{ items }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customClassesId = '{{ customClassesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
annotations,
customClassId,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid;
DELETE
examples
- delete
Delete a custom class.
DELETE FROM google.speech.custom_classes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customClassesId = '{{ customClassesId }}' --required;