Reference documentation and code samples for the Google Cloud Vmware Engine V1 Client class 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.
Generated from protobuf message google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService
Namespace
Google \ Cloud \ VmwareEngine \ V1 \ NetworkPolicy
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ enabled
bool
True if the service is enabled; false otherwise.
↳ state
int
Output only. State of the service. New values may be added to this enum when appropriate.
getEnabled
True if the service is enabled; false otherwise.
Returns
Type
Description
bool
setEnabled
True if the service is enabled; false otherwise.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getState
Output only. State of the service. New values may be added to this enum
when appropriate.
Returns
Type
Description
int
Enum of type State.
setState
Output only. State of the service. New values may be added to this enum
when appropriate.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Google Cloud Vmware Engine V1 Client - Class NetworkService (1.1.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.1.4 (latest)](/php/docs/reference/cloud-vmware-engine/latest/V1.NetworkPolicy.NetworkService)\n- [1.1.3](/php/docs/reference/cloud-vmware-engine/1.1.3/V1.NetworkPolicy.NetworkService)\n- [1.0.0](/php/docs/reference/cloud-vmware-engine/1.0.0/V1.NetworkPolicy.NetworkService)\n- [0.5.6](/php/docs/reference/cloud-vmware-engine/0.5.6/V1.NetworkPolicy.NetworkService)\n- [0.4.0](/php/docs/reference/cloud-vmware-engine/0.4.0/V1.NetworkPolicy.NetworkService)\n- [0.3.3](/php/docs/reference/cloud-vmware-engine/0.3.3/V1.NetworkPolicy.NetworkService)\n- [0.2.1](/php/docs/reference/cloud-vmware-engine/0.2.1/V1.NetworkPolicy.NetworkService)\n- [0.1.4](/php/docs/reference/cloud-vmware-engine/0.1.4/V1.NetworkPolicy.NetworkService) \nReference documentation and code samples for the Google Cloud Vmware Engine V1 Client class NetworkService.\n\nRepresents a network service that is managed by a `NetworkPolicy` resource.\n\nA network service provides a way to control an aspect of external access to\nVMware workloads. For example, whether the VMware workloads in the\nprivate clouds governed by a network policy can access or be accessed from\nthe internet.\n\nGenerated from protobuf message `google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ VmwareEngine \\\\ V1 \\\\ NetworkPolicy\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEnabled\n\nTrue if the service is enabled; false otherwise.\n\n### setEnabled\n\nTrue if the service is enabled; false otherwise.\n\n### getState\n\nOutput only. State of the service. New values may be added to this enum\nwhen appropriate.\n\n### setState\n\nOutput only. State of the service. New values may be added to this enum\nwhen appropriate."]]