# Google Cloud Migration Center V1 Client - Class NetworkConnection (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 NetworkConnection.

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

## Namespace

Google \\ Cloud \\ MigrationCenter \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ protocol` | `string` Connection protocol (e.g. TCP/UDP). |
| `↳ local_ip_address` | `string` Local IP address. |
| `↳ local_port` | `int` Local port. |
| `↳ remote_ip_address` | `string` Remote IP address. |
| `↳ remote_port` | `int` Remote port. |
| `↳ state` | `int` Network connection state. |
| `↳ pid` | `int|string` Process ID. |
| `↳ process_name` | `string` Process or service name. |

### getProtocol

Connection protocol (e.g. TCP/UDP).

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

### setProtocol

Connection protocol (e.g. TCP/UDP).

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

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

### getLocalIpAddress

Local IP address.

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

### setLocalIpAddress

Local IP address.

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

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

### getLocalPort

Local port.

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

### setLocalPort

Local port.

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

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

### getRemoteIpAddress

Remote IP address.

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

### setRemoteIpAddress

Remote IP address.

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

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

### getRemotePort

Remote port.

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

### setRemotePort

Remote port.

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

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

### getState

Network connection state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.NetworkConnection.State). |

### setState

Network connection state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-migrationcenter/latest/V1.NetworkConnection.State). |

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

### getPid

Process ID.

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

### setPid

Process ID.

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

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

### getProcessName

Process or service name.

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

### setProcessName

Process or service name.

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

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