# Google Cloud Network Security V1 Client - Class ClientTlsPolicy (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class ClientTlsPolicy.

ClientTlsPolicy is a resource that specifies how a client should authenticate
connections to backends of a service. This resource itself does not affect
configuration unless it is attached to a backend service resource.

Generated from protobuf message `google.cloud.networksecurity.v1.ClientTlsPolicy`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` |
| `↳ description` | `string` Optional. Free-text description of the resource. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the resource was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The timestamp when the resource was updated. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Set of label tags associated with the resource. |
| `↳ sni` | `string` Optional. Server Name Indication string to present to the server during TLS handshake. E.g: "secure.example.com". |
| `↳ client_certificate` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.CertificateProvider` Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS. |
| `↳ server_validation_ca` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.ValidationCA>` Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate. |

### getName

Required. Name of the ClientTlsPolicy resource. It matches the pattern
`projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}`

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

### setName

Required. Name of the ClientTlsPolicy resource. It matches the pattern
`projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}`

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

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

### getDescription

Optional. Free-text description of the resource.

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

### setDescription

Optional. Free-text description of the resource.

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

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

### getCreateTime

Output only. The timestamp when the resource was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp when the resource was created.

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

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

### getUpdateTime

Output only. The timestamp when the resource was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The timestamp when the resource was updated.

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

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

### getLabels

Optional. Set of label tags associated with the resource.

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

### setLabels

Optional. Set of label tags associated with the resource.

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

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

### getSni

Optional. Server Name Indication string to present to the server during TLS
handshake. E.g: "secure.example.com".

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

### setSni

Optional. Server Name Indication string to present to the server during TLS
handshake. E.g: "secure.example.com".

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

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

### getClientCertificate

Optional. Defines a mechanism to provision client identity (public and
private keys) for peer to peer authentication. The presence of this
dictates mTLS.

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

### hasClientCertificate

### clearClientCertificate

### setClientCertificate

Optional. Defines a mechanism to provision client identity (public and
private keys) for peer to peer authentication. The presence of this
dictates mTLS.

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

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

### getServerValidationCa

Optional. Defines the mechanism to obtain the Certificate Authority
certificate to validate the server certificate. If empty, client does not
validate the server certificate.

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

### setServerValidationCa

Optional. Defines the mechanism to obtain the Certificate Authority
certificate to validate the server certificate. If empty, client does not
validate the server certificate.

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

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