<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/bigquery/migration/v2/translation_config.proto

namespace Google\Cloud\BigQuery\Migration\V2;

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

/**
 * The potential components of a full name mapping that will be mapped
 * during translation in the source data warehouse.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.migration.v2.NameMappingKey</code>
 */
class NameMappingKey extends \Google\Protobuf\Internal\Message
{
    /**
     * The type of object that is being mapped.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1;</code>
     */
    private $type = 0;
    /**
     * The database name (BigQuery project ID equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string database = 2;</code>
     */
    private $database = '';
    /**
     * The schema name (BigQuery dataset equivalent in the source data warehouse).
     *
     * Generated from protobuf field <code>string schema = 3;</code>
     */
    private $schema = '';
    /**
     * The relation name (BigQuery table or view equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string relation = 4;</code>
     */
    private $relation = '';
    /**
     * The attribute name (BigQuery column equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string attribute = 5;</code>
     */
    private $attribute = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           The type of object that is being mapped.
     *     @type string $database
     *           The database name (BigQuery project ID equivalent in the source data
     *           warehouse).
     *     @type string $schema
     *           The schema name (BigQuery dataset equivalent in the source data warehouse).
     *     @type string $relation
     *           The relation name (BigQuery table or view equivalent in the source data
     *           warehouse).
     *     @type string $attribute
     *           The attribute name (BigQuery column equivalent in the source data
     *           warehouse).
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The type of object that is being mapped.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The type of object that is being mapped.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.NameMappingKey.Type type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The database name (BigQuery project ID equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string database = 2;</code>
     * @return string
     */
    public function getDatabase()
    {
        return $this->database;
    }

    /**
     * The database name (BigQuery project ID equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string database = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setDatabase($var)
    {
        GPBUtil::checkString($var, True);
        $this->database = $var;

        return $this;
    }

    /**
     * The schema name (BigQuery dataset equivalent in the source data warehouse).
     *
     * Generated from protobuf field <code>string schema = 3;</code>
     * @return string
     */
    public function getSchema()
    {
        return $this->schema;
    }

    /**
     * The schema name (BigQuery dataset equivalent in the source data warehouse).
     *
     * Generated from protobuf field <code>string schema = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setSchema($var)
    {
        GPBUtil::checkString($var, True);
        $this->schema = $var;

        return $this;
    }

    /**
     * The relation name (BigQuery table or view equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string relation = 4;</code>
     * @return string
     */
    public function getRelation()
    {
        return $this->relation;
    }

    /**
     * The relation name (BigQuery table or view equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string relation = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setRelation($var)
    {
        GPBUtil::checkString($var, True);
        $this->relation = $var;

        return $this;
    }

    /**
     * The attribute name (BigQuery column equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string attribute = 5;</code>
     * @return string
     */
    public function getAttribute()
    {
        return $this->attribute;
    }

    /**
     * The attribute name (BigQuery column equivalent in the source data
     * warehouse).
     *
     * Generated from protobuf field <code>string attribute = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setAttribute($var)
    {
        GPBUtil::checkString($var, True);
        $this->attribute = $var;

        return $this;
    }

}

