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

namespace Google\Cloud\AIPlatform\V1\Featurestore\OnlineServingConfig;

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

/**
 * Online serving scaling configuration. If min_node_count and
 * max_node_count are set to the same value, the cluster will be configured
 * with the fixed number of node (no auto-scaling).
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Featurestore.OnlineServingConfig.Scaling</code>
 */
class Scaling extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The minimum number of nodes to scale down to. Must be greater
     * than or equal to 1.
     *
     * Generated from protobuf field <code>int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $min_node_count = 0;
    /**
     * The maximum number of nodes to scale up to. Must be greater than
     * min_node_count, and less than or equal to 10 times of 'min_node_count'.
     *
     * Generated from protobuf field <code>int32 max_node_count = 2;</code>
     */
    protected $max_node_count = 0;
    /**
     * Optional. The cpu utilization that the Autoscaler should be trying to
     * achieve. This number is on a scale from 0 (no utilization) to 100
     * (total utilization), and is limited between 10 and 80. When a cluster's
     * CPU utilization exceeds the target that you have set, Bigtable
     * immediately adds nodes to the cluster. When CPU utilization is
     * substantially lower than the target, Bigtable removes nodes. If not set
     * or set to 0, default to 50.
     *
     * Generated from protobuf field <code>int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $cpu_utilization_target = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $min_node_count
     *           Required. The minimum number of nodes to scale down to. Must be greater
     *           than or equal to 1.
     *     @type int $max_node_count
     *           The maximum number of nodes to scale up to. Must be greater than
     *           min_node_count, and less than or equal to 10 times of 'min_node_count'.
     *     @type int $cpu_utilization_target
     *           Optional. The cpu utilization that the Autoscaler should be trying to
     *           achieve. This number is on a scale from 0 (no utilization) to 100
     *           (total utilization), and is limited between 10 and 80. When a cluster's
     *           CPU utilization exceeds the target that you have set, Bigtable
     *           immediately adds nodes to the cluster. When CPU utilization is
     *           substantially lower than the target, Bigtable removes nodes. If not set
     *           or set to 0, default to 50.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Featurestore::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The minimum number of nodes to scale down to. Must be greater
     * than or equal to 1.
     *
     * Generated from protobuf field <code>int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getMinNodeCount()
    {
        return $this->min_node_count;
    }

    /**
     * Required. The minimum number of nodes to scale down to. Must be greater
     * than or equal to 1.
     *
     * Generated from protobuf field <code>int32 min_node_count = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setMinNodeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_node_count = $var;

        return $this;
    }

    /**
     * The maximum number of nodes to scale up to. Must be greater than
     * min_node_count, and less than or equal to 10 times of 'min_node_count'.
     *
     * Generated from protobuf field <code>int32 max_node_count = 2;</code>
     * @return int
     */
    public function getMaxNodeCount()
    {
        return $this->max_node_count;
    }

    /**
     * The maximum number of nodes to scale up to. Must be greater than
     * min_node_count, and less than or equal to 10 times of 'min_node_count'.
     *
     * Generated from protobuf field <code>int32 max_node_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxNodeCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_node_count = $var;

        return $this;
    }

    /**
     * Optional. The cpu utilization that the Autoscaler should be trying to
     * achieve. This number is on a scale from 0 (no utilization) to 100
     * (total utilization), and is limited between 10 and 80. When a cluster's
     * CPU utilization exceeds the target that you have set, Bigtable
     * immediately adds nodes to the cluster. When CPU utilization is
     * substantially lower than the target, Bigtable removes nodes. If not set
     * or set to 0, default to 50.
     *
     * Generated from protobuf field <code>int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getCpuUtilizationTarget()
    {
        return $this->cpu_utilization_target;
    }

    /**
     * Optional. The cpu utilization that the Autoscaler should be trying to
     * achieve. This number is on a scale from 0 (no utilization) to 100
     * (total utilization), and is limited between 10 and 80. When a cluster's
     * CPU utilization exceeds the target that you have set, Bigtable
     * immediately adds nodes to the cluster. When CPU utilization is
     * substantially lower than the target, Bigtable removes nodes. If not set
     * or set to 0, default to 50.
     *
     * Generated from protobuf field <code>int32 cpu_utilization_target = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setCpuUtilizationTarget($var)
    {
        GPBUtil::checkInt32($var);
        $this->cpu_utilization_target = $var;

        return $this;
    }

}


