# Google Cloud Datastream V1 Client - Class PostgresqlProfile (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 PostgresqlProfile.

PostgreSQL database profile.

Generated from protobuf message `google.cloud.datastream.v1.PostgresqlProfile`

## Namespace

Google \\ Cloud \\ Datastream \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ hostname` | `string` Required. Hostname for the PostgreSQL connection. |
| `↳ port` | `int` Port for the PostgreSQL connection, default value is 5432. |
| `↳ username` | `string` Required. Username for the PostgreSQL connection. |
| `↳ password` | `string` Optional. Password for the PostgreSQL connection. Mutually exclusive with the `secret_manager_stored_password` field. |
| `↳ database` | `string` Required. Database for the PostgreSQL connection. |
| `↳ secret_manager_stored_password` | `string` Optional. A reference to a Secret Manager resource name storing the PostgreSQL connection password. Mutually exclusive with the `password` field. |
| `↳ ssl_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastream/latest/V1.PostgresqlSslConfig` Optional. SSL configuration for the PostgreSQL connection. In case PostgresqlSslConfig is not set, the connection will use the default SSL mode, which is `prefer` (i.e. this mode will only use encryption if enabled from database side, otherwise will use unencrypted communication) |

### getHostname

Required. Hostname for the PostgreSQL connection.

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

### setHostname

Required. Hostname for the PostgreSQL connection.

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

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

### getPort

Port for the PostgreSQL connection, default value is 5432.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPort

Port for the PostgreSQL connection, default value is 5432.

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

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

### getUsername

Required. Username for the PostgreSQL connection.

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

### setUsername

Required. Username for the PostgreSQL connection.

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

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

### getPassword

Optional. Password for the PostgreSQL connection. Mutually exclusive with
the `secret_manager_stored_password` field.

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

### setPassword

Optional. Password for the PostgreSQL connection. Mutually exclusive with
the `secret_manager_stored_password` field.

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

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

### getDatabase

Required. Database for the PostgreSQL connection.

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

### setDatabase

Required. Database for the PostgreSQL connection.

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

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

### getSecretManagerStoredPassword

Optional. A reference to a Secret Manager resource name storing the
PostgreSQL connection password. Mutually exclusive with the `password`
field.

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

### setSecretManagerStoredPassword

Optional. A reference to a Secret Manager resource name storing the
PostgreSQL connection password. Mutually exclusive with the `password`
field.

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

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

### getSslConfig

Optional. SSL configuration for the PostgreSQL connection.

In case PostgresqlSslConfig is not set, the connection will use the default
SSL mode, which is `prefer` (i.e. this mode will only use encryption if
enabled from database side, otherwise will use unencrypted communication)

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

### hasSslConfig

### clearSslConfig

### setSslConfig

Optional. SSL configuration for the PostgreSQL connection.

In case PostgresqlSslConfig is not set, the connection will use the default
SSL mode, which is `prefer` (i.e. this mode will only use encryption if
enabled from database side, otherwise will use unencrypted communication)

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

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