com.pulumi.kubernetes.apiextensions.v1.kotlin.inputs.CustomResourceSubresourcesArgs.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.apiextensions.v1.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.apiextensions.v1.inputs.CustomResourceSubresourcesArgs.builder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* CustomResourceSubresources defines the status and scale subresources for CustomResources.
* @property scale scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
* @property status status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
*/
public data class CustomResourceSubresourcesArgs(
public val scale: Output? = null,
public val status: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceSubresourcesArgs =
com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceSubresourcesArgs.builder()
.scale(scale?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.status(
status?.applyValue({ args0 ->
JsonParser.parseString(Json.encodeToString(JsonElement.serializer(), args0))
}),
).build()
}
/**
* Builder for [CustomResourceSubresourcesArgs].
*/
@PulumiTagMarker
public class CustomResourceSubresourcesArgsBuilder internal constructor() {
private var scale: Output? = null
private var status: Output? = null
/**
* @param value scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
*/
@JvmName("xojbtufucgkpxwft")
public suspend fun scale(`value`: Output) {
this.scale = value
}
/**
* @param value status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
*/
@JvmName("xcqhycgveghvwkly")
public suspend fun status(`value`: Output) {
this.status = value
}
/**
* @param value scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
*/
@JvmName("ubdounlqdfalvrgo")
public suspend fun scale(`value`: CustomResourceSubresourceScaleArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.scale = mapped
}
/**
* @param argument scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object.
*/
@JvmName("impglqqqfudnrsqx")
public suspend fun scale(argument: suspend CustomResourceSubresourceScaleArgsBuilder.() -> Unit) {
val toBeMapped = CustomResourceSubresourceScaleArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.scale = mapped
}
/**
* @param value status indicates the custom resource should serve a `/status` subresource. When enabled: 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object.
*/
@JvmName("dgcugrfjbhifitlb")
public suspend fun status(`value`: JsonElement?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.status = mapped
}
internal fun build(): CustomResourceSubresourcesArgs = CustomResourceSubresourcesArgs(
scale = scale,
status = status,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy