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

namespace Temporal\Api\Workflow\V1;

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

/**
 * Holds all the extra information about workflow execution that is not part of Visibility.
 *
 * Generated from protobuf message <code>temporal.api.workflow.v1.WorkflowExecutionExtendedInfo</code>
 */
class WorkflowExecutionExtendedInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Workflow execution expiration time is defined as workflow start time plus expiration timeout.
     * Workflow start time may change after workflow reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp execution_expiration_time = 1;</code>
     */
    protected $execution_expiration_time = null;
    /**
     * Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp run_expiration_time = 2;</code>
     */
    protected $run_expiration_time = null;
    /**
     * indicates if the workflow received a cancel request
     *
     * Generated from protobuf field <code>bool cancel_requested = 3;</code>
     */
    protected $cancel_requested = false;
    /**
     * Last workflow reset time. Nil if the workflow was never reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_reset_time = 4;</code>
     */
    protected $last_reset_time = null;
    /**
     * Original workflow start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp original_start_time = 5;</code>
     */
    protected $original_start_time = null;
    /**
     * Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.
     *
     * Generated from protobuf field <code>string reset_run_id = 6;</code>
     */
    protected $reset_run_id = '';
    /**
     * Request ID information (eg: history event information associated with the request ID).
     * Note: It only contains request IDs from StartWorkflowExecution requests, including indirect
     * calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
     * used in the StartWorkflowExecution request).
     *
     * Generated from protobuf field <code>map<string, .temporal.api.workflow.v1.RequestIdInfo> request_id_infos = 7;</code>
     */
    private $request_id_infos;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Timestamp $execution_expiration_time
     *           Workflow execution expiration time is defined as workflow start time plus expiration timeout.
     *           Workflow start time may change after workflow reset.
     *     @type \Google\Protobuf\Timestamp $run_expiration_time
     *           Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.
     *     @type bool $cancel_requested
     *           indicates if the workflow received a cancel request
     *     @type \Google\Protobuf\Timestamp $last_reset_time
     *           Last workflow reset time. Nil if the workflow was never reset.
     *     @type \Google\Protobuf\Timestamp $original_start_time
     *           Original workflow start time.
     *     @type string $reset_run_id
     *           Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.
     *     @type array|\Google\Protobuf\Internal\MapField $request_id_infos
     *           Request ID information (eg: history event information associated with the request ID).
     *           Note: It only contains request IDs from StartWorkflowExecution requests, including indirect
     *           calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
     *           used in the StartWorkflowExecution request).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Workflow execution expiration time is defined as workflow start time plus expiration timeout.
     * Workflow start time may change after workflow reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp execution_expiration_time = 1;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExecutionExpirationTime()
    {
        return $this->execution_expiration_time;
    }

    public function hasExecutionExpirationTime()
    {
        return isset($this->execution_expiration_time);
    }

    public function clearExecutionExpirationTime()
    {
        unset($this->execution_expiration_time);
    }

    /**
     * Workflow execution expiration time is defined as workflow start time plus expiration timeout.
     * Workflow start time may change after workflow reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp execution_expiration_time = 1;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExecutionExpirationTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->execution_expiration_time = $var;

        return $this;
    }

    /**
     * Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp run_expiration_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getRunExpirationTime()
    {
        return $this->run_expiration_time;
    }

    public function hasRunExpirationTime()
    {
        return isset($this->run_expiration_time);
    }

    public function clearRunExpirationTime()
    {
        unset($this->run_expiration_time);
    }

    /**
     * Workflow run expiration time is defined as current workflow run start time plus workflow run timeout.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp run_expiration_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setRunExpirationTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->run_expiration_time = $var;

        return $this;
    }

    /**
     * indicates if the workflow received a cancel request
     *
     * Generated from protobuf field <code>bool cancel_requested = 3;</code>
     * @return bool
     */
    public function getCancelRequested()
    {
        return $this->cancel_requested;
    }

    /**
     * indicates if the workflow received a cancel request
     *
     * Generated from protobuf field <code>bool cancel_requested = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setCancelRequested($var)
    {
        GPBUtil::checkBool($var);
        $this->cancel_requested = $var;

        return $this;
    }

    /**
     * Last workflow reset time. Nil if the workflow was never reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_reset_time = 4;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastResetTime()
    {
        return $this->last_reset_time;
    }

    public function hasLastResetTime()
    {
        return isset($this->last_reset_time);
    }

    public function clearLastResetTime()
    {
        unset($this->last_reset_time);
    }

    /**
     * Last workflow reset time. Nil if the workflow was never reset.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_reset_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastResetTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_reset_time = $var;

        return $this;
    }

    /**
     * Original workflow start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp original_start_time = 5;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getOriginalStartTime()
    {
        return $this->original_start_time;
    }

    public function hasOriginalStartTime()
    {
        return isset($this->original_start_time);
    }

    public function clearOriginalStartTime()
    {
        unset($this->original_start_time);
    }

    /**
     * Original workflow start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp original_start_time = 5;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setOriginalStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->original_start_time = $var;

        return $this;
    }

    /**
     * Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.
     *
     * Generated from protobuf field <code>string reset_run_id = 6;</code>
     * @return string
     */
    public function getResetRunId()
    {
        return $this->reset_run_id;
    }

    /**
     * Reset Run ID points to the new run when this execution is reset. If the execution is reset multiple times, it points to the latest run.
     *
     * Generated from protobuf field <code>string reset_run_id = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setResetRunId($var)
    {
        GPBUtil::checkString($var, True);
        $this->reset_run_id = $var;

        return $this;
    }

    /**
     * Request ID information (eg: history event information associated with the request ID).
     * Note: It only contains request IDs from StartWorkflowExecution requests, including indirect
     * calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
     * used in the StartWorkflowExecution request).
     *
     * Generated from protobuf field <code>map<string, .temporal.api.workflow.v1.RequestIdInfo> request_id_infos = 7;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getRequestIdInfos()
    {
        return $this->request_id_infos;
    }

    /**
     * Request ID information (eg: history event information associated with the request ID).
     * Note: It only contains request IDs from StartWorkflowExecution requests, including indirect
     * calls (eg: if SignalWithStartWorkflowExecution starts a new workflow, then the request ID is
     * used in the StartWorkflowExecution request).
     *
     * Generated from protobuf field <code>map<string, .temporal.api.workflow.v1.RequestIdInfo> request_id_infos = 7;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setRequestIdInfos($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflow\V1\RequestIdInfo::class);
        $this->request_id_infos = $arr;

        return $this;
    }

}

