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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.DriverRequestsPatchArgs.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.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.DriverRequestsPatchArgs.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 DriverRequestsPatchArgs(
    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.DriverRequestsPatchArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.DriverRequestsPatchArgs.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 [DriverRequestsPatchArgs].
 */
@PulumiTagMarker
public class DriverRequestsPatchArgsBuilder 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("hnrffmgmlwsqgvwg")
    public suspend fun driverName(`value`: Output) {
        this.driverName = value
    }

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

    @JvmName("xnecsoadaefcsnji")
    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("kqyfbudlywvxcjje")
    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("kupmawqgywhdvcgv")
    public suspend fun vendorParameters(`value`: Output) {
        this.vendorParameters = value
    }

    /**
     * @param value DriverName is the name used by the DRA driver kubelet plugin.
     */
    @JvmName("awomldhhdqcaynyc")
    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("dimlqobnofjeitun")
    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("euvpsdddbxdfnivu")
    public suspend fun requests(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ResourceRequestPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requests = mapped
    }

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

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

    /**
     * @param values Requests describes all resources that are needed from the driver.
     */
    @JvmName("yxajxuiihvlgrtdp")
    public suspend fun requests(vararg values: ResourceRequestPatchArgs) {
        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("spelyjyvjhqiwktl")
    public suspend fun vendorParameters(`value`: JsonElement?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vendorParameters = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy