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

Network configuration for the instance.

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

## Namespace

Google \\ Cloud \\ Filestore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ network` | `string` The name of the Google Compute Engine [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. |
| `↳ modes` | `int[]` Internet protocol versions for which the instance has IP addresses assigned. For this version, only MODE_IPV4 is supported. |
| `↳ reserved_ip_range` | `string` Optional, reserved_ip_range can have one of the following two types of values. \* \* CIDR range value when using DIRECT_PEERING connect mode. \* \* [Allocated IP address range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) when using PRIVATE_SERVICE_ACCESS connect mode. When the name of an allocated IP address range is specified, it must be one of the ranges associated with the private service access connection. When specified as a direct CIDR value, it must be a /29 CIDR block for Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for Enterprise tier in one of the [internal IP address ranges](https://www.arin.net/reference/research/statistics/address_filters/) that identifies the range of IP addresses reserved for this instance. For example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The range you specify can't overlap with either existing subnets or assigned IP address ranges for other Filestore instances in the selected VPC network. |
| `↳ ip_addresses` | `string[]` Output only. IPv4 addresses in the format `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. |
| `↳ connect_mode` | `int` The network connect mode of the Filestore instance. If not provided, the connect mode defaults to DIRECT_PEERING. |

### getNetwork

The name of the Google Compute Engine
[VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
instance is connected.

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

### setNetwork

The name of the Google Compute Engine
[VPC network](https://cloud.google.com/vpc/docs/vpc) to which the
instance is connected.

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

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

### getModes

Internet protocol versions for which the instance has IP addresses
assigned. For this version, only MODE_IPV4 is supported.

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

### setModes

Internet protocol versions for which the instance has IP addresses
assigned. For this version, only MODE_IPV4 is supported.

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

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

### getReservedIpRange

Optional, reserved_ip_range can have one of the following two types of
values.

- CIDR range value when using DIRECT_PEERING connect mode.
- [Allocated IP address
  range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) when using PRIVATE_SERVICE_ACCESS connect mode. When the name of an allocated IP address range is specified, it must be one of the ranges associated with the private service access connection. When specified as a direct CIDR value, it must be a /29 CIDR block for Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for Enterprise tier in one of the [internal IP address
  ranges](https://www.arin.net/reference/research/statistics/address_filters/) that identifies the range of IP addresses reserved for this instance. For example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The range you specify can't overlap with either existing subnets or assigned IP address ranges for other Filestore instances in the selected VPC network.

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

### setReservedIpRange

Optional, reserved_ip_range can have one of the following two types of
values.

- CIDR range value when using DIRECT_PEERING connect mode.
- [Allocated IP address
  range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) when using PRIVATE_SERVICE_ACCESS connect mode. When the name of an allocated IP address range is specified, it must be one of the ranges associated with the private service access connection. When specified as a direct CIDR value, it must be a /29 CIDR block for Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for Enterprise tier in one of the [internal IP address
  ranges](https://www.arin.net/reference/research/statistics/address_filters/) that identifies the range of IP addresses reserved for this instance. For example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The range you specify can't overlap with either existing subnets or assigned IP address ranges for other Filestore instances in the selected VPC network.

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

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

### getIpAddresses

Output only. IPv4 addresses in the format
`{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
`{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.

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

### setIpAddresses

Output only. IPv4 addresses in the format
`{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format
`{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`.

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

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

### getConnectMode

The network connect mode of the Filestore instance.

If not provided, the connect mode defaults to DIRECT_PEERING.

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

### setConnectMode

The network connect mode of the Filestore instance.

If not provided, the connect mode defaults to DIRECT_PEERING.

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

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