# Google Cloud Managed Kafka V1 Client - Class TlsConfig (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 TlsConfig.

The TLS configuration for the Kafka cluster.

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

## Namespace

Google \\ Cloud \\ ManagedKafka \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ trust_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.TrustConfig` Optional. The configuration of the broker truststore. If specified, clients can use mTLS for authentication. |
| `↳ ssl_principal_mapping_rules` | `string` Optional. A list of rules for mapping from SSL principal names to short names. These are applied in order by Kafka. Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules` for the precise formatting details and syntax. Example: "RULE:\^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT" This is a static Kafka broker configuration. Setting or modifying this field will trigger a rolling restart of the Kafka brokers to apply the change. An empty string means no rules are applied (Kafka default). |

### getTrustConfig

Optional. The configuration of the broker truststore. If specified, clients
can use mTLS for authentication.

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

### hasTrustConfig

### clearTrustConfig

### setTrustConfig

Optional. The configuration of the broker truststore. If specified, clients
can use mTLS for authentication.

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

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

### getSslPrincipalMappingRules

Optional. A list of rules for mapping from SSL principal names to
short names. These are applied in order by Kafka.

Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules`
for the precise formatting details and syntax.
Example: "RULE:\^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT"
This is a static Kafka broker configuration. Setting or modifying this
field will trigger a rolling restart of the Kafka brokers to apply
the change. An empty string means no rules are applied (Kafka default).

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

### setSslPrincipalMappingRules

Optional. A list of rules for mapping from SSL principal names to
short names. These are applied in order by Kafka.

Refer to the Apache Kafka documentation for `ssl.principal.mapping.rules`
for the precise formatting details and syntax.
Example: "RULE:\^CN=(.*?),OU=ServiceUsers.*$/$1@example.com/,DEFAULT"
This is a static Kafka broker configuration. Setting or modifying this
field will trigger a rolling restart of the Kafka brokers to apply
the change. An empty string means no rules are applied (Kafka default).

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

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