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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.ResourceClaimSpecArgs.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.v1alpha2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceClaimSpecArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * ResourceClaimSpec defines how a resource is to be allocated.
 * @property allocationMode Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default.
 * @property parametersRef ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
 * The object must be in the same namespace as the ResourceClaim.
 * @property resourceClassName ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.
 */
public data class ResourceClaimSpecArgs(
    public val allocationMode: Output? = null,
    public val parametersRef: Output? = null,
    public val resourceClassName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceClaimSpecArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceClaimSpecArgs.builder()
            .allocationMode(allocationMode?.applyValue({ args0 -> args0 }))
            .parametersRef(parametersRef?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceClassName(resourceClassName.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ResourceClaimSpecArgs].
 */
@PulumiTagMarker
public class ResourceClaimSpecArgsBuilder internal constructor() {
    private var allocationMode: Output? = null

    private var parametersRef: Output? = null

    private var resourceClassName: Output? = null

    /**
     * @param value Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default.
     */
    @JvmName("adpyrfchuiocfpgp")
    public suspend fun allocationMode(`value`: Output) {
        this.allocationMode = value
    }

    /**
     * @param value ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
     * The object must be in the same namespace as the ResourceClaim.
     */
    @JvmName("ddjsgnkpasamboyw")
    public suspend fun parametersRef(`value`: Output) {
        this.parametersRef = value
    }

    /**
     * @param value ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.
     */
    @JvmName("smnosujxplungivg")
    public suspend fun resourceClassName(`value`: Output) {
        this.resourceClassName = value
    }

    /**
     * @param value Allocation can start immediately or when a Pod wants to use the resource. "WaitForFirstConsumer" is the default.
     */
    @JvmName("dsewuhcjbociuahd")
    public suspend fun allocationMode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allocationMode = mapped
    }

    /**
     * @param value ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
     * The object must be in the same namespace as the ResourceClaim.
     */
    @JvmName("ygxnwlmotaavobmx")
    public suspend fun parametersRef(`value`: ResourceClaimParametersReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parametersRef = mapped
    }

    /**
     * @param argument ParametersRef references a separate object with arbitrary parameters that will be used by the driver when allocating a resource for the claim.
     * The object must be in the same namespace as the ResourceClaim.
     */
    @JvmName("bowxqxwiwclebtib")
    public suspend fun parametersRef(argument: suspend ResourceClaimParametersReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = ResourceClaimParametersReferenceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.parametersRef = mapped
    }

    /**
     * @param value ResourceClassName references the driver and additional parameters via the name of a ResourceClass that was created as part of the driver deployment.
     */
    @JvmName("ftdwbwhapsvaemoc")
    public suspend fun resourceClassName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceClassName = mapped
    }

    internal fun build(): ResourceClaimSpecArgs = ResourceClaimSpecArgs(
        allocationMode = allocationMode,
        parametersRef = parametersRef,
        resourceClassName = resourceClassName ?: throw PulumiNullFieldException("resourceClassName"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy