# Batch v1 API - Class AllocationPolicy.Types.NetworkInterface (2.15.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.15.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.14.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.14.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.13.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.13.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.12.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.12.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.11.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.11.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.10.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.10.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.9.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.9.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.8.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.7.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.7.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.6.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.5.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.4.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.3.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.2.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.1.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [2.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/2.0.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.3.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.2.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.1.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/1.0.0/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface)

    public sealed class AllocationPolicy.Types.NetworkInterface : IMessage<AllocationPolicy.Types.NetworkInterface>, IEquatable<AllocationPolicy.Types.NetworkInterface>, IDeepCloneable<AllocationPolicy.Types.NetworkInterface>, IBufferMessage, IMessage

Reference documentation and code samples for the Batch v1 API class AllocationPolicy.Types.NetworkInterface.

A network interface.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> AllocationPolicy.Types.NetworkInterface

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types)[NetworkInterface](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types)[NetworkInterface](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AllocationPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types)[NetworkInterface](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Batch.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1)

## Assembly

Google.Cloud.Batch.V1.dll

## Constructors

### NetworkInterface()

    public NetworkInterface()

### NetworkInterface(NetworkInterface)

    public NetworkInterface(AllocationPolicy.Types.NetworkInterface other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Batch.V1/latest/Google.Cloud.Batch.V1.AllocationPolicy.Types.NetworkInterface` |

## Properties

### Network

    public string Network { get; set; }

The URL of an existing network resource.
You can specify the network as a full or partial URL.

For example, the following are all valid URLs:

- https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
- projects/{project}/global/networks/{network}
- global/networks/{network}

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NoExternalIpAddress

    public bool NoExternalIpAddress { get; set; }

Default is false (with an external IP address). Required if
no external public IP address is attached to the VM. If no external
public IP address, additional configuration is required to allow the VM
to access Google Services. See
<https://cloud.google.com/vpc/docs/configure-private-google-access> and
<https://cloud.google.com/nat/docs/gce-example#create-nat> for more
information.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### Subnetwork

    public string Subnetwork { get; set; }

The URL of an existing subnetwork resource in the network.
You can specify the subnetwork as a full or partial URL.

For example, the following are all valid URLs:

- https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork}
- projects/{project}/regions/{region}/subnetworks/{subnetwork}
- regions/{region}/subnetworks/{subnetwork}

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |