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

/**
 * Nexus operation timed out.
 *
 * Generated from protobuf message <code>temporal.api.history.v1.NexusOperationTimedOutEventAttributes</code>
 */
class NexusOperationTimedOutEventAttributes extends \Google\Protobuf\Internal\Message
{
    /**
     * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
     *
     * Generated from protobuf field <code>int64 scheduled_event_id = 1;</code>
     */
    protected $scheduled_event_id = 0;
    /**
     * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
     *
     * Generated from protobuf field <code>.temporal.api.failure.v1.Failure failure = 2;</code>
     */
    protected $failure = null;
    /**
     * The request ID allocated at schedule time.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     */
    protected $request_id = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $scheduled_event_id
     *           The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
     *     @type \Temporal\Api\Failure\V1\Failure $failure
     *           Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
     *     @type string $request_id
     *           The request ID allocated at schedule time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\History\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
     *
     * Generated from protobuf field <code>int64 scheduled_event_id = 1;</code>
     * @return int|string
     */
    public function getScheduledEventId()
    {
        return $this->scheduled_event_id;
    }

    /**
     * The ID of the `NEXUS_OPERATION_SCHEDULED` event. Uniquely identifies this operation.
     *
     * Generated from protobuf field <code>int64 scheduled_event_id = 1;</code>
     * @param int|string $var
     * @return $this
     */
    public function setScheduledEventId($var)
    {
        GPBUtil::checkInt64($var);
        $this->scheduled_event_id = $var;

        return $this;
    }

    /**
     * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
     *
     * Generated from protobuf field <code>.temporal.api.failure.v1.Failure failure = 2;</code>
     * @return \Temporal\Api\Failure\V1\Failure|null
     */
    public function getFailure()
    {
        return $this->failure;
    }

    public function hasFailure()
    {
        return isset($this->failure);
    }

    public function clearFailure()
    {
        unset($this->failure);
    }

    /**
     * Failure details. A NexusOperationFailureInfo wrapping a CanceledFailureInfo.
     *
     * Generated from protobuf field <code>.temporal.api.failure.v1.Failure failure = 2;</code>
     * @param \Temporal\Api\Failure\V1\Failure $var
     * @return $this
     */
    public function setFailure($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Failure\V1\Failure::class);
        $this->failure = $var;

        return $this;
    }

    /**
     * The request ID allocated at schedule time.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     * @return string
     */
    public function getRequestId()
    {
        return $this->request_id;
    }

    /**
     * The request ID allocated at schedule time.
     *
     * Generated from protobuf field <code>string request_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setRequestId($var)
    {
        GPBUtil::checkString($var, True);
        $this->request_id = $var;

        return $this;
    }

}

