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

namespace Google\Cloud\BigQuery\Migration\V2;

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

/**
 * The translation details to capture the necessary settings for a translation
 * job.
 *
 * Generated from protobuf message <code>google.cloud.bigquery.migration.v2.TranslationDetails</code>
 */
class TranslationDetails extends \Google\Protobuf\Internal\Message
{
    /**
     * The mapping from source to target SQL.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1;</code>
     */
    private $source_target_mapping;
    /**
     * The base URI for all writes to persistent storage.
     *
     * Generated from protobuf field <code>string target_base_uri = 2;</code>
     */
    protected $target_base_uri = '';
    /**
     * The default source environment values for the translation.
     *
     * Generated from protobuf field <code>.google.cloud.bigquery.migration.v2.SourceEnvironment source_environment = 3;</code>
     */
    protected $source_environment = null;
    /**
     * The list of literal targets that will be directly returned to the response.
     * Each entry consists of the constructed path, EXCLUDING the base path. Not
     * providing a target_base_uri will prevent writing to persistent storage.
     *
     * Generated from protobuf field <code>repeated string target_return_literals = 4;</code>
     */
    private $target_return_literals;
    /**
     * The types of output to generate, e.g. sql, metadata,
     * lineage_from_sql_scripts, etc. If not specified, a default set of
     * targets will be generated. Some additional target types may be slower to
     * generate. See the documentation for the set of available target types.
     *
     * Generated from protobuf field <code>repeated string target_types = 5;</code>
     */
    private $target_types;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping[] $source_target_mapping
     *           The mapping from source to target SQL.
     *     @type string $target_base_uri
     *           The base URI for all writes to persistent storage.
     *     @type \Google\Cloud\BigQuery\Migration\V2\SourceEnvironment $source_environment
     *           The default source environment values for the translation.
     *     @type string[] $target_return_literals
     *           The list of literal targets that will be directly returned to the response.
     *           Each entry consists of the constructed path, EXCLUDING the base path. Not
     *           providing a target_base_uri will prevent writing to persistent storage.
     *     @type string[] $target_types
     *           The types of output to generate, e.g. sql, metadata,
     *           lineage_from_sql_scripts, etc. If not specified, a default set of
     *           targets will be generated. Some additional target types may be slower to
     *           generate. See the documentation for the set of available target types.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Bigquery\Migration\V2\TranslationDetails::initOnce();
        parent::__construct($data);
    }

    /**
     * The mapping from source to target SQL.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1;</code>
     * @return RepeatedField<\Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping>
     */
    public function getSourceTargetMapping()
    {
        return $this->source_target_mapping;
    }

    /**
     * The mapping from source to target SQL.
     *
     * Generated from protobuf field <code>repeated .google.cloud.bigquery.migration.v2.SourceTargetMapping source_target_mapping = 1;</code>
     * @param \Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping[] $var
     * @return $this
     */
    public function setSourceTargetMapping($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\BigQuery\Migration\V2\SourceTargetMapping::class);
        $this->source_target_mapping = $arr;

        return $this;
    }

    /**
     * The base URI for all writes to persistent storage.
     *
     * Generated from protobuf field <code>string target_base_uri = 2;</code>
     * @return string
     */
    public function getTargetBaseUri()
    {
        return $this->target_base_uri;
    }

    /**
     * The base URI for all writes to persistent storage.
     *
     * Generated from protobuf field <code>string target_base_uri = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setTargetBaseUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->target_base_uri = $var;

        return $this;
    }

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

    public function hasSourceEnvironment()
    {
        return isset($this->source_environment);
    }

    public function clearSourceEnvironment()
    {
        unset($this->source_environment);
    }

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

        return $this;
    }

    /**
     * The list of literal targets that will be directly returned to the response.
     * Each entry consists of the constructed path, EXCLUDING the base path. Not
     * providing a target_base_uri will prevent writing to persistent storage.
     *
     * Generated from protobuf field <code>repeated string target_return_literals = 4;</code>
     * @return RepeatedField<string>
     */
    public function getTargetReturnLiterals()
    {
        return $this->target_return_literals;
    }

    /**
     * The list of literal targets that will be directly returned to the response.
     * Each entry consists of the constructed path, EXCLUDING the base path. Not
     * providing a target_base_uri will prevent writing to persistent storage.
     *
     * Generated from protobuf field <code>repeated string target_return_literals = 4;</code>
     * @param string[] $var
     * @return $this
     */
    public function setTargetReturnLiterals($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->target_return_literals = $arr;

        return $this;
    }

    /**
     * The types of output to generate, e.g. sql, metadata,
     * lineage_from_sql_scripts, etc. If not specified, a default set of
     * targets will be generated. Some additional target types may be slower to
     * generate. See the documentation for the set of available target types.
     *
     * Generated from protobuf field <code>repeated string target_types = 5;</code>
     * @return RepeatedField<string>
     */
    public function getTargetTypes()
    {
        return $this->target_types;
    }

    /**
     * The types of output to generate, e.g. sql, metadata,
     * lineage_from_sql_scripts, etc. If not specified, a default set of
     * targets will be generated. Some additional target types may be slower to
     * generate. See the documentation for the set of available target types.
     *
     * Generated from protobuf field <code>repeated string target_types = 5;</code>
     * @param string[] $var
     * @return $this
     */
    public function setTargetTypes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->target_types = $arr;

        return $this;
    }

}

