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

namespace Google\Cloud\Sql\V1beta4;

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

/**
 * Reference to another Cloud SQL instance.
 *
 * Generated from protobuf message <code>google.cloud.sql.v1beta4.InstanceReference</code>
 */
class InstanceReference extends \Google\Protobuf\Internal\Message
{
    /**
     * The name of the Cloud SQL instance being referenced.
     * This does not include the project ID.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     */
    private $name = '';
    /**
     * The region of the Cloud SQL instance being referenced.
     *
     * Generated from protobuf field <code>string region = 2;</code>
     */
    private $region = '';
    /**
     * The project ID of the Cloud SQL instance being referenced.
     * The default is the same project ID as the instance references it.
     *
     * Generated from protobuf field <code>string project = 3;</code>
     */
    private $project = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           The name of the Cloud SQL instance being referenced.
     *           This does not include the project ID.
     *     @type string $region
     *           The region of the Cloud SQL instance being referenced.
     *     @type string $project
     *           The project ID of the Cloud SQL instance being referenced.
     *           The default is the same project ID as the instance references it.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Sql\V1Beta4\CloudSqlResources::initOnce();
        parent::__construct($data);
    }

    /**
     * The name of the Cloud SQL instance being referenced.
     * This does not include the project ID.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of the Cloud SQL instance being referenced.
     * This does not include the project ID.
     *
     * Generated from protobuf field <code>string name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The region of the Cloud SQL instance being referenced.
     *
     * Generated from protobuf field <code>string region = 2;</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * The region of the Cloud SQL instance being referenced.
     *
     * Generated from protobuf field <code>string region = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * The project ID of the Cloud SQL instance being referenced.
     * The default is the same project ID as the instance references it.
     *
     * Generated from protobuf field <code>string project = 3;</code>
     * @return string
     */
    public function getProject()
    {
        return $this->project;
    }

    /**
     * The project ID of the Cloud SQL instance being referenced.
     * The default is the same project ID as the instance references it.
     *
     * Generated from protobuf field <code>string project = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setProject($var)
    {
        GPBUtil::checkString($var, True);
        $this->project = $var;

        return $this;
    }

}

