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

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * Message representing a reference to a single Spanner database.
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference</code>
 */
class SpannerDatabaseReference extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The engine of the Spanner instance.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.Engine engine = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $engine = 0;
    /**
     * Required. The project the instance belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $project_id = '';
    /**
     * Required. The region of the instance.
     *
     * Generated from protobuf field <code>string region = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $region = '';
    /**
     * Required. The instance id.
     *
     * Generated from protobuf field <code>string instance_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $instance_id = '';
    /**
     * Required. The database id.
     *
     * Generated from protobuf field <code>string database_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $database_id = '';
    /**
     * Optional. The table ids. Denotes all tables if unset.
     *
     * Generated from protobuf field <code>repeated string table_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $table_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $engine
     *           Required. The engine of the Spanner instance.
     *     @type string $project_id
     *           Required. The project the instance belongs to.
     *     @type string $region
     *           Required. The region of the instance.
     *     @type string $instance_id
     *           Required. The instance id.
     *     @type string $database_id
     *           Required. The database id.
     *     @type string[] $table_ids
     *           Optional. The table ids. Denotes all tables if unset.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\Datasource::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The engine of the Spanner instance.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.Engine engine = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getEngine()
    {
        return $this->engine;
    }

    /**
     * Required. The engine of the Spanner instance.
     *
     * Generated from protobuf field <code>.google.cloud.geminidataanalytics.v1beta.SpannerDatabaseReference.Engine engine = 6 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setEngine($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\GeminiDataAnalytics\V1beta\SpannerDatabaseReference\Engine::class);
        $this->engine = $var;

        return $this;
    }

    /**
     * Required. The project the instance belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * Required. The project the instance belongs to.
     *
     * Generated from protobuf field <code>string project_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * Required. The region of the instance.
     *
     * Generated from protobuf field <code>string region = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getRegion()
    {
        return $this->region;
    }

    /**
     * Required. The region of the instance.
     *
     * Generated from protobuf field <code>string region = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setRegion($var)
    {
        GPBUtil::checkString($var, True);
        $this->region = $var;

        return $this;
    }

    /**
     * Required. The instance id.
     *
     * Generated from protobuf field <code>string instance_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getInstanceId()
    {
        return $this->instance_id;
    }

    /**
     * Required. The instance id.
     *
     * Generated from protobuf field <code>string instance_id = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setInstanceId($var)
    {
        GPBUtil::checkString($var, True);
        $this->instance_id = $var;

        return $this;
    }

    /**
     * Required. The database id.
     *
     * Generated from protobuf field <code>string database_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDatabaseId()
    {
        return $this->database_id;
    }

    /**
     * Required. The database id.
     *
     * Generated from protobuf field <code>string database_id = 4 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDatabaseId($var)
    {
        GPBUtil::checkString($var, True);
        $this->database_id = $var;

        return $this;
    }

    /**
     * Optional. The table ids. Denotes all tables if unset.
     *
     * Generated from protobuf field <code>repeated string table_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return RepeatedField<string>
     */
    public function getTableIds()
    {
        return $this->table_ids;
    }

    /**
     * Optional. The table ids. Denotes all tables if unset.
     *
     * Generated from protobuf field <code>repeated string table_ids = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string[] $var
     * @return $this
     */
    public function setTableIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->table_ids = $arr;

        return $this;
    }

}

