# Google Cloud Bare Metal Solution V2 Client - Class LogicalNetworkInterface (1.1.3)

1.1.3 (latest) 1.1.2 1.0.5 0.6.5 0.5.2 0.4.0 0.3.2 0.2.8 Reference documentation and code samples for the Google Cloud Bare Metal Solution V2 Client class LogicalNetworkInterface.

Each logical network interface is effectively a network and IP pair.

Generated from protobuf message `google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface`

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2 \\ LogicalInterface

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ network` | `string` Name of the network |
| `↳ ip_address` | `string` IP address in the network |
| `↳ default_gateway` | `bool` Whether this interface is the default gateway for the instance. Only one interface can be the default gateway for the instance. |
| `↳ network_type` | `int` Type of network. |
| `↳ id` | `string` An identifier for the `Network`, generated by the backend. |

### getNetwork

Name of the network

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

### setNetwork

Name of the network

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

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

### getIpAddress

IP address in the network

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

### setIpAddress

IP address in the network

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

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

### getDefaultGateway

Whether this interface is the default gateway for the instance. Only
one interface can be the default gateway for the instance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDefaultGateway

Whether this interface is the default gateway for the instance. Only
one interface can be the default gateway for the instance.

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

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

### getNetworkType

Type of network.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.Network.Type). |

### setNetworkType

Type of network.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.Network.Type). |

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

### getId

An identifier for the `Network`, generated by the backend.

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

### setId

An identifier for the `Network`, generated by the backend.

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

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