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.

There is a newer version: 4.18.2.0
Show 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("ptnlytcoubgxeriy")
    public suspend fun config(`value`: Output>) {
        this.config = value
    }

    @JvmName("ebovvfouucswgeex")
    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("rodffppmxutvgbui")
    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("ajepwvntnyhcgxmm")
    public suspend fun constraints(`value`: Output>) {
        this.constraints = value
    }

    @JvmName("kkocbkptnpkrgowd")
    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("fxfdumysyiaxdcnc")
    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("jkesxhlrmvobajun")
    public suspend fun requests(`value`: Output>) {
        this.requests = value
    }

    @JvmName("fvgepnvuttcxmvky")
    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("imeqsojsuooriiwk")
    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("mrkhhlbqvnickrwj")
    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("wobnbwkkrniacxrb")
    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("nhhayexswidylvsg")
    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("xrrwbbauxcbyewgm")
    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("cxlctcxnoghqyycf")
    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("fiitrqsselwylsjq")
    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("fmtvljqqqyucreic")
    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("ptsrpissjaoowfow")
    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("ybhcgexvodkxygdg")
    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("ylttnjckfflgwsxj")
    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("vhvyhtuojasqmsyl")
    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("oyxntqpbaivrpvxu")
    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("cngmyhyewxkbwwrb")
    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("mwwdbodtppxbjigi")
    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("dkkxmuijhljqtbac")
    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