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

com.pulumi.gcp.dataproc.kotlin.inputs.JobPrestoConfigArgs.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.dataproc.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.dataproc.inputs.JobPrestoConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property clientTags Presto client tags to attach to this query.
 * @property continueOnFailure Whether to continue executing queries if a query fails. Setting to true can be useful when executing independent parallel queries. Defaults to false.
 * @property loggingConfig The runtime logging config of the job
 * @property outputFormat The format in which query output will be displayed. See the Presto documentation for supported output formats.
 * * `logging_config.driver_log_levels`- (Required) The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
 * @property properties A mapping of property names to values. Used to set Presto session properties Equivalent to using the --session flag in the Presto CLI.
 * @property queryFileUri The HCFS URI of the script that contains SQL queries.
 * Conflicts with `query_list`
 * @property queryLists The list of SQL queries or statements to execute as part of the job.
 * Conflicts with `query_file_uri`
 */
public data class JobPrestoConfigArgs(
    public val clientTags: Output>? = null,
    public val continueOnFailure: Output? = null,
    public val loggingConfig: Output? = null,
    public val outputFormat: Output? = null,
    public val properties: Output>? = null,
    public val queryFileUri: Output? = null,
    public val queryLists: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.inputs.JobPrestoConfigArgs =
        com.pulumi.gcp.dataproc.inputs.JobPrestoConfigArgs.builder()
            .clientTags(clientTags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .continueOnFailure(continueOnFailure?.applyValue({ args0 -> args0 }))
            .loggingConfig(loggingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .outputFormat(outputFormat?.applyValue({ args0 -> args0 }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .queryFileUri(queryFileUri?.applyValue({ args0 -> args0 }))
            .queryLists(queryLists?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [JobPrestoConfigArgs].
 */
@PulumiTagMarker
public class JobPrestoConfigArgsBuilder internal constructor() {
    private var clientTags: Output>? = null

    private var continueOnFailure: Output? = null

    private var loggingConfig: Output? = null

    private var outputFormat: Output? = null

    private var properties: Output>? = null

    private var queryFileUri: Output? = null

    private var queryLists: Output>? = null

    /**
     * @param value Presto client tags to attach to this query.
     */
    @JvmName("vldyoorjgysomepm")
    public suspend fun clientTags(`value`: Output>) {
        this.clientTags = value
    }

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

    /**
     * @param values Presto client tags to attach to this query.
     */
    @JvmName("xxipeyctdyfotium")
    public suspend fun clientTags(values: List>) {
        this.clientTags = Output.all(values)
    }

    /**
     * @param value Whether to continue executing queries if a query fails. Setting to true can be useful when executing independent parallel queries. Defaults to false.
     */
    @JvmName("rlngyxuwbubtixil")
    public suspend fun continueOnFailure(`value`: Output) {
        this.continueOnFailure = value
    }

    /**
     * @param value The runtime logging config of the job
     */
    @JvmName("bgkwrldgvlqyjnae")
    public suspend fun loggingConfig(`value`: Output) {
        this.loggingConfig = value
    }

    /**
     * @param value The format in which query output will be displayed. See the Presto documentation for supported output formats.
     * * `logging_config.driver_log_levels`- (Required) The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
     */
    @JvmName("ftlkguoasbmoffpf")
    public suspend fun outputFormat(`value`: Output) {
        this.outputFormat = value
    }

    /**
     * @param value A mapping of property names to values. Used to set Presto session properties Equivalent to using the --session flag in the Presto CLI.
     */
    @JvmName("gkktgmdlujjfoorv")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value The HCFS URI of the script that contains SQL queries.
     * Conflicts with `query_list`
     */
    @JvmName("bviexmgcprocxiqs")
    public suspend fun queryFileUri(`value`: Output) {
        this.queryFileUri = value
    }

    /**
     * @param value The list of SQL queries or statements to execute as part of the job.
     * Conflicts with `query_file_uri`
     */
    @JvmName("nyontcnycwoopuqv")
    public suspend fun queryLists(`value`: Output>) {
        this.queryLists = value
    }

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

    /**
     * @param values The list of SQL queries or statements to execute as part of the job.
     * Conflicts with `query_file_uri`
     */
    @JvmName("wtgswwwnlgvfaabk")
    public suspend fun queryLists(values: List>) {
        this.queryLists = Output.all(values)
    }

    /**
     * @param value Presto client tags to attach to this query.
     */
    @JvmName("jlvgtdjuhqfkurbm")
    public suspend fun clientTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientTags = mapped
    }

    /**
     * @param values Presto client tags to attach to this query.
     */
    @JvmName("xkayuiujripyekiv")
    public suspend fun clientTags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientTags = mapped
    }

    /**
     * @param value Whether to continue executing queries if a query fails. Setting to true can be useful when executing independent parallel queries. Defaults to false.
     */
    @JvmName("ojmdkbpambpfmfyv")
    public suspend fun continueOnFailure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.continueOnFailure = mapped
    }

    /**
     * @param value The runtime logging config of the job
     */
    @JvmName("kevswayglaiuohpf")
    public suspend fun loggingConfig(`value`: JobPrestoConfigLoggingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loggingConfig = mapped
    }

    /**
     * @param argument The runtime logging config of the job
     */
    @JvmName("rsluhfirxoxjtyiq")
    public suspend fun loggingConfig(argument: suspend JobPrestoConfigLoggingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = JobPrestoConfigLoggingConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.loggingConfig = mapped
    }

    /**
     * @param value The format in which query output will be displayed. See the Presto documentation for supported output formats.
     * * `logging_config.driver_log_levels`- (Required) The per-package log levels for the driver. This may include 'root' package name to configure rootLogger. Examples: 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
     */
    @JvmName("vnmfxojoftnwvpxc")
    public suspend fun outputFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputFormat = mapped
    }

    /**
     * @param value A mapping of property names to values. Used to set Presto session properties Equivalent to using the --session flag in the Presto CLI.
     */
    @JvmName("xkmilogslvvaqcdk")
    public suspend fun properties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param values A mapping of property names to values. Used to set Presto session properties Equivalent to using the --session flag in the Presto CLI.
     */
    @JvmName("kbplgbjdcirogkou")
    public fun properties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value The HCFS URI of the script that contains SQL queries.
     * Conflicts with `query_list`
     */
    @JvmName("kdcunrpohiwwkccr")
    public suspend fun queryFileUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryFileUri = mapped
    }

    /**
     * @param value The list of SQL queries or statements to execute as part of the job.
     * Conflicts with `query_file_uri`
     */
    @JvmName("ounqpblrbjmqqqav")
    public suspend fun queryLists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryLists = mapped
    }

    /**
     * @param values The list of SQL queries or statements to execute as part of the job.
     * Conflicts with `query_file_uri`
     */
    @JvmName("gsqoieeentghpqex")
    public suspend fun queryLists(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.queryLists = mapped
    }

    internal fun build(): JobPrestoConfigArgs = JobPrestoConfigArgs(
        clientTags = clientTags,
        continueOnFailure = continueOnFailure,
        loggingConfig = loggingConfig,
        outputFormat = outputFormat,
        properties = properties,
        queryFileUri = queryFileUri,
        queryLists = queryLists,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy