<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/memorystore/v1/memorystore.proto

namespace Google\Cloud\Memorystore\V1\CrossInstanceReplicationConfig;

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

/**
 * Details of the remote instance associated with this instance in a cross
 * instance replication setup.
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1.CrossInstanceReplicationConfig.RemoteInstance</code>
 */
class RemoteInstance extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The full resource path of the remote instance in
     * the format: projects/<project>/locations/<region>/instances/<instance-id>
     *
     * Generated from protobuf field <code>string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     */
    protected $instance = '';
    /**
     * Output only. The unique identifier of the remote instance.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     */
    protected $uid = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $instance
     *           Optional. The full resource path of the remote instance in
     *           the format: projects/<project>/locations/<region>/instances/<instance-id>
     *     @type string $uid
     *           Output only. The unique identifier of the remote instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The full resource path of the remote instance in
     * the format: projects/<project>/locations/<region>/instances/<instance-id>
     *
     * Generated from protobuf field <code>string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getInstance()
    {
        return $this->instance;
    }

    /**
     * Optional. The full resource path of the remote instance in
     * the format: projects/<project>/locations/<region>/instances/<instance-id>
     *
     * Generated from protobuf field <code>string instance = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setInstance($var)
    {
        GPBUtil::checkString($var, True);
        $this->instance = $var;

        return $this;
    }

    /**
     * Output only. The unique identifier of the remote instance.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @return string
     */
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * Output only. The unique identifier of the remote instance.
     *
     * Generated from protobuf field <code>string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_info) = {</code>
     * @param string $var
     * @return $this
     */
    public function setUid($var)
    {
        GPBUtil::checkString($var, True);
        $this->uid = $var;

        return $this;
    }

}


