com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.outputs.CustomResourceSubresources.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.apiextensions.v1beta1.kotlin.outputs
import com.google.gson.GsonBuilder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.Suppress
/**
* 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 CustomResourceSubresources(
public val scale: CustomResourceSubresourceScale? = null,
public val status: JsonElement? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceSubresources): CustomResourceSubresources = CustomResourceSubresources(
scale = javaType.scale().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.outputs.CustomResourceSubresourceScale.Companion.toKotlin(args0)
})
}).orElse(null),
status = javaType.status().map({ args0 ->
Json.parseToJsonElement(GsonBuilder().serializeNulls().create().toJson(args0))
}).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy