All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gcp.bigquery.kotlin.inputs.TableExternalDataConfigurationArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.bigquery.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigquery.inputs.TableExternalDataConfigurationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property autodetect Let BigQuery try to autodetect the schema
 * and format of the table.
 * @property avroOptions Additional options if `source_format` is set to
 * "AVRO".  Structure is documented below.
 * @property compression The compression type of the data source.
 * Valid values are "NONE" or "GZIP".
 * @property connectionId The connection specifying the credentials to be used to read
 * external storage, such as Azure Blob, Cloud Storage, or S3. The `connection_id` can have
 * the form `{{project}}.{{location}}.{{connection_id}}`
 * or `projects/{{project}}/locations/{{location}}/connections/{{connection_id}}`.
 * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
 * table schema must be specified using the top-level `schema` field
 * documented above.
 * @property csvOptions Additional properties to set if
 * `source_format` is set to "CSV". Structure is documented below.
 * @property fileSetSpecType Specifies how source URIs are interpreted for constructing the file set to load.
 * By default source URIs are expanded against the underlying storage.
 * Other options include specifying manifest files. Only applicable to object storage systems. Docs
 * @property googleSheetsOptions Additional options if
 * `source_format` is set to "GOOGLE_SHEETS". Structure is
 * documented below.
 * @property hivePartitioningOptions When set, configures hive partitioning
 * support. Not all storage formats support hive partitioning -- requesting hive
 * partitioning on an unsupported format will lead to an error, as will providing
 * an invalid specification. Structure is documented below.
 * @property ignoreUnknownValues Indicates if BigQuery should
 * allow extra values that are not represented in the table schema.
 * If true, the extra values are ignored. If false, records with
 * extra columns are treated as bad records, and if there are too
 * many bad records, an invalid error is returned in the job result.
 * The default value is false.
 * @property jsonExtension Used to indicate that a JSON variant, rather than normal JSON, is being used as the sourceFormat. This should only be used in combination with the `JSON` source format. Valid values are: `GEOJSON`.
 * @property jsonOptions Additional properties to set if
 * `source_format` is set to "JSON". Structure is documented below.
 * @property maxBadRecords The maximum number of bad records that
 * BigQuery can ignore when reading data.
 * @property metadataCacheMode Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source. Valid values are `AUTOMATIC` and `MANUAL`.
 * @property objectMetadata Object Metadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the sourceUris. If `object_metadata` is set, `source_format` should be omitted.
 * @property parquetOptions Additional properties to set if
 * `source_format` is set to "PARQUET". Structure is documented below.
 * @property referenceFileSchemaUri When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC.
 * @property schema A JSON schema for the external table. Schema is required
 * for CSV and JSON formats if autodetect is not on. Schema is disallowed
 * for Google Cloud Bigtable, Cloud Datastore backups, Avro, Iceberg, ORC and Parquet formats.
 * ~>**NOTE:** Because this field expects a JSON string, any changes to the
 * string will create a diff, even if the JSON itself hasn't changed.
 * Furthermore drift for this field cannot not be detected because BigQuery
 * only uses this schema to compute the effective schema for the table, therefore
 * any changes on the configured value will force the table to be recreated.
 * This schema is effectively only applied when creating a table from an external
 * datasource, after creation the computed schema will be stored in
 * `google_bigquery_table.schema`
 * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
 * table schema must be specified using the top-level `schema` field
 * documented above.
 * @property sourceFormat The data format. Please see sourceFormat under
 * [ExternalDataConfiguration](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#externaldataconfiguration)
 * in Bigquery's public API documentation for supported formats. To use "GOOGLE_SHEETS"
 * the `scopes` must include "https://www.googleapis.com/auth/drive.readonly".
 * @property sourceUris A list of the fully-qualified URIs that point to
 * your data in Google Cloud.
 */
public data class TableExternalDataConfigurationArgs(
    public val autodetect: Output,
    public val avroOptions: Output? = null,
    public val compression: Output? = null,
    public val connectionId: Output? = null,
    public val csvOptions: Output? = null,
    public val fileSetSpecType: Output? = null,
    public val googleSheetsOptions: Output? =
        null,
    public val hivePartitioningOptions: Output? = null,
    public val ignoreUnknownValues: Output? = null,
    public val jsonExtension: Output? = null,
    public val jsonOptions: Output? = null,
    public val maxBadRecords: Output? = null,
    public val metadataCacheMode: Output? = null,
    public val objectMetadata: Output? = null,
    public val parquetOptions: Output? = null,
    public val referenceFileSchemaUri: Output? = null,
    public val schema: Output? = null,
    public val sourceFormat: Output? = null,
    public val sourceUris: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigquery.inputs.TableExternalDataConfigurationArgs =
        com.pulumi.gcp.bigquery.inputs.TableExternalDataConfigurationArgs.builder()
            .autodetect(autodetect.applyValue({ args0 -> args0 }))
            .avroOptions(avroOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .compression(compression?.applyValue({ args0 -> args0 }))
            .connectionId(connectionId?.applyValue({ args0 -> args0 }))
            .csvOptions(csvOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .fileSetSpecType(fileSetSpecType?.applyValue({ args0 -> args0 }))
            .googleSheetsOptions(
                googleSheetsOptions?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .hivePartitioningOptions(
                hivePartitioningOptions?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .ignoreUnknownValues(ignoreUnknownValues?.applyValue({ args0 -> args0 }))
            .jsonExtension(jsonExtension?.applyValue({ args0 -> args0 }))
            .jsonOptions(jsonOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .maxBadRecords(maxBadRecords?.applyValue({ args0 -> args0 }))
            .metadataCacheMode(metadataCacheMode?.applyValue({ args0 -> args0 }))
            .objectMetadata(objectMetadata?.applyValue({ args0 -> args0 }))
            .parquetOptions(parquetOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .referenceFileSchemaUri(referenceFileSchemaUri?.applyValue({ args0 -> args0 }))
            .schema(schema?.applyValue({ args0 -> args0 }))
            .sourceFormat(sourceFormat?.applyValue({ args0 -> args0 }))
            .sourceUris(sourceUris.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [TableExternalDataConfigurationArgs].
 */
@PulumiTagMarker
public class TableExternalDataConfigurationArgsBuilder internal constructor() {
    private var autodetect: Output? = null

    private var avroOptions: Output? = null

    private var compression: Output? = null

    private var connectionId: Output? = null

    private var csvOptions: Output? = null

    private var fileSetSpecType: Output? = null

    private var googleSheetsOptions: Output? =
        null

    private var hivePartitioningOptions:
        Output? = null

    private var ignoreUnknownValues: Output? = null

    private var jsonExtension: Output? = null

    private var jsonOptions: Output? = null

    private var maxBadRecords: Output? = null

    private var metadataCacheMode: Output? = null

    private var objectMetadata: Output? = null

    private var parquetOptions: Output? = null

    private var referenceFileSchemaUri: Output? = null

    private var schema: Output? = null

    private var sourceFormat: Output? = null

    private var sourceUris: Output>? = null

    /**
     * @param value Let BigQuery try to autodetect the schema
     * and format of the table.
     */
    @JvmName("tqjcexdhyklobfpv")
    public suspend fun autodetect(`value`: Output) {
        this.autodetect = value
    }

    /**
     * @param value Additional options if `source_format` is set to
     * "AVRO".  Structure is documented below.
     */
    @JvmName("evertddxjbnbyvni")
    public suspend fun avroOptions(`value`: Output) {
        this.avroOptions = value
    }

    /**
     * @param value The compression type of the data source.
     * Valid values are "NONE" or "GZIP".
     */
    @JvmName("fhwkfpurupgcjjwp")
    public suspend fun compression(`value`: Output) {
        this.compression = value
    }

    /**
     * @param value The connection specifying the credentials to be used to read
     * external storage, such as Azure Blob, Cloud Storage, or S3. The `connection_id` can have
     * the form `{{project}}.{{location}}.{{connection_id}}`
     * or `projects/{{project}}/locations/{{location}}/connections/{{connection_id}}`.
     * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
     * table schema must be specified using the top-level `schema` field
     * documented above.
     */
    @JvmName("vnhatgjpiuwjitrs")
    public suspend fun connectionId(`value`: Output) {
        this.connectionId = value
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "CSV". Structure is documented below.
     */
    @JvmName("ilfcvhtdvbbmgouj")
    public suspend fun csvOptions(`value`: Output) {
        this.csvOptions = value
    }

    /**
     * @param value Specifies how source URIs are interpreted for constructing the file set to load.
     * By default source URIs are expanded against the underlying storage.
     * Other options include specifying manifest files. Only applicable to object storage systems. Docs
     */
    @JvmName("wtymhexeexnitfkv")
    public suspend fun fileSetSpecType(`value`: Output) {
        this.fileSetSpecType = value
    }

    /**
     * @param value Additional options if
     * `source_format` is set to "GOOGLE_SHEETS". Structure is
     * documented below.
     */
    @JvmName("ajpmjthjemdwyfqa")
    public suspend fun googleSheetsOptions(`value`: Output) {
        this.googleSheetsOptions = value
    }

    /**
     * @param value When set, configures hive partitioning
     * support. Not all storage formats support hive partitioning -- requesting hive
     * partitioning on an unsupported format will lead to an error, as will providing
     * an invalid specification. Structure is documented below.
     */
    @JvmName("qpkjanpuumdvunny")
    public suspend fun hivePartitioningOptions(`value`: Output) {
        this.hivePartitioningOptions = value
    }

    /**
     * @param value Indicates if BigQuery should
     * allow extra values that are not represented in the table schema.
     * If true, the extra values are ignored. If false, records with
     * extra columns are treated as bad records, and if there are too
     * many bad records, an invalid error is returned in the job result.
     * The default value is false.
     */
    @JvmName("orjndwviwarottsw")
    public suspend fun ignoreUnknownValues(`value`: Output) {
        this.ignoreUnknownValues = value
    }

    /**
     * @param value Used to indicate that a JSON variant, rather than normal JSON, is being used as the sourceFormat. This should only be used in combination with the `JSON` source format. Valid values are: `GEOJSON`.
     */
    @JvmName("uepnlghcjocrijcf")
    public suspend fun jsonExtension(`value`: Output) {
        this.jsonExtension = value
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "JSON". Structure is documented below.
     */
    @JvmName("kvjsdmcwnudvdktf")
    public suspend fun jsonOptions(`value`: Output) {
        this.jsonOptions = value
    }

    /**
     * @param value The maximum number of bad records that
     * BigQuery can ignore when reading data.
     */
    @JvmName("ibfuceovkcfjpxyi")
    public suspend fun maxBadRecords(`value`: Output) {
        this.maxBadRecords = value
    }

    /**
     * @param value Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source. Valid values are `AUTOMATIC` and `MANUAL`.
     */
    @JvmName("tabljuulcslqqash")
    public suspend fun metadataCacheMode(`value`: Output) {
        this.metadataCacheMode = value
    }

    /**
     * @param value Object Metadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the sourceUris. If `object_metadata` is set, `source_format` should be omitted.
     */
    @JvmName("tyvaahkliodikmss")
    public suspend fun objectMetadata(`value`: Output) {
        this.objectMetadata = value
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "PARQUET". Structure is documented below.
     */
    @JvmName("umdhrqsfoygvqqvb")
    public suspend fun parquetOptions(`value`: Output) {
        this.parquetOptions = value
    }

    /**
     * @param value When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC.
     */
    @JvmName("eilerxvnxwcdgtle")
    public suspend fun referenceFileSchemaUri(`value`: Output) {
        this.referenceFileSchemaUri = value
    }

    /**
     * @param value A JSON schema for the external table. Schema is required
     * for CSV and JSON formats if autodetect is not on. Schema is disallowed
     * for Google Cloud Bigtable, Cloud Datastore backups, Avro, Iceberg, ORC and Parquet formats.
     * ~>**NOTE:** Because this field expects a JSON string, any changes to the
     * string will create a diff, even if the JSON itself hasn't changed.
     * Furthermore drift for this field cannot not be detected because BigQuery
     * only uses this schema to compute the effective schema for the table, therefore
     * any changes on the configured value will force the table to be recreated.
     * This schema is effectively only applied when creating a table from an external
     * datasource, after creation the computed schema will be stored in
     * `google_bigquery_table.schema`
     * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
     * table schema must be specified using the top-level `schema` field
     * documented above.
     */
    @JvmName("ngfhkvjbktifmjye")
    public suspend fun schema(`value`: Output) {
        this.schema = value
    }

    /**
     * @param value The data format. Please see sourceFormat under
     * [ExternalDataConfiguration](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#externaldataconfiguration)
     * in Bigquery's public API documentation for supported formats. To use "GOOGLE_SHEETS"
     * the `scopes` must include "https://www.googleapis.com/auth/drive.readonly".
     */
    @JvmName("wdnjqipqoeynvcil")
    public suspend fun sourceFormat(`value`: Output) {
        this.sourceFormat = value
    }

    /**
     * @param value A list of the fully-qualified URIs that point to
     * your data in Google Cloud.
     */
    @JvmName("mqfipoijgghhxhmt")
    public suspend fun sourceUris(`value`: Output>) {
        this.sourceUris = value
    }

    @JvmName("tcjitghybglwfkfc")
    public suspend fun sourceUris(vararg values: Output) {
        this.sourceUris = Output.all(values.asList())
    }

    /**
     * @param values A list of the fully-qualified URIs that point to
     * your data in Google Cloud.
     */
    @JvmName("cenncxejheulwwdp")
    public suspend fun sourceUris(values: List>) {
        this.sourceUris = Output.all(values)
    }

    /**
     * @param value Let BigQuery try to autodetect the schema
     * and format of the table.
     */
    @JvmName("tmkebhllktdnoqsp")
    public suspend fun autodetect(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.autodetect = mapped
    }

    /**
     * @param value Additional options if `source_format` is set to
     * "AVRO".  Structure is documented below.
     */
    @JvmName("audyqlgffmdhdyml")
    public suspend fun avroOptions(`value`: TableExternalDataConfigurationAvroOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.avroOptions = mapped
    }

    /**
     * @param argument Additional options if `source_format` is set to
     * "AVRO".  Structure is documented below.
     */
    @JvmName("lvvxfptktnkavrhm")
    public suspend fun avroOptions(argument: suspend TableExternalDataConfigurationAvroOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = TableExternalDataConfigurationAvroOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.avroOptions = mapped
    }

    /**
     * @param value The compression type of the data source.
     * Valid values are "NONE" or "GZIP".
     */
    @JvmName("dybpdqoniidrvccx")
    public suspend fun compression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compression = mapped
    }

    /**
     * @param value The connection specifying the credentials to be used to read
     * external storage, such as Azure Blob, Cloud Storage, or S3. The `connection_id` can have
     * the form `{{project}}.{{location}}.{{connection_id}}`
     * or `projects/{{project}}/locations/{{location}}/connections/{{connection_id}}`.
     * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
     * table schema must be specified using the top-level `schema` field
     * documented above.
     */
    @JvmName("hrukluqqvhkyslja")
    public suspend fun connectionId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectionId = mapped
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "CSV". Structure is documented below.
     */
    @JvmName("aslowmalemfmkfpi")
    public suspend fun csvOptions(`value`: TableExternalDataConfigurationCsvOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.csvOptions = mapped
    }

    /**
     * @param argument Additional properties to set if
     * `source_format` is set to "CSV". Structure is documented below.
     */
    @JvmName("qcmecdrctlyibkgf")
    public suspend fun csvOptions(argument: suspend TableExternalDataConfigurationCsvOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = TableExternalDataConfigurationCsvOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.csvOptions = mapped
    }

    /**
     * @param value Specifies how source URIs are interpreted for constructing the file set to load.
     * By default source URIs are expanded against the underlying storage.
     * Other options include specifying manifest files. Only applicable to object storage systems. Docs
     */
    @JvmName("goilffkbnqqwyqsm")
    public suspend fun fileSetSpecType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fileSetSpecType = mapped
    }

    /**
     * @param value Additional options if
     * `source_format` is set to "GOOGLE_SHEETS". Structure is
     * documented below.
     */
    @JvmName("mslxnosiefbddcvg")
    public suspend fun googleSheetsOptions(`value`: TableExternalDataConfigurationGoogleSheetsOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.googleSheetsOptions = mapped
    }

    /**
     * @param argument Additional options if
     * `source_format` is set to "GOOGLE_SHEETS". Structure is
     * documented below.
     */
    @JvmName("hxpjmiirgoqotygt")
    public suspend fun googleSheetsOptions(argument: suspend TableExternalDataConfigurationGoogleSheetsOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = TableExternalDataConfigurationGoogleSheetsOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.googleSheetsOptions = mapped
    }

    /**
     * @param value When set, configures hive partitioning
     * support. Not all storage formats support hive partitioning -- requesting hive
     * partitioning on an unsupported format will lead to an error, as will providing
     * an invalid specification. Structure is documented below.
     */
    @JvmName("ehbwsryscoattjdj")
    public suspend fun hivePartitioningOptions(`value`: TableExternalDataConfigurationHivePartitioningOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hivePartitioningOptions = mapped
    }

    /**
     * @param argument When set, configures hive partitioning
     * support. Not all storage formats support hive partitioning -- requesting hive
     * partitioning on an unsupported format will lead to an error, as will providing
     * an invalid specification. Structure is documented below.
     */
    @JvmName("fgldkyaawfajrfsc")
    public suspend fun hivePartitioningOptions(argument: suspend TableExternalDataConfigurationHivePartitioningOptionsArgsBuilder.() -> Unit) {
        val toBeMapped =
            TableExternalDataConfigurationHivePartitioningOptionsArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.hivePartitioningOptions = mapped
    }

    /**
     * @param value Indicates if BigQuery should
     * allow extra values that are not represented in the table schema.
     * If true, the extra values are ignored. If false, records with
     * extra columns are treated as bad records, and if there are too
     * many bad records, an invalid error is returned in the job result.
     * The default value is false.
     */
    @JvmName("wkombipqdglebqer")
    public suspend fun ignoreUnknownValues(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ignoreUnknownValues = mapped
    }

    /**
     * @param value Used to indicate that a JSON variant, rather than normal JSON, is being used as the sourceFormat. This should only be used in combination with the `JSON` source format. Valid values are: `GEOJSON`.
     */
    @JvmName("ltorgbokjtlquhby")
    public suspend fun jsonExtension(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jsonExtension = mapped
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "JSON". Structure is documented below.
     */
    @JvmName("ommumcvsoilhvoek")
    public suspend fun jsonOptions(`value`: TableExternalDataConfigurationJsonOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jsonOptions = mapped
    }

    /**
     * @param argument Additional properties to set if
     * `source_format` is set to "JSON". Structure is documented below.
     */
    @JvmName("cqawwjwmnafxocgk")
    public suspend fun jsonOptions(argument: suspend TableExternalDataConfigurationJsonOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = TableExternalDataConfigurationJsonOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.jsonOptions = mapped
    }

    /**
     * @param value The maximum number of bad records that
     * BigQuery can ignore when reading data.
     */
    @JvmName("gbmsgdbjkxdjswtn")
    public suspend fun maxBadRecords(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxBadRecords = mapped
    }

    /**
     * @param value Metadata Cache Mode for the table. Set this to enable caching of metadata from external data source. Valid values are `AUTOMATIC` and `MANUAL`.
     */
    @JvmName("jvsoqyjbbkspeetd")
    public suspend fun metadataCacheMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadataCacheMode = mapped
    }

    /**
     * @param value Object Metadata is used to create Object Tables. Object Tables contain a listing of objects (with their metadata) found at the sourceUris. If `object_metadata` is set, `source_format` should be omitted.
     */
    @JvmName("amjyupyjvdrqtulu")
    public suspend fun objectMetadata(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectMetadata = mapped
    }

    /**
     * @param value Additional properties to set if
     * `source_format` is set to "PARQUET". Structure is documented below.
     */
    @JvmName("euxsomwtkautvili")
    public suspend fun parquetOptions(`value`: TableExternalDataConfigurationParquetOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parquetOptions = mapped
    }

    /**
     * @param argument Additional properties to set if
     * `source_format` is set to "PARQUET". Structure is documented below.
     */
    @JvmName("ovwrkwlqglomljjx")
    public suspend fun parquetOptions(argument: suspend TableExternalDataConfigurationParquetOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = TableExternalDataConfigurationParquetOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.parquetOptions = mapped
    }

    /**
     * @param value When creating an external table, the user can provide a reference file with the table schema. This is enabled for the following formats: AVRO, PARQUET, ORC.
     */
    @JvmName("hyuldwygiwdjjneb")
    public suspend fun referenceFileSchemaUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.referenceFileSchemaUri = mapped
    }

    /**
     * @param value A JSON schema for the external table. Schema is required
     * for CSV and JSON formats if autodetect is not on. Schema is disallowed
     * for Google Cloud Bigtable, Cloud Datastore backups, Avro, Iceberg, ORC and Parquet formats.
     * ~>**NOTE:** Because this field expects a JSON string, any changes to the
     * string will create a diff, even if the JSON itself hasn't changed.
     * Furthermore drift for this field cannot not be detected because BigQuery
     * only uses this schema to compute the effective schema for the table, therefore
     * any changes on the configured value will force the table to be recreated.
     * This schema is effectively only applied when creating a table from an external
     * datasource, after creation the computed schema will be stored in
     * `google_bigquery_table.schema`
     * ~>**NOTE:** If you set `external_data_configuration.connection_id`, the
     * table schema must be specified using the top-level `schema` field
     * documented above.
     */
    @JvmName("kapvgehriphblfih")
    public suspend fun schema(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schema = mapped
    }

    /**
     * @param value The data format. Please see sourceFormat under
     * [ExternalDataConfiguration](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#externaldataconfiguration)
     * in Bigquery's public API documentation for supported formats. To use "GOOGLE_SHEETS"
     * the `scopes` must include "https://www.googleapis.com/auth/drive.readonly".
     */
    @JvmName("uajdwhgimvkbkdgt")
    public suspend fun sourceFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceFormat = mapped
    }

    /**
     * @param value A list of the fully-qualified URIs that point to
     * your data in Google Cloud.
     */
    @JvmName("egkpfqkamfroqxeo")
    public suspend fun sourceUris(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceUris = mapped
    }

    /**
     * @param values A list of the fully-qualified URIs that point to
     * your data in Google Cloud.
     */
    @JvmName("vingbevwdehmjjtf")
    public suspend fun sourceUris(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceUris = mapped
    }

    internal fun build(): TableExternalDataConfigurationArgs = TableExternalDataConfigurationArgs(
        autodetect = autodetect ?: throw PulumiNullFieldException("autodetect"),
        avroOptions = avroOptions,
        compression = compression,
        connectionId = connectionId,
        csvOptions = csvOptions,
        fileSetSpecType = fileSetSpecType,
        googleSheetsOptions = googleSheetsOptions,
        hivePartitioningOptions = hivePartitioningOptions,
        ignoreUnknownValues = ignoreUnknownValues,
        jsonExtension = jsonExtension,
        jsonOptions = jsonOptions,
        maxBadRecords = maxBadRecords,
        metadataCacheMode = metadataCacheMode,
        objectMetadata = objectMetadata,
        parquetOptions = parquetOptions,
        referenceFileSchemaUri = referenceFileSchemaUri,
        schema = schema,
        sourceFormat = sourceFormat,
        sourceUris = sourceUris ?: throw PulumiNullFieldException("sourceUris"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy