<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/sdk/v1/worker_config.proto

namespace Temporal\Api\Sdk\V1\WorkerConfig;

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

/**
 * Generated from protobuf message <code>temporal.api.sdk.v1.WorkerConfig.AutoscalingPollerBehavior</code>
 */
class AutoscalingPollerBehavior extends \Google\Protobuf\Internal\Message
{
    /**
     * At least this many poll calls will always be attempted (assuming slots are available).
     * Cannot be zero.
     *
     * Generated from protobuf field <code>int32 min_pollers = 1;</code>
     */
    protected $min_pollers = 0;
    /**
     * At most this many poll calls will ever be open at once. Must be >= `minimum`.
     *
     * Generated from protobuf field <code>int32 max_pollers = 2;</code>
     */
    protected $max_pollers = 0;
    /**
     * This many polls will be attempted initially before scaling kicks in. Must be between
     *  `minimum` and `maximum`.
     *
     * Generated from protobuf field <code>int32 initial_pollers = 3;</code>
     */
    protected $initial_pollers = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $min_pollers
     *           At least this many poll calls will always be attempted (assuming slots are available).
     *           Cannot be zero.
     *     @type int $max_pollers
     *           At most this many poll calls will ever be open at once. Must be >= `minimum`.
     *     @type int $initial_pollers
     *           This many polls will be attempted initially before scaling kicks in. Must be between
     *            `minimum` and `maximum`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Sdk\V1\WorkerConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * At least this many poll calls will always be attempted (assuming slots are available).
     * Cannot be zero.
     *
     * Generated from protobuf field <code>int32 min_pollers = 1;</code>
     * @return int
     */
    public function getMinPollers()
    {
        return $this->min_pollers;
    }

    /**
     * At least this many poll calls will always be attempted (assuming slots are available).
     * Cannot be zero.
     *
     * Generated from protobuf field <code>int32 min_pollers = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setMinPollers($var)
    {
        GPBUtil::checkInt32($var);
        $this->min_pollers = $var;

        return $this;
    }

    /**
     * At most this many poll calls will ever be open at once. Must be >= `minimum`.
     *
     * Generated from protobuf field <code>int32 max_pollers = 2;</code>
     * @return int
     */
    public function getMaxPollers()
    {
        return $this->max_pollers;
    }

    /**
     * At most this many poll calls will ever be open at once. Must be >= `minimum`.
     *
     * Generated from protobuf field <code>int32 max_pollers = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxPollers($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_pollers = $var;

        return $this;
    }

    /**
     * This many polls will be attempted initially before scaling kicks in. Must be between
     *  `minimum` and `maximum`.
     *
     * Generated from protobuf field <code>int32 initial_pollers = 3;</code>
     * @return int
     */
    public function getInitialPollers()
    {
        return $this->initial_pollers;
    }

    /**
     * This many polls will be attempted initially before scaling kicks in. Must be between
     *  `minimum` and `maximum`.
     *
     * Generated from protobuf field <code>int32 initial_pollers = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setInitialPollers($var)
    {
        GPBUtil::checkInt32($var);
        $this->initial_pollers = $var;

        return $this;
    }

}

