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

com.pulumi.gcp.dataproc.kotlin.inputs.ClusterClusterConfigPreemptibleWorkerConfigArgs.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.12.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.ClusterClusterConfigPreemptibleWorkerConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property diskConfig Disk Config
 * @property instanceFlexibilityPolicy Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
 * @property instanceNames List of preemptible instance names which have been assigned
 * to the cluster.
 * @property numInstances Specifies the number of preemptible nodes to create.
 * Defaults to 0.
 * @property preemptibility Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
 * Accepted values are:
 * * PREEMPTIBILITY_UNSPECIFIED
 * * NON_PREEMPTIBLE
 * * PREEMPTIBLE
 */
public data class ClusterClusterConfigPreemptibleWorkerConfigArgs(
    public val diskConfig: Output? = null,
    public val instanceFlexibilityPolicy: Output? = null,
    public val instanceNames: Output>? = null,
    public val numInstances: Output? = null,
    public val preemptibility: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigPreemptibleWorkerConfigArgs =
        com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigPreemptibleWorkerConfigArgs.builder()
            .diskConfig(diskConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instanceFlexibilityPolicy(
                instanceFlexibilityPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .instanceNames(instanceNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .numInstances(numInstances?.applyValue({ args0 -> args0 }))
            .preemptibility(preemptibility?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterClusterConfigPreemptibleWorkerConfigArgs].
 */
@PulumiTagMarker
public class ClusterClusterConfigPreemptibleWorkerConfigArgsBuilder internal constructor() {
    private var diskConfig: Output? = null

    private var instanceFlexibilityPolicy:
        Output? = null

    private var instanceNames: Output>? = null

    private var numInstances: Output? = null

    private var preemptibility: Output? = null

    /**
     * @param value Disk Config
     */
    @JvmName("kvpwjqntdgavftdb")
    public suspend fun diskConfig(`value`: Output) {
        this.diskConfig = value
    }

    /**
     * @param value Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
     */
    @JvmName("skftsxtialuifnat")
    public suspend fun instanceFlexibilityPolicy(`value`: Output) {
        this.instanceFlexibilityPolicy = value
    }

    /**
     * @param value List of preemptible instance names which have been assigned
     * to the cluster.
     */
    @JvmName("iqexhcixqfapojox")
    public suspend fun instanceNames(`value`: Output>) {
        this.instanceNames = value
    }

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

    /**
     * @param values List of preemptible instance names which have been assigned
     * to the cluster.
     */
    @JvmName("vxtwlrdxcvvvwyap")
    public suspend fun instanceNames(values: List>) {
        this.instanceNames = Output.all(values)
    }

    /**
     * @param value Specifies the number of preemptible nodes to create.
     * Defaults to 0.
     */
    @JvmName("hgtgcqgtoagdgsqg")
    public suspend fun numInstances(`value`: Output) {
        this.numInstances = value
    }

    /**
     * @param value Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
     * Accepted values are:
     * * PREEMPTIBILITY_UNSPECIFIED
     * * NON_PREEMPTIBLE
     * * PREEMPTIBLE
     */
    @JvmName("pdsndwincwqxycdd")
    public suspend fun preemptibility(`value`: Output) {
        this.preemptibility = value
    }

    /**
     * @param value Disk Config
     */
    @JvmName("rxhutkjqjtnoeoxv")
    public suspend fun diskConfig(`value`: ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskConfig = mapped
    }

    /**
     * @param argument Disk Config
     */
    @JvmName("ikrwywhxbwtppdsf")
    public suspend fun diskConfig(argument: suspend ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            ClusterClusterConfigPreemptibleWorkerConfigDiskConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.diskConfig = mapped
    }

    /**
     * @param value Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
     */
    @JvmName("cuiilestacuvfyhy")
    public suspend fun instanceFlexibilityPolicy(`value`: ClusterClusterConfigPreemptibleWorkerConfigInstanceFlexibilityPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceFlexibilityPolicy = mapped
    }

    /**
     * @param argument Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
     */
    @JvmName("fptnhxamlpihwric")
    public suspend fun instanceFlexibilityPolicy(argument: suspend ClusterClusterConfigPreemptibleWorkerConfigInstanceFlexibilityPolicyArgsBuilder.() -> Unit) {
        val toBeMapped =
            ClusterClusterConfigPreemptibleWorkerConfigInstanceFlexibilityPolicyArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.instanceFlexibilityPolicy = mapped
    }

    /**
     * @param value List of preemptible instance names which have been assigned
     * to the cluster.
     */
    @JvmName("mdnnrxvuyjxdbivp")
    public suspend fun instanceNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceNames = mapped
    }

    /**
     * @param values List of preemptible instance names which have been assigned
     * to the cluster.
     */
    @JvmName("cyxmsusicdecbdxb")
    public suspend fun instanceNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceNames = mapped
    }

    /**
     * @param value Specifies the number of preemptible nodes to create.
     * Defaults to 0.
     */
    @JvmName("fhwrctsrmpomcqnn")
    public suspend fun numInstances(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numInstances = mapped
    }

    /**
     * @param value Specifies the preemptibility of the secondary workers. The default value is `PREEMPTIBLE`
     * Accepted values are:
     * * PREEMPTIBILITY_UNSPECIFIED
     * * NON_PREEMPTIBLE
     * * PREEMPTIBLE
     */
    @JvmName("djutvecodggewjrw")
    public suspend fun preemptibility(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preemptibility = mapped
    }

    internal fun build(): ClusterClusterConfigPreemptibleWorkerConfigArgs =
        ClusterClusterConfigPreemptibleWorkerConfigArgs(
            diskConfig = diskConfig,
            instanceFlexibilityPolicy = instanceFlexibilityPolicy,
            instanceNames = instanceNames,
            numInstances = numInstances,
            preemptibility = preemptibility,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy