<?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;

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

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest</code>
 */
class UpdateTaskQueueConfigRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     */
    protected $identity = '';
    /**
     * Selects the task queue to update.
     *
     * Generated from protobuf field <code>string task_queue = 3;</code>
     */
    protected $task_queue = '';
    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.TaskQueueType task_queue_type = 4;</code>
     */
    protected $task_queue_type = 0;
    /**
     * Update to queue-wide rate limit.
     * If not set, this configuration is unchanged.
     * NOTE: A limit set by the worker is overriden; and restored again when reset.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_queue_rate_limit = 5;</code>
     */
    protected $update_queue_rate_limit = null;
    /**
     * Update to the default fairness key rate limit.
     * If not set, this configuration is unchanged.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_fairness_key_rate_limit_default = 6;</code>
     */
    protected $update_fairness_key_rate_limit_default = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *     @type string $identity
     *     @type string $task_queue
     *           Selects the task queue to update.
     *     @type int $task_queue_type
     *     @type \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate $update_queue_rate_limit
     *           Update to queue-wide rate limit.
     *           If not set, this configuration is unchanged.
     *           NOTE: A limit set by the worker is overriden; and restored again when reset.
     *           If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *     @type \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate $update_fairness_key_rate_limit_default
     *           Update to the default fairness key rate limit.
     *           If not set, this configuration is unchanged.
     *           If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * Generated from protobuf field <code>string identity = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * Selects the task queue to update.
     *
     * Generated from protobuf field <code>string task_queue = 3;</code>
     * @return string
     */
    public function getTaskQueue()
    {
        return $this->task_queue;
    }

    /**
     * Selects the task queue to update.
     *
     * Generated from protobuf field <code>string task_queue = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setTaskQueue($var)
    {
        GPBUtil::checkString($var, True);
        $this->task_queue = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.TaskQueueType task_queue_type = 4;</code>
     * @return int
     */
    public function getTaskQueueType()
    {
        return $this->task_queue_type;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.TaskQueueType task_queue_type = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setTaskQueueType($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\TaskQueueType::class);
        $this->task_queue_type = $var;

        return $this;
    }

    /**
     * Update to queue-wide rate limit.
     * If not set, this configuration is unchanged.
     * NOTE: A limit set by the worker is overriden; and restored again when reset.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_queue_rate_limit = 5;</code>
     * @return \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate|null
     */
    public function getUpdateQueueRateLimit()
    {
        return $this->update_queue_rate_limit;
    }

    public function hasUpdateQueueRateLimit()
    {
        return isset($this->update_queue_rate_limit);
    }

    public function clearUpdateQueueRateLimit()
    {
        unset($this->update_queue_rate_limit);
    }

    /**
     * Update to queue-wide rate limit.
     * If not set, this configuration is unchanged.
     * NOTE: A limit set by the worker is overriden; and restored again when reset.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_queue_rate_limit = 5;</code>
     * @param \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate $var
     * @return $this
     */
    public function setUpdateQueueRateLimit($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate::class);
        $this->update_queue_rate_limit = $var;

        return $this;
    }

    /**
     * Update to the default fairness key rate limit.
     * If not set, this configuration is unchanged.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_fairness_key_rate_limit_default = 6;</code>
     * @return \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate|null
     */
    public function getUpdateFairnessKeyRateLimitDefault()
    {
        return $this->update_fairness_key_rate_limit_default;
    }

    public function hasUpdateFairnessKeyRateLimitDefault()
    {
        return isset($this->update_fairness_key_rate_limit_default);
    }

    public function clearUpdateFairnessKeyRateLimitDefault()
    {
        unset($this->update_fairness_key_rate_limit_default);
    }

    /**
     * Update to the default fairness key rate limit.
     * If not set, this configuration is unchanged.
     * If the `rate_limit` field in the `RateLimitUpdate` is missing, remove the existing rate limit.
     *
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.UpdateTaskQueueConfigRequest.RateLimitUpdate update_fairness_key_rate_limit_default = 6;</code>
     * @param \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate $var
     * @return $this
     */
    public function setUpdateFairnessKeyRateLimitDefault($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\UpdateTaskQueueConfigRequest\RateLimitUpdate::class);
        $this->update_fairness_key_rate_limit_default = $var;

        return $this;
    }

}

