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

A Network.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of this `Network`. Resource names are schemeless URIs that follow the conventions in <https://cloud.google.com/apis/design/resource_names>. Format: `projects/{project}/locations/{location}/networks/{network}` |
| `↳ id` | `string` An identifier for the `Network`, generated by the backend. |
| `↳ type` | `int` The type of this network. |
| `↳ ip_address` | `string` IP address configured. |
| `↳ mac_address` | `string[]` List of physical interfaces. |
| `↳ state` | `int` The Network state. |
| `↳ vlan_id` | `string` The vlan id of the Network. |
| `↳ cidr` | `string` The cidr of the Network. |
| `↳ vrf` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VRF` The vrf for the Network. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels as key value pairs. |
| `↳ services_cidr` | `string` IP range for reserved for services (e.g. NFS). |
| `↳ reservations` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.NetworkAddressReservation>` List of IP address reservations in this network. When updating this field, an error will be generated if a reservation conflicts with an IP address already allocated to a physical server. |
| `↳ pod` | `string` Output only. Pod name. |
| `↳ mount_points` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.NetworkMountPoint>` Input only. List of mount points to attach the network to. |
| `↳ jumbo_frames_enabled` | `bool` Whether network uses standard frames or jumbo ones. |
| `↳ gateway_ip` | `string` Output only. Gateway ip address. |

### getName

Output only. The resource name of this `Network`.

Resource names are schemeless URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
Format:
`projects/{project}/locations/{location}/networks/{network}`

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

### setName

Output only. The resource name of this `Network`.

Resource names are schemeless URIs that follow the conventions in
<https://cloud.google.com/apis/design/resource_names>.
Format:
`projects/{project}/locations/{location}/networks/{network}`

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

| **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` |   |

### getType

The type of this 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). |

### setType

The type of this 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` |   |

### getIpAddress

IP address configured.

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

### setIpAddress

IP address configured.

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

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

### getMacAddress

List of physical interfaces.

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

### setMacAddress

List of physical interfaces.

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

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

### getState

The Network state.

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

### setState

The Network state.

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

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

### getVlanId

The vlan id of the Network.

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

### setVlanId

The vlan id of the Network.

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

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

### getCidr

The cidr of the Network.

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

### setCidr

The cidr of the Network.

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

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

### getVrf

The vrf for the Network.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VRF|null` |   |

### hasVrf

### clearVrf

### setVrf

The vrf for the Network.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.VRF` |

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

### getLabels

Labels as key value pairs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setLabels

Labels as key value pairs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getServicesCidr

IP range for reserved for services (e.g. NFS).

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

### setServicesCidr

IP range for reserved for services (e.g. NFS).

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

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

### getReservations

List of IP address reservations in this network.

When updating this field, an error will be generated if a reservation
conflicts with an IP address already allocated to a physical server.

| **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.NetworkAddressReservation>` |   |

### setReservations

List of IP address reservations in this network.

When updating this field, an error will be generated if a reservation
conflicts with an IP address already allocated to a physical server.

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

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

### getPod

Output only. Pod name.

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

### setPod

Output only. Pod name.

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

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

### getMountPoints

Input only. List of mount points to attach the network to.

| **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.NetworkMountPoint>` |   |

### setMountPoints

Input only. List of mount points to attach the network to.

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

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

### getJumboFramesEnabled

Whether network uses standard frames or jumbo ones.

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

### setJumboFramesEnabled

Whether network uses standard frames or jumbo ones.

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

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

### getGatewayIp

Output only. Gateway ip address.

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

### setGatewayIp

Output only. Gateway ip address.

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

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