# Google Cloud Filestore V1 Client - Class NfsExportOptions (2.2.3)

2.2.3 (latest) 2.2.2 2.1.1 2.0.4 1.5.7 1.4.0 1.3.2 1.2.1 1.1.2 1.0.3 Reference documentation and code samples for the Google Cloud Filestore V1 Client class NfsExportOptions.

NFS export options specifications.

Generated from protobuf message `google.cloud.filestore.v1.NfsExportOptions`

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ ip_ranges` | `string[]` List of either an IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the file share. Overlapping IP ranges are not allowed, both within and across NfsExportOptions. An error will be returned. The limit is 64 IP ranges/addresses for each FileShareConfig among all NfsExportOptions. |
| `↳ access_mode` | `int` Either READ_ONLY, for allowing only read requests on the exported directory, or READ_WRITE, for allowing both read and write requests. The default is READ_WRITE. |
| `↳ squash_mode` | `int` Either NO_ROOT_SQUASH, for allowing root access on the exported directory, or ROOT_SQUASH, for not allowing root access. The default is NO_ROOT_SQUASH. |
| `↳ anon_uid` | `int|string` An integer representing the anonymous user id with a default value of 65534. Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be returned if this field is specified for other squash_mode settings. |
| `↳ anon_gid` | `int|string` An integer representing the anonymous group id with a default value of 65534. Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be returned if this field is specified for other squash_mode settings. |

### getIpRanges

List of either an IPv4 addresses in the format
`{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
`{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
file share.

Overlapping IP ranges are not allowed, both within and across
NfsExportOptions. An error will be returned.
The limit is 64 IP ranges/addresses for each FileShareConfig among all
NfsExportOptions.

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

### setIpRanges

List of either an IPv4 addresses in the format
`{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format
`{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the
file share.

Overlapping IP ranges are not allowed, both within and across
NfsExportOptions. An error will be returned.
The limit is 64 IP ranges/addresses for each FileShareConfig among all
NfsExportOptions.

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

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

### getAccessMode

Either READ_ONLY, for allowing only read requests on the exported
directory, or READ_WRITE, for allowing both read and write requests.

The default is READ_WRITE.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [AccessMode](https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NfsExportOptions.AccessMode). |

### setAccessMode

Either READ_ONLY, for allowing only read requests on the exported
directory, or READ_WRITE, for allowing both read and write requests.

The default is READ_WRITE.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [AccessMode](https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NfsExportOptions.AccessMode). |

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

### getSquashMode

Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
or ROOT_SQUASH, for not allowing root access. The default is
NO_ROOT_SQUASH.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [SquashMode](https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NfsExportOptions.SquashMode). |

### setSquashMode

Either NO_ROOT_SQUASH, for allowing root access on the exported directory,
or ROOT_SQUASH, for not allowing root access. The default is
NO_ROOT_SQUASH.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [SquashMode](https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NfsExportOptions.SquashMode). |

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

### getAnonUid

An integer representing the anonymous user id with a default value of
65534.

Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
returned if this field is specified for other squash_mode settings.

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

### setAnonUid

An integer representing the anonymous user id with a default value of
65534.

Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be
returned if this field is specified for other squash_mode settings.

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

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

### getAnonGid

An integer representing the anonymous group id with a default value of
65534.

Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
returned if this field is specified for other squash_mode settings.

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

### setAnonGid

An integer representing the anonymous group id with a default value of
65534.

Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be
returned if this field is specified for other squash_mode settings.

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

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