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

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

/**
 * ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.
 * @property allocation Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.
 * @property deallocationRequested DeallocationRequested indicates that a ResourceClaim is to be deallocated.
 * The driver then must deallocate this claim and reset the field together with clearing the Allocation field.
 * While DeallocationRequested is set, no new consumers may be added to ReservedFor.
 * @property driverName DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.
 * @property reservedFor ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
 * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
 */
public data class ResourceClaimStatusArgs(
    public val allocation: Output? = null,
    public val deallocationRequested: Output? = null,
    public val driverName: Output? = null,
    public val reservedFor: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceClaimStatusArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceClaimStatusArgs.builder()
            .allocation(allocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .deallocationRequested(deallocationRequested?.applyValue({ args0 -> args0 }))
            .driverName(driverName?.applyValue({ args0 -> args0 }))
            .reservedFor(
                reservedFor?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ResourceClaimStatusArgs].
 */
@PulumiTagMarker
public class ResourceClaimStatusArgsBuilder internal constructor() {
    private var allocation: Output? = null

    private var deallocationRequested: Output? = null

    private var driverName: Output? = null

    private var reservedFor: Output>? = null

    /**
     * @param value Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.
     */
    @JvmName("vbsfepviybbdtkes")
    public suspend fun allocation(`value`: Output) {
        this.allocation = value
    }

    /**
     * @param value DeallocationRequested indicates that a ResourceClaim is to be deallocated.
     * The driver then must deallocate this claim and reset the field together with clearing the Allocation field.
     * While DeallocationRequested is set, no new consumers may be added to ReservedFor.
     */
    @JvmName("biftehadbkeyeuhq")
    public suspend fun deallocationRequested(`value`: Output) {
        this.deallocationRequested = value
    }

    /**
     * @param value DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.
     */
    @JvmName("tnthohmwimhbpukh")
    public suspend fun driverName(`value`: Output) {
        this.driverName = value
    }

    /**
     * @param value ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("olficbreudclaweu")
    public suspend fun reservedFor(`value`: Output>) {
        this.reservedFor = value
    }

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

    /**
     * @param values ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("nkhfttvahbdjpdcw")
    public suspend fun reservedFor(values: List>) {
        this.reservedFor = Output.all(values)
    }

    /**
     * @param value Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.
     */
    @JvmName("qcyjtlwrjuqgklav")
    public suspend fun allocation(`value`: AllocationResultArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocation = mapped
    }

    /**
     * @param argument Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.
     */
    @JvmName("qsngnuoxcckqjtky")
    public suspend fun allocation(argument: suspend AllocationResultArgsBuilder.() -> Unit) {
        val toBeMapped = AllocationResultArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.allocation = mapped
    }

    /**
     * @param value DeallocationRequested indicates that a ResourceClaim is to be deallocated.
     * The driver then must deallocate this claim and reset the field together with clearing the Allocation field.
     * While DeallocationRequested is set, no new consumers may be added to ReservedFor.
     */
    @JvmName("dggmpgartpbobbbd")
    public suspend fun deallocationRequested(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deallocationRequested = mapped
    }

    /**
     * @param value DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.
     */
    @JvmName("svihtmqbulkhktue")
    public suspend fun driverName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.driverName = mapped
    }

    /**
     * @param value ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("alvljqbkvaoylvlf")
    public suspend fun reservedFor(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservedFor = mapped
    }

    /**
     * @param argument ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("lfsrkmktgonuflur")
    public suspend fun reservedFor(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResourceClaimConsumerReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.reservedFor = mapped
    }

    /**
     * @param argument ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("tpuhxhwummotnlnw")
    public suspend fun reservedFor(vararg argument: suspend ResourceClaimConsumerReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResourceClaimConsumerReferenceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.reservedFor = mapped
    }

    /**
     * @param argument ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("wpttcqshpiyenaje")
    public suspend fun reservedFor(argument: suspend ResourceClaimConsumerReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ResourceClaimConsumerReferenceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.reservedFor = mapped
    }

    /**
     * @param values ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
     * There can be at most 32 such reservations. This may get increased in the future, but not reduced.
     */
    @JvmName("ufbvuixhirawttsl")
    public suspend fun reservedFor(vararg values: ResourceClaimConsumerReferenceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.reservedFor = mapped
    }

    internal fun build(): ResourceClaimStatusArgs = ResourceClaimStatusArgs(
        allocation = allocation,
        deallocationRequested = deallocationRequested,
        driverName = driverName,
        reservedFor = reservedFor,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy