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

/**
 * Keep the parameters in sync with:
 *   - temporal.api.batch.v1.BatchOperationSignal.
 *   - temporal.api.workflow.v1.PostResetOperation.SignalWorkflow.
 *
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.SignalWorkflowExecutionRequest</code>
 */
class SignalWorkflowExecutionRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 2;</code>
     */
    protected $workflow_execution = null;
    /**
     * The workflow author-defined name of the signal to send to the workflow
     *
     * Generated from protobuf field <code>string signal_name = 3;</code>
     */
    protected $signal_name = '';
    /**
     * Serialized value(s) to provide with the signal
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     */
    protected $input = null;
    /**
     * The identity of the worker/client
     *
     * Generated from protobuf field <code>string identity = 5;</code>
     */
    protected $identity = '';
    /**
     * Used to de-dupe sent signals
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     */
    protected $request_id = '';
    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string control = 7 [deprecated = true];</code>
     * @deprecated
     */
    protected $control = '';
    /**
     * Headers that are passed with the signal to the processing workflow.
     * These can include things like auth or tracing tokens.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Header header = 8;</code>
     */
    protected $header = null;
    /**
     * Links to be associated with the WorkflowExecutionSignaled event.
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.Link links = 10;</code>
     */
    private $links;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *     @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution
     *     @type string $signal_name
     *           The workflow author-defined name of the signal to send to the workflow
     *     @type \Temporal\Api\Common\V1\Payloads $input
     *           Serialized value(s) to provide with the signal
     *     @type string $identity
     *           The identity of the worker/client
     *     @type string $request_id
     *           Used to de-dupe sent signals
     *     @type string $control
     *           Deprecated.
     *     @type \Temporal\Api\Common\V1\Header $header
     *           Headers that are passed with the signal to the processing workflow.
     *           These can include things like auth or tracing tokens.
     *     @type \Temporal\Api\Common\V1\Link[] $links
     *           Links to be associated with the WorkflowExecutionSignaled event.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

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

    /**
     * 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;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 2;</code>
     * @return \Temporal\Api\Common\V1\WorkflowExecution|null
     */
    public function getWorkflowExecution()
    {
        return $this->workflow_execution;
    }

    public function hasWorkflowExecution()
    {
        return isset($this->workflow_execution);
    }

    public function clearWorkflowExecution()
    {
        unset($this->workflow_execution);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 2;</code>
     * @param \Temporal\Api\Common\V1\WorkflowExecution $var
     * @return $this
     */
    public function setWorkflowExecution($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class);
        $this->workflow_execution = $var;

        return $this;
    }

    /**
     * The workflow author-defined name of the signal to send to the workflow
     *
     * Generated from protobuf field <code>string signal_name = 3;</code>
     * @return string
     */
    public function getSignalName()
    {
        return $this->signal_name;
    }

    /**
     * The workflow author-defined name of the signal to send to the workflow
     *
     * Generated from protobuf field <code>string signal_name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSignalName($var)
    {
        GPBUtil::checkString($var, True);
        $this->signal_name = $var;

        return $this;
    }

    /**
     * Serialized value(s) to provide with the signal
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     * @return \Temporal\Api\Common\V1\Payloads|null
     */
    public function getInput()
    {
        return $this->input;
    }

    public function hasInput()
    {
        return isset($this->input);
    }

    public function clearInput()
    {
        unset($this->input);
    }

    /**
     * Serialized value(s) to provide with the signal
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     * @param \Temporal\Api\Common\V1\Payloads $var
     * @return $this
     */
    public function setInput($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class);
        $this->input = $var;

        return $this;
    }

    /**
     * The identity of the worker/client
     *
     * Generated from protobuf field <code>string identity = 5;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

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

        return $this;
    }

    /**
     * Used to de-dupe sent signals
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * Used to de-dupe sent signals
     *
     * Generated from protobuf field <code>string request_id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string control = 7 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getControl()
    {
        if ($this->control !== '') {
            @trigger_error('control is deprecated.', E_USER_DEPRECATED);
        }
        return $this->control;
    }

    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string control = 7 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setControl($var)
    {
        @trigger_error('control is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->control = $var;

        return $this;
    }

    /**
     * Headers that are passed with the signal to the processing workflow.
     * These can include things like auth or tracing tokens.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Header header = 8;</code>
     * @return \Temporal\Api\Common\V1\Header|null
     */
    public function getHeader()
    {
        return $this->header;
    }

    public function hasHeader()
    {
        return isset($this->header);
    }

    public function clearHeader()
    {
        unset($this->header);
    }

    /**
     * Headers that are passed with the signal to the processing workflow.
     * These can include things like auth or tracing tokens.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Header header = 8;</code>
     * @param \Temporal\Api\Common\V1\Header $var
     * @return $this
     */
    public function setHeader($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Header::class);
        $this->header = $var;

        return $this;
    }

    /**
     * Links to be associated with the WorkflowExecutionSignaled event.
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.Link links = 10;</code>
     * @return RepeatedField<\Temporal\Api\Common\V1\Link>
     */
    public function getLinks()
    {
        return $this->links;
    }

    /**
     * Links to be associated with the WorkflowExecutionSignaled event.
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.Link links = 10;</code>
     * @param \Temporal\Api\Common\V1\Link[] $var
     * @return $this
     */
    public function setLinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\Link::class);
        $this->links = $arr;

        return $this;
    }

}

