# Google Cloud Discovery Engine V1 Client - Class CmekConfig (1.11.1)

1.11.1 (latest) 1.11.0 1.10.1 1.9.1 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.3 1.2.0 1.1.0 1.0.0 0.11.3 0.8.0 0.7.1 0.6.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class CmekConfig.

Configurations used to enable CMEK data encryption with Cloud KMS keys.

Generated from protobuf message `google.cloud.discoveryengine.v1.CmekConfig`

## Namespace

Google \\ Cloud \\ DiscoveryEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. The name of the CmekConfig of the form `projects/{project}/locations/{location}/cmekConfig` or `projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`. |
| `↳ kms_key` | `string` KMS key resource name which will be used to encrypt resources `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`. |
| `↳ kms_key_version` | `string` KMS key version resource name which will be used to encrypt resources `<kms_key>/cryptoKeyVersions/{keyVersion}`. |
| `↳ state` | `int` Output only. The states of the CmekConfig. |
| `↳ is_default` | `bool` Output only. The default CmekConfig for the Customer. |
| `↳ last_rotation_timestamp_micros` | `int|string` Output only. The timestamp of the last key rotation. |
| `↳ single_region_keys` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SingleRegionKey>` Optional. Single-regional CMEKs that are required for some VAIS features. |
| `↳ notebooklm_state` | `int` Output only. Whether the NotebookLM Corpus is ready to be used. |

### getName

Required. The name of the CmekConfig of the form
`projects/{project}/locations/{location}/cmekConfig` or
`projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.

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

### setName

Required. The name of the CmekConfig of the form
`projects/{project}/locations/{location}/cmekConfig` or
`projects/{project}/locations/{location}/cmekConfigs/{cmek_config}`.

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

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

### getKmsKey

KMS key resource name which will be used to encrypt resources
`projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.

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

### setKmsKey

KMS key resource name which will be used to encrypt resources
`projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{keyId}`.

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

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

### getKmsKeyVersion

KMS key version resource name which will be used to encrypt resources
`<kms_key>/cryptoKeyVersions/{keyVersion}`.

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

### setKmsKeyVersion

KMS key version resource name which will be used to encrypt resources
`<kms_key>/cryptoKeyVersions/{keyVersion}`.

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

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

### getState

Output only. The states of the CmekConfig.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CmekConfig.State). |

### setState

Output only. The states of the CmekConfig.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CmekConfig.State). |

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

### getIsDefault

Output only. The default CmekConfig for the Customer.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setIsDefault

Output only. The default CmekConfig for the Customer.

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

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

### getLastRotationTimestampMicros

Output only. The timestamp of the last key rotation.

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

### setLastRotationTimestampMicros

Output only. The timestamp of the last key rotation.

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

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

### getSingleRegionKeys

Optional. Single-regional CMEKs that are required for some VAIS features.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SingleRegionKey>` |   |

### setSingleRegionKeys

Optional. Single-regional CMEKs that are required for some VAIS features.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.SingleRegionKey>` |

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

### getNotebooklmState

Output only. Whether the NotebookLM Corpus is ready to be used.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [NotebookLMState](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CmekConfig.NotebookLMState). |

### setNotebooklmState

Output only. Whether the NotebookLM Corpus is ready to be used.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [NotebookLMState](https://docs.cloud.google.com/php/docs/reference/cloud-discoveryengine/latest/V1.CmekConfig.NotebookLMState). |

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