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

namespace Google\Cloud\Run\V2;

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

/**
 * Settings for revision-level scaling settings.
 *
 * Generated from protobuf message <code>google.cloud.run.v2.RevisionScaling</code>
 */
class RevisionScaling extends \Google\Protobuf\Internal\Message
{
    /**
     * Minimum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 min_instance_count = 1;</code>
     */
    private $min_instance_count = 0;
    /**
     * Maximum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 max_instance_count = 2;</code>
     */
    private $max_instance_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $min_instance_count
     *           Minimum number of serving instances that this resource should have.
     *     @type int $max_instance_count
     *           Maximum number of serving instances that this resource should have.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Run\V2\VendorSettings::initOnce();
        parent::__construct($data);
    }

    /**
     * Minimum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 min_instance_count = 1;</code>
     * @return int
     */
    public function getMinInstanceCount()
    {
        return $this->min_instance_count;
    }

    /**
     * Minimum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 min_instance_count = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMinInstanceCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_instance_count = $var;

        return $this;
    }

    /**
     * Maximum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 max_instance_count = 2;</code>
     * @return int
     */
    public function getMaxInstanceCount()
    {
        return $this->max_instance_count;
    }

    /**
     * Maximum number of serving instances that this resource should have.
     *
     * Generated from protobuf field <code>int32 max_instance_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxInstanceCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_instance_count = $var;

        return $this;
    }

}

