com.pulumi.kubernetes.resource.v1alpha1.kotlin.inputs.ResourceClaimTemplateSpecArgs.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.resource.v1alpha1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.ObjectMetaArgsBuilder
import com.pulumi.kubernetes.resource.v1alpha1.inputs.ResourceClaimTemplateSpecArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
* @property metadata ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
* @property spec Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
*/
public data class ResourceClaimTemplateSpecArgs(
public val metadata: Output? = null,
public val spec: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.resource.v1alpha1.inputs.ResourceClaimTemplateSpecArgs =
com.pulumi.kubernetes.resource.v1alpha1.inputs.ResourceClaimTemplateSpecArgs.builder()
.metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.spec(spec.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [ResourceClaimTemplateSpecArgs].
*/
@PulumiTagMarker
public class ResourceClaimTemplateSpecArgsBuilder internal constructor() {
private var metadata: Output? = null
private var spec: Output? = null
/**
* @param value ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
*/
@JvmName("merqbnsjcdwacvfo")
public suspend fun metadata(`value`: Output) {
this.metadata = value
}
/**
* @param value Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
*/
@JvmName("dreilnvugqbmsxot")
public suspend fun spec(`value`: Output) {
this.spec = value
}
/**
* @param value ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
*/
@JvmName("vhkbtkkrggpvmlcs")
public suspend fun metadata(`value`: ObjectMetaArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.metadata = mapped
}
/**
* @param argument ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation.
*/
@JvmName("yvrxvowmhhtfsbpr")
public suspend fun metadata(argument: suspend ObjectMetaArgsBuilder.() -> Unit) {
val toBeMapped = ObjectMetaArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.metadata = mapped
}
/**
* @param value Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
*/
@JvmName("ttciloasgmdwchsp")
public suspend fun spec(`value`: ResourceClaimSpecArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.spec = mapped
}
/**
* @param argument Spec for the ResourceClaim. The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
*/
@JvmName("smnbjkhxeybxhbur")
public suspend fun spec(argument: suspend ResourceClaimSpecArgsBuilder.() -> Unit) {
val toBeMapped = ResourceClaimSpecArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.spec = mapped
}
internal fun build(): ResourceClaimTemplateSpecArgs = ResourceClaimTemplateSpecArgs(
metadata = metadata,
spec = spec ?: throw PulumiNullFieldException("spec"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy