com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.ResourceRequestArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@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.ResourceRequestArgs.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 ResourceRequestArgs(
public val namedResources: Output? = null,
public val vendorParameters: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceRequestArgs =
com.pulumi.kubernetes.resource.v1alpha2.inputs.ResourceRequestArgs.builder()
.namedResources(namedResources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.vendorParameters(
vendorParameters?.applyValue({ args0 ->
JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
}),
).build()
}
/**
* Builder for [ResourceRequestArgs].
*/
@PulumiTagMarker
public class ResourceRequestArgsBuilder 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("rlrmhleubofdqamv")
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("xvtormfuqjtuqtos")
public suspend fun vendorParameters(`value`: Output) {
this.vendorParameters = value
}
/**
* @param value NamedResources describes a request for resources with the named resources model.
*/
@JvmName("odjafrafnuulwgxk")
public suspend fun namedResources(`value`: NamedResourcesRequestArgs?) {
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("brahlitsmgxdepui")
public suspend fun namedResources(argument: suspend NamedResourcesRequestArgsBuilder.() -> Unit) {
val toBeMapped = NamedResourcesRequestArgsBuilder().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("arqrynisfasdkksk")
public suspend fun vendorParameters(`value`: JsonElement?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vendorParameters = mapped
}
internal fun build(): ResourceRequestArgs = ResourceRequestArgs(
namedResources = namedResources,
vendorParameters = vendorParameters,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy