<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/history/v1/message.proto

namespace Temporal\Api\History\V1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>temporal.api.history.v1.SignalExternalWorkflowExecutionInitiatedEventAttributes</code>
 */
class SignalExternalWorkflowExecutionInitiatedEventAttributes extends \Google\Protobuf\Internal\Message
{
    /**
     * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
     *
     * Generated from protobuf field <code>int64 workflow_task_completed_event_id = 1;</code>
     */
    protected $workflow_task_completed_event_id = 0;
    /**
     * Namespace of the to-be-signalled workflow.
     * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
     *
     * Generated from protobuf field <code>string namespace = 2;</code>
     */
    protected $namespace = '';
    /**
     * Generated from protobuf field <code>string namespace_id = 9;</code>
     */
    protected $namespace_id = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 3;</code>
     */
    protected $workflow_execution = null;
    /**
     * name/type of the signal to fire in the external workflow
     *
     * Generated from protobuf field <code>string signal_name = 4;</code>
     */
    protected $signal_name = '';
    /**
     * Serialized arguments to provide to the signal handler
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 5;</code>
     */
    protected $input = null;
    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string control = 6 [deprecated = true];</code>
     * @deprecated
     */
    protected $control = '';
    /**
     * Workers are expected to set this to true if the workflow they are requesting to cancel is
     * a child of the workflow which issued the request
     *
     * Generated from protobuf field <code>bool child_workflow_only = 7;</code>
     */
    protected $child_workflow_only = false;
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Header header = 8;</code>
     */
    protected $header = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $workflow_task_completed_event_id
     *           The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
     *     @type string $namespace
     *           Namespace of the to-be-signalled workflow.
     *           SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
     *     @type string $namespace_id
     *     @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution
     *     @type string $signal_name
     *           name/type of the signal to fire in the external workflow
     *     @type \Temporal\Api\Common\V1\Payloads $input
     *           Serialized arguments to provide to the signal handler
     *     @type string $control
     *           Deprecated.
     *     @type bool $child_workflow_only
     *           Workers are expected to set this to true if the workflow they are requesting to cancel is
     *           a child of the workflow which issued the request
     *     @type \Temporal\Api\Common\V1\Header $header
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\History\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
     *
     * Generated from protobuf field <code>int64 workflow_task_completed_event_id = 1;</code>
     * @return int|string
     */
    public function getWorkflowTaskCompletedEventId()
    {
        return $this->workflow_task_completed_event_id;
    }

    /**
     * The `WORKFLOW_TASK_COMPLETED` event which this command was reported with
     *
     * Generated from protobuf field <code>int64 workflow_task_completed_event_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setWorkflowTaskCompletedEventId($var)
    {
        GPBUtil::checkInt64($var);
        $this->workflow_task_completed_event_id = $var;

        return $this;
    }

    /**
     * Namespace of the to-be-signalled workflow.
     * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
     *
     * Generated from protobuf field <code>string namespace = 2;</code>
     * @return string
     */
    public function getNamespace()
    {
        return $this->namespace;
    }

    /**
     * Namespace of the to-be-signalled workflow.
     * SDKs and UI tools should use `namespace` field but server must use `namespace_id` only.
     *
     * Generated from protobuf field <code>string namespace = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setNamespace($var)
    {
        GPBUtil::checkString($var, True);
        $this->namespace = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string namespace_id = 9;</code>
     * @return string
     */
    public function getNamespaceId()
    {
        return $this->namespace_id;
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 3;</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 = 3;</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;
    }

    /**
     * name/type of the signal to fire in the external workflow
     *
     * Generated from protobuf field <code>string signal_name = 4;</code>
     * @return string
     */
    public function getSignalName()
    {
        return $this->signal_name;
    }

    /**
     * name/type of the signal to fire in the external workflow
     *
     * Generated from protobuf field <code>string signal_name = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setSignalName($var)
    {
        GPBUtil::checkString($var, True);
        $this->signal_name = $var;

        return $this;
    }

    /**
     * Serialized arguments to provide to the signal handler
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 5;</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 arguments to provide to the signal handler
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 5;</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;
    }

    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string control = 6 [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 = 6 [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;
    }

    /**
     * Workers are expected to set this to true if the workflow they are requesting to cancel is
     * a child of the workflow which issued the request
     *
     * Generated from protobuf field <code>bool child_workflow_only = 7;</code>
     * @return bool
     */
    public function getChildWorkflowOnly()
    {
        return $this->child_workflow_only;
    }

    /**
     * Workers are expected to set this to true if the workflow they are requesting to cancel is
     * a child of the workflow which issued the request
     *
     * Generated from protobuf field <code>bool child_workflow_only = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setChildWorkflowOnly($var)
    {
        GPBUtil::checkBool($var);
        $this->child_workflow_only = $var;

        return $this;
    }

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

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

}

