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

An NFS share.

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

## Namespace

Google \\ Cloud \\ BareMetalSolution \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Immutable. The name of the NFS share. |
| `↳ nfs_share_id` | `string` Output only. An identifier for the NFS share, generated by the backend. This field will be deprecated in the future, use `id` instead. |
| `↳ id` | `string` Output only. An identifier for the NFS share, generated by the backend. This is the same value as nfs_share_id and will replace it in the future. |
| `↳ state` | `int` Output only. The state of the NFS share. |
| `↳ volume` | `string` Output only. The underlying volume of the share. Created automatically during provisioning. |
| `↳ allowed_clients` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bare-metal-solution/latest/V2.NfsShare.AllowedClient>` List of allowed access points. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Labels as key value pairs. |
| `↳ requested_size_gib` | `int|string` The requested size, in GiB. |
| `↳ storage_type` | `int` Immutable. The storage type of the underlying volume. |

### getName

Immutable. The name of the NFS share.

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

### setName

Immutable. The name of the NFS share.

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

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

### getNfsShareId

Output only. An identifier for the NFS share, generated by the backend.

This field will be deprecated in the future, use `id` instead.

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

### setNfsShareId

Output only. An identifier for the NFS share, generated by the backend.

This field will be deprecated in the future, use `id` instead.

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

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

### getId

Output only. An identifier for the NFS share, generated by the backend.

This is the same value as nfs_share_id and will replace it in the future.

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

### setId

Output only. An identifier for the NFS share, generated by the backend.

This is the same value as nfs_share_id and will replace it in the future.

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

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

### getState

Output only. The state of the NFS share.

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

### setState

Output only. The state of the NFS share.

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

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

### getVolume

Output only. The underlying volume of the share. Created automatically
during provisioning.

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

### setVolume

Output only. The underlying volume of the share. Created automatically
during provisioning.

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

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

### getAllowedClients

List of allowed access points.

| **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.NfsShare.AllowedClient>` |   |

### setAllowedClients

List of allowed access points.

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

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

### getRequestedSizeGib

The requested size, in GiB.

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

### setRequestedSizeGib

The requested size, in GiB.

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

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

### getStorageType

Immutable. The storage type of the underlying volume.

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

### setStorageType

Immutable. The storage type of the underlying volume.

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

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