<?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.DescribeTaskQueueResponse</code>
 */
class DescribeTaskQueueResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1;</code>
     */
    private $pollers;
    /**
     * Statistics for the task queue.
     * Only set if `report_stats` is set on the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 5;</code>
     */
    protected $stats = null;
    /**
     * Task queue stats breakdown by priority key. Only contains actively used priority keys.
     * Only set if `report_stats` is set on the request.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "by" is used to clarify the keys and values. --)
     *
     * Generated from protobuf field <code>map<int32, .temporal.api.taskqueue.v1.TaskQueueStats> stats_by_priority_key = 8;</code>
     */
    private $stats_by_priority_key;
    /**
     * Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.
     * When not present, it means the tasks are routed to Unversioned workers (workers with
     * UNVERSIONED or unspecified WorkerVersioningMode.)
     * Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion
     * and SetWorkerDeploymentRampingVersion on Worker Deployments.
     * Note: This information is not relevant to Pinned workflow executions and their activities as
     * they are always routed to their Pinned Deployment Version. However, new workflow executions
     * are typically not Pinned until they complete their first task (unless they are started with
     * a Pinned VersioningOverride or are Child Workflows of a Pinned parent).
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueVersioningInfo versioning_info = 4;</code>
     */
    protected $versioning_info = null;
    /**
     * Only populated if report_task_queue_config is set to true.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueConfig config = 6;</code>
     */
    protected $config = null;
    /**
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit effective_rate_limit = 7;</code>
     */
    protected $effective_rate_limit = null;
    /**
     * Deprecated.
     * Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2 [deprecated = true];</code>
     * @deprecated
     */
    protected $task_queue_status = null;
    /**
     * Deprecated.
     * Only returned in ENHANCED mode.
     * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.taskqueue.v1.TaskQueueVersionInfo> versions_info = 3 [deprecated = true];</code>
     * @deprecated
     */
    private $versions_info;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Taskqueue\V1\PollerInfo[] $pollers
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueueStats $stats
     *           Statistics for the task queue.
     *           Only set if `report_stats` is set on the request.
     *     @type array|\Google\Protobuf\Internal\MapField $stats_by_priority_key
     *           Task queue stats breakdown by priority key. Only contains actively used priority keys.
     *           Only set if `report_stats` is set on the request.
     *           (-- api-linter: core::0140::prepositions=disabled
     *               aip.dev/not-precedent: "by" is used to clarify the keys and values. --)
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueueVersioningInfo $versioning_info
     *           Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.
     *           When not present, it means the tasks are routed to Unversioned workers (workers with
     *           UNVERSIONED or unspecified WorkerVersioningMode.)
     *           Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion
     *           and SetWorkerDeploymentRampingVersion on Worker Deployments.
     *           Note: This information is not relevant to Pinned workflow executions and their activities as
     *           they are always routed to their Pinned Deployment Version. However, new workflow executions
     *           are typically not Pinned until they complete their first task (unless they are started with
     *           a Pinned VersioningOverride or are Child Workflows of a Pinned parent).
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueueConfig $config
     *           Only populated if report_task_queue_config is set to true.
     *     @type \Temporal\Api\Workflowservice\V1\DescribeTaskQueueResponse\EffectiveRateLimit $effective_rate_limit
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueueStatus $task_queue_status
     *           Deprecated.
     *           Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request.
     *     @type array|\Google\Protobuf\Internal\MapField $versions_info
     *           Deprecated.
     *           Only returned in ENHANCED mode.
     *           This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1;</code>
     * @return RepeatedField<\Temporal\Api\Taskqueue\V1\PollerInfo>
     */
    public function getPollers()
    {
        return $this->pollers;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1;</code>
     * @param \Temporal\Api\Taskqueue\V1\PollerInfo[] $var
     * @return $this
     */
    public function setPollers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\PollerInfo::class);
        $this->pollers = $arr;

        return $this;
    }

    /**
     * Statistics for the task queue.
     * Only set if `report_stats` is set on the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 5;</code>
     * @return \Temporal\Api\Taskqueue\V1\TaskQueueStats|null
     */
    public function getStats()
    {
        return $this->stats;
    }

    public function hasStats()
    {
        return isset($this->stats);
    }

    public function clearStats()
    {
        unset($this->stats);
    }

    /**
     * Statistics for the task queue.
     * Only set if `report_stats` is set on the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 5;</code>
     * @param \Temporal\Api\Taskqueue\V1\TaskQueueStats $var
     * @return $this
     */
    public function setStats($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueStats::class);
        $this->stats = $var;

        return $this;
    }

    /**
     * Task queue stats breakdown by priority key. Only contains actively used priority keys.
     * Only set if `report_stats` is set on the request.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "by" is used to clarify the keys and values. --)
     *
     * Generated from protobuf field <code>map<int32, .temporal.api.taskqueue.v1.TaskQueueStats> stats_by_priority_key = 8;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getStatsByPriorityKey()
    {
        return $this->stats_by_priority_key;
    }

    /**
     * Task queue stats breakdown by priority key. Only contains actively used priority keys.
     * Only set if `report_stats` is set on the request.
     * (-- api-linter: core::0140::prepositions=disabled
     *     aip.dev/not-precedent: "by" is used to clarify the keys and values. --)
     *
     * Generated from protobuf field <code>map<int32, .temporal.api.taskqueue.v1.TaskQueueStats> stats_by_priority_key = 8;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setStatsByPriorityKey($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueueStats::class);
        $this->stats_by_priority_key = $arr;

        return $this;
    }

    /**
     * Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.
     * When not present, it means the tasks are routed to Unversioned workers (workers with
     * UNVERSIONED or unspecified WorkerVersioningMode.)
     * Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion
     * and SetWorkerDeploymentRampingVersion on Worker Deployments.
     * Note: This information is not relevant to Pinned workflow executions and their activities as
     * they are always routed to their Pinned Deployment Version. However, new workflow executions
     * are typically not Pinned until they complete their first task (unless they are started with
     * a Pinned VersioningOverride or are Child Workflows of a Pinned parent).
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueVersioningInfo versioning_info = 4;</code>
     * @return \Temporal\Api\Taskqueue\V1\TaskQueueVersioningInfo|null
     */
    public function getVersioningInfo()
    {
        return $this->versioning_info;
    }

    public function hasVersioningInfo()
    {
        return isset($this->versioning_info);
    }

    public function clearVersioningInfo()
    {
        unset($this->versioning_info);
    }

    /**
     * Specifies which Worker Deployment Version(s) Server routes this Task Queue's tasks to.
     * When not present, it means the tasks are routed to Unversioned workers (workers with
     * UNVERSIONED or unspecified WorkerVersioningMode.)
     * Task Queue Versioning info is updated indirectly by calling SetWorkerDeploymentCurrentVersion
     * and SetWorkerDeploymentRampingVersion on Worker Deployments.
     * Note: This information is not relevant to Pinned workflow executions and their activities as
     * they are always routed to their Pinned Deployment Version. However, new workflow executions
     * are typically not Pinned until they complete their first task (unless they are started with
     * a Pinned VersioningOverride or are Child Workflows of a Pinned parent).
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueVersioningInfo versioning_info = 4;</code>
     * @param \Temporal\Api\Taskqueue\V1\TaskQueueVersioningInfo $var
     * @return $this
     */
    public function setVersioningInfo($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueVersioningInfo::class);
        $this->versioning_info = $var;

        return $this;
    }

    /**
     * Only populated if report_task_queue_config is set to true.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueConfig config = 6;</code>
     * @return \Temporal\Api\Taskqueue\V1\TaskQueueConfig|null
     */
    public function getConfig()
    {
        return $this->config;
    }

    public function hasConfig()
    {
        return isset($this->config);
    }

    public function clearConfig()
    {
        unset($this->config);
    }

    /**
     * Only populated if report_task_queue_config is set to true.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueConfig config = 6;</code>
     * @param \Temporal\Api\Taskqueue\V1\TaskQueueConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit effective_rate_limit = 7;</code>
     * @return \Temporal\Api\Workflowservice\V1\DescribeTaskQueueResponse\EffectiveRateLimit|null
     */
    public function getEffectiveRateLimit()
    {
        return $this->effective_rate_limit;
    }

    public function hasEffectiveRateLimit()
    {
        return isset($this->effective_rate_limit);
    }

    public function clearEffectiveRateLimit()
    {
        unset($this->effective_rate_limit);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflowservice.v1.DescribeTaskQueueResponse.EffectiveRateLimit effective_rate_limit = 7;</code>
     * @param \Temporal\Api\Workflowservice\V1\DescribeTaskQueueResponse\EffectiveRateLimit $var
     * @return $this
     */
    public function setEffectiveRateLimit($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflowservice\V1\DescribeTaskQueueResponse\EffectiveRateLimit::class);
        $this->effective_rate_limit = $var;

        return $this;
    }

    /**
     * Deprecated.
     * Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2 [deprecated = true];</code>
     * @return \Temporal\Api\Taskqueue\V1\TaskQueueStatus|null
     * @deprecated
     */
    public function getTaskQueueStatus()
    {
        if (isset($this->task_queue_status)) {
            @trigger_error('task_queue_status is deprecated.', E_USER_DEPRECATED);
        }
        return $this->task_queue_status;
    }

    public function hasTaskQueueStatus()
    {
        if (isset($this->task_queue_status)) {
            @trigger_error('task_queue_status is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->task_queue_status);
    }

    public function clearTaskQueueStatus()
    {
        @trigger_error('task_queue_status is deprecated.', E_USER_DEPRECATED);
        unset($this->task_queue_status);
    }

    /**
     * Deprecated.
     * Status of the task queue. Only populated when `include_task_queue_status` is set to true in the request.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStatus task_queue_status = 2 [deprecated = true];</code>
     * @param \Temporal\Api\Taskqueue\V1\TaskQueueStatus $var
     * @return $this
     * @deprecated
     */
    public function setTaskQueueStatus($var)
    {
        @trigger_error('task_queue_status is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueueStatus::class);
        $this->task_queue_status = $var;

        return $this;
    }

    /**
     * Deprecated.
     * Only returned in ENHANCED mode.
     * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.taskqueue.v1.TaskQueueVersionInfo> versions_info = 3 [deprecated = true];</code>
     * @return \Google\Protobuf\Internal\MapField
     * @deprecated
     */
    public function getVersionsInfo()
    {
        if ($this->versions_info->count() !== 0) {
            @trigger_error('versions_info is deprecated.', E_USER_DEPRECATED);
        }
        return $this->versions_info;
    }

    /**
     * Deprecated.
     * Only returned in ENHANCED mode.
     * This map contains Task Queue information for each Build ID. Empty string as key value means unversioned.
     *
     * Generated from protobuf field <code>map<string, .temporal.api.taskqueue.v1.TaskQueueVersionInfo> versions_info = 3 [deprecated = true];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     * @deprecated
     */
    public function setVersionsInfo($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Taskqueue\V1\TaskQueueVersionInfo::class);
        if ($arr->count() !== 0) {
            @trigger_error('versions_info is deprecated.', E_USER_DEPRECATED);
        }
        $this->versions_info = $arr;

        return $this;
    }

}

