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

com.pulumi.gcp.container.kotlin.inputs.ClusterNodeConfigGuestAcceleratorArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterNodeConfigGuestAcceleratorArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property count The number of the guest accelerator cards exposed to this instance.
 * @property gpuDriverInstallationConfig Configuration for auto installation of GPU driver. Structure is documented below.
 * @property gpuPartitionSize Size of partitions to create on the GPU. Valid values are described in the NVIDIA mig [user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
 * @property gpuSharingConfig Configuration for GPU sharing. Structure is documented below.
 * @property type The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
 */
public data class ClusterNodeConfigGuestAcceleratorArgs(
    public val count: Output,
    public val gpuDriverInstallationConfig: Output? = null,
    public val gpuPartitionSize: Output? = null,
    public val gpuSharingConfig: Output? =
        null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.container.inputs.ClusterNodeConfigGuestAcceleratorArgs =
        com.pulumi.gcp.container.inputs.ClusterNodeConfigGuestAcceleratorArgs.builder()
            .count(count.applyValue({ args0 -> args0 }))
            .gpuDriverInstallationConfig(
                gpuDriverInstallationConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .gpuPartitionSize(gpuPartitionSize?.applyValue({ args0 -> args0 }))
            .gpuSharingConfig(gpuSharingConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterNodeConfigGuestAcceleratorArgs].
 */
@PulumiTagMarker
public class ClusterNodeConfigGuestAcceleratorArgsBuilder internal constructor() {
    private var count: Output? = null

    private var gpuDriverInstallationConfig:
        Output? = null

    private var gpuPartitionSize: Output? = null

    private var gpuSharingConfig: Output? =
        null

    private var type: Output? = null

    /**
     * @param value The number of the guest accelerator cards exposed to this instance.
     */
    @JvmName("sgwcvcmtbtafetxh")
    public suspend fun count(`value`: Output) {
        this.count = value
    }

    /**
     * @param value Configuration for auto installation of GPU driver. Structure is documented below.
     */
    @JvmName("xxnmsbtfdcxviosc")
    public suspend fun gpuDriverInstallationConfig(`value`: Output) {
        this.gpuDriverInstallationConfig = value
    }

    /**
     * @param value Size of partitions to create on the GPU. Valid values are described in the NVIDIA mig [user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
     */
    @JvmName("njwucfgdqldwoods")
    public suspend fun gpuPartitionSize(`value`: Output) {
        this.gpuPartitionSize = value
    }

    /**
     * @param value Configuration for GPU sharing. Structure is documented below.
     */
    @JvmName("fvrrkrikrugcuiid")
    public suspend fun gpuSharingConfig(`value`: Output) {
        this.gpuSharingConfig = value
    }

    /**
     * @param value The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
     */
    @JvmName("ifbssohhhmyetjth")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The number of the guest accelerator cards exposed to this instance.
     */
    @JvmName("xjaldckjddnyklcl")
    public suspend fun count(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.count = mapped
    }

    /**
     * @param value Configuration for auto installation of GPU driver. Structure is documented below.
     */
    @JvmName("ymhxmomsfajrdvjt")
    public suspend fun gpuDriverInstallationConfig(`value`: ClusterNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gpuDriverInstallationConfig = mapped
    }

    /**
     * @param argument Configuration for auto installation of GPU driver. Structure is documented below.
     */
    @JvmName("gtshiaipiffgorns")
    public suspend fun gpuDriverInstallationConfig(argument: suspend ClusterNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            ClusterNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.gpuDriverInstallationConfig = mapped
    }

    /**
     * @param value Size of partitions to create on the GPU. Valid values are described in the NVIDIA mig [user guide](https://docs.nvidia.com/datacenter/tesla/mig-user-guide/#partitioning).
     */
    @JvmName("ubulmqlnawbldjxi")
    public suspend fun gpuPartitionSize(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gpuPartitionSize = mapped
    }

    /**
     * @param value Configuration for GPU sharing. Structure is documented below.
     */
    @JvmName("vimqxyqolvdldmgy")
    public suspend fun gpuSharingConfig(`value`: ClusterNodeConfigGuestAcceleratorGpuSharingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gpuSharingConfig = mapped
    }

    /**
     * @param argument Configuration for GPU sharing. Structure is documented below.
     */
    @JvmName("ivlcnnejjsyvxhbq")
    public suspend fun gpuSharingConfig(argument: suspend ClusterNodeConfigGuestAcceleratorGpuSharingConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterNodeConfigGuestAcceleratorGpuSharingConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.gpuSharingConfig = mapped
    }

    /**
     * @param value The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
     */
    @JvmName("ykcjmitjyyxfettl")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ClusterNodeConfigGuestAcceleratorArgs =
        ClusterNodeConfigGuestAcceleratorArgs(
            count = count ?: throw PulumiNullFieldException("count"),
            gpuDriverInstallationConfig = gpuDriverInstallationConfig,
            gpuPartitionSize = gpuPartitionSize,
            gpuSharingConfig = gpuSharingConfig,
            type = type ?: throw PulumiNullFieldException("type"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy