<?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.RateLimitConfig</code>
 */
class RateLimitConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.RateLimit rate_limit = 1;</code>
     */
    protected $rate_limit = null;
    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.ConfigMetadata metadata = 2;</code>
     */
    protected $metadata = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Taskqueue\V1\RateLimit $rate_limit
     *     @type \Temporal\Api\Taskqueue\V1\ConfigMetadata $metadata
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * 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);
    }

    /**
     * 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;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.ConfigMetadata metadata = 2;</code>
     * @return \Temporal\Api\Taskqueue\V1\ConfigMetadata|null
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    public function hasMetadata()
    {
        return isset($this->metadata);
    }

    public function clearMetadata()
    {
        unset($this->metadata);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.ConfigMetadata metadata = 2;</code>
     * @param \Temporal\Api\Taskqueue\V1\ConfigMetadata $var
     * @return $this
     */
    public function setMetadata($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\ConfigMetadata::class);
        $this->metadata = $var;

        return $this;
    }

}

