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

namespace Temporal\Api\Nexus\V1\StartOperationResponse;

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

/**
 * The operation will complete asynchronously.
 * The returned ID can be used to reference this operation.
 *
 * Generated from protobuf message <code>temporal.api.nexus.v1.StartOperationResponse.Async</code>
 */
class Async extends \Google\Protobuf\Internal\Message
{
    /**
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 1 [deprecated = true];</code>
     * @deprecated
     */
    protected $operation_id = '';
    /**
     * Generated from protobuf field <code>repeated .temporal.api.nexus.v1.Link links = 2;</code>
     */
    private $links;
    /**
     * Generated from protobuf field <code>string operation_token = 3;</code>
     */
    protected $operation_token = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $operation_id
     *           Deprecated. Renamed to operation_token.
     *     @type \Temporal\Api\Nexus\V1\Link[] $links
     *     @type string $operation_token
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Nexus\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 1 [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;
    }

    /**
     * Deprecated. Renamed to operation_token.
     *
     * Generated from protobuf field <code>string operation_id = 1 [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;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.nexus.v1.Link links = 2;</code>
     * @return RepeatedField<\Temporal\Api\Nexus\V1\Link>
     */
    public function getLinks()
    {
        return $this->links;
    }

    /**
     * Generated from protobuf field <code>repeated .temporal.api.nexus.v1.Link links = 2;</code>
     * @param \Temporal\Api\Nexus\V1\Link[] $var
     * @return $this
     */
    public function setLinks($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Nexus\V1\Link::class);
        $this->links = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string operation_token = 3;</code>
     * @return string
     */
    public function getOperationToken()
    {
        return $this->operation_token;
    }

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

        return $this;
    }

}

