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

com.pulumi.googlenative.dataproc.v1.kotlin.inputs.NodeGroupArgs.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.NodeGroupArgs.builder
import com.pulumi.googlenative.dataproc.v1.kotlin.enums.NodeGroupRolesItem
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Dataproc Node Group. The Dataproc NodeGroup resource is not related to the Dataproc NodeGroupAffinity resource.
 * @property labels Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn.
 * @property name The Node group resource name (https://aip.dev/122).
 * @property nodeGroupConfig Optional. The node group instance group configuration.
 * @property roles Node group roles.
 */
public data class NodeGroupArgs(
    public val labels: Output>? = null,
    public val name: Output? = null,
    public val nodeGroupConfig: Output? = null,
    public val roles: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dataproc.v1.inputs.NodeGroupArgs =
        com.pulumi.googlenative.dataproc.v1.inputs.NodeGroupArgs.builder()
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .name(name?.applyValue({ args0 -> args0 }))
            .nodeGroupConfig(nodeGroupConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .roles(
                roles.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var name: Output? = null

    private var nodeGroupConfig: Output? = null

    private var roles: Output>? = null

    /**
     * @param value Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn.
     */
    @JvmName("cnoocgmajascqapl")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The Node group resource name (https://aip.dev/122).
     */
    @JvmName("tbpntcldkkehgacp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Optional. The node group instance group configuration.
     */
    @JvmName("lvgkleiupofxjbbu")
    public suspend fun nodeGroupConfig(`value`: Output) {
        this.nodeGroupConfig = value
    }

    /**
     * @param value Node group roles.
     */
    @JvmName("aeqyhooajblllufs")
    public suspend fun roles(`value`: Output>) {
        this.roles = value
    }

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

    /**
     * @param values Node group roles.
     */
    @JvmName("qjhwrstgvutdbjln")
    public suspend fun roles(values: List>) {
        this.roles = Output.all(values)
    }

    /**
     * @param value Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn.
     */
    @JvmName("gbehaumhpbreiamc")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Optional. Node group labels. Label keys must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty. If specified, they must consist of from 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). The node group must have no more than 32 labelsn.
     */
    @JvmName("onppgorxifjeuhdc")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The Node group resource name (https://aip.dev/122).
     */
    @JvmName("tlfxdlsyiixvaowr")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Optional. The node group instance group configuration.
     */
    @JvmName("pergnsownxyyaxel")
    public suspend fun nodeGroupConfig(`value`: InstanceGroupConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeGroupConfig = mapped
    }

    /**
     * @param argument Optional. The node group instance group configuration.
     */
    @JvmName("mtbmlfjedtrgbeqn")
    public suspend fun nodeGroupConfig(argument: suspend InstanceGroupConfigArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceGroupConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nodeGroupConfig = mapped
    }

    /**
     * @param value Node group roles.
     */
    @JvmName("ldcqtgvydvjfcjxq")
    public suspend fun roles(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    /**
     * @param values Node group roles.
     */
    @JvmName("iwumpngjupacryfk")
    public suspend fun roles(vararg values: NodeGroupRolesItem) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    internal fun build(): NodeGroupArgs = NodeGroupArgs(
        labels = labels,
        name = name,
        nodeGroupConfig = nodeGroupConfig,
        roles = roles ?: throw PulumiNullFieldException("roles"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy