<?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.TaskQueueTypeInfo</code>
 */
class TaskQueueTypeInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
     *
     * Generated from protobuf field <code>repeated .temporal.api.taskqueue.v1.PollerInfo pollers = 1;</code>
     */
    private $pollers;
    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 2;</code>
     */
    protected $stats = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Taskqueue\V1\PollerInfo[] $pollers
     *           Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueueStats $stats
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
     *
     * 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;
    }

    /**
     * Unversioned workers (with `useVersioning=false`) are reported in unversioned result even if they set a Build ID.
     *
     * 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;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 2;</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);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueueStats stats = 2;</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;
    }

}

