# Google Cloud Migration Center V1 Client - Class HostsEntry (1.2.3)

1.2.3 (latest) 1.2.2 1.1.2 1.0.3 0.4.5 0.3.1 0.2.0 0.1.0 Reference documentation and code samples for the Google Cloud Migration Center V1 Client class HostsEntry.

Single /etc/hosts entry.

Generated from protobuf message `google.cloud.migrationcenter.v1.HostsEntry`

## Namespace

Google \\ Cloud \\ MigrationCenter \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ ip` | `string` IP (raw, IPv4/6 agnostic). |
| `↳ host_names` | `string[]` List of host names / aliases. |

### getIp

IP (raw, IPv4/6 agnostic).

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

### setIp

IP (raw, IPv4/6 agnostic).

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

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

### getHostNames

List of host names / aliases.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setHostNames

List of host names / aliases.

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

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