Reference documentation and code samples for the Cloud Speech V2 Client class CustomClass.
CustomClass for biasing in speech recognition. Used to define a set of words
or phrases that represents a common concept or theme likely to appear in your
audio, for example a list of passenger ship names.
Generated from protobuf messagegoogle.cloud.speech.v2.CustomClass
Namespace
Google \ Cloud \ Speech \ V2
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Output only. Identifier. The resource name of the CustomClass. Format:projects/{project}/locations/{location}/customClasses/{custom_class}.
↳ uid
string
Output only. System-assigned unique identifier for the CustomClass.
↳ display_name
string
Optional. User-settable, human-readable name for the CustomClass. Must be 63 characters or less.
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.
↳ 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.
↳ reconciling
bool
Output only. Whether or not this CustomClass is in the process of being updated.
↳ kms_key_name
string
Output only. TheKMS key namewith which the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
↳ kms_key_version_name
string
Output only. TheKMS key version namewith which the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}.
getName
Output only. Identifier. The resource name of the CustomClass.
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.
Returns
Type
Description
string
setEtag
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getReconciling
Output only. Whether or not this CustomClass is in the process of being
updated.
Returns
Type
Description
bool
setReconciling
Output only. Whether or not this CustomClass is in the process of being
updated.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getKmsKeyName
Output only. TheKMS key
namewith which
the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
Returns
Type
Description
string
setKmsKeyName
Output only. TheKMS key
namewith which
the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKmsKeyVersionName
Output only. TheKMS key version
namewith which the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}.
Returns
Type
Description
string
setKmsKeyVersionName
Output only. TheKMS key version
namewith which the CustomClass is encrypted. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Cloud Speech V2 Client - Class CustomClass (2.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.1 (latest)](/php/docs/reference/cloud-speech/latest/V2.CustomClass)\n- [2.1.0](/php/docs/reference/cloud-speech/2.1.0/V2.CustomClass)\n- [2.0.1](/php/docs/reference/cloud-speech/2.0.1/V2.CustomClass)\n- [1.20.1](/php/docs/reference/cloud-speech/1.20.1/V2.CustomClass)\n- [1.19.2](/php/docs/reference/cloud-speech/1.19.2/V2.CustomClass)\n- [1.18.3](/php/docs/reference/cloud-speech/1.18.3/V2.CustomClass)\n- [1.16.0](/php/docs/reference/cloud-speech/1.16.0/V2.CustomClass)\n- [1.15.0](/php/docs/reference/cloud-speech/1.15.0/V2.CustomClass)\n- [1.14.3](/php/docs/reference/cloud-speech/1.14.3/V2.CustomClass)\n- [1.13.1](/php/docs/reference/cloud-speech/1.13.1/V2.CustomClass)\n- [1.12.0](/php/docs/reference/cloud-speech/1.12.0/V2.CustomClass)\n- [1.11.2](/php/docs/reference/cloud-speech/1.11.2/V2.CustomClass)\n- [1.10.0](/php/docs/reference/cloud-speech/1.10.0/V2.CustomClass)\n- [1.9.1](/php/docs/reference/cloud-speech/1.9.1/V2.CustomClass)\n- [1.8.0](/php/docs/reference/cloud-speech/1.8.0/V2.CustomClass)\n- [1.7.0](/php/docs/reference/cloud-speech/1.7.0/V2.CustomClass) \nReference documentation and code samples for the Cloud Speech V2 Client class CustomClass.\n\nCustomClass for biasing in speech recognition. Used to define a set of words\nor phrases that represents a common concept or theme likely to appear in your\naudio, for example a list of passenger ship names.\n\nGenerated from protobuf message `google.cloud.speech.v2.CustomClass`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Speech \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. Identifier. The resource name of the CustomClass.\n\nFormat:\n`projects/{project}/locations/{location}/customClasses/{custom_class}`.\n\n### setName\n\nOutput only. Identifier. The resource name of the CustomClass.\n\nFormat:\n`projects/{project}/locations/{location}/customClasses/{custom_class}`.\n\n### getUid\n\nOutput only. System-assigned unique identifier for the CustomClass.\n\n### setUid\n\nOutput only. System-assigned unique identifier for the CustomClass.\n\n### getDisplayName\n\nOptional. User-settable, human-readable name for the CustomClass. Must be\n63 characters or less.\n\n### setDisplayName\n\nOptional. User-settable, human-readable name for the CustomClass. Must be\n63 characters or less.\n\n### getItems\n\nA collection of class items.\n\n### setItems\n\nA collection of class items.\n\n### getState\n\nOutput only. The CustomClass lifecycle state.\n\n### setState\n\nOutput only. The CustomClass lifecycle state.\n\n### getCreateTime\n\nOutput only. Creation time.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Creation time.\n\n### getUpdateTime\n\nOutput only. The most recent time this resource was modified.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. The most recent time this resource was modified.\n\n### getDeleteTime\n\nOutput only. The time at which this resource was requested for deletion.\n\n### hasDeleteTime\n\n### clearDeleteTime\n\n### setDeleteTime\n\nOutput only. The time at which this resource was requested for deletion.\n\n### getExpireTime\n\nOutput only. The time at which this resource will be purged.\n\n### hasExpireTime\n\n### clearExpireTime\n\n### setExpireTime\n\nOutput only. The time at which this resource will be purged.\n\n### getAnnotations\n\nOptional. Allows users to store small amounts of arbitrary data.\n\nBoth the key and the value must be 63 characters or less each.\nAt most 100 annotations.\n\n### setAnnotations\n\nOptional. Allows users to store small amounts of arbitrary data.\n\nBoth the key and the value must be 63 characters or less each.\nAt most 100 annotations.\n\n### getEtag\n\nOutput only. This checksum is computed by the server based on the value of\nother fields. This may be sent on update, undelete, and delete requests to\nensure the client has an up-to-date value before proceeding.\n\n### setEtag\n\nOutput only. This checksum is computed by the server based on the value of\nother fields. This may be sent on update, undelete, and delete requests to\nensure the client has an up-to-date value before proceeding.\n\n### getReconciling\n\nOutput only. Whether or not this CustomClass is in the process of being\nupdated.\n\n### setReconciling\n\nOutput only. Whether or not this CustomClass is in the process of being\nupdated.\n\n### getKmsKeyName\n\nOutput only. The [KMS key\nname](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which\nthe CustomClass is encrypted. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n### setKmsKeyName\n\nOutput only. The [KMS key\nname](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which\nthe CustomClass is encrypted. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n### getKmsKeyVersionName\n\nOutput only. The [KMS key version\nname](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)\nwith which the CustomClass is encrypted. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.\n\n### setKmsKeyVersionName\n\nOutput only. The [KMS key version\nname](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions)\nwith which the CustomClass is encrypted. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`."]]