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

namespace Temporal\Api\Taskqueue\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.taskqueue.v1.RateLimit</code>
 */
class RateLimit extends \Google\Protobuf\Internal\Message
{
    /**
     * Zero is a valid rate limit.
     *
     * Generated from protobuf field <code>float requests_per_second = 1;</code>
     */
    protected $requests_per_second = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $requests_per_second
     *           Zero is a valid rate limit.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Zero is a valid rate limit.
     *
     * Generated from protobuf field <code>float requests_per_second = 1;</code>
     * @return float
     */
    public function getRequestsPerSecond()
    {
        return $this->requests_per_second;
    }

    /**
     * Zero is a valid rate limit.
     *
     * Generated from protobuf field <code>float requests_per_second = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setRequestsPerSecond($var)
    {
        GPBUtil::checkFloat($var);
        $this->requests_per_second = $var;

        return $this;
    }

}

