# Google Cloud Datastream V1 Client - Class ServerAndClientVerification (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.0 2.1.1 2.0.1 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Datastream V1 Client class ServerAndClientVerification.

Message represents the option where Datastream will enforce the encryption
and authenticate the server identity as well as the client identity.

ca_certificate, client_certificate and client_key must be set if user
selects this option.

Generated from protobuf message `google.cloud.datastream.v1.PostgresqlSslConfig.ServerAndClientVerification`

## Namespace

Google \\ Cloud \\ Datastream \\ V1 \\ PostgresqlSslConfig

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ client_certificate` | `string` Required. Input only. PEM-encoded certificate used by the source database to authenticate the client identity (i.e., the Datastream's identity). This certificate is signed by either a root certificate trusted by the server or one or more intermediate certificates (which is stored with the leaf certificate) to link the this certificate to the trusted root certificate. |
| `↳ client_key` | `string` Optional. Input only. PEM-encoded private key associated with the client certificate. This value will be used during the SSL/TLS handshake, allowing the PostgreSQL server to authenticate the client's identity, i.e. identity of the Datastream. |
| `↳ ca_certificate` | `string` Required. Input only. PEM-encoded server root CA certificate. |
| `↳ server_certificate_hostname` | `string` Optional. The hostname mentioned in the Subject or SAN extension of the server certificate. If this field is not provided, the hostname in the server certificate is not validated. |

### getClientCertificate

Required. Input only. PEM-encoded certificate used by the source database
to authenticate the client identity (i.e., the Datastream's identity).

This certificate is signed by either a root certificate trusted by the
server or one or more intermediate certificates (which is stored with the
leaf certificate) to link the this certificate to the trusted root
certificate.

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

### setClientCertificate

Required. Input only. PEM-encoded certificate used by the source database
to authenticate the client identity (i.e., the Datastream's identity).

This certificate is signed by either a root certificate trusted by the
server or one or more intermediate certificates (which is stored with the
leaf certificate) to link the this certificate to the trusted root
certificate.

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

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

### getClientKey

Optional. Input only. PEM-encoded private key associated with the client
certificate. This value will be used during the SSL/TLS handshake,
allowing the PostgreSQL server to authenticate the client's identity,
i.e. identity of the Datastream.

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

### setClientKey

Optional. Input only. PEM-encoded private key associated with the client
certificate. This value will be used during the SSL/TLS handshake,
allowing the PostgreSQL server to authenticate the client's identity,
i.e. identity of the Datastream.

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

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

### getCaCertificate

Required. Input only. PEM-encoded server root CA certificate.

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

### setCaCertificate

Required. Input only. PEM-encoded server root CA certificate.

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

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

### getServerCertificateHostname

Optional. The hostname mentioned in the Subject or SAN extension of the
server certificate. If this field is not provided, the hostname in the
server certificate is not validated.

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

### setServerCertificateHostname

Optional. The hostname mentioned in the Subject or SAN extension of the
server certificate. If this field is not provided, the hostname in the
server certificate is not validated.

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

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