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

namespace Google\Cloud\AutoMl\V1beta1;

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

/**
 * *  For Translation:
 *         CSV file `translation.csv`, with each line in format:
 *         ML_USE,GCS_FILE_PATH
 *         GCS_FILE_PATH leads to a .TSV file which describes examples that have
 *         given ML_USE, using the following row format per line:
 *         TEXT_SNIPPET (in source language) \t TEXT_SNIPPET (in target
 *         language)
 *   *  For Tables:
 *         Output depends on whether the dataset was imported from GCS or
 *         BigQuery.
 *         GCS case:
 * [gcs_destination][google.cloud.automl.v1beta1.OutputConfig.gcs_destination]
 *           must be set. Exported are CSV file(s) `tables_1.csv`,
 *           `tables_2.csv`,...,`tables_N.csv` with each having as header line
 *           the table's column names, and all other lines contain values for
 *           the header columns.
 *         BigQuery case:
 * [bigquery_destination][google.cloud.automl.v1beta1.OutputConfig.bigquery_destination]
 *           pointing to a BigQuery project must be set. In the given project a
 *           new dataset will be created with name
 * `export_data_<automl-dataset-display-name>_<timestamp-of-export-call>`
 *           where <automl-dataset-display-name> will be made
 *           BigQuery-dataset-name compatible (e.g. most special characters will
 *           become underscores), and timestamp will be in
 *           YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In that
 *           dataset a new table called `primary_table` will be created, and
 *           filled with precisely the same data as this obtained on import.
 *
 * Generated from protobuf message <code>google.cloud.automl.v1beta1.OutputConfig</code>
 */
class OutputConfig extends \Google\Protobuf\Internal\Message
{
    protected $destination;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\AutoMl\V1beta1\GcsDestination $gcs_destination
     *           The Google Cloud Storage location where the output is to be written to.
     *           For Image Object Detection, Text Extraction, Video Classification and
     *           Tables, in the given directory a new directory will be created with name:
     *           export_data-<dataset-display-name>-<timestamp-of-export-call> where
     *           timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
     *           output will be written into that directory.
     *     @type \Google\Cloud\AutoMl\V1beta1\BigQueryDestination $bigquery_destination
     *           The BigQuery location where the output is to be written to.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Automl\V1Beta1\Io::initOnce();
        parent::__construct($data);
    }

    /**
     * The Google Cloud Storage location where the output is to be written to.
     * For Image Object Detection, Text Extraction, Video Classification and
     * Tables, in the given directory a new directory will be created with name:
     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
     * output will be written into that directory.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1;</code>
     * @return \Google\Cloud\AutoMl\V1beta1\GcsDestination|null
     */
    public function getGcsDestination()
    {
        return $this->readOneof(1);
    }

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

    /**
     * The Google Cloud Storage location where the output is to be written to.
     * For Image Object Detection, Text Extraction, Video Classification and
     * Tables, in the given directory a new directory will be created with name:
     * export_data-<dataset-display-name>-<timestamp-of-export-call> where
     * timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. All export
     * output will be written into that directory.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1;</code>
     * @param \Google\Cloud\AutoMl\V1beta1\GcsDestination $var
     * @return $this
     */
    public function setGcsDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\GcsDestination::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The BigQuery location where the output is to be written to.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2;</code>
     * @return \Google\Cloud\AutoMl\V1beta1\BigQueryDestination|null
     */
    public function getBigqueryDestination()
    {
        return $this->readOneof(2);
    }

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

    /**
     * The BigQuery location where the output is to be written to.
     *
     * Generated from protobuf field <code>.google.cloud.automl.v1beta1.BigQueryDestination bigquery_destination = 2;</code>
     * @param \Google\Cloud\AutoMl\V1beta1\BigQueryDestination $var
     * @return $this
     */
    public function setBigqueryDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AutoMl\V1beta1\BigQueryDestination::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

