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

namespace Google\Cloud\DiscoveryEngine\V1beta;

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

/**
 * Request message for Import methods.
 *
 * Generated from protobuf message <code>google.cloud.discoveryengine.v1beta.ImportDocumentsRequest</code>
 */
class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent branch resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
     * Requires create/update permission.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5;</code>
     */
    protected $error_config = null;
    /**
     * The mode of reconciliation between existing documents and the documents to
     * be imported. Defaults to
     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6;</code>
     */
    protected $reconciliation_mode = 0;
    /**
     * Indicates which fields in the provided imported documents to update. If
     * not set, the default is to update all fields.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 7;</code>
     */
    protected $update_mask = null;
    /**
     * Whether to automatically generate IDs for the documents if absent.
     * If set to `true`,
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are
     * automatically generated based on the hash of the payload, where IDs may not
     * be consistent during multiple imports. In which case
     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL]
     * is highly recommended to avoid duplicate contents. If unset or set to
     * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
     * have to be specified using
     * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
     * otherwise, documents without IDs fail to be imported.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>bool auto_generate_ids = 8;</code>
     */
    protected $auto_generate_ids = false;
    /**
     * The field indicates the ID field or column to be used as unique IDs of
     * the documents.
     * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
     * "some_uuid"}`. For others, it may be the column name of the table where the
     * unique ids are stored.
     * The values of the JSON field or the table column are used as the
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
     * field or the table column must be of string type, and the values must be
     * set as valid strings conform to
     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
     * Otherwise, documents without valid IDs fail to be imported.
     * Only set this field when
     * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * If it is unset, a default value `_id` is used when importing from the
     * allowed data sources.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>string id_field = 9;</code>
     */
    protected $id_field = '';
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $inline_source
     *           The Inline source for the input content for documents.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $gcs_source
     *           Cloud Storage location for the input content.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $bigquery_source
     *           BigQuery input source.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource $fhir_store_source
     *           FhirStore input source.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource $spanner_source
     *           Spanner input source.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource $cloud_sql_source
     *           Cloud SQL input source.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource $firestore_source
     *           Firestore input source.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource $bigtable_source
     *           Cloud Bigtable input source.
     *     @type string $parent
     *           Required. The parent branch resource name, such as
     *           `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
     *           Requires create/update permission.
     *     @type \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $error_config
     *           The desired location of errors incurred during the Import.
     *     @type int $reconciliation_mode
     *           The mode of reconciliation between existing documents and the documents to
     *           be imported. Defaults to
     *           [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
     *     @type \Google\Protobuf\FieldMask $update_mask
     *           Indicates which fields in the provided imported documents to update. If
     *           not set, the default is to update all fields.
     *     @type bool $auto_generate_ids
     *           Whether to automatically generate IDs for the documents if absent.
     *           If set to `true`,
     *           [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are
     *           automatically generated based on the hash of the payload, where IDs may not
     *           be consistent during multiple imports. In which case
     *           [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL]
     *           is highly recommended to avoid duplicate contents. If unset or set to
     *           `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
     *           have to be specified using
     *           [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
     *           otherwise, documents without IDs fail to be imported.
     *           Supported data sources:
     *           * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     *           [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     *           must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     *           * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     *           [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     *           must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     *           * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     *           * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     *           * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     *           * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *     @type string $id_field
     *           The field indicates the ID field or column to be used as unique IDs of
     *           the documents.
     *           For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
     *           key of the JSON field. For instance, `my_id` for JSON `{"my_id":
     *           "some_uuid"}`. For others, it may be the column name of the table where the
     *           unique ids are stored.
     *           The values of the JSON field or the table column are used as the
     *           [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
     *           field or the table column must be of string type, and the values must be
     *           set as valid strings conform to
     *           [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
     *           Otherwise, documents without valid IDs fail to be imported.
     *           Only set this field when
     *           [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
     *           is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
     *           If it is unset, a default value `_id` is used when importing from the
     *           allowed data sources.
     *           Supported data sources:
     *           * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     *           [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     *           must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     *           * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     *           [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     *           must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     *           * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     *           * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     *           * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     *           * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Discoveryengine\V1Beta\ImportConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * The Inline source for the input content for documents.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource|null
     */
    public function getInlineSource()
    {
        return $this->readOneof(2);
    }

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

    /**
     * The Inline source for the input content for documents.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource inline_source = 2;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource $var
     * @return $this
     */
    public function setInlineSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\InlineSource::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Cloud Storage location for the input content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(3);
    }

    public function hasGcsSource()
    {
        return $this->hasOneof(3);
    }

    /**
     * Cloud Storage location for the input content.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.GcsSource gcs_source = 3;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\GcsSource::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * BigQuery input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource|null
     */
    public function getBigquerySource()
    {
        return $this->readOneof(4);
    }

    public function hasBigquerySource()
    {
        return $this->hasOneof(4);
    }

    /**
     * BigQuery input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigQuerySource bigquery_source = 4;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource $var
     * @return $this
     */
    public function setBigquerySource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigQuerySource::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * FhirStore input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.FhirStoreSource fhir_store_source = 10;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource|null
     */
    public function getFhirStoreSource()
    {
        return $this->readOneof(10);
    }

    public function hasFhirStoreSource()
    {
        return $this->hasOneof(10);
    }

    /**
     * FhirStore input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.FhirStoreSource fhir_store_source = 10;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource $var
     * @return $this
     */
    public function setFhirStoreSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\FhirStoreSource::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Spanner input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.SpannerSource spanner_source = 11;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource|null
     */
    public function getSpannerSource()
    {
        return $this->readOneof(11);
    }

    public function hasSpannerSource()
    {
        return $this->hasOneof(11);
    }

    /**
     * Spanner input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.SpannerSource spanner_source = 11;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource $var
     * @return $this
     */
    public function setSpannerSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\SpannerSource::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Cloud SQL input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.CloudSqlSource cloud_sql_source = 12;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource|null
     */
    public function getCloudSqlSource()
    {
        return $this->readOneof(12);
    }

    public function hasCloudSqlSource()
    {
        return $this->hasOneof(12);
    }

    /**
     * Cloud SQL input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.CloudSqlSource cloud_sql_source = 12;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource $var
     * @return $this
     */
    public function setCloudSqlSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\CloudSqlSource::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * Firestore input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.FirestoreSource firestore_source = 13;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource|null
     */
    public function getFirestoreSource()
    {
        return $this->readOneof(13);
    }

    public function hasFirestoreSource()
    {
        return $this->hasOneof(13);
    }

    /**
     * Firestore input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.FirestoreSource firestore_source = 13;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource $var
     * @return $this
     */
    public function setFirestoreSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\FirestoreSource::class);
        $this->writeOneof(13, $var);

        return $this;
    }

    /**
     * Cloud Bigtable input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableSource bigtable_source = 15;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource|null
     */
    public function getBigtableSource()
    {
        return $this->readOneof(15);
    }

    public function hasBigtableSource()
    {
        return $this->hasOneof(15);
    }

    /**
     * Cloud Bigtable input source.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.BigtableSource bigtable_source = 15;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource $var
     * @return $this
     */
    public function setBigtableSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\BigtableSource::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * Required. The parent branch resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
     * Requires create/update permission.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent branch resource name, such as
     * `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
     * Requires create/update permission.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5;</code>
     * @return \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig|null
     */
    public function getErrorConfig()
    {
        return $this->error_config;
    }

    public function hasErrorConfig()
    {
        return isset($this->error_config);
    }

    public function clearErrorConfig()
    {
        unset($this->error_config);
    }

    /**
     * The desired location of errors incurred during the Import.
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportErrorConfig error_config = 5;</code>
     * @param \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig $var
     * @return $this
     */
    public function setErrorConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportErrorConfig::class);
        $this->error_config = $var;

        return $this;
    }

    /**
     * The mode of reconciliation between existing documents and the documents to
     * be imported. Defaults to
     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6;</code>
     * @return int
     */
    public function getReconciliationMode()
    {
        return $this->reconciliation_mode;
    }

    /**
     * The mode of reconciliation between existing documents and the documents to
     * be imported. Defaults to
     * [ReconciliationMode.INCREMENTAL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.INCREMENTAL].
     *
     * Generated from protobuf field <code>.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode reconciliation_mode = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setReconciliationMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DiscoveryEngine\V1beta\ImportDocumentsRequest\ReconciliationMode::class);
        $this->reconciliation_mode = $var;

        return $this;
    }

    /**
     * Indicates which fields in the provided imported documents to update. If
     * not set, the default is to update all fields.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 7;</code>
     * @return \Google\Protobuf\FieldMask|null
     */
    public function getUpdateMask()
    {
        return $this->update_mask;
    }

    public function hasUpdateMask()
    {
        return isset($this->update_mask);
    }

    public function clearUpdateMask()
    {
        unset($this->update_mask);
    }

    /**
     * Indicates which fields in the provided imported documents to update. If
     * not set, the default is to update all fields.
     *
     * Generated from protobuf field <code>.google.protobuf.FieldMask update_mask = 7;</code>
     * @param \Google\Protobuf\FieldMask $var
     * @return $this
     */
    public function setUpdateMask($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class);
        $this->update_mask = $var;

        return $this;
    }

    /**
     * Whether to automatically generate IDs for the documents if absent.
     * If set to `true`,
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are
     * automatically generated based on the hash of the payload, where IDs may not
     * be consistent during multiple imports. In which case
     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL]
     * is highly recommended to avoid duplicate contents. If unset or set to
     * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
     * have to be specified using
     * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
     * otherwise, documents without IDs fail to be imported.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>bool auto_generate_ids = 8;</code>
     * @return bool
     */
    public function getAutoGenerateIds()
    {
        return $this->auto_generate_ids;
    }

    /**
     * Whether to automatically generate IDs for the documents if absent.
     * If set to `true`,
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s are
     * automatically generated based on the hash of the payload, where IDs may not
     * be consistent during multiple imports. In which case
     * [ReconciliationMode.FULL][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode.FULL]
     * is highly recommended to avoid duplicate contents. If unset or set to
     * `false`, [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s
     * have to be specified using
     * [id_field][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.id_field],
     * otherwise, documents without IDs fail to be imported.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>bool auto_generate_ids = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setAutoGenerateIds($var)
    {
        GPBUtil::checkBool($var);
        $this->auto_generate_ids = $var;

        return $this;
    }

    /**
     * The field indicates the ID field or column to be used as unique IDs of
     * the documents.
     * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
     * "some_uuid"}`. For others, it may be the column name of the table where the
     * unique ids are stored.
     * The values of the JSON field or the table column are used as the
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
     * field or the table column must be of string type, and the values must be
     * set as valid strings conform to
     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
     * Otherwise, documents without valid IDs fail to be imported.
     * Only set this field when
     * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * If it is unset, a default value `_id` is used when importing from the
     * allowed data sources.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>string id_field = 9;</code>
     * @return string
     */
    public function getIdField()
    {
        return $this->id_field;
    }

    /**
     * The field indicates the ID field or column to be used as unique IDs of
     * the documents.
     * For [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource] it is the
     * key of the JSON field. For instance, `my_id` for JSON `{"my_id":
     * "some_uuid"}`. For others, it may be the column name of the table where the
     * unique ids are stored.
     * The values of the JSON field or the table column are used as the
     * [Document.id][google.cloud.discoveryengine.v1beta.Document.id]s. The JSON
     * field or the table column must be of string type, and the values must be
     * set as valid strings conform to
     * [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
     * Otherwise, documents without valid IDs fail to be imported.
     * Only set this field when
     * [auto_generate_ids][google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.auto_generate_ids]
     * is unset or set as `false`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * If it is unset, a default value `_id` is used when importing from the
     * allowed data sources.
     * Supported data sources:
     * * [GcsSource][google.cloud.discoveryengine.v1beta.GcsSource].
     * [GcsSource.data_schema][google.cloud.discoveryengine.v1beta.GcsSource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [BigQuerySource][google.cloud.discoveryengine.v1beta.BigQuerySource].
     * [BigQuerySource.data_schema][google.cloud.discoveryengine.v1beta.BigQuerySource.data_schema]
     * must be `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
     * * [SpannerSource][google.cloud.discoveryengine.v1beta.SpannerSource].
     * * [CloudSqlSource][google.cloud.discoveryengine.v1beta.CloudSqlSource].
     * * [FirestoreSource][google.cloud.discoveryengine.v1beta.FirestoreSource].
     * * [BigtableSource][google.cloud.discoveryengine.v1beta.BigtableSource].
     *
     * Generated from protobuf field <code>string id_field = 9;</code>
     * @param string $var
     * @return $this
     */
    public function setIdField($var)
    {
        GPBUtil::checkString($var, True);
        $this->id_field = $var;

        return $this;
    }

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

}

