# Google Cloud Managed Kafka V1 Client - Class GcpConfig (0.8.0)

0.8.0 (latest) 0.7.2 0.6.1 0.5.0 0.4.1 0.3.1 0.2.3 0.1.3 Reference documentation and code samples for the Google Cloud Managed Kafka V1 Client class GcpConfig.

Configuration properties for a Kafka cluster deployed to Google Cloud
Platform.

Generated from protobuf message `google.cloud.managedkafka.v1.GcpConfig`

## Namespace

Google \\ Cloud \\ ManagedKafka \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ access_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.AccessConfig` Required. Access configuration for the Kafka cluster. |
| `↳ kms_key` | `string` Optional. Immutable. The Cloud KMS Key name to use for encryption. The key must be located in the same region as the cluster and cannot be changed. Structured like: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}. |

### getAccessConfig

Required. Access configuration for the Kafka cluster.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.AccessConfig|null` |   |

### hasAccessConfig

### clearAccessConfig

### setAccessConfig

Required. Access configuration for the Kafka cluster.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.AccessConfig` |

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

### getKmsKey

Optional. Immutable. The Cloud KMS Key name to use for encryption. The key
must be located in the same region as the cluster and cannot be changed.

Structured like:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

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

### setKmsKey

Optional. Immutable. The Cloud KMS Key name to use for encryption. The key
must be located in the same region as the cluster and cannot be changed.

Structured like:
projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

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

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