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

com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs.ResourceSliceSpecPatchArgs.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.ResourceSliceSpecPatchArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
 * @property allNodes AllNodes indicates that all nodes have access to the resources in the pool.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set.
 * @property devices Devices lists some or all of the devices in this pool.
 * Must not have more than 128 entries.
 * @property driver Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.
 * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
 * @property nodeName NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.
 * This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
 * @property nodeSelector NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
 * Must use exactly one term.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set.
 * @property pool Pool describes the pool that this ResourceSlice belongs to.
 */
public data class ResourceSliceSpecPatchArgs(
    public val allNodes: Output? = null,
    public val devices: Output>? = null,
    public val driver: Output? = null,
    public val nodeName: Output? = null,
    public val nodeSelector: Output? = null,
    public val pool: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha3.inputs.ResourceSliceSpecPatchArgs =
        com.pulumi.kubernetes.resource.v1alpha3.inputs.ResourceSliceSpecPatchArgs.builder()
            .allNodes(allNodes?.applyValue({ args0 -> args0 }))
            .devices(
                devices?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .driver(driver?.applyValue({ args0 -> args0 }))
            .nodeName(nodeName?.applyValue({ args0 -> args0 }))
            .nodeSelector(nodeSelector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .pool(pool?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ResourceSliceSpecPatchArgs].
 */
@PulumiTagMarker
public class ResourceSliceSpecPatchArgsBuilder internal constructor() {
    private var allNodes: Output? = null

    private var devices: Output>? = null

    private var driver: Output? = null

    private var nodeName: Output? = null

    private var nodeSelector: Output? = null

    private var pool: Output? = null

    /**
     * @param value AllNodes indicates that all nodes have access to the resources in the pool.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set.
     */
    @JvmName("paoiolnjtbbhxvrp")
    public suspend fun allNodes(`value`: Output) {
        this.allNodes = value
    }

    /**
     * @param value Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("skbuauecxgjdbhud")
    public suspend fun devices(`value`: Output>) {
        this.devices = value
    }

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

    /**
     * @param values Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("gwntdikaawmncubx")
    public suspend fun devices(values: List>) {
        this.devices = Output.all(values)
    }

    /**
     * @param value Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.
     * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
     */
    @JvmName("yrpjtsycmpkielel")
    public suspend fun driver(`value`: Output) {
        this.driver = value
    }

    /**
     * @param value NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.
     * This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
     */
    @JvmName("mpqprvifjnjttvfo")
    public suspend fun nodeName(`value`: Output) {
        this.nodeName = value
    }

    /**
     * @param value NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
     * Must use exactly one term.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set.
     */
    @JvmName("nhmycphvtctsrhbs")
    public suspend fun nodeSelector(`value`: Output) {
        this.nodeSelector = value
    }

    /**
     * @param value Pool describes the pool that this ResourceSlice belongs to.
     */
    @JvmName("pilbgqremubqntcb")
    public suspend fun pool(`value`: Output) {
        this.pool = value
    }

    /**
     * @param value AllNodes indicates that all nodes have access to the resources in the pool.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set.
     */
    @JvmName("rgwbqovolodtgwdg")
    public suspend fun allNodes(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allNodes = mapped
    }

    /**
     * @param value Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("rcfatdgibosfvlci")
    public suspend fun devices(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.devices = mapped
    }

    /**
     * @param argument Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("bwbrabyckhmftjqd")
    public suspend fun devices(argument: List Unit>) {
        val toBeMapped = argument.toList().map { DevicePatchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.devices = mapped
    }

    /**
     * @param argument Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("ysyjpklgvrpwhsdr")
    public suspend fun devices(vararg argument: suspend DevicePatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { DevicePatchArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.devices = mapped
    }

    /**
     * @param argument Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("ubmryofybopbqpok")
    public suspend fun devices(argument: suspend DevicePatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DevicePatchArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.devices = mapped
    }

    /**
     * @param values Devices lists some or all of the devices in this pool.
     * Must not have more than 128 entries.
     */
    @JvmName("ffvpwkmtvblxmlrs")
    public suspend fun devices(vararg values: DevicePatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.devices = mapped
    }

    /**
     * @param value Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.
     * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
     */
    @JvmName("ywpbbcfrniyrxfkd")
    public suspend fun driver(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.driver = mapped
    }

    /**
     * @param value NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.
     * This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
     */
    @JvmName("nhqatqrtoqltyqky")
    public suspend fun nodeName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeName = mapped
    }

    /**
     * @param value NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
     * Must use exactly one term.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set.
     */
    @JvmName("hruiicwbieguvxfc")
    public suspend fun nodeSelector(`value`: NodeSelectorPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeSelector = mapped
    }

    /**
     * @param argument NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
     * Must use exactly one term.
     * Exactly one of NodeName, NodeSelector and AllNodes must be set.
     */
    @JvmName("cbrvqfpdvpimecth")
    public suspend fun nodeSelector(argument: suspend NodeSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = NodeSelectorPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nodeSelector = mapped
    }

    /**
     * @param value Pool describes the pool that this ResourceSlice belongs to.
     */
    @JvmName("deftqtkxevtrlund")
    public suspend fun pool(`value`: ResourcePoolPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pool = mapped
    }

    /**
     * @param argument Pool describes the pool that this ResourceSlice belongs to.
     */
    @JvmName("nkeyaymbkweitgiy")
    public suspend fun pool(argument: suspend ResourcePoolPatchArgsBuilder.() -> Unit) {
        val toBeMapped = ResourcePoolPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.pool = mapped
    }

    internal fun build(): ResourceSliceSpecPatchArgs = ResourceSliceSpecPatchArgs(
        allNodes = allNodes,
        devices = devices,
        driver = driver,
        nodeName = nodeName,
        nodeSelector = nodeSelector,
        pool = pool,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy