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

com.pulumi.googlenative.dataproc.v1.kotlin.inputs.PrestoJobArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.dataproc.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dataproc.v1.inputs.PrestoJobArgs.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

/**
 * A Dataproc job for running Presto (https://prestosql.io/) queries. IMPORTANT: The Dataproc Presto Optional Component (https://cloud.google.com/dataproc/docs/concepts/components/presto) must be enabled when the cluster is created to submit a Presto job to the cluster.
 * @property clientTags Optional. Presto client tags to attach to this query
 * @property continueOnFailure Optional. Whether to continue executing queries if a query fails. The default value is false. Setting to true can be useful when executing independent parallel queries.
 * @property loggingConfig Optional. The runtime log config for job execution.
 * @property outputFormat Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
 * @property properties Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
 * @property queryFileUri The HCFS URI of the script that contains SQL queries.
 * @property queryList A list of queries.
 */
public data class PrestoJobArgs(
    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 queryList: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dataproc.v1.inputs.PrestoJobArgs =
        com.pulumi.googlenative.dataproc.v1.inputs.PrestoJobArgs.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 }))
            .queryList(queryList?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [PrestoJobArgs].
 */
@PulumiTagMarker
public class PrestoJobArgsBuilder 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 queryList: Output? = null

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

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

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

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

    /**
     * @param value Optional. The runtime log config for job execution.
     */
    @JvmName("gerxrblcyximfrdg")
    public suspend fun loggingConfig(`value`: Output) {
        this.loggingConfig = value
    }

    /**
     * @param value Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
     */
    @JvmName("fumrlrgvgsshojkh")
    public suspend fun outputFormat(`value`: Output) {
        this.outputFormat = value
    }

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

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

    /**
     * @param value A list of queries.
     */
    @JvmName("bkohuqlkvevjkbke")
    public suspend fun queryList(`value`: Output) {
        this.queryList = value
    }

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

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

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

    /**
     * @param value Optional. The runtime log config for job execution.
     */
    @JvmName("ywfqaapruwlehwpm")
    public suspend fun loggingConfig(`value`: LoggingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loggingConfig = mapped
    }

    /**
     * @param argument Optional. The runtime log config for job execution.
     */
    @JvmName("ibfbhplcmnwrkkvy")
    public suspend fun loggingConfig(argument: suspend LoggingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = LoggingConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.loggingConfig = mapped
    }

    /**
     * @param value Optional. The format in which query output will be displayed. See the Presto documentation for supported output formats
     */
    @JvmName("axybxhinsveakidy")
    public suspend fun outputFormat(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.outputFormat = mapped
    }

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

    /**
     * @param values Optional. A mapping of property names to values. Used to set Presto session properties (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to using the --session flag in the Presto CLI
     */
    @JvmName("xbcpinglslujxajt")
    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.
     */
    @JvmName("erorponwkamdlwoy")
    public suspend fun queryFileUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryFileUri = mapped
    }

    /**
     * @param value A list of queries.
     */
    @JvmName("psysmksadekifdhw")
    public suspend fun queryList(`value`: QueryListArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queryList = mapped
    }

    /**
     * @param argument A list of queries.
     */
    @JvmName("dpeiiolndxfegtqc")
    public suspend fun queryList(argument: suspend QueryListArgsBuilder.() -> Unit) {
        val toBeMapped = QueryListArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.queryList = mapped
    }

    internal fun build(): PrestoJobArgs = PrestoJobArgs(
        clientTags = clientTags,
        continueOnFailure = continueOnFailure,
        loggingConfig = loggingConfig,
        outputFormat = outputFormat,
        properties = properties,
        queryFileUri = queryFileUri,
        queryList = queryList,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy