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

com.pulumi.gcp.dataproc.kotlin.inputs.WorkflowTemplatePlacementManagedClusterArgs.kt Maven / Gradle / Ivy

@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.WorkflowTemplatePlacementManagedClusterArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property clusterName Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix. The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters.
 * @property config Required. The cluster configuration.
 * @property labels The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: {0,63} No more than 32 labels can be associated with a given cluster.
 */
public data class WorkflowTemplatePlacementManagedClusterArgs(
    public val clusterName: Output,
    public val config: Output,
    public val labels: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.inputs.WorkflowTemplatePlacementManagedClusterArgs = com.pulumi.gcp.dataproc.inputs.WorkflowTemplatePlacementManagedClusterArgs.builder()
        .clusterName(clusterName.applyValue({ args0 -> args0 }))
        .config(config.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .labels(
            labels?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }),
        ).build()
}

/**
 * Builder for [WorkflowTemplatePlacementManagedClusterArgs].
 */
@PulumiTagMarker
public class WorkflowTemplatePlacementManagedClusterArgsBuilder internal constructor() {
    private var clusterName: Output? = null

    private var config: Output? = null

    private var labels: Output>? = null

    /**
     * @param value Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix. The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters.
     */
    @JvmName("rpfuiwdgqhjohvct")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value Required. The cluster configuration.
     */
    @JvmName("uhelhgjjduuuxqav")
    public suspend fun config(`value`: Output) {
        this.config = value
    }

    /**
     * @param value The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: {0,63} No more than 32 labels can be associated with a given cluster.
     */
    @JvmName("vvbndxvditgviqlw")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value Required. The cluster name prefix. A unique cluster name will be formed by appending a random suffix. The name must contain only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must begin with a letter. Cannot begin or end with hyphen. Must consist of between 2 and 35 characters.
     */
    @JvmName("efixhcbjpqxajvhv")
    public suspend fun clusterName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clusterName = mapped
    }

    /**
     * @param value Required. The cluster configuration.
     */
    @JvmName("opycykajonpstasx")
    public suspend fun config(`value`: WorkflowTemplatePlacementManagedClusterConfigArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param argument Required. The cluster configuration.
     */
    @JvmName("jhdxnmdlqjeqyjwk")
    public suspend fun config(argument: suspend WorkflowTemplatePlacementManagedClusterConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WorkflowTemplatePlacementManagedClusterConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param value The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: {0,63} No more than 32 labels can be associated with a given cluster.
     */
    @JvmName("mpuslukqsfatsbyn")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The labels to associate with this cluster. Label keys must be between 1 and 63 characters long, and must conform to the following PCRE regular expression: {0,63} No more than 32 labels can be associated with a given cluster.
     */
    @JvmName("bkcorlkoadksgnws")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    internal fun build(): WorkflowTemplatePlacementManagedClusterArgs =
        WorkflowTemplatePlacementManagedClusterArgs(
            clusterName = clusterName ?: throw PulumiNullFieldException("clusterName"),
            config = config ?: throw PulumiNullFieldException("config"),
            labels = labels,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy