# Google Cloud Run V2 Client - Class NetworkInterface (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class NetworkInterface.

Direct VPC egress settings.

Generated from protobuf message `google.cloud.run.v2.VpcAccess.NetworkInterface`

## Namespace

Google \\ Cloud \\ Run \\ V2 \\ VpcAccess

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ network` | `string` Optional. The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork. |
| `↳ subnetwork` | `string` Optional. The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used. |
| `↳ tags` | `string[]` Optional. Network tags applied to this Cloud Run resource. |

### getNetwork

Optional. The VPC network that the Cloud Run resource will be able to
send traffic to. At least one of network or subnetwork must be specified.

If both network and subnetwork are specified, the given VPC subnetwork
must belong to the given VPC network. If network is not specified, it
will be looked up from the subnetwork.

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

### setNetwork

Optional. The VPC network that the Cloud Run resource will be able to
send traffic to. At least one of network or subnetwork must be specified.

If both network and subnetwork are specified, the given VPC subnetwork
must belong to the given VPC network. If network is not specified, it
will be looked up from the subnetwork.

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

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

### getSubnetwork

Optional. The VPC subnetwork that the Cloud Run resource will get IPs
from. At least one of network or subnetwork must be specified. If both
network and subnetwork are specified, the given VPC subnetwork must
belong to the given VPC network. If subnetwork is not specified, the
subnetwork with the same name with the network will be used.

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

### setSubnetwork

Optional. The VPC subnetwork that the Cloud Run resource will get IPs
from. At least one of network or subnetwork must be specified. If both
network and subnetwork are specified, the given VPC subnetwork must
belong to the given VPC network. If subnetwork is not specified, the
subnetwork with the same name with the network will be used.

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

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

### getTags

Optional. Network tags applied to this Cloud Run resource.

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

### setTags

Optional. Network tags applied to this Cloud Run resource.

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

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