<?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.PollWorkflowExecutionUpdateRequest</code>
 */
class PollWorkflowExecutionUpdateRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The namespace of the Workflow Execution to which the Update was
     * originally issued.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * The Update reference returned in the initial UpdateWorkflowExecutionResponse.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.UpdateRef update_ref = 2;</code>
     */
    protected $update_ref = null;
    /**
     * The identity of the worker/client who is polling this Update outcome.
     *
     * Generated from protobuf field <code>string identity = 3;</code>
     */
    protected $identity = '';
    /**
     * Specifies client's intent to wait for Update results.
     * Omit to request a non-blocking poll.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.WaitPolicy wait_policy = 4;</code>
     */
    protected $wait_policy = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           The namespace of the Workflow Execution to which the Update was
     *           originally issued.
     *     @type \Temporal\Api\Update\V1\UpdateRef $update_ref
     *           The Update reference returned in the initial UpdateWorkflowExecutionResponse.
     *     @type string $identity
     *           The identity of the worker/client who is polling this Update outcome.
     *     @type \Temporal\Api\Update\V1\WaitPolicy $wait_policy
     *           Specifies client's intent to wait for Update results.
     *           Omit to request a non-blocking poll.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

    /**
     * The namespace of the Workflow Execution to which the Update was
     * originally issued.
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * The namespace of the Workflow Execution to which the Update was
     * originally issued.
     *
     * 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;
    }

    /**
     * The Update reference returned in the initial UpdateWorkflowExecutionResponse.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.UpdateRef update_ref = 2;</code>
     * @return \Temporal\Api\Update\V1\UpdateRef|null
     */
    public function getUpdateRef()
    {
        return $this->update_ref;
    }

    public function hasUpdateRef()
    {
        return isset($this->update_ref);
    }

    public function clearUpdateRef()
    {
        unset($this->update_ref);
    }

    /**
     * The Update reference returned in the initial UpdateWorkflowExecutionResponse.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.UpdateRef update_ref = 2;</code>
     * @param \Temporal\Api\Update\V1\UpdateRef $var
     * @return $this
     */
    public function setUpdateRef($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\UpdateRef::class);
        $this->update_ref = $var;

        return $this;
    }

    /**
     * The identity of the worker/client who is polling this Update outcome.
     *
     * Generated from protobuf field <code>string identity = 3;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * The identity of the worker/client who is polling this Update outcome.
     *
     * Generated from protobuf field <code>string identity = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * Specifies client's intent to wait for Update results.
     * Omit to request a non-blocking poll.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.WaitPolicy wait_policy = 4;</code>
     * @return \Temporal\Api\Update\V1\WaitPolicy|null
     */
    public function getWaitPolicy()
    {
        return $this->wait_policy;
    }

    public function hasWaitPolicy()
    {
        return isset($this->wait_policy);
    }

    public function clearWaitPolicy()
    {
        unset($this->wait_policy);
    }

    /**
     * Specifies client's intent to wait for Update results.
     * Omit to request a non-blocking poll.
     *
     * Generated from protobuf field <code>.temporal.api.update.v1.WaitPolicy wait_policy = 4;</code>
     * @param \Temporal\Api\Update\V1\WaitPolicy $var
     * @return $this
     */
    public function setWaitPolicy($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\WaitPolicy::class);
        $this->wait_policy = $var;

        return $this;
    }

}

