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

namespace Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest;

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

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate</code>
 */
class RateLimitUpdate extends \Google\Protobuf\Internal\Message
{
    /**
     * Rate Limit to be updated
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.RateLimit rate_limit = 1;</code>
     */
    protected $rate_limit = null;
    /**
     * Reason for why the rate limit was set.
     *
     * Generated from protobuf field <code>string reason = 2;</code>
     */
    protected $reason = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Taskqueue\V1\RateLimit $rate_limit
     *           Rate Limit to be updated
     *     @type string $reason
     *           Reason for why the rate limit was set.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Rate Limit to be updated
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.RateLimit rate_limit = 1;</code>
     * @return \Temporal\Api\Taskqueue\V1\RateLimit|null
     */
    public function getRateLimit()
    {
        return $this->rate_limit;
    }

    public function hasRateLimit()
    {
        return isset($this->rate_limit);
    }

    public function clearRateLimit()
    {
        unset($this->rate_limit);
    }

    /**
     * Rate Limit to be updated
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.RateLimit rate_limit = 1;</code>
     * @param \Temporal\Api\Taskqueue\V1\RateLimit $var
     * @return $this
     */
    public function setRateLimit($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\RateLimit::class);
        $this->rate_limit = $var;

        return $this;
    }

    /**
     * Reason for why the rate limit was set.
     *
     * Generated from protobuf field <code>string reason = 2;</code>
     * @return string
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Reason for why the rate limit was set.
     *
     * Generated from protobuf field <code>string reason = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkString($var, True);
        $this->reason = $var;

        return $this;
    }

}

