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

A storage volume logical unit number (LUN).

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

## 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 name of the LUN. |
| `↳ id` | `string` An identifier for the LUN, generated by the backend. |
| `↳ state` | `int` The state of this storage volume. |
| `↳ size_gb` | `int|string` The size of this LUN, in gigabytes. |
| `↳ multiprotocol_type` | `int` The LUN multiprotocol type ensures the characteristics of the LUN are optimized for each operating system. |
| `↳ storage_volume` | `string` Display the storage volume for this LUN. |
| `↳ shareable` | `bool` Display if this LUN can be shared between multiple physical servers. |
| `↳ boot_lun` | `bool` Display if this LUN is a boot LUN. |
| `↳ storage_type` | `int` The storage type for this LUN. |
| `↳ wwid` | `string` The WWID for this LUN. |
| `↳ expire_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time after which LUN will be fully deleted. It is filled only for LUNs in COOL_OFF state. |
| `↳ instances` | `string[]` Output only. Instances this Lun is attached to. |

### getName

Output only. The name of the LUN.

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

### setName

Output only. The name of the LUN.

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

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

### getId

An identifier for the LUN, generated by the backend.

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

### setId

An identifier for the LUN, generated by the backend.

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

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

### getState

The state of this storage volume.

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

### setState

The state of this storage volume.

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

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

### getSizeGb

The size of this LUN, in gigabytes.

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

### setSizeGb

The size of this LUN, in gigabytes.

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

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

### getMultiprotocolType

The LUN multiprotocol type ensures the characteristics of the LUN are
optimized for each operating system.

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

### setMultiprotocolType

The LUN multiprotocol type ensures the characteristics of the LUN are
optimized for each operating system.

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

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

### getStorageVolume

Display the storage volume for this LUN.

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

### setStorageVolume

Display the storage volume for this LUN.

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

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

### getShareable

Display if this LUN can be shared between multiple physical servers.

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

### setShareable

Display if this LUN can be shared between multiple physical servers.

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

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

### getBootLun

Display if this LUN is a boot LUN.

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

### setBootLun

Display if this LUN is a boot LUN.

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

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

### getStorageType

The storage type for this LUN.

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

### setStorageType

The storage type for this LUN.

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

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

### getWwid

The WWID for this LUN.

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

### setWwid

The WWID for this LUN.

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

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

### getExpireTime

Output only. Time after which LUN will be fully deleted.

It is filled only for LUNs in COOL_OFF state.

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

### hasExpireTime

### clearExpireTime

### setExpireTime

Output only. Time after which LUN will be fully deleted.

It is filled only for LUNs in COOL_OFF state.

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

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

### getInstances

Output only. Instances this Lun is attached to.

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

### setInstances

Output only. Instances this Lun is attached to.

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

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