# Google Cloud VMware Engine V1 API - Class Google::Cloud::VmwareEngine::V1::NetworkPolicy::NetworkService (v1.5.0)

1.5.0 (latest) 1.4.1 1.3.1 1.2.0 1.1.0 1.0.1 0.11.0 0.10.0 0.9.2 0.8.0 0.7.1 0.6.1 0.5.0 0.4.0 0.3.1 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud VMware Engine V1 API class Google::Cloud::VmwareEngine::V1::NetworkPolicy::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.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #enabled

    def enabled() -> ::Boolean

**Returns**

- (::Boolean) --- True if the service is enabled; false otherwise.

### #enabled=

    def enabled=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- True if the service is enabled; false otherwise.
**Returns**

- (::Boolean) --- True if the service is enabled; false otherwise.

### #state

    def state() -> ::Google::Cloud::VmwareEngine::V1::NetworkPolicy::NetworkService::State

**Returns**

- ([::Google::Cloud::VmwareEngine::V1::NetworkPolicy::NetworkService::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest/Google-Cloud-VmwareEngine-V1-NetworkPolicy-NetworkService-State)) --- Output only. State of the service. New values may be added to this enum when appropriate.