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

com.pulumi.gcp.bigquery.kotlin.inputs.JobExtractArgs.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.10.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.JobExtractArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property compression The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE.
 * The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
 * @property destinationFormat The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models.
 * The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV.
 * The default value for models is SAVED_MODEL.
 * @property destinationUris A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
 * @property fieldDelimiter When extracting data in CSV format, this defines the delimiter to use between fields in the exported data.
 * Default is ','
 * @property printHeader Whether to print out a header row in the results. Default is true.
 * @property sourceModel A reference to the model being exported.
 * Structure is documented below.
 * @property sourceTable A reference to the table being exported.
 * Structure is documented below.
 * @property useAvroLogicalTypes Whether to use logical types when extracting to AVRO format.
 */
public data class JobExtractArgs(
    public val compression: Output? = null,
    public val destinationFormat: Output? = null,
    public val destinationUris: Output>,
    public val fieldDelimiter: Output? = null,
    public val printHeader: Output? = null,
    public val sourceModel: Output? = null,
    public val sourceTable: Output? = null,
    public val useAvroLogicalTypes: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigquery.inputs.JobExtractArgs =
        com.pulumi.gcp.bigquery.inputs.JobExtractArgs.builder()
            .compression(compression?.applyValue({ args0 -> args0 }))
            .destinationFormat(destinationFormat?.applyValue({ args0 -> args0 }))
            .destinationUris(destinationUris.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .fieldDelimiter(fieldDelimiter?.applyValue({ args0 -> args0 }))
            .printHeader(printHeader?.applyValue({ args0 -> args0 }))
            .sourceModel(sourceModel?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sourceTable(sourceTable?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .useAvroLogicalTypes(useAvroLogicalTypes?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [JobExtractArgs].
 */
@PulumiTagMarker
public class JobExtractArgsBuilder internal constructor() {
    private var compression: Output? = null

    private var destinationFormat: Output? = null

    private var destinationUris: Output>? = null

    private var fieldDelimiter: Output? = null

    private var printHeader: Output? = null

    private var sourceModel: Output? = null

    private var sourceTable: Output? = null

    private var useAvroLogicalTypes: Output? = null

    /**
     * @param value The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE.
     * The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
     */
    @JvmName("hcuatuocpprqtwot")
    public suspend fun compression(`value`: Output) {
        this.compression = value
    }

    /**
     * @param value The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models.
     * The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV.
     * The default value for models is SAVED_MODEL.
     */
    @JvmName("qeatnxkuqhwqwity")
    public suspend fun destinationFormat(`value`: Output) {
        this.destinationFormat = value
    }

    /**
     * @param value A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
     */
    @JvmName("ulglkgebqwwklhcd")
    public suspend fun destinationUris(`value`: Output>) {
        this.destinationUris = value
    }

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

    /**
     * @param values A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
     */
    @JvmName("fvlpckxyuidlgxul")
    public suspend fun destinationUris(values: List>) {
        this.destinationUris = Output.all(values)
    }

    /**
     * @param value When extracting data in CSV format, this defines the delimiter to use between fields in the exported data.
     * Default is ','
     */
    @JvmName("xdqgfrjucnrjqcgr")
    public suspend fun fieldDelimiter(`value`: Output) {
        this.fieldDelimiter = value
    }

    /**
     * @param value Whether to print out a header row in the results. Default is true.
     */
    @JvmName("fhdusntxbmgvkckw")
    public suspend fun printHeader(`value`: Output) {
        this.printHeader = value
    }

    /**
     * @param value A reference to the model being exported.
     * Structure is documented below.
     */
    @JvmName("cijydtmnldkwxhge")
    public suspend fun sourceModel(`value`: Output) {
        this.sourceModel = value
    }

    /**
     * @param value A reference to the table being exported.
     * Structure is documented below.
     */
    @JvmName("wrrurhudkfwpwonf")
    public suspend fun sourceTable(`value`: Output) {
        this.sourceTable = value
    }

    /**
     * @param value Whether to use logical types when extracting to AVRO format.
     */
    @JvmName("dxvavwehqllggbkw")
    public suspend fun useAvroLogicalTypes(`value`: Output) {
        this.useAvroLogicalTypes = value
    }

    /**
     * @param value The compression type to use for exported files. Possible values include GZIP, DEFLATE, SNAPPY, and NONE.
     * The default value is NONE. DEFLATE and SNAPPY are only supported for Avro.
     */
    @JvmName("lxnigmctkudqjpbd")
    public suspend fun compression(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.compression = mapped
    }

    /**
     * @param value The exported file format. Possible values include CSV, NEWLINE_DELIMITED_JSON and AVRO for tables and SAVED_MODEL for models.
     * The default value for tables is CSV. Tables with nested or repeated fields cannot be exported as CSV.
     * The default value for models is SAVED_MODEL.
     */
    @JvmName("ifruqduhltxcwhdo")
    public suspend fun destinationFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinationFormat = mapped
    }

    /**
     * @param value A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
     */
    @JvmName("meaggrtyoktobgjj")
    public suspend fun destinationUris(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationUris = mapped
    }

    /**
     * @param values A list of fully-qualified Google Cloud Storage URIs where the extracted table should be written.
     */
    @JvmName("rjhvdsjpigqffklu")
    public suspend fun destinationUris(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationUris = mapped
    }

    /**
     * @param value When extracting data in CSV format, this defines the delimiter to use between fields in the exported data.
     * Default is ','
     */
    @JvmName("knmlcyhkjjxyfsen")
    public suspend fun fieldDelimiter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fieldDelimiter = mapped
    }

    /**
     * @param value Whether to print out a header row in the results. Default is true.
     */
    @JvmName("xnenephtrmoaaaqn")
    public suspend fun printHeader(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.printHeader = mapped
    }

    /**
     * @param value A reference to the model being exported.
     * Structure is documented below.
     */
    @JvmName("gphgbnwbpixapyop")
    public suspend fun sourceModel(`value`: JobExtractSourceModelArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceModel = mapped
    }

    /**
     * @param argument A reference to the model being exported.
     * Structure is documented below.
     */
    @JvmName("pxiahmenvvivscau")
    public suspend fun sourceModel(argument: suspend JobExtractSourceModelArgsBuilder.() -> Unit) {
        val toBeMapped = JobExtractSourceModelArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceModel = mapped
    }

    /**
     * @param value A reference to the table being exported.
     * Structure is documented below.
     */
    @JvmName("opkkapelasrlffex")
    public suspend fun sourceTable(`value`: JobExtractSourceTableArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceTable = mapped
    }

    /**
     * @param argument A reference to the table being exported.
     * Structure is documented below.
     */
    @JvmName("qheeqcvxmdeqlsyg")
    public suspend fun sourceTable(argument: suspend JobExtractSourceTableArgsBuilder.() -> Unit) {
        val toBeMapped = JobExtractSourceTableArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceTable = mapped
    }

    /**
     * @param value Whether to use logical types when extracting to AVRO format.
     */
    @JvmName("ksefjswpuqjbabie")
    public suspend fun useAvroLogicalTypes(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.useAvroLogicalTypes = mapped
    }

    internal fun build(): JobExtractArgs = JobExtractArgs(
        compression = compression,
        destinationFormat = destinationFormat,
        destinationUris = destinationUris ?: throw PulumiNullFieldException("destinationUris"),
        fieldDelimiter = fieldDelimiter,
        printHeader = printHeader,
        sourceModel = sourceModel,
        sourceTable = sourceTable,
        useAvroLogicalTypes = useAvroLogicalTypes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy