<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/vmwareengine/v1/vmwareengine_resources.proto

namespace Google\Cloud\VmwareEngine\V1\NetworkPolicy;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * 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 <code>google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService</code>
 */
class NetworkService extends \Google\Protobuf\Internal\Message
{
    /**
     * True if the service is enabled; false otherwise.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     */
    private $enabled = false;
    /**
     * Output only. State of the service. New values may be added to this enum
     * when appropriate.
     *
     * Generated from protobuf field <code>.google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           True if the service is enabled; false otherwise.
     *     @type int $state
     *           Output only. State of the service. New values may be added to this enum
     *           when appropriate.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Vmwareengine\V1\VmwareengineResources::initOnce();
        parent::__construct($data);
    }

    /**
     * True if the service is enabled; false otherwise.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * True if the service is enabled; false otherwise.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * Output only. State of the service. New values may be added to this enum
     * when appropriate.
     *
     * Generated from protobuf field <code>.google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Output only. State of the service. New values may be added to this enum
     * when appropriate.
     *
     * Generated from protobuf field <code>.google.cloud.vmwareengine.v1.NetworkPolicy.NetworkService.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\VmwareEngine\V1\NetworkPolicy\NetworkService\State::class);
        $this->state = $var;

        return $this;
    }

}


