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

/**
 * Reachability of tasks for a worker on a single task queue.
 *
 * Generated from protobuf message <code>temporal.api.taskqueue.v1.TaskQueueReachability</code>
 */
class TaskQueueReachability extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string task_queue = 1;</code>
     */
    protected $task_queue = '';
    /**
     * Task reachability for a worker in a single task queue.
     * See the TaskReachability docstring for information about each enum variant.
     * If reachability is empty, this worker is considered unreachable in this task queue.
     *
     * Generated from protobuf field <code>repeated .temporal.api.enums.v1.TaskReachability reachability = 2;</code>
     */
    private $reachability;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $task_queue
     *     @type int[] $reachability
     *           Task reachability for a worker in a single task queue.
     *           See the TaskReachability docstring for information about each enum variant.
     *           If reachability is empty, this worker is considered unreachable in this task queue.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Taskqueue\V1\Message::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Task reachability for a worker in a single task queue.
     * See the TaskReachability docstring for information about each enum variant.
     * If reachability is empty, this worker is considered unreachable in this task queue.
     *
     * Generated from protobuf field <code>repeated .temporal.api.enums.v1.TaskReachability reachability = 2;</code>
     * @return RepeatedField<int>
     */
    public function getReachability()
    {
        return $this->reachability;
    }

    /**
     * Task reachability for a worker in a single task queue.
     * See the TaskReachability docstring for information about each enum variant.
     * If reachability is empty, this worker is considered unreachable in this task queue.
     *
     * Generated from protobuf field <code>repeated .temporal.api.enums.v1.TaskReachability reachability = 2;</code>
     * @param int[] $var
     * @return $this
     */
    public function setReachability($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Temporal\Api\Enums\V1\TaskReachability::class);
        $this->reachability = $arr;

        return $this;
    }

}

