custom_classes
Creates, updates, deletes, gets or lists a custom_classes resource.
Overview
| Name | custom_classes |
| Type | Resource |
| Id | google.speechv2.custom_classes |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the CustomClass. Format: projects/{project}/locations/{location}/customClasses/{custom_class}. |
annotations | object | Optional. 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. |
createTime | string (google-datetime) | Output only. Creation time. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. |
displayName | string | Optional. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. |
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. |
expireTime | string (google-datetime) | Output only. The time at which this resource will be purged. |
items | array | A collection of class items. |
kmsKeyName | string | Output only. The KMS key name with which the CustomClass 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 the CustomClass 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. |
state | string | Output only. The CustomClass lifecycle state. |
uid | string | Output only. System-assigned unique identifier for the CustomClass. |
updateTime | string (google-datetime) | Output only. The most recent time this resource was modified. |
| Name | Datatype | Description |
|---|---|---|
name | string | Output only. Identifier. The resource name of the CustomClass. Format: projects/{project}/locations/{location}/customClasses/{custom_class}. |
annotations | object | Optional. 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. |
createTime | string (google-datetime) | Output only. Creation time. |
deleteTime | string (google-datetime) | Output only. The time at which this resource was requested for deletion. |
displayName | string | Optional. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. |
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. |
expireTime | string (google-datetime) | Output only. The time at which this resource will be purged. |
items | array | A collection of class items. |
kmsKeyName | string | Output only. The KMS key name with which the CustomClass 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 the CustomClass 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. |
state | string | Output only. The CustomClass lifecycle state. |
uid | string | Output only. System-assigned unique identifier for the CustomClass. |
updateTime | string (google-datetime) | Output only. The most recent time this resource was modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, customClassesId | Returns the requested CustomClass. | |
list | select | projectsId, locationsId | pageSize, pageToken, showDeleted | Lists CustomClasses. |
create | insert | projectsId, locationsId | validateOnly, customClassId | Creates a CustomClass. |
patch | update | projectsId, locationsId, customClassesId | updateMask, validateOnly | Updates the CustomClass. |
delete | delete | projectsId, locationsId, customClassesId | validateOnly, allowMissing, etag | Deletes the CustomClass. |
undelete | exec | projectsId, locationsId, customClassesId | Undeletes the CustomClass. |
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 | |
allowMissing | boolean | |
customClassId | string | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
showDeleted | boolean | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- get
- list
Returns the requested CustomClass.
SELECT
name,
annotations,
createTime,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.custom_classes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND customClassesId = '{{ customClassesId }}' -- required
;
Lists CustomClasses.
SELECT
name,
annotations,
createTime,
deleteTime,
displayName,
etag,
expireTime,
items,
kmsKeyName,
kmsKeyVersionName,
reconciling,
state,
uid,
updateTime
FROM google.speechv2.custom_classes
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND showDeleted = '{{ showDeleted }}'
;
INSERT examples
- create
- Manifest
Creates a CustomClass.
INSERT INTO google.speechv2.custom_classes (
data__displayName,
data__items,
data__annotations,
projectsId,
locationsId,
validateOnly,
customClassId
)
SELECT
'{{ displayName }}',
'{{ items }}',
'{{ annotations }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ validateOnly }}',
'{{ customClassId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# 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: displayName
value: string
description: >
Optional. User-settable, human-readable name for the CustomClass. Must be 63 characters or less.
- name: items
value: array
description: >
A collection of class items.
- name: annotations
value: object
description: >
Optional. 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.
- name: validateOnly
value: boolean
- name: customClassId
value: string
UPDATE examples
- patch
Updates the CustomClass.
UPDATE google.speechv2.custom_classes
SET
data__displayName = '{{ displayName }}',
data__items = '{{ items }}',
data__annotations = '{{ annotations }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customClassesId = '{{ customClassesId }}' --required
AND updateMask = '{{ updateMask}}'
AND validateOnly = {{ validateOnly}}
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes the CustomClass.
DELETE FROM google.speechv2.custom_classes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customClassesId = '{{ customClassesId }}' --required
AND validateOnly = '{{ validateOnly }}'
AND allowMissing = '{{ allowMissing }}'
AND etag = '{{ etag }}'
;
Lifecycle Methods
- undelete
Undeletes the CustomClass.
EXEC google.speechv2.custom_classes.undelete
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@customClassesId='{{ customClassesId }}' --required
@@json=
'{
"name": "{{ name }}",
"validateOnly": {{ validateOnly }},
"etag": "{{ etag }}"
}'
;