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

com.pulumi.gcp.dataproc.kotlin.inputs.ClusterClusterConfigMasterConfigArgs.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.ClusterClusterConfigMasterConfigArgs.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 accelerators The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
 * @property diskConfig Disk Config
 * @property imageUri The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
 * for more information.
 * @property instanceNames List of master instance names which
 * have been assigned to the cluster.
 * @property machineType The name of a Google Compute Engine machine type
 * to create for the master. If not specified, GCP will default to a predetermined
 * computed value (currently `n1-standard-4`).
 * @property minCpuPlatform The name of a minimum generation of CPU family
 * for the master. If not specified, GCP will default to a predetermined computed value
 * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
 * for details about which CPU families are available (and defaulted) for each zone.
 * @property numInstances Specifies the number of master nodes to create.
 * If not specified, GCP will default to a predetermined computed value (currently 1).
 */
public data class ClusterClusterConfigMasterConfigArgs(
    public val accelerators: Output>? = null,
    public val diskConfig: Output? = null,
    public val imageUri: Output? = null,
    public val instanceNames: Output>? = null,
    public val machineType: Output? = null,
    public val minCpuPlatform: Output? = null,
    public val numInstances: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigMasterConfigArgs =
        com.pulumi.gcp.dataproc.inputs.ClusterClusterConfigMasterConfigArgs.builder()
            .accelerators(
                accelerators?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .diskConfig(diskConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .imageUri(imageUri?.applyValue({ args0 -> args0 }))
            .instanceNames(instanceNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .minCpuPlatform(minCpuPlatform?.applyValue({ args0 -> args0 }))
            .numInstances(numInstances?.applyValue({ args0 -> args0 })).build()
}

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

    private var diskConfig: Output? = null

    private var imageUri: Output? = null

    private var instanceNames: Output>? = null

    private var machineType: Output? = null

    private var minCpuPlatform: Output? = null

    private var numInstances: Output? = null

    /**
     * @param value The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("xkhifstmqlhquvnl")
    public suspend fun accelerators(`value`: Output>) {
        this.accelerators = value
    }

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

    /**
     * @param values The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("rpmsrdqioexvpmlv")
    public suspend fun accelerators(values: List>) {
        this.accelerators = Output.all(values)
    }

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

    /**
     * @param value The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
     * for more information.
     */
    @JvmName("rqiccxdklaihtjgk")
    public suspend fun imageUri(`value`: Output) {
        this.imageUri = value
    }

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

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

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

    /**
     * @param value The name of a Google Compute Engine machine type
     * to create for the master. If not specified, GCP will default to a predetermined
     * computed value (currently `n1-standard-4`).
     */
    @JvmName("ctmihsnelyfanmlq")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value The name of a minimum generation of CPU family
     * for the master. If not specified, GCP will default to a predetermined computed value
     * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
     * for details about which CPU families are available (and defaulted) for each zone.
     */
    @JvmName("tpfqaxgreltarelq")
    public suspend fun minCpuPlatform(`value`: Output) {
        this.minCpuPlatform = value
    }

    /**
     * @param value Specifies the number of master nodes to create.
     * If not specified, GCP will default to a predetermined computed value (currently 1).
     */
    @JvmName("bcbgpvprxavbmbka")
    public suspend fun numInstances(`value`: Output) {
        this.numInstances = value
    }

    /**
     * @param value The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("toaiubknfrbxkqtc")
    public suspend fun accelerators(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("xmekjtsvgagdccir")
    public suspend fun accelerators(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterClusterConfigMasterConfigAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("pkhelaboblnvkwwa")
    public suspend fun accelerators(vararg argument: suspend ClusterClusterConfigMasterConfigAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterClusterConfigMasterConfigAcceleratorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param argument The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("ogfhbjfynyvcgkeh")
    public suspend fun accelerators(argument: suspend ClusterClusterConfigMasterConfigAcceleratorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ClusterClusterConfigMasterConfigAcceleratorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.accelerators = mapped
    }

    /**
     * @param values The Compute Engine accelerator (GPU) configuration for these instances. Can be specified multiple times.
     */
    @JvmName("wjqfejqnhbpbgsdn")
    public suspend fun accelerators(vararg values: ClusterClusterConfigMasterConfigAcceleratorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accelerators = mapped
    }

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

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

    /**
     * @param value The URI for the image to use for this worker.  See [the guide](https://cloud.google.com/dataproc/docs/guides/dataproc-images)
     * for more information.
     */
    @JvmName("gfilrtmojdryyfmi")
    public suspend fun imageUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageUri = mapped
    }

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

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

    /**
     * @param value The name of a Google Compute Engine machine type
     * to create for the master. If not specified, GCP will default to a predetermined
     * computed value (currently `n1-standard-4`).
     */
    @JvmName("vuwtgejjxubrhuhp")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value The name of a minimum generation of CPU family
     * for the master. If not specified, GCP will default to a predetermined computed value
     * for each zone. See [the guide](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
     * for details about which CPU families are available (and defaulted) for each zone.
     */
    @JvmName("dgdemiflkpypgmqy")
    public suspend fun minCpuPlatform(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minCpuPlatform = mapped
    }

    /**
     * @param value Specifies the number of master nodes to create.
     * If not specified, GCP will default to a predetermined computed value (currently 1).
     */
    @JvmName("wipklkrbmtfhcpof")
    public suspend fun numInstances(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numInstances = mapped
    }

    internal fun build(): ClusterClusterConfigMasterConfigArgs = ClusterClusterConfigMasterConfigArgs(
        accelerators = accelerators,
        diskConfig = diskConfig,
        imageUri = imageUri,
        instanceNames = instanceNames,
        machineType = machineType,
        minCpuPlatform = minCpuPlatform,
        numInstances = numInstances,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy