# VMware Engine v1 API - Class NetworkPolicy.Types.NetworkService (1.7.0)

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

- [1.7.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.6.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.6.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.5.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.4.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.3.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.2.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.1.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/1.0.0/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService)

    public sealed class NetworkPolicy.Types.NetworkService : IMessage<NetworkPolicy.Types.NetworkService>, IEquatable<NetworkPolicy.Types.NetworkService>, IDeepCloneable<NetworkPolicy.Types.NetworkService>, IBufferMessage, IMessage

Reference documentation and code samples for the VMware Engine v1 API class NetworkPolicy.Types.NetworkService.

Represents a network service that is managed by a `NetworkPolicy` resource.
A network service provides a way to control an aspect of external access to
VMware workloads. For example, whether the VMware workloads in the
private clouds governed by a network policy can access or be accessed from
the internet.

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[NetworkPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types)[NetworkService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[NetworkPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types)[NetworkService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[NetworkPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types)[NetworkService](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService), [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.VmwareEngine.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1)

## Assembly

Google.Cloud.VmwareEngine.V1.dll

## Constructors

### NetworkService()

    public NetworkService()

### NetworkService(NetworkService)

    public NetworkService(NetworkPolicy.Types.NetworkService other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService` |

## Properties

### Enabled

    public bool Enabled { get; set; }

True if the service is enabled; false otherwise.

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

### State

    public NetworkPolicy.Types.NetworkService.Types.State State { get; set; }

Output only. State of the service. New values may be added to this enum
when appropriate.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicyhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkServicehttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.VmwareEngine.V1/latest/Google.Cloud.VmwareEngine.V1.NetworkPolicy.Types.NetworkService.Types.State` |   |