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

namespace Google\Cloud\Retail\V2;

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

/**
 * BigQuery source import data from.
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.BigQuerySource</code>
 */
class BigQuerySource extends \Google\Protobuf\Internal\Message
{
    /**
     * The project id (can be project # or id) that the BigQuery source is in with
     * a length limit of 128 characters. If not specified, inherits the project
     * id from the parent request.
     *
     * Generated from protobuf field <code>string project_id = 5;</code>
     */
    private $project_id = '';
    /**
     * Required. The BigQuery data set to copy the data from with a length limit
     * of 1,024 characters.
     *
     * Generated from protobuf field <code>string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $dataset_id = '';
    /**
     * Required. The BigQuery table to copy the data from with a length limit of
     * 1,024 characters.
     *
     * Generated from protobuf field <code>string table_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $table_id = '';
    /**
     * Intermediate Cloud Storage directory used for the import with a length
     * limit of 2,000 characters. Can be specified if one wants to have the
     * BigQuery export to a specific Cloud Storage directory.
     *
     * Generated from protobuf field <code>string gcs_staging_dir = 3;</code>
     */
    private $gcs_staging_dir = '';
    /**
     * The schema to use when parsing the data from the source.
     * Supported values for product imports:
     * * `product` (default): One JSON [Product][google.cloud.retail.v2.Product]
     * per line. Each product must
     *   have a valid [Product.id][google.cloud.retail.v2.Product.id].
     * * `product_merchant_center`: See [Importing catalog data from Merchant
     *   Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
     * Supported values for user events imports:
     * * `user_event` (default): One JSON
     * [UserEvent][google.cloud.retail.v2.UserEvent] per line.
     * * `user_event_ga360`: Using
     *   https://support.google.com/analytics/answer/3437719?hl=en.
     *
     * Generated from protobuf field <code>string data_schema = 4;</code>
     */
    private $data_schema = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $project_id
     *           The project id (can be project # or id) that the BigQuery source is in with
     *           a length limit of 128 characters. If not specified, inherits the project
     *           id from the parent request.
     *     @type string $dataset_id
     *           Required. The BigQuery data set to copy the data from with a length limit
     *           of 1,024 characters.
     *     @type string $table_id
     *           Required. The BigQuery table to copy the data from with a length limit of
     *           1,024 characters.
     *     @type string $gcs_staging_dir
     *           Intermediate Cloud Storage directory used for the import with a length
     *           limit of 2,000 characters. Can be specified if one wants to have the
     *           BigQuery export to a specific Cloud Storage directory.
     *     @type string $data_schema
     *           The schema to use when parsing the data from the source.
     *           Supported values for product imports:
     *           * `product` (default): One JSON [Product][google.cloud.retail.v2.Product]
     *           per line. Each product must
     *             have a valid [Product.id][google.cloud.retail.v2.Product.id].
     *           * `product_merchant_center`: See [Importing catalog data from Merchant
     *             Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
     *           Supported values for user events imports:
     *           * `user_event` (default): One JSON
     *           [UserEvent][google.cloud.retail.v2.UserEvent] per line.
     *           * `user_event_ga360`: Using
     *             https://support.google.com/analytics/answer/3437719?hl=en.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The project id (can be project # or id) that the BigQuery source is in with
     * a length limit of 128 characters. If not specified, inherits the project
     * id from the parent request.
     *
     * Generated from protobuf field <code>string project_id = 5;</code>
     * @return string
     */
    public function getProjectId()
    {
        return $this->project_id;
    }

    /**
     * The project id (can be project # or id) that the BigQuery source is in with
     * a length limit of 128 characters. If not specified, inherits the project
     * id from the parent request.
     *
     * Generated from protobuf field <code>string project_id = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setProjectId($var)
    {
        GPBUtil::checkString($var, True);
        $this->project_id = $var;

        return $this;
    }

    /**
     * Required. The BigQuery data set to copy the data from with a length limit
     * of 1,024 characters.
     *
     * Generated from protobuf field <code>string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getDatasetId()
    {
        return $this->dataset_id;
    }

    /**
     * Required. The BigQuery data set to copy the data from with a length limit
     * of 1,024 characters.
     *
     * Generated from protobuf field <code>string dataset_id = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setDatasetId($var)
    {
        GPBUtil::checkString($var, True);
        $this->dataset_id = $var;

        return $this;
    }

    /**
     * Required. The BigQuery table to copy the data from with a length limit of
     * 1,024 characters.
     *
     * Generated from protobuf field <code>string table_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getTableId()
    {
        return $this->table_id;
    }

    /**
     * Required. The BigQuery table to copy the data from with a length limit of
     * 1,024 characters.
     *
     * Generated from protobuf field <code>string table_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setTableId($var)
    {
        GPBUtil::checkString($var, True);
        $this->table_id = $var;

        return $this;
    }

    /**
     * Intermediate Cloud Storage directory used for the import with a length
     * limit of 2,000 characters. Can be specified if one wants to have the
     * BigQuery export to a specific Cloud Storage directory.
     *
     * Generated from protobuf field <code>string gcs_staging_dir = 3;</code>
     * @return string
     */
    public function getGcsStagingDir()
    {
        return $this->gcs_staging_dir;
    }

    /**
     * Intermediate Cloud Storage directory used for the import with a length
     * limit of 2,000 characters. Can be specified if one wants to have the
     * BigQuery export to a specific Cloud Storage directory.
     *
     * Generated from protobuf field <code>string gcs_staging_dir = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setGcsStagingDir($var)
    {
        GPBUtil::checkString($var, True);
        $this->gcs_staging_dir = $var;

        return $this;
    }

    /**
     * The schema to use when parsing the data from the source.
     * Supported values for product imports:
     * * `product` (default): One JSON [Product][google.cloud.retail.v2.Product]
     * per line. Each product must
     *   have a valid [Product.id][google.cloud.retail.v2.Product.id].
     * * `product_merchant_center`: See [Importing catalog data from Merchant
     *   Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
     * Supported values for user events imports:
     * * `user_event` (default): One JSON
     * [UserEvent][google.cloud.retail.v2.UserEvent] per line.
     * * `user_event_ga360`: Using
     *   https://support.google.com/analytics/answer/3437719?hl=en.
     *
     * Generated from protobuf field <code>string data_schema = 4;</code>
     * @return string
     */
    public function getDataSchema()
    {
        return $this->data_schema;
    }

    /**
     * The schema to use when parsing the data from the source.
     * Supported values for product imports:
     * * `product` (default): One JSON [Product][google.cloud.retail.v2.Product]
     * per line. Each product must
     *   have a valid [Product.id][google.cloud.retail.v2.Product.id].
     * * `product_merchant_center`: See [Importing catalog data from Merchant
     *   Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc).
     * Supported values for user events imports:
     * * `user_event` (default): One JSON
     * [UserEvent][google.cloud.retail.v2.UserEvent] per line.
     * * `user_event_ga360`: Using
     *   https://support.google.com/analytics/answer/3437719?hl=en.
     *
     * Generated from protobuf field <code>string data_schema = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setDataSchema($var)
    {
        GPBUtil::checkString($var, True);
        $this->data_schema = $var;

        return $this;
    }

}

