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

namespace Google\Cloud\Compute\V1;

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

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.NodeGroupAutoscalingPolicy</code>
 */
class NodeGroupAutoscalingPolicy extends \Google\Protobuf\Internal\Message
{
    /**
     * The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
     *
     * Generated from protobuf field <code>int32 max_nodes = 297762838;</code>
     */
    private $max_nodes = null;
    /**
     * The minimum number of nodes that the group should have.
     *
     * Generated from protobuf field <code>int32 min_nodes = 533370500;</code>
     */
    private $min_nodes = null;
    /**
     * The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see  Autoscaler modes.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.Mode mode = 3357091;</code>
     */
    private $mode = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $max_nodes
     *           The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
     *     @type int $min_nodes
     *           The minimum number of nodes that the group should have.
     *     @type int $mode
     *           The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see  Autoscaler modes.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
     *
     * Generated from protobuf field <code>int32 max_nodes = 297762838;</code>
     * @return int
     */
    public function getMaxNodes()
    {
        return isset($this->max_nodes) ? $this->max_nodes : 0;
    }

    public function hasMaxNodes()
    {
        return isset($this->max_nodes);
    }

    public function clearMaxNodes()
    {
        unset($this->max_nodes);
    }

    /**
     * The maximum number of nodes that the group should have. Must be set if autoscaling is enabled. Maximum value allowed is 100.
     *
     * Generated from protobuf field <code>int32 max_nodes = 297762838;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxNodes($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_nodes = $var;

        return $this;
    }

    /**
     * The minimum number of nodes that the group should have.
     *
     * Generated from protobuf field <code>int32 min_nodes = 533370500;</code>
     * @return int
     */
    public function getMinNodes()
    {
        return isset($this->min_nodes) ? $this->min_nodes : 0;
    }

    public function hasMinNodes()
    {
        return isset($this->min_nodes);
    }

    public function clearMinNodes()
    {
        unset($this->min_nodes);
    }

    /**
     * The minimum number of nodes that the group should have.
     *
     * Generated from protobuf field <code>int32 min_nodes = 533370500;</code>
     * @param int $var
     * @return $this
     */
    public function setMinNodes($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_nodes = $var;

        return $this;
    }

    /**
     * The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see  Autoscaler modes.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.Mode mode = 3357091;</code>
     * @return int
     */
    public function getMode()
    {
        return isset($this->mode) ? $this->mode : 0;
    }

    public function hasMode()
    {
        return isset($this->mode);
    }

    public function clearMode()
    {
        unset($this->mode);
    }

    /**
     * The autoscaling mode. Set to one of: ON, OFF, or ONLY_SCALE_OUT. For more information, see  Autoscaler modes.
     *
     * Generated from protobuf field <code>.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.Mode mode = 3357091;</code>
     * @param int $var
     * @return $this
     */
    public function setMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Compute\V1\NodeGroupAutoscalingPolicy\Mode::class);
        $this->mode = $var;

        return $this;
    }

}

