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

namespace Google\Cloud\BigQuery\Reservation\V1\Reservation;

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

/**
 * Auto scaling settings.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.reservation.v1.Reservation.Autoscale</code>
 */
class Autoscale extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The slot capacity added to this reservation when autoscale
     * happens. Will be between [0, max_slots]. Note: after users reduce
     * max_slots, it may take a while before it can be propagated, so
     * current_slots may stay in the original value and could be larger than
     * max_slots for that brief period (less than one minute)
     *
     * Generated from protobuf field <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $current_slots = 0;
    /**
     * Optional. Number of slots to be scaled when needed.
     *
     * Generated from protobuf field <code>int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $max_slots = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $current_slots
     *           Output only. The slot capacity added to this reservation when autoscale
     *           happens. Will be between [0, max_slots]. Note: after users reduce
     *           max_slots, it may take a while before it can be propagated, so
     *           current_slots may stay in the original value and could be larger than
     *           max_slots for that brief period (less than one minute)
     *     @type int|string $max_slots
     *           Optional. Number of slots to be scaled when needed.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Reservation\V1\Reservation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The slot capacity added to this reservation when autoscale
     * happens. Will be between [0, max_slots]. Note: after users reduce
     * max_slots, it may take a while before it can be propagated, so
     * current_slots may stay in the original value and could be larger than
     * max_slots for that brief period (less than one minute)
     *
     * Generated from protobuf field <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return int|string
     */
    public function getCurrentSlots()
    {
        return $this->current_slots;
    }

    /**
     * Output only. The slot capacity added to this reservation when autoscale
     * happens. Will be between [0, max_slots]. Note: after users reduce
     * max_slots, it may take a while before it can be propagated, so
     * current_slots may stay in the original value and could be larger than
     * max_slots for that brief period (less than one minute)
     *
     * Generated from protobuf field <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param int|string $var
     * @return $this
     */
    public function setCurrentSlots($var)
    {
        GPBUtil::checkInt64($var);
        $this->current_slots = $var;

        return $this;
    }

    /**
     * Optional. Number of slots to be scaled when needed.
     *
     * Generated from protobuf field <code>int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int|string
     */
    public function getMaxSlots()
    {
        return $this->max_slots;
    }

    /**
     * Optional. Number of slots to be scaled when needed.
     *
     * Generated from protobuf field <code>int64 max_slots = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int|string $var
     * @return $this
     */
    public function setMaxSlots($var)
    {
        GPBUtil::checkInt64($var);
        $this->max_slots = $var;

        return $this;
    }

}


