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

/**
 * An operation completed successfully.
 *
 * Generated from protobuf message <code>temporal.api.nexus.v1.StartOperationResponse.Sync</code>
 */
class Sync extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload payload = 1;</code>
     */
    protected $payload = null;
    /**
     * Generated from protobuf field <code>repeated .temporal.api.nexus.v1.Link links = 2;</code>
     */
    private $links;

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

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload payload = 1;</code>
     * @return \Temporal\Api\Common\V1\Payload|null
     */
    public function getPayload()
    {
        return $this->payload;
    }

    public function hasPayload()
    {
        return isset($this->payload);
    }

    public function clearPayload()
    {
        unset($this->payload);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payload payload = 1;</code>
     * @param \Temporal\Api\Common\V1\Payload $var
     * @return $this
     */
    public function setPayload($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payload::class);
        $this->payload = $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;
    }

}

