# Google Cloud Filestore V1 Client - Class Instance (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 Instance.

A Filestore instance.

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

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Output only. The resource name of the instance, in the format `projects/{project}/locations/{location}/instances/{instance}`. |
| `↳ description` | `string` The description of the instance (2048 characters or less). |
| `↳ state` | `int` Output only. The instance state. |
| `↳ status_message` | `string` Output only. Additional information about the instance state, if available. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time when the instance was created. |
| `↳ tier` | `int` The service tier of the instance. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Resource labels to represent user provided metadata. |
| `↳ file_shares` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.FileShareConfig>` File system shares on the instance. For this version, only a single file share is supported. |
| `↳ networks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NetworkConfig>` VPC networks to which the instance is connected. For this version, only a single network is supported. |
| `↳ etag` | `string` Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. |
| `↳ satisfies_pzs` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/BoolValue` Output only. Reserved for future use. |
| `↳ satisfies_pzi` | `bool` Output only. Reserved for future use. |
| `↳ kms_key_name` | `string` KMS key name used for data encryption. |
| `↳ suspension_reasons` | `int[]` Output only. Field indicates all the reasons the instance is in "SUSPENDED" state. |
| `↳ replication` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Replication` Optional. Replication configuration. |
| `↳ tags` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Input only. Immutable. Tag key-value pairs bound to this resource. Each key must be a namespaced name and each value a short name. Example: "123456789012/environment" : "production", "123456789013/costCenter" : "marketing" See the documentation for more information: - Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key> - Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value> |
| `↳ protocol` | `int` Immutable. The protocol indicates the access protocol for all shares in the instance. This field is immutable and it cannot be changed after the instance has been created. Default value: `NFS_V3`. |
| `↳ custom_performance_supported` | `bool` Output only. Indicates whether this instance supports configuring its performance. If true, the user can configure the instance's performance by using the 'performance_config' field. |
| `↳ performance_config` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceConfig` Optional. Used to configure performance. |
| `↳ performance_limits` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceLimits` Output only. Used for getting performance limits. |
| `↳ deletion_protection_enabled` | `bool` Optional. Indicates whether the instance is protected against deletion. |
| `↳ deletion_protection_reason` | `string` Optional. The reason for enabling deletion protection. |

### getName

Output only. The resource name of the instance, in the format
`projects/{project}/locations/{location}/instances/{instance}`.

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

### setName

Output only. The resource name of the instance, in the format
`projects/{project}/locations/{location}/instances/{instance}`.

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

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

### getDescription

The description of the instance (2048 characters or less).

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

### setDescription

The description of the instance (2048 characters or less).

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

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

### getState

Output only. The instance state.

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

### setState

Output only. The instance state.

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

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

### getStatusMessage

Output only. Additional information about the instance state, if available.

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

### setStatusMessage

Output only. Additional information about the instance state, if available.

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

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

### getCreateTime

Output only. The time when the instance was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time when the instance was created.

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

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

### getTier

The service tier of the instance.

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

### setTier

The service tier of the instance.

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

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

### getLabels

Resource labels to represent user provided metadata.

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

### setLabels

Resource labels to represent user provided metadata.

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

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

### getFileShares

File system shares on the instance.

For this version, only a single file share is supported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.FileShareConfig>` |   |

### setFileShares

File system shares on the instance.

For this version, only a single file share is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.FileShareConfig>` |

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

### getNetworks

VPC networks to which the instance is connected.

For this version, only a single network is supported.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NetworkConfig>` |   |

### setNetworks

VPC networks to which the instance is connected.

For this version, only a single network is supported.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.NetworkConfig>` |

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

### getEtag

Server-specified ETag for the instance resource to prevent simultaneous
updates from overwriting each other.

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

### setEtag

Server-specified ETag for the instance resource to prevent simultaneous
updates from overwriting each other.

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

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

### getSatisfiesPzs

Output only. Reserved for future use.

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

### hasSatisfiesPzs

### clearSatisfiesPzs

### getSatisfiesPzsUnwrapped

Returns the unboxed value from `getSatisfiesPzs()`

Output only. Reserved for future use.

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

### setSatisfiesPzs

Output only. Reserved for future use.

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

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

### setSatisfiesPzsUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\BoolValue object.

Output only. Reserved for future use.

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

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

### getSatisfiesPzi

Output only. Reserved for future use.

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

### setSatisfiesPzi

Output only. Reserved for future use.

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

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

### getKmsKeyName

KMS key name used for data encryption.

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

### setKmsKeyName

KMS key name used for data encryption.

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

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

### getSuspensionReasons

Output only. Field indicates all the reasons the instance is in "SUSPENDED"
state.

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

### setSuspensionReasons

Output only. Field indicates all the reasons the instance is in "SUSPENDED"
state.

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

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

### getReplication

Optional. Replication configuration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Replication|null` |   |

### hasReplication

### clearReplication

### setReplication

Optional. Replication configuration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Replication` |

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

### getTags

Optional. Input only. Immutable. Tag key-value pairs bound to this
resource. Each key must be a namespaced name and each value a short name.

Example:
"123456789012/environment" : "production",
"123456789013/costCenter" : "marketing"
See the documentation for more information:

- Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key>
- Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value>

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

### setTags

Optional. Input only. Immutable. Tag key-value pairs bound to this
resource. Each key must be a namespaced name and each value a short name.

Example:
"123456789012/environment" : "production",
"123456789013/costCenter" : "marketing"
See the documentation for more information:

- Namespaced name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key>
- Short name: <https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value>

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

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

### getProtocol

Immutable. The protocol indicates the access protocol for all shares in the
instance. This field is immutable and it cannot be changed after the
instance has been created. Default value: `NFS_V3`.

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

### setProtocol

Immutable. The protocol indicates the access protocol for all shares in the
instance. This field is immutable and it cannot be changed after the
instance has been created. Default value: `NFS_V3`.

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

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

### getCustomPerformanceSupported

Output only. Indicates whether this instance supports configuring its
performance. If true, the user can configure the instance's performance by
using the 'performance_config' field.

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

### setCustomPerformanceSupported

Output only. Indicates whether this instance supports configuring its
performance. If true, the user can configure the instance's performance by
using the 'performance_config' field.

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

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

### getPerformanceConfig

Optional. Used to configure performance.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceConfig|null` |   |

### hasPerformanceConfig

### clearPerformanceConfig

### setPerformanceConfig

Optional. Used to configure performance.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceConfig` |

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

### getPerformanceLimits

Output only. Used for getting performance limits.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceLimits|null` |   |

### hasPerformanceLimits

### clearPerformanceLimits

### setPerformanceLimits

Output only. Used for getting performance limits.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-filestore/latest/V1.Instance.PerformanceLimits` |

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

### getDeletionProtectionEnabled

Optional. Indicates whether the instance is protected against deletion.

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

### setDeletionProtectionEnabled

Optional. Indicates whether the instance is protected against deletion.

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

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

### getDeletionProtectionReason

Optional. The reason for enabling deletion protection.

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

### setDeletionProtectionReason

Optional. The reason for enabling deletion protection.

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

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