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

com.pulumi.kubernetes.resource.v1beta1.kotlin.inputs.AllocatedDeviceStatusArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.resource.v1beta1.kotlin.inputs

import com.google.gson.JsonParser
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ConditionArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ConditionArgsBuilder
import com.pulumi.kubernetes.resource.v1beta1.inputs.AllocatedDeviceStatusArgs.builder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.
 * @property conditions Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
 * @property data Data contains arbitrary driver-specific data.
 * The length of the raw data must be smaller or equal to 10 Ki.
 * @property device Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
 * @property driver Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.
 * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
 * @property networkData NetworkData contains network-related information specific to the device.
 * @property pool This name together with the driver name and the device name field identify which device was allocated (`//`).
 * Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
 */
public data class AllocatedDeviceStatusArgs(
    public val conditions: Output>? = null,
    public val `data`: Output? = null,
    public val device: Output,
    public val driver: Output,
    public val networkData: Output? = null,
    public val pool: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1beta1.inputs.AllocatedDeviceStatusArgs =
        com.pulumi.kubernetes.resource.v1beta1.inputs.AllocatedDeviceStatusArgs.builder()
            .conditions(
                conditions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .`data`(
                `data`?.applyValue({ args0 ->
                    JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
                }),
            )
            .device(device.applyValue({ args0 -> args0 }))
            .driver(driver.applyValue({ args0 -> args0 }))
            .networkData(networkData?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .pool(pool.applyValue({ args0 -> args0 })).build()
}

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

    private var `data`: Output? = null

    private var device: Output? = null

    private var driver: Output? = null

    private var networkData: Output? = null

    private var pool: Output? = null

    /**
     * @param value Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("cvmbmoatugwwrdof")
    public suspend fun conditions(`value`: Output>) {
        this.conditions = value
    }

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

    /**
     * @param values Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("scmsyaxmcbpexclv")
    public suspend fun conditions(values: List>) {
        this.conditions = Output.all(values)
    }

    /**
     * @param value Data contains arbitrary driver-specific data.
     * The length of the raw data must be smaller or equal to 10 Ki.
     */
    @JvmName("qdnxjnqpbofigcwq")
    public suspend fun `data`(`value`: Output) {
        this.`data` = value
    }

    /**
     * @param value Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
     */
    @JvmName("rfxgmldpwyopramx")
    public suspend fun device(`value`: Output) {
        this.device = value
    }

    /**
     * @param value Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.
     * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
     */
    @JvmName("krsbaevfapntaknb")
    public suspend fun driver(`value`: Output) {
        this.driver = value
    }

    /**
     * @param value NetworkData contains network-related information specific to the device.
     */
    @JvmName("rjbqhjuxltpudugu")
    public suspend fun networkData(`value`: Output) {
        this.networkData = value
    }

    /**
     * @param value This name together with the driver name and the device name field identify which device was allocated (`//`).
     * Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
     */
    @JvmName("quuwhxvpioxabjne")
    public suspend fun pool(`value`: Output) {
        this.pool = value
    }

    /**
     * @param value Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("uedmyftsbligxlho")
    public suspend fun conditions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param argument Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("jujxjmohulxypctl")
    public suspend fun conditions(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ConditionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param argument Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("jxvattasxdpkgccb")
    public suspend fun conditions(vararg argument: suspend ConditionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ConditionArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param argument Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("qthedeiidsfpffkx")
    public suspend fun conditions(argument: suspend ConditionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ConditionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param values Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
     */
    @JvmName("auviyqgrojalnqjb")
    public suspend fun conditions(vararg values: ConditionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param value Data contains arbitrary driver-specific data.
     * The length of the raw data must be smaller or equal to 10 Ki.
     */
    @JvmName("vhjcorthpwngerml")
    public suspend fun `data`(`value`: JsonElement?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`data` = mapped
    }

    /**
     * @param value Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
     */
    @JvmName("inpwhwludwrxjusn")
    public suspend fun device(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.device = mapped
    }

    /**
     * @param value Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.
     * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
     */
    @JvmName("bqslxjfybmjqmxvs")
    public suspend fun driver(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.driver = mapped
    }

    /**
     * @param value NetworkData contains network-related information specific to the device.
     */
    @JvmName("fvadeoojtiebxvbf")
    public suspend fun networkData(`value`: NetworkDeviceDataArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkData = mapped
    }

    /**
     * @param argument NetworkData contains network-related information specific to the device.
     */
    @JvmName("ytkswdeuhvmsehfh")
    public suspend fun networkData(argument: suspend NetworkDeviceDataArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkDeviceDataArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkData = mapped
    }

    /**
     * @param value This name together with the driver name and the device name field identify which device was allocated (`//`).
     * Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
     */
    @JvmName("jbhlkiwgypmyomsm")
    public suspend fun pool(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.pool = mapped
    }

    internal fun build(): AllocatedDeviceStatusArgs = AllocatedDeviceStatusArgs(
        conditions = conditions,
        `data` = `data`,
        device = device ?: throw PulumiNullFieldException("device"),
        driver = driver ?: throw PulumiNullFieldException("driver"),
        networkData = networkData,
        pool = pool ?: throw PulumiNullFieldException("pool"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy