# Google Cloud Bare Metal Solution V2 Client - Class LogicalInterface (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 LogicalInterface.

Logical interface.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2 \\ ServerNetworkTemplate

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Interface name. This is not a globally unique identifier. Name is unique only inside the ServerNetworkTemplate. This is of syntax |
| `↳ type` | `int` Interface type. |
| `↳ required` | `bool` If true, interface must have network connected. |

### getName

Interface name.

This is not a globally unique identifier.
Name is unique only inside the ServerNetworkTemplate. This is of syntax


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

### setName

Interface name.

This is not a globally unique identifier.
Name is unique only inside the ServerNetworkTemplate. This is of syntax


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

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

### getType

Interface type.

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

### setType

Interface type.

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

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

### getRequired

If true, interface must have network connected.

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

### setRequired

If true, interface must have network connected.

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

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