# DataStream v1 API - Class PostgresqlSslConfig.Types.ServerAndClientVerification (2.12.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.12.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.11.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.10.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.9.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.8.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.7.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.6.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.5.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.4.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.3.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.2.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.1.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/2.0.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/1.0.0/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification)

    public sealed class PostgresqlSslConfig.Types.ServerAndClientVerification : IMessage<PostgresqlSslConfig.Types.ServerAndClientVerification>, IEquatable<PostgresqlSslConfig.Types.ServerAndClientVerification>, IDeepCloneable<PostgresqlSslConfig.Types.ServerAndClientVerification>, IBufferMessage, IMessage

Reference documentation and code samples for the DataStream v1 API class PostgresqlSslConfig.Types.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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> PostgresqlSslConfig.Types.ServerAndClientVerification

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PostgresqlSslConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types)[ServerAndClientVerification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PostgresqlSslConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types)[ServerAndClientVerification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PostgresqlSslConfig](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types)[ServerAndClientVerification](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Datastream.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1)

## Assembly

Google.Cloud.Datastream.V1.dll

## Constructors

### ServerAndClientVerification()

    public ServerAndClientVerification()

### ServerAndClientVerification(ServerAndClientVerification)

    public ServerAndClientVerification(PostgresqlSslConfig.Types.ServerAndClientVerification other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfighttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Datastream.V1/latest/Google.Cloud.Datastream.V1.PostgresqlSslConfig.Types.ServerAndClientVerification` |

## Properties

### CaCertificate

    public string CaCertificate { get; set; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ClientCertificate

    public string ClientCertificate { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ClientKey

    public string ClientKey { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### ServerCertificateHostname

    public string ServerCertificateHostname { get; set; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |