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

namespace Temporal\Api\Errordetails\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.errordetails.v1.SystemWorkflowFailure</code>
 */
class SystemWorkflowFailure extends \Google\Protobuf\Internal\Message
{
    /**
     * WorkflowId and RunId of the Temporal system workflow performing the underlying operation.
     * Looking up the info of the system workflow run may help identify the issue causing the failure.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 1;</code>
     */
    protected $workflow_execution = null;
    /**
     * Serialized error returned by the system workflow performing the underlying operation.
     *
     * Generated from protobuf field <code>string workflow_error = 2;</code>
     */
    protected $workflow_error = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Common\V1\WorkflowExecution $workflow_execution
     *           WorkflowId and RunId of the Temporal system workflow performing the underlying operation.
     *           Looking up the info of the system workflow run may help identify the issue causing the failure.
     *     @type string $workflow_error
     *           Serialized error returned by the system workflow performing the underlying operation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * WorkflowId and RunId of the Temporal system workflow performing the underlying operation.
     * Looking up the info of the system workflow run may help identify the issue causing the failure.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 1;</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);
    }

    /**
     * WorkflowId and RunId of the Temporal system workflow performing the underlying operation.
     * Looking up the info of the system workflow run may help identify the issue causing the failure.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution workflow_execution = 1;</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;
    }

    /**
     * Serialized error returned by the system workflow performing the underlying operation.
     *
     * Generated from protobuf field <code>string workflow_error = 2;</code>
     * @return string
     */
    public function getWorkflowError()
    {
        return $this->workflow_error;
    }

    /**
     * Serialized error returned by the system workflow performing the underlying operation.
     *
     * Generated from protobuf field <code>string workflow_error = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setWorkflowError($var)
    {
        GPBUtil::checkString($var, True);
        $this->workflow_error = $var;

        return $this;
    }

}

