<?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.PollNexusTaskQueueResponse</code>
 */
class PollNexusTaskQueueResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * An opaque unique identifier for this task for correlating a completion request the embedded request.
     *
     * Generated from protobuf field <code>bytes task_token = 1;</code>
     */
    protected $task_token = '';
    /**
     * Embedded request as translated from the incoming frontend request.
     *
     * Generated from protobuf field <code>.temporal.api.nexus.v1.Request request = 2;</code>
     */
    protected $request = null;
    /**
     * Server-advised information the SDK may use to adjust its poller count.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3;</code>
     */
    protected $poller_scaling_decision = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $task_token
     *           An opaque unique identifier for this task for correlating a completion request the embedded request.
     *     @type \Temporal\Api\Nexus\V1\Request $request
     *           Embedded request as translated from the incoming frontend request.
     *     @type \Temporal\Api\Taskqueue\V1\PollerScalingDecision $poller_scaling_decision
     *           Server-advised information the SDK may use to adjust its poller count.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * An opaque unique identifier for this task for correlating a completion request the embedded request.
     *
     * Generated from protobuf field <code>bytes task_token = 1;</code>
     * @return string
     */
    public function getTaskToken()
    {
        return $this->task_token;
    }

    /**
     * An opaque unique identifier for this task for correlating a completion request the embedded request.
     *
     * Generated from protobuf field <code>bytes task_token = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setTaskToken($var)
    {
        GPBUtil::checkString($var, False);
        $this->task_token = $var;

        return $this;
    }

    /**
     * Embedded request as translated from the incoming frontend request.
     *
     * Generated from protobuf field <code>.temporal.api.nexus.v1.Request request = 2;</code>
     * @return \Temporal\Api\Nexus\V1\Request|null
     */
    public function getRequest()
    {
        return $this->request;
    }

    public function hasRequest()
    {
        return isset($this->request);
    }

    public function clearRequest()
    {
        unset($this->request);
    }

    /**
     * Embedded request as translated from the incoming frontend request.
     *
     * Generated from protobuf field <code>.temporal.api.nexus.v1.Request request = 2;</code>
     * @param \Temporal\Api\Nexus\V1\Request $var
     * @return $this
     */
    public function setRequest($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Nexus\V1\Request::class);
        $this->request = $var;

        return $this;
    }

    /**
     * Server-advised information the SDK may use to adjust its poller count.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3;</code>
     * @return \Temporal\Api\Taskqueue\V1\PollerScalingDecision|null
     */
    public function getPollerScalingDecision()
    {
        return $this->poller_scaling_decision;
    }

    public function hasPollerScalingDecision()
    {
        return isset($this->poller_scaling_decision);
    }

    public function clearPollerScalingDecision()
    {
        unset($this->poller_scaling_decision);
    }

    /**
     * Server-advised information the SDK may use to adjust its poller count.
     *
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3;</code>
     * @param \Temporal\Api\Taskqueue\V1\PollerScalingDecision $var
     * @return $this
     */
    public function setPollerScalingDecision($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\PollerScalingDecision::class);
        $this->poller_scaling_decision = $var;

        return $this;
    }

}

