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

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

/**
 * ResourceRequest is a request for resources from one particular driver.
 * @property namedResources NamedResources describes a request for resources with the named resources model.
 * @property vendorParameters VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.
 */
public data class ResourceRequestPatchArgs(
    public val namedResources: Output? = null,
    public val vendorParameters: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceRequestPatchArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceRequestPatchArgs.builder()
            .namedResources(namedResources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vendorParameters(
                vendorParameters?.applyValue({ args0 ->
                    JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
                }),
            ).build()
}

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

    private var vendorParameters: Output? = null

    /**
     * @param value NamedResources describes a request for resources with the named resources model.
     */
    @JvmName("tbiatlfbfrpmjccr")
    public suspend fun namedResources(`value`: Output) {
        this.namedResources = value
    }

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

    /**
     * @param value NamedResources describes a request for resources with the named resources model.
     */
    @JvmName("pmfqodsipbbyjstd")
    public suspend fun namedResources(`value`: NamedResourcesRequestPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namedResources = mapped
    }

    /**
     * @param argument NamedResources describes a request for resources with the named resources model.
     */
    @JvmName("qqkkvsabhnkjgsfn")
    public suspend fun namedResources(argument: suspend NamedResourcesRequestPatchArgsBuilder.() -> Unit) {
        val toBeMapped = NamedResourcesRequestPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.namedResources = mapped
    }

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

    internal fun build(): ResourceRequestPatchArgs = ResourceRequestPatchArgs(
        namedResources = namedResources,
        vendorParameters = vendorParameters,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy