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

namespace Temporal\Api\Failure\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.failure.v1.NexusOperationFailureInfo</code>
 */
class NexusOperationFailureInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The NexusOperationScheduled event ID.
     *
     * Generated from protobuf field <code>int64 scheduled_event_id = 1;</code>
     */
    protected $scheduled_event_id = 0;
    /**
     * Endpoint name.
     *
     * Generated from protobuf field <code>string endpoint = 2;</code>
     */
    protected $endpoint = '';
    /**
     * Service name.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     */
    protected $service = '';
    /**
     * Operation name.
     *
     * Generated from protobuf field <code>string operation = 4;</code>
     */
    protected $operation = '';
    /**
     * Operation ID - may be empty if the operation completed synchronously.
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 5 [deprecated = true];</code>
     * @deprecated
     */
    protected $operation_id = '';
    /**
     * Operation token - may be empty if the operation completed synchronously.
     *
     * Generated from protobuf field <code>string operation_token = 6;</code>
     */
    protected $operation_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $scheduled_event_id
     *           The NexusOperationScheduled event ID.
     *     @type string $endpoint
     *           Endpoint name.
     *     @type string $service
     *           Service name.
     *     @type string $operation
     *           Operation name.
     *     @type string $operation_id
     *           Operation ID - may be empty if the operation completed synchronously.
     *           Deprecated. Renamed to operation_token.
     *     @type string $operation_token
     *           Operation token - may be empty if the operation completed synchronously.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Failure\V1\Message::initOnce();
        parent::__construct($data);
    }

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

    /**
     * The NexusOperationScheduled event ID.
     *
     * 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;
    }

    /**
     * Endpoint name.
     *
     * Generated from protobuf field <code>string endpoint = 2;</code>
     * @return string
     */
    public function getEndpoint()
    {
        return $this->endpoint;
    }

    /**
     * Endpoint name.
     *
     * Generated from protobuf field <code>string endpoint = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setEndpoint($var)
    {
        GPBUtil::checkString($var, True);
        $this->endpoint = $var;

        return $this;
    }

    /**
     * Service name.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     * @return string
     */
    public function getService()
    {
        return $this->service;
    }

    /**
     * Service name.
     *
     * Generated from protobuf field <code>string service = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setService($var)
    {
        GPBUtil::checkString($var, True);
        $this->service = $var;

        return $this;
    }

    /**
     * Operation name.
     *
     * Generated from protobuf field <code>string operation = 4;</code>
     * @return string
     */
    public function getOperation()
    {
        return $this->operation;
    }

    /**
     * Operation name.
     *
     * Generated from protobuf field <code>string operation = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setOperation($var)
    {
        GPBUtil::checkString($var, True);
        $this->operation = $var;

        return $this;
    }

    /**
     * Operation ID - may be empty if the operation completed synchronously.
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 5 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getOperationId()
    {
        if ($this->operation_id !== '') {
            @trigger_error('operation_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->operation_id;
    }

    /**
     * Operation ID - may be empty if the operation completed synchronously.
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 5 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setOperationId($var)
    {
        @trigger_error('operation_id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->operation_id = $var;

        return $this;
    }

    /**
     * Operation token - may be empty if the operation completed synchronously.
     *
     * Generated from protobuf field <code>string operation_token = 6;</code>
     * @return string
     */
    public function getOperationToken()
    {
        return $this->operation_token;
    }

    /**
     * Operation token - may be empty if the operation completed synchronously.
     *
     * Generated from protobuf field <code>string operation_token = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setOperationToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->operation_token = $var;

        return $this;
    }

}

