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

com.pulumi.gcp.gkeonprem.kotlin.inputs.VMwareNodePoolConfigArgs.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.gkeonprem.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolConfigArgs.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.Int
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 bootDiskSizeGb VMware disk size to be used during creation.
 * @property cpus The number of CPUs for each node in the node pool.
 * @property enableLoadBalancer Allow node pool traffic to be load balanced. Only works for clusters with
 * MetalLB load balancers.
 * @property image The OS image name in vCenter, only valid when using Windows.
 * @property imageType The OS image to be used for each node in a node pool.
 * Currently `cos`, `ubuntu`, `ubuntu_containerd` and `windows` are supported.
 * @property labels The map of Kubernetes labels (key/value pairs) to be applied to each node.
 * These will added in addition to any default label(s) that
 * Kubernetes may apply to the node.
 * In case of conflict in label keys, the applied set may differ depending on
 * the Kubernetes version -- it's best to assume the behavior is undefined
 * and conflicts should be avoided.
 * @property memoryMb The megabytes of memory for each node in the node pool.
 * @property replicas The number of nodes in the node pool.
 * @property taints The initial taints assigned to nodes of this node pool.
 * Structure is documented below.
 * @property vsphereConfigs Specifies the vSphere config for node pool.
 * Structure is documented below.
 */
public data class VMwareNodePoolConfigArgs(
    public val bootDiskSizeGb: Output? = null,
    public val cpus: Output? = null,
    public val enableLoadBalancer: Output? = null,
    public val image: Output? = null,
    public val imageType: Output,
    public val labels: Output>? = null,
    public val memoryMb: Output? = null,
    public val replicas: Output? = null,
    public val taints: Output>? = null,
    public val vsphereConfigs: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolConfigArgs =
        com.pulumi.gcp.gkeonprem.inputs.VMwareNodePoolConfigArgs.builder()
            .bootDiskSizeGb(bootDiskSizeGb?.applyValue({ args0 -> args0 }))
            .cpus(cpus?.applyValue({ args0 -> args0 }))
            .enableLoadBalancer(enableLoadBalancer?.applyValue({ args0 -> args0 }))
            .image(image?.applyValue({ args0 -> args0 }))
            .imageType(imageType.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .memoryMb(memoryMb?.applyValue({ args0 -> args0 }))
            .replicas(replicas?.applyValue({ args0 -> args0 }))
            .taints(taints?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .vsphereConfigs(
                vsphereConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [VMwareNodePoolConfigArgs].
 */
@PulumiTagMarker
public class VMwareNodePoolConfigArgsBuilder internal constructor() {
    private var bootDiskSizeGb: Output? = null

    private var cpus: Output? = null

    private var enableLoadBalancer: Output? = null

    private var image: Output? = null

    private var imageType: Output? = null

    private var labels: Output>? = null

    private var memoryMb: Output? = null

    private var replicas: Output? = null

    private var taints: Output>? = null

    private var vsphereConfigs: Output>? = null

    /**
     * @param value VMware disk size to be used during creation.
     */
    @JvmName("fdoipkmtstfymhrf")
    public suspend fun bootDiskSizeGb(`value`: Output) {
        this.bootDiskSizeGb = value
    }

    /**
     * @param value The number of CPUs for each node in the node pool.
     */
    @JvmName("apwneitaehfuntan")
    public suspend fun cpus(`value`: Output) {
        this.cpus = value
    }

    /**
     * @param value Allow node pool traffic to be load balanced. Only works for clusters with
     * MetalLB load balancers.
     */
    @JvmName("ycsklcfqjsfeutfs")
    public suspend fun enableLoadBalancer(`value`: Output) {
        this.enableLoadBalancer = value
    }

    /**
     * @param value The OS image name in vCenter, only valid when using Windows.
     */
    @JvmName("ufaqelrtudxkuhjp")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value The OS image to be used for each node in a node pool.
     * Currently `cos`, `ubuntu`, `ubuntu_containerd` and `windows` are supported.
     */
    @JvmName("gnetdapchllohtfd")
    public suspend fun imageType(`value`: Output) {
        this.imageType = value
    }

    /**
     * @param value The map of Kubernetes labels (key/value pairs) to be applied to each node.
     * These will added in addition to any default label(s) that
     * Kubernetes may apply to the node.
     * In case of conflict in label keys, the applied set may differ depending on
     * the Kubernetes version -- it's best to assume the behavior is undefined
     * and conflicts should be avoided.
     */
    @JvmName("vyftgklhebwgbnww")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The megabytes of memory for each node in the node pool.
     */
    @JvmName("knyrivmupdlagwro")
    public suspend fun memoryMb(`value`: Output) {
        this.memoryMb = value
    }

    /**
     * @param value The number of nodes in the node pool.
     */
    @JvmName("tixyehwwnoouswor")
    public suspend fun replicas(`value`: Output) {
        this.replicas = value
    }

    /**
     * @param value The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("plaafynejemikfld")
    public suspend fun taints(`value`: Output>) {
        this.taints = value
    }

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

    /**
     * @param values The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("dgdxhdqorcmktiyc")
    public suspend fun taints(values: List>) {
        this.taints = Output.all(values)
    }

    /**
     * @param value Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("kbyxfcniibovdduj")
    public suspend fun vsphereConfigs(`value`: Output>) {
        this.vsphereConfigs = value
    }

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

    /**
     * @param values Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("pwdxfqgbdvqhfbpv")
    public suspend fun vsphereConfigs(values: List>) {
        this.vsphereConfigs = Output.all(values)
    }

    /**
     * @param value VMware disk size to be used during creation.
     */
    @JvmName("fasaqcnnogkkmalx")
    public suspend fun bootDiskSizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bootDiskSizeGb = mapped
    }

    /**
     * @param value The number of CPUs for each node in the node pool.
     */
    @JvmName("dqitdalbmfjyxadw")
    public suspend fun cpus(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpus = mapped
    }

    /**
     * @param value Allow node pool traffic to be load balanced. Only works for clusters with
     * MetalLB load balancers.
     */
    @JvmName("noorqbutkjnrhmvb")
    public suspend fun enableLoadBalancer(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableLoadBalancer = mapped
    }

    /**
     * @param value The OS image name in vCenter, only valid when using Windows.
     */
    @JvmName("cngtelyeyiapernv")
    public suspend fun image(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value The OS image to be used for each node in a node pool.
     * Currently `cos`, `ubuntu`, `ubuntu_containerd` and `windows` are supported.
     */
    @JvmName("ssrryjiidbntqevc")
    public suspend fun imageType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageType = mapped
    }

    /**
     * @param value The map of Kubernetes labels (key/value pairs) to be applied to each node.
     * These will added in addition to any default label(s) that
     * Kubernetes may apply to the node.
     * In case of conflict in label keys, the applied set may differ depending on
     * the Kubernetes version -- it's best to assume the behavior is undefined
     * and conflicts should be avoided.
     */
    @JvmName("fhoujntsmbaharyg")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values The map of Kubernetes labels (key/value pairs) to be applied to each node.
     * These will added in addition to any default label(s) that
     * Kubernetes may apply to the node.
     * In case of conflict in label keys, the applied set may differ depending on
     * the Kubernetes version -- it's best to assume the behavior is undefined
     * and conflicts should be avoided.
     */
    @JvmName("mgfhrmwkexnsbual")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The megabytes of memory for each node in the node pool.
     */
    @JvmName("cyomprsiuxponxwq")
    public suspend fun memoryMb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memoryMb = mapped
    }

    /**
     * @param value The number of nodes in the node pool.
     */
    @JvmName("tubyvtwynuhinfwq")
    public suspend fun replicas(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicas = mapped
    }

    /**
     * @param value The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("hkvdrdeduewhuaix")
    public suspend fun taints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    /**
     * @param argument The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("wrcdnsacayoguwum")
    public suspend fun taints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VMwareNodePoolConfigTaintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("sabewqabenhvpdqh")
    public suspend fun taints(vararg argument: suspend VMwareNodePoolConfigTaintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VMwareNodePoolConfigTaintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param argument The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("aljxsooocoyktyft")
    public suspend fun taints(argument: suspend VMwareNodePoolConfigTaintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VMwareNodePoolConfigTaintArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.taints = mapped
    }

    /**
     * @param values The initial taints assigned to nodes of this node pool.
     * Structure is documented below.
     */
    @JvmName("pdpfrsbpeennmobi")
    public suspend fun taints(vararg values: VMwareNodePoolConfigTaintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.taints = mapped
    }

    /**
     * @param value Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("gilrosttnruwcvuw")
    public suspend fun vsphereConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vsphereConfigs = mapped
    }

    /**
     * @param argument Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("mcmeycfpdduqfwkx")
    public suspend fun vsphereConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VMwareNodePoolConfigVsphereConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.vsphereConfigs = mapped
    }

    /**
     * @param argument Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("mljmixexcugxbfjh")
    public suspend fun vsphereConfigs(vararg argument: suspend VMwareNodePoolConfigVsphereConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VMwareNodePoolConfigVsphereConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.vsphereConfigs = mapped
    }

    /**
     * @param argument Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("nhujakwxpqlpvdeo")
    public suspend fun vsphereConfigs(argument: suspend VMwareNodePoolConfigVsphereConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VMwareNodePoolConfigVsphereConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.vsphereConfigs = mapped
    }

    /**
     * @param values Specifies the vSphere config for node pool.
     * Structure is documented below.
     */
    @JvmName("ktmxtqevesltolua")
    public suspend fun vsphereConfigs(vararg values: VMwareNodePoolConfigVsphereConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.vsphereConfigs = mapped
    }

    internal fun build(): VMwareNodePoolConfigArgs = VMwareNodePoolConfigArgs(
        bootDiskSizeGb = bootDiskSizeGb,
        cpus = cpus,
        enableLoadBalancer = enableLoadBalancer,
        image = image,
        imageType = imageType ?: throw PulumiNullFieldException("imageType"),
        labels = labels,
        memoryMb = memoryMb,
        replicas = replicas,
        taints = taints,
        vsphereConfigs = vsphereConfigs,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy