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

com.pulumi.gcp.container.kotlin.inputs.ClusterNodePoolNodeConfigGuestAcceleratorArgs.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.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterNodePoolNodeConfigGuestAcceleratorArgs.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 ClusterNodePoolNodeConfigGuestAcceleratorArgs(
    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.ClusterNodePoolNodeConfigGuestAcceleratorArgs =
        com.pulumi.gcp.container.inputs.ClusterNodePoolNodeConfigGuestAcceleratorArgs.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 [ClusterNodePoolNodeConfigGuestAcceleratorArgs].
 */
@PulumiTagMarker
public class ClusterNodePoolNodeConfigGuestAcceleratorArgsBuilder 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("hcxsqxouluetmcql")
    public suspend fun count(`value`: Output) {
        this.count = value
    }

    /**
     * @param value Configuration for auto installation of GPU driver. Structure is documented below.
     */
    @JvmName("wncdllepruwespca")
    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("hlxxronpqeyjjghw")
    public suspend fun gpuPartitionSize(`value`: Output) {
        this.gpuPartitionSize = value
    }

    /**
     * @param value Configuration for GPU sharing. Structure is documented below.
     */
    @JvmName("yswseivnvxgilvkk")
    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("lehwljvyoojkqlmi")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The number of the guest accelerator cards exposed to this instance.
     */
    @JvmName("fkcjisdbxjxrgwnb")
    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("fcwwnmwxxogcrjjx")
    public suspend fun gpuDriverInstallationConfig(`value`: ClusterNodePoolNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgs?) {
        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("oaiogxjrtujlwpfr")
    public suspend fun gpuDriverInstallationConfig(argument: suspend ClusterNodePoolNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            ClusterNodePoolNodeConfigGuestAcceleratorGpuDriverInstallationConfigArgsBuilder().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("tnwditunkceprjif")
    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("cbtpgtwktwjexgib")
    public suspend fun gpuSharingConfig(`value`: ClusterNodePoolNodeConfigGuestAcceleratorGpuSharingConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gpuSharingConfig = mapped
    }

    /**
     * @param argument Configuration for GPU sharing. Structure is documented below.
     */
    @JvmName("senpshaoeotbdqqg")
    public suspend fun gpuSharingConfig(argument: suspend ClusterNodePoolNodeConfigGuestAcceleratorGpuSharingConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            ClusterNodePoolNodeConfigGuestAcceleratorGpuSharingConfigArgsBuilder().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("wyrbrwgfophjxvfu")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy