Reference documentation and code samples for the Cloud Speech V2 Client class Config.
Message representing the config for the Speech-to-Text API. This includes an
optionalKMS keywith which incoming data will be encrypted.
Generated from protobuf messagegoogle.cloud.speech.v2.Config
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 name of the config resource. There is exactly one config resource per project per location. The expected format isprojects/{project}/locations/{location}/config.
↳ kms_key_name
string
Optional. An optionalKMS key namethat if present, will be used to encrypt Speech-to-Text resources at-rest. Updating this key will not encrypt existing resources using this key; only new resources will be encrypted using this key. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
Output only. The most recent time this resource was modified.
getName
Output only. Identifier. The name of the config resource. There is exactly
one config resource per project per location. The expected format isprojects/{project}/locations/{location}/config.
Returns
Type
Description
string
setName
Output only. Identifier. The name of the config resource. There is exactly
one config resource per project per location. The expected format isprojects/{project}/locations/{location}/config.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getKmsKeyName
Optional. An optionalKMS key
namethat if
present, will be used to encrypt Speech-to-Text resources at-rest. Updating
this key will not encrypt existing resources using this key; only new
resources will be encrypted using this key. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
Returns
Type
Description
string
setKmsKeyName
Optional. An optionalKMS key
namethat if
present, will be used to encrypt Speech-to-Text resources at-rest. Updating
this key will not encrypt existing resources using this key; only new
resources will be encrypted using this key. The expected format isprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getUpdateTime
Output only. The most recent time this resource was modified.
[[["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 Config (2.1.1)\n\nVersion latestkeyboard_arrow_down\n\n- [2.1.1 (latest)](/php/docs/reference/cloud-speech/latest/V2.Config)\n- [2.1.0](/php/docs/reference/cloud-speech/2.1.0/V2.Config)\n- [2.0.1](/php/docs/reference/cloud-speech/2.0.1/V2.Config)\n- [1.20.1](/php/docs/reference/cloud-speech/1.20.1/V2.Config)\n- [1.19.2](/php/docs/reference/cloud-speech/1.19.2/V2.Config)\n- [1.18.3](/php/docs/reference/cloud-speech/1.18.3/V2.Config)\n- [1.16.0](/php/docs/reference/cloud-speech/1.16.0/V2.Config)\n- [1.15.0](/php/docs/reference/cloud-speech/1.15.0/V2.Config)\n- [1.14.3](/php/docs/reference/cloud-speech/1.14.3/V2.Config)\n- [1.13.1](/php/docs/reference/cloud-speech/1.13.1/V2.Config)\n- [1.12.0](/php/docs/reference/cloud-speech/1.12.0/V2.Config)\n- [1.11.2](/php/docs/reference/cloud-speech/1.11.2/V2.Config)\n- [1.10.0](/php/docs/reference/cloud-speech/1.10.0/V2.Config)\n- [1.9.1](/php/docs/reference/cloud-speech/1.9.1/V2.Config)\n- [1.8.0](/php/docs/reference/cloud-speech/1.8.0/V2.Config)\n- [1.7.0](/php/docs/reference/cloud-speech/1.7.0/V2.Config) \nReference documentation and code samples for the Cloud Speech V2 Client class Config.\n\nMessage representing the config for the Speech-to-Text API. This includes an\noptional [KMS key](https://cloud.google.com/kms/docs/resource-hierarchy#keys)\nwith which incoming data will be encrypted.\n\nGenerated from protobuf message `google.cloud.speech.v2.Config`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Speech \\\\ V2\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nOutput only. Identifier. The name of the config resource. There is exactly\none config resource per project per location. The expected format is\n`projects/{project}/locations/{location}/config`.\n\n### setName\n\nOutput only. Identifier. The name of the config resource. There is exactly\none config resource per project per location. The expected format is\n`projects/{project}/locations/{location}/config`.\n\n### getKmsKeyName\n\nOptional. An optional [KMS key\nname](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if\npresent, will be used to encrypt Speech-to-Text resources at-rest. Updating\nthis key will not encrypt existing resources using this key; only new\nresources will be encrypted using this key. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\n\n### setKmsKeyName\n\nOptional. An optional [KMS key\nname](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that if\npresent, will be used to encrypt Speech-to-Text resources at-rest. Updating\nthis key will not encrypt existing resources using this key; only new\nresources will be encrypted using this key. The expected format is\n`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.\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."]]