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

namespace Google\Cloud\Metastore\V1\MetadataImport;

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

/**
 * A specification of the location of and metadata about a database dump from
 * a relational database management system.
 *
 * Generated from protobuf message <code>google.cloud.metastore.v1.MetadataImport.DatabaseDump</code>
 */
class DatabaseDump extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of the database.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];</code>
     * @deprecated
     */
    protected $database_type = 0;
    /**
     * A Cloud Storage object or folder URI that specifies the source from which
     * to import metadata. It must begin with `gs://`.
     *
     * Generated from protobuf field <code>string gcs_uri = 2;</code>
     */
    protected $gcs_uri = '';
    /**
     * The name of the source database.
     *
     * Generated from protobuf field <code>string source_database = 3 [deprecated = true];</code>
     * @deprecated
     */
    protected $source_database = '';
    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $type = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $database_type
     *           The type of the database.
     *     @type string $gcs_uri
     *           A Cloud Storage object or folder URI that specifies the source from which
     *           to import metadata. It must begin with `gs://`.
     *     @type string $source_database
     *           The name of the source database.
     *     @type int $type
     *           Optional. The type of the database dump. If unspecified, defaults to
     *           `MYSQL`.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Metastore\V1\Metastore::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of the database.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];</code>
     * @return int
     * @deprecated
     */
    public function getDatabaseType()
    {
        @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
        return $this->database_type;
    }

    /**
     * The type of the database.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.MetadataImport.DatabaseDump.DatabaseType database_type = 1 [deprecated = true];</code>
     * @param int $var
     * @return $this
     * @deprecated
     */
    public function setDatabaseType($var)
    {
        @trigger_error('database_type is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1\MetadataImport\DatabaseDump\DatabaseType::class);
        $this->database_type = $var;

        return $this;
    }

    /**
     * A Cloud Storage object or folder URI that specifies the source from which
     * to import metadata. It must begin with `gs://`.
     *
     * Generated from protobuf field <code>string gcs_uri = 2;</code>
     * @return string
     */
    public function getGcsUri()
    {
        return $this->gcs_uri;
    }

    /**
     * A Cloud Storage object or folder URI that specifies the source from which
     * to import metadata. It must begin with `gs://`.
     *
     * Generated from protobuf field <code>string gcs_uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcs_uri = $var;

        return $this;
    }

    /**
     * The name of the source database.
     *
     * Generated from protobuf field <code>string source_database = 3 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getSourceDatabase()
    {
        @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
        return $this->source_database;
    }

    /**
     * The name of the source database.
     *
     * Generated from protobuf field <code>string source_database = 3 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setSourceDatabase($var)
    {
        @trigger_error('source_database is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->source_database = $var;

        return $this;
    }

    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Optional. The type of the database dump. If unspecified, defaults to
     * `MYSQL`.
     *
     * Generated from protobuf field <code>.google.cloud.metastore.v1.DatabaseDumpSpec.Type type = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Metastore\V1\DatabaseDumpSpec\Type::class);
        $this->type = $var;

        return $this;
    }

}


