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

namespace Google\Cloud\Container\V1;

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

/**
 * Configuration options for the NetworkPolicy feature.
 * https://kubernetes.io/docs/concepts/services-networking/networkpolicies/
 *
 * Generated from protobuf message <code>google.container.v1.NetworkPolicy</code>
 */
class NetworkPolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * The selected network policy provider.
     *
     * Generated from protobuf field <code>.google.container.v1.NetworkPolicy.Provider provider = 1;</code>
     */
    protected $provider = 0;
    /**
     * Whether network policy is enabled on the cluster.
     *
     * Generated from protobuf field <code>bool enabled = 2;</code>
     */
    protected $enabled = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $provider
     *           The selected network policy provider.
     *     @type bool $enabled
     *           Whether network policy is enabled on the cluster.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * The selected network policy provider.
     *
     * Generated from protobuf field <code>.google.container.v1.NetworkPolicy.Provider provider = 1;</code>
     * @return int
     */
    public function getProvider()
    {
        return $this->provider;
    }

    /**
     * The selected network policy provider.
     *
     * Generated from protobuf field <code>.google.container.v1.NetworkPolicy.Provider provider = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setProvider($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Container\V1\NetworkPolicy\Provider::class);
        $this->provider = $var;

        return $this;
    }

    /**
     * Whether network policy is enabled on the cluster.
     *
     * Generated from protobuf field <code>bool enabled = 2;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Whether network policy is enabled on the cluster.
     *
     * Generated from protobuf field <code>bool enabled = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

}

