2.2.3 (latest) 2.1.3 2.0.4 1.3.5 1.2.2 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Appengine Admin V1 Client class Network.

Extra network settings.

Only applicable in the App Engine flexible environment.

Generated from protobuf message `google.appengine.v1.Network`

## Namespace

Google \\ Cloud \\ AppEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ forwarded_ports` | `string[]` List of ports, or port pairs, to forward from the virtual machine to the application container. Only applicable in the App Engine flexible environment. |
| `↳ instance_tag` | `string` Tag to apply to the instance during creation. Only applicable in the App Engine flexible environment. |
| `↳ name` | `string` Google Compute Engine network where the virtual machines are created. Specify the short name, not the resource path. Defaults to `default`. |
| `↳ subnetwork_name` | `string` Google Cloud Platform sub-network where the virtual machines are created. Specify the short name, not the resource path. If a subnetwork name is specified, a network name will also be required unless it is for the default network. \* \* If the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range. \* \* If the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network. \* \* If the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork. If specified, the subnetwork must exist in the same region as the App Engine flexible environment application. |
| `↳ session_affinity` | `bool` Enable session affinity. Only applicable in the App Engine flexible environment. |

### getForwardedPorts

List of ports, or port pairs, to forward from the virtual machine to the
application container.

Only applicable in the App Engine flexible environment.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setForwardedPorts

List of ports, or port pairs, to forward from the virtual machine to the
application container.

Only applicable in the App Engine flexible environment.

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

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

### getInstanceTag

Tag to apply to the instance during creation.

Only applicable in the App Engine flexible environment.

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

### setInstanceTag

Tag to apply to the instance during creation.

Only applicable in the App Engine flexible environment.

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

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

### getName

Google Compute Engine network where the virtual machines are created.

Specify the short name, not the resource path.
Defaults to `default`.

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

### setName

Google Compute Engine network where the virtual machines are created.

Specify the short name, not the resource path.
Defaults to `default`.

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

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

### getSubnetworkName

Google Cloud Platform sub-network where the virtual machines are created.

Specify the short name, not the resource path.
If a subnetwork name is specified, a network name will also be required
unless it is for the default network.

- If the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.
- If the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.
- If the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork. If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.

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

### setSubnetworkName

Google Cloud Platform sub-network where the virtual machines are created.

Specify the short name, not the resource path.
If a subnetwork name is specified, a network name will also be required
unless it is for the default network.

- If the network that the instance is being created in is a Legacy network, then the IP address is allocated from the IPv4Range.
- If the network that the instance is being created in is an auto Subnet Mode Network, then only network name should be specified (not the subnetwork_name) and the IP address is created from the IPCidrRange of the subnetwork that exists in that zone for that network.
- If the network that the instance is being created in is a custom Subnet Mode Network, then the subnetwork_name must be specified and the IP address is created from the IPCidrRange of the subnetwork. If specified, the subnetwork must exist in the same region as the App Engine flexible environment application.

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

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

### getSessionAffinity

Enable session affinity.

Only applicable in the App Engine flexible environment.

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

### setSessionAffinity

Enable session affinity.

Only applicable in the App Engine flexible environment.

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

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