Skip to main content

custom_classes

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

Overview

Namecustom_classes
TypeResource
Idgoogle.speech.custom_classes

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringThe resource name of the custom class.
annotationsobjectOutput 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.
customClassIdstringIf this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.
deleteTimestring (google-datetime)Output only. The time at which this resource was requested for deletion. This field is not used.
displayNamestringOutput only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used.
etagstringOutput 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.
expireTimestring (google-datetime)Output only. The time at which this resource will be purged. This field is not used.
itemsarrayA collection of class items.
kmsKeyNamestringOutput 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}.
kmsKeyVersionNamestringOutput 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}.
reconcilingbooleanOutput only. Whether or not this CustomClass is in the process of being updated. This field is not used.
statestringOutput only. The CustomClass lifecycle state. This field is not used.
uidstringOutput only. System-assigned unique identifier for the CustomClass. This field is not used.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, customClassesIdGet a custom class.
listselectprojectsId, locationsIdpageSize, pageTokenList custom classes.
createinsertprojectsId, locationsIdCreate a custom class.
patchupdateprojectsId, locationsId, customClassesIdupdateMaskUpdate a custom class.
deletedeleteprojectsId, locationsId, customClassesIdDelete 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.

NameDatatypeDescription
customClassesIdstring
locationsIdstring
projectsIdstring
pageSizeinteger (int32)
pageTokenstring
updateMaskstring (google-fieldmask)

SELECT examples

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;

INSERT examples

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
;

UPDATE examples

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 a custom class.

DELETE FROM google.speech.custom_classes
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND customClassesId = '{{ customClassesId }}' --required;