<?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\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Parameters for node pool-level network config.
 *
 * Generated from protobuf message <code>google.container.v1.NodeNetworkConfig</code>
 */
class NodeNetworkConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Input only. Whether to create a new range for pod IPs in this node pool.
     * Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
     * are not specified.
     * If neither `create_pod_range` or `pod_range` are specified, the
     * cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
     * used.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>bool create_pod_range = 4 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $create_pod_range = false;
    /**
     * The ID of the secondary range for pod IPs.
     * If `create_pod_range` is true, this ID is used for the new range.
     * If `create_pod_range` is false, uses an existing secondary range with this
     * ID.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_range = 5;</code>
     */
    private $pod_range = '';
    /**
     * The IP address range for pod IPs in this node pool.
     * Only applicable if `create_pod_range` is true.
     * Set to blank to have a range chosen with the default size.
     * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
     * netmask.
     * Set to a
     * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
     * notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_ipv4_cidr_block = 6;</code>
     */
    private $pod_ipv4_cidr_block = '';
    /**
     * Whether nodes have internal IP addresses only.
     * If enable_private_nodes is not specified, then the value is derived from
     * [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes]
     *
     * Generated from protobuf field <code>optional bool enable_private_nodes = 9;</code>
     */
    private $enable_private_nodes = null;
    /**
     * Network bandwidth tier configuration.
     *
     * Generated from protobuf field <code>optional .google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig network_performance_config = 11;</code>
     */
    private $network_performance_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $create_pod_range
     *           Input only. Whether to create a new range for pod IPs in this node pool.
     *           Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
     *           are not specified.
     *           If neither `create_pod_range` or `pod_range` are specified, the
     *           cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
     *           used.
     *           Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     *           This field cannot be changed after the node pool has been created.
     *     @type string $pod_range
     *           The ID of the secondary range for pod IPs.
     *           If `create_pod_range` is true, this ID is used for the new range.
     *           If `create_pod_range` is false, uses an existing secondary range with this
     *           ID.
     *           Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     *           This field cannot be changed after the node pool has been created.
     *     @type string $pod_ipv4_cidr_block
     *           The IP address range for pod IPs in this node pool.
     *           Only applicable if `create_pod_range` is true.
     *           Set to blank to have a range chosen with the default size.
     *           Set to /netmask (e.g. `/14`) to have a range chosen with a specific
     *           netmask.
     *           Set to a
     *           [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
     *           notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
     *           Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     *           This field cannot be changed after the node pool has been created.
     *     @type bool $enable_private_nodes
     *           Whether nodes have internal IP addresses only.
     *           If enable_private_nodes is not specified, then the value is derived from
     *           [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes]
     *     @type \Google\Cloud\Container\V1\NodeNetworkConfig\NetworkPerformanceConfig $network_performance_config
     *           Network bandwidth tier configuration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Input only. Whether to create a new range for pod IPs in this node pool.
     * Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
     * are not specified.
     * If neither `create_pod_range` or `pod_range` are specified, the
     * cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
     * used.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>bool create_pod_range = 4 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return bool
     */
    public function getCreatePodRange()
    {
        return $this->create_pod_range;
    }

    /**
     * Input only. Whether to create a new range for pod IPs in this node pool.
     * Defaults are provided for `pod_range` and `pod_ipv4_cidr_block` if they
     * are not specified.
     * If neither `create_pod_range` or `pod_range` are specified, the
     * cluster-level default (`ip_allocation_policy.cluster_ipv4_cidr_block`) is
     * used.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>bool create_pod_range = 4 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param bool $var
     * @return $this
     */
    public function setCreatePodRange($var)
    {
        GPBUtil::checkBool($var);
        $this->create_pod_range = $var;

        return $this;
    }

    /**
     * The ID of the secondary range for pod IPs.
     * If `create_pod_range` is true, this ID is used for the new range.
     * If `create_pod_range` is false, uses an existing secondary range with this
     * ID.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_range = 5;</code>
     * @return string
     */
    public function getPodRange()
    {
        return $this->pod_range;
    }

    /**
     * The ID of the secondary range for pod IPs.
     * If `create_pod_range` is true, this ID is used for the new range.
     * If `create_pod_range` is false, uses an existing secondary range with this
     * ID.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_range = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setPodRange($var)
    {
        GPBUtil::checkString($var, True);
        $this->pod_range = $var;

        return $this;
    }

    /**
     * The IP address range for pod IPs in this node pool.
     * Only applicable if `create_pod_range` is true.
     * Set to blank to have a range chosen with the default size.
     * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
     * netmask.
     * Set to a
     * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
     * notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_ipv4_cidr_block = 6;</code>
     * @return string
     */
    public function getPodIpv4CidrBlock()
    {
        return $this->pod_ipv4_cidr_block;
    }

    /**
     * The IP address range for pod IPs in this node pool.
     * Only applicable if `create_pod_range` is true.
     * Set to blank to have a range chosen with the default size.
     * Set to /netmask (e.g. `/14`) to have a range chosen with a specific
     * netmask.
     * Set to a
     * [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing)
     * notation (e.g. `10.96.0.0/14`) to pick a specific range to use.
     * Only applicable if `ip_allocation_policy.use_ip_aliases` is true.
     * This field cannot be changed after the node pool has been created.
     *
     * Generated from protobuf field <code>string pod_ipv4_cidr_block = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setPodIpv4CidrBlock($var)
    {
        GPBUtil::checkString($var, True);
        $this->pod_ipv4_cidr_block = $var;

        return $this;
    }

    /**
     * Whether nodes have internal IP addresses only.
     * If enable_private_nodes is not specified, then the value is derived from
     * [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes]
     *
     * Generated from protobuf field <code>optional bool enable_private_nodes = 9;</code>
     * @return bool
     */
    public function getEnablePrivateNodes()
    {
        return isset($this->enable_private_nodes) ? $this->enable_private_nodes : false;
    }

    public function hasEnablePrivateNodes()
    {
        return isset($this->enable_private_nodes);
    }

    public function clearEnablePrivateNodes()
    {
        unset($this->enable_private_nodes);
    }

    /**
     * Whether nodes have internal IP addresses only.
     * If enable_private_nodes is not specified, then the value is derived from
     * [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes]
     *
     * Generated from protobuf field <code>optional bool enable_private_nodes = 9;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnablePrivateNodes($var)
    {
        GPBUtil::checkBool($var);
        $this->enable_private_nodes = $var;

        return $this;
    }

    /**
     * Network bandwidth tier configuration.
     *
     * Generated from protobuf field <code>optional .google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig network_performance_config = 11;</code>
     * @return \Google\Cloud\Container\V1\NodeNetworkConfig\NetworkPerformanceConfig|null
     */
    public function getNetworkPerformanceConfig()
    {
        return $this->network_performance_config;
    }

    public function hasNetworkPerformanceConfig()
    {
        return isset($this->network_performance_config);
    }

    public function clearNetworkPerformanceConfig()
    {
        unset($this->network_performance_config);
    }

    /**
     * Network bandwidth tier configuration.
     *
     * Generated from protobuf field <code>optional .google.container.v1.NodeNetworkConfig.NetworkPerformanceConfig network_performance_config = 11;</code>
     * @param \Google\Cloud\Container\V1\NodeNetworkConfig\NetworkPerformanceConfig $var
     * @return $this
     */
    public function setNetworkPerformanceConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\NodeNetworkConfig\NetworkPerformanceConfig::class);
        $this->network_performance_config = $var;

        return $this;
    }

}

