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

com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs.DeviceClassSpecPatchArgs.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.core.v1.kotlin.inputs.NodeSelectorPatchArgs
import com.pulumi.kubernetes.core.v1.kotlin.inputs.NodeSelectorPatchArgsBuilder
import com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClassSpecPatchArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
 * @property config Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
 * They are passed to the driver, but are not considered while allocating the claim.
 * @property selectors Each selector must be satisfied by a device which is claimed via this class.
 * @property suitableNodes Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.
 * Setting this field is optional. If unset, all Nodes are candidates.
 * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
 */
public data class DeviceClassSpecPatchArgs(
    public val config: Output>? = null,
    public val selectors: Output>? = null,
    public val suitableNodes: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClassSpecPatchArgs =
        com.pulumi.kubernetes.resource.v1alpha3.inputs.DeviceClassSpecPatchArgs.builder()
            .config(config?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .selectors(
                selectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .suitableNodes(suitableNodes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var selectors: Output>? = null

    private var suitableNodes: Output? = null

    /**
     * @param value Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("vmkdejcmdtiffukp")
    public suspend fun config(`value`: Output>) {
        this.config = value
    }

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

    /**
     * @param values Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("kskdlgarwdocjqwr")
    public suspend fun config(values: List>) {
        this.config = Output.all(values)
    }

    /**
     * @param value Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("shfsxxutqiiliadd")
    public suspend fun selectors(`value`: Output>) {
        this.selectors = value
    }

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

    /**
     * @param values Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("piesanveajdxbcmy")
    public suspend fun selectors(values: List>) {
        this.selectors = Output.all(values)
    }

    /**
     * @param value Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.
     * Setting this field is optional. If unset, all Nodes are candidates.
     * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
     */
    @JvmName("doypnbxmqshqtkou")
    public suspend fun suitableNodes(`value`: Output) {
        this.suitableNodes = value
    }

    /**
     * @param value Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("nkakcqsvjywgtxkf")
    public suspend fun config(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param argument Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("gjjtqvgvncvppncn")
    public suspend fun config(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DeviceClassConfigurationPatchArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param argument Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("dngigbfbefiwxmir")
    public suspend fun config(vararg argument: suspend DeviceClassConfigurationPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DeviceClassConfigurationPatchArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param argument Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("lshliwnjemvuknkx")
    public suspend fun config(argument: suspend DeviceClassConfigurationPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DeviceClassConfigurationPatchArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.config = mapped
    }

    /**
     * @param values Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
     * They are passed to the driver, but are not considered while allocating the claim.
     */
    @JvmName("lrgkrqocavvnnmdc")
    public suspend fun config(vararg values: DeviceClassConfigurationPatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.config = mapped
    }

    /**
     * @param value Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("ordoepbpuqvqgjiq")
    public suspend fun selectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selectors = mapped
    }

    /**
     * @param argument Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("gdmbikgyedfatlcr")
    public suspend fun selectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DeviceSelectorPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param argument Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("hpidsgrpnavbjikk")
    public suspend fun selectors(vararg argument: suspend DeviceSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DeviceSelectorPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param argument Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("vryvsfpxlmwyrfhh")
    public suspend fun selectors(argument: suspend DeviceSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DeviceSelectorPatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param values Each selector must be satisfied by a device which is claimed via this class.
     */
    @JvmName("fabbnpkgcncjvqrs")
    public suspend fun selectors(vararg values: DeviceSelectorPatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectors = mapped
    }

    /**
     * @param value Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.
     * Setting this field is optional. If unset, all Nodes are candidates.
     * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
     */
    @JvmName("sabjstisaqglmnrt")
    public suspend fun suitableNodes(`value`: NodeSelectorPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.suitableNodes = mapped
    }

    /**
     * @param argument Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet *and* that claim gets allocated through a control plane controller. It is ignored when the claim does not use a control plane controller for allocation.
     * Setting this field is optional. If unset, all Nodes are candidates.
     * This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
     */
    @JvmName("urryaeysqpqubesq")
    public suspend fun suitableNodes(argument: suspend NodeSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = NodeSelectorPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.suitableNodes = mapped
    }

    internal fun build(): DeviceClassSpecPatchArgs = DeviceClassSpecPatchArgs(
        config = config,
        selectors = selectors,
        suitableNodes = suitableNodes,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy