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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.DriverAllocationResultArgs.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.DriverAllocationResultArgs.builder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * DriverAllocationResult contains vendor parameters and the allocation result for one request.
 * @property namedResources NamedResources describes the allocation result when using the named resources model.
 * @property vendorRequestParameters VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.
 */
public data class DriverAllocationResultArgs(
    public val namedResources: Output? = null,
    public val vendorRequestParameters: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.DriverAllocationResultArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.DriverAllocationResultArgs.builder()
            .namedResources(namedResources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vendorRequestParameters(
                vendorRequestParameters?.applyValue({ args0 ->
                    JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
                }),
            ).build()
}

/**
 * Builder for [DriverAllocationResultArgs].
 */
@PulumiTagMarker
public class DriverAllocationResultArgsBuilder internal constructor() {
    private var namedResources: Output? = null

    private var vendorRequestParameters: Output? = null

    /**
     * @param value NamedResources describes the allocation result when using the named resources model.
     */
    @JvmName("kspxotacixvwdqhx")
    public suspend fun namedResources(`value`: Output) {
        this.namedResources = value
    }

    /**
     * @param value VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.
     */
    @JvmName("rajbskkdiyskuhth")
    public suspend fun vendorRequestParameters(`value`: Output) {
        this.vendorRequestParameters = value
    }

    /**
     * @param value NamedResources describes the allocation result when using the named resources model.
     */
    @JvmName("pscrhpmlalwsxsla")
    public suspend fun namedResources(`value`: NamedResourcesAllocationResultArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namedResources = mapped
    }

    /**
     * @param argument NamedResources describes the allocation result when using the named resources model.
     */
    @JvmName("wrpxktgfohkhmqsl")
    public suspend fun namedResources(argument: suspend NamedResourcesAllocationResultArgsBuilder.() -> Unit) {
        val toBeMapped = NamedResourcesAllocationResultArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.namedResources = mapped
    }

    /**
     * @param value VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.
     */
    @JvmName("qclbgbesdfilbuys")
    public suspend fun vendorRequestParameters(`value`: JsonElement?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vendorRequestParameters = mapped
    }

    internal fun build(): DriverAllocationResultArgs = DriverAllocationResultArgs(
        namedResources = namedResources,
        vendorRequestParameters = vendorRequestParameters,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy