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

com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs.DeviceClaimArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClaimArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * DeviceClaim defines how to request devices with a ResourceClaim.
 * @property config This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
 * @property constraints These constraints must be satisfied by the set of devices that get allocated for the claim.
 * @property requests Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
 */
public data class DeviceClaimArgs(
    public val config: Output>? = null,
    public val constraints: Output>? = null,
    public val requests: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClaimArgs =
        com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClaimArgs.builder()
            .config(config?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .constraints(
                constraints?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .requests(
                requests?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var constraints: Output>? = null

    private var requests: Output>? = null

    /**
     * @param value This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("slxufrmrkstkefue")
    public suspend fun config(`value`: Output>) {
        this.config = value
    }

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

    /**
     * @param values This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("rpakeuofqwxxcmph")
    public suspend fun config(values: List>) {
        this.config = Output.all(values)
    }

    /**
     * @param value These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("bcjvrgpfmlkvtdnj")
    public suspend fun constraints(`value`: Output>) {
        this.constraints = value
    }

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

    /**
     * @param values These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("tyaupivhlrpwejni")
    public suspend fun constraints(values: List>) {
        this.constraints = Output.all(values)
    }

    /**
     * @param value Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("fyixrslisxeayyqb")
    public suspend fun requests(`value`: Output>) {
        this.requests = value
    }

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

    /**
     * @param values Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("narejjtfpyljujsl")
    public suspend fun requests(values: List>) {
        this.requests = Output.all(values)
    }

    /**
     * @param value This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("quevbuncowxngqim")
    public suspend fun config(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param argument This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("grcddijwmmonwcmd")
    public suspend fun config(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DeviceClaimConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param argument This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("larqqvywcopclqff")
    public suspend fun config(vararg argument: suspend DeviceClaimConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DeviceClaimConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param argument This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("lmcyjivpiiloeuah")
    public suspend fun config(argument: suspend DeviceClaimConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DeviceClaimConfigurationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param values This field holds configuration for multiple potential drivers which could satisfy requests in this claim. It is ignored while allocating the claim.
     */
    @JvmName("ygaftphujoltajry")
    public suspend fun config(vararg values: DeviceClaimConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param value These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("jubvxyggppbbhleq")
    public suspend fun constraints(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.constraints = mapped
    }

    /**
     * @param argument These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("lxxlgkxlcugepcql")
    public suspend fun constraints(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DeviceConstraintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.constraints = mapped
    }

    /**
     * @param argument These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("pfttmlaqwabgeabj")
    public suspend fun constraints(vararg argument: suspend DeviceConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DeviceConstraintArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.constraints = mapped
    }

    /**
     * @param argument These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("duahydikakklomxc")
    public suspend fun constraints(argument: suspend DeviceConstraintArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DeviceConstraintArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.constraints = mapped
    }

    /**
     * @param values These constraints must be satisfied by the set of devices that get allocated for the claim.
     */
    @JvmName("ttvydmdixeabeyiw")
    public suspend fun constraints(vararg values: DeviceConstraintArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.constraints = mapped
    }

    /**
     * @param value Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("xbeapkmaqbojbuey")
    public suspend fun requests(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    /**
     * @param argument Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("fmwoouavxwjrvsof")
    public suspend fun requests(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DeviceRequestArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param argument Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("vwoajdaiuauatrsi")
    public suspend fun requests(vararg argument: suspend DeviceRequestArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DeviceRequestArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param argument Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("sgisfplqslcjcvab")
    public suspend fun requests(argument: suspend DeviceRequestArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DeviceRequestArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param values Requests represent individual requests for distinct devices which must all be satisfied. If empty, nothing needs to be allocated.
     */
    @JvmName("luufovcygqwkccgn")
    public suspend fun requests(vararg values: DeviceRequestArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    internal fun build(): DeviceClaimArgs = DeviceClaimArgs(
        config = config,
        constraints = constraints,
        requests = requests,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy