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

A HostAddress represents a transport end point, which is the combination
of an IP address or hostname and a port number.

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

## 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 connection. |
| `↳ port` | `int` Optional. Port for the connection. |

### getHostname

Required. Hostname for the connection.

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

### setHostname

Required. Hostname for the connection.

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

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

### getPort

Optional. Port for the connection.

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

### setPort

Optional. Port for the connection.

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

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