# 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.

Each logical interface represents a logical abstraction of the underlying
physical interface (for eg. bond, nic) of the instance. Each logical
interface can effectively map to multiple network-IP pairs and still be
mapped to one underlying physical interface.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ logical_network_interfaces` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface.LogicalNetworkInterface>` List of logical network interfaces within a logical interface. |
| `↳ name` | `string` Interface name. This is of syntax |
| `↳ interface_index` | `int` The index of the logical interface mapping to the index of the hardware bond or nic on the chosen network template. This field is deprecated. |

### getLogicalNetworkInterfaces

List of logical network interfaces within a logical interface.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface.LogicalNetworkInterface>` |   |

### setLogicalNetworkInterfaces

List of logical network interfaces within a logical interface.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.LogicalInterface.LogicalNetworkInterface>` |

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

### getName

Interface name. This is of syntax


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

### setName

Interface name. This is of syntax


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

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

### getInterfaceIndex

The index of the logical interface mapping to the index of the hardware
bond or nic on the chosen network template. This field is deprecated.

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

### setInterfaceIndex

The index of the logical interface mapping to the index of the hardware
bond or nic on the chosen network template. This field is deprecated.

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

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