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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.DriverRequestsArgs.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.google.gson.JsonParser
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.DriverRequestsArgs.builder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * DriverRequests describes all resources that are needed from one particular driver.
 * @property driverName DriverName is the name used by the DRA driver kubelet plugin.
 * @property requests Requests describes all resources that are needed from the driver.
 * @property vendorParameters VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.
 */
public data class DriverRequestsArgs(
    public val driverName: Output? = null,
    public val requests: Output>? = null,
    public val vendorParameters: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.DriverRequestsArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.DriverRequestsArgs.builder()
            .driverName(driverName?.applyValue({ args0 -> args0 }))
            .requests(
                requests?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .vendorParameters(
                vendorParameters?.applyValue({ args0 ->
                    JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
                }),
            ).build()
}

/**
 * Builder for [DriverRequestsArgs].
 */
@PulumiTagMarker
public class DriverRequestsArgsBuilder internal constructor() {
    private var driverName: Output? = null

    private var requests: Output>? = null

    private var vendorParameters: Output? = null

    /**
     * @param value DriverName is the name used by the DRA driver kubelet plugin.
     */
    @JvmName("wjycjdnrhebancwc")
    public suspend fun driverName(`value`: Output) {
        this.driverName = value
    }

    /**
     * @param value Requests describes all resources that are needed from the driver.
     */
    @JvmName("fxinqgbdnppgweya")
    public suspend fun requests(`value`: Output>) {
        this.requests = value
    }

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

    /**
     * @param values Requests describes all resources that are needed from the driver.
     */
    @JvmName("bqdmojcubxvckork")
    public suspend fun requests(values: List>) {
        this.requests = Output.all(values)
    }

    /**
     * @param value VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.
     */
    @JvmName("hdisxbllgsmonmhk")
    public suspend fun vendorParameters(`value`: Output) {
        this.vendorParameters = value
    }

    /**
     * @param value DriverName is the name used by the DRA driver kubelet plugin.
     */
    @JvmName("viybumedkbjffhjc")
    public suspend fun driverName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.driverName = mapped
    }

    /**
     * @param value Requests describes all resources that are needed from the driver.
     */
    @JvmName("xlvqpavmqahegomr")
    public suspend fun requests(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    /**
     * @param argument Requests describes all resources that are needed from the driver.
     */
    @JvmName("uurpoxblkcuckbqg")
    public suspend fun requests(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResourceRequestArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param argument Requests describes all resources that are needed from the driver.
     */
    @JvmName("ijgrnisqksytfkbo")
    public suspend fun requests(vararg argument: suspend ResourceRequestArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ResourceRequestArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param argument Requests describes all resources that are needed from the driver.
     */
    @JvmName("bvgbcykreuxlfkkb")
    public suspend fun requests(argument: suspend ResourceRequestArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ResourceRequestArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

    /**
     * @param values Requests describes all resources that are needed from the driver.
     */
    @JvmName("tgkdjnsdbvywqwrp")
    public suspend fun requests(vararg values: ResourceRequestArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requests = mapped
    }

    /**
     * @param value VendorParameters are arbitrary setup parameters for all requests of the claim. They are ignored while allocating the claim.
     */
    @JvmName("cqrqaccimatoiexp")
    public suspend fun vendorParameters(`value`: JsonElement?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vendorParameters = mapped
    }

    internal fun build(): DriverRequestsArgs = DriverRequestsArgs(
        driverName = driverName,
        requests = requests,
        vendorParameters = vendorParameters,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy