com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.CustomResourceConversion.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.outputs
import kotlin.String
import kotlin.Suppress
/**
* CustomResourceConversion describes how to convert different versions of a CR.
* @property strategy strategy specifies how custom resources are converted between versions. Allowed values are: - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information
* is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
* @property webhook webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`.
*/
public data class CustomResourceConversion(
public val strategy: String,
public val webhook: WebhookConversion? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.apiextensions.v1.outputs.CustomResourceConversion): CustomResourceConversion = CustomResourceConversion(
strategy = javaType.strategy(),
webhook = javaType.webhook().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.WebhookConversion.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy