# Cloud Speech V2 Client - Class Config (2.5.1)

2.5.1 (latest) 2.5.0 2.4.0 2.3.0 2.2.1 2.1.1 2.0.1 1.20.1 1.19.2 1.18.3 1.16.0 1.15.0 1.14.3 1.13.1 1.12.0 1.11.2 1.10.0 1.9.1 1.8.0 1.7.0 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
optional [KMS key](https://cloud.google.com/kms/docs/resource-hierarchy#keys)
with which incoming data will be encrypted.

Generated from protobuf message `google.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 is `projects/{project}/locations/{location}/config`. |
| `↳ kms_key_name` | `string` Optional. An optional [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that 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 is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` 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 is
`projects/{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 is
`projects/{project}/locations/{location}/config`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getKmsKeyName

Optional. An optional [KMS key
name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that 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 is
`projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setKmsKeyName

Optional. An optional [KMS key
name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) that 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 is
`projects/{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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The most recent time this resource was modified.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |