<?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 translation config to capture necessary settings for a translation task
 * and subtask.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.migration.v2.TranslationConfigDetails</code>
 */
class TranslationConfigDetails extends \Google\Protobuf\Internal\Message
{
    /**
     * The dialect of the input files.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect source_dialect = 3;</code>
     */
    private $source_dialect = null;
    /**
     * The target dialect for the engine to translate the input to.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect target_dialect = 4;</code>
     */
    private $target_dialect = null;
    /**
     * The default source environment values for the translation.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.SourceEnv source_env = 6;</code>
     */
    private $source_env = null;
    protected $source_location;
    protected $target_location;
    protected $output_name_mapping;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $gcs_source_path
     *           The Cloud Storage path for a directory of files to translate in a task.
     *     @type string $gcs_target_path
     *           The Cloud Storage path to write back the corresponding input files to.
     *     @type \Google\Cloud\BigQuery\Migration\V2\Dialect $source_dialect
     *           The dialect of the input files.
     *     @type \Google\Cloud\BigQuery\Migration\V2\Dialect $target_dialect
     *           The target dialect for the engine to translate the input to.
     *     @type \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $name_mapping_list
     *           The mapping of objects to their desired output names in list form.
     *     @type \Google\Cloud\BigQuery\Migration\V2\SourceEnv $source_env
     *           The default source environment values for the translation.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The Cloud Storage path for a directory of files to translate in a task.
     *
     * Generated from protobuf field <code>string gcs_source_path = 1;</code>
     * @return string
     */
    public function getGcsSourcePath()
    {
        return $this->readOneof(1);
    }

    public function hasGcsSourcePath()
    {
        return $this->hasOneof(1);
    }

    /**
     * The Cloud Storage path for a directory of files to translate in a task.
     *
     * Generated from protobuf field <code>string gcs_source_path = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsSourcePath($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The Cloud Storage path to write back the corresponding input files to.
     *
     * Generated from protobuf field <code>string gcs_target_path = 2;</code>
     * @return string
     */
    public function getGcsTargetPath()
    {
        return $this->readOneof(2);
    }

    public function hasGcsTargetPath()
    {
        return $this->hasOneof(2);
    }

    /**
     * The Cloud Storage path to write back the corresponding input files to.
     *
     * Generated from protobuf field <code>string gcs_target_path = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsTargetPath($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The dialect of the input files.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect source_dialect = 3;</code>
     * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null
     */
    public function getSourceDialect()
    {
        return $this->source_dialect;
    }

    public function hasSourceDialect()
    {
        return isset($this->source_dialect);
    }

    public function clearSourceDialect()
    {
        unset($this->source_dialect);
    }

    /**
     * The dialect of the input files.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect source_dialect = 3;</code>
     * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var
     * @return $this
     */
    public function setSourceDialect($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class);
        $this->source_dialect = $var;

        return $this;
    }

    /**
     * The target dialect for the engine to translate the input to.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect target_dialect = 4;</code>
     * @return \Google\Cloud\BigQuery\Migration\V2\Dialect|null
     */
    public function getTargetDialect()
    {
        return $this->target_dialect;
    }

    public function hasTargetDialect()
    {
        return isset($this->target_dialect);
    }

    public function clearTargetDialect()
    {
        unset($this->target_dialect);
    }

    /**
     * The target dialect for the engine to translate the input to.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.Dialect target_dialect = 4;</code>
     * @param \Google\Cloud\BigQuery\Migration\V2\Dialect $var
     * @return $this
     */
    public function setTargetDialect($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\Dialect::class);
        $this->target_dialect = $var;

        return $this;
    }

    /**
     * The mapping of objects to their desired output names in list form.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5;</code>
     * @return \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList|null
     */
    public function getNameMappingList()
    {
        return $this->readOneof(5);
    }

    public function hasNameMappingList()
    {
        return $this->hasOneof(5);
    }

    /**
     * The mapping of objects to their desired output names in list form.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.ObjectNameMappingList name_mapping_list = 5;</code>
     * @param \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList $var
     * @return $this
     */
    public function setNameMappingList($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\ObjectNameMappingList::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * The default source environment values for the translation.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.SourceEnv source_env = 6;</code>
     * @return \Google\Cloud\BigQuery\Migration\V2\SourceEnv|null
     */
    public function getSourceEnv()
    {
        return $this->source_env;
    }

    public function hasSourceEnv()
    {
        return isset($this->source_env);
    }

    public function clearSourceEnv()
    {
        unset($this->source_env);
    }

    /**
     * The default source environment values for the translation.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.SourceEnv source_env = 6;</code>
     * @param \Google\Cloud\BigQuery\Migration\V2\SourceEnv $var
     * @return $this
     */
    public function setSourceEnv($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\SourceEnv::class);
        $this->source_env = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getSourceLocation()
    {
        return $this->whichOneof("source_location");
    }

    /**
     * @return string
     */
    public function getTargetLocation()
    {
        return $this->whichOneof("target_location");
    }

    /**
     * @return string
     */
    public function getOutputNameMapping()
    {
        return $this->whichOneof("output_name_mapping");
    }

}

