com.pulumi.kubernetes.admissionregistration.v1alpha1.kotlin.inputs.MutationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.admissionregistration.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.admissionregistration.v1alpha1.inputs.MutationArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Mutation specifies the CEL expression which is used to apply the Mutation.
* @property applyConfiguration applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.
* @property jsonPatch jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.
* @property patchType patchType indicates the patch strategy used. Allowed values are "ApplyConfiguration" and "JSONPatch". Required.
*/
public data class MutationArgs(
public val applyConfiguration: Output? = null,
public val jsonPatch: Output? = null,
public val patchType: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutationArgs =
com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutationArgs.builder()
.applyConfiguration(
applyConfiguration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.jsonPatch(jsonPatch?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.patchType(patchType.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [MutationArgs].
*/
@PulumiTagMarker
public class MutationArgsBuilder internal constructor() {
private var applyConfiguration: Output? = null
private var jsonPatch: Output? = null
private var patchType: Output? = null
/**
* @param value applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.
*/
@JvmName("orhwsttgmdulhnmx")
public suspend fun applyConfiguration(`value`: Output) {
this.applyConfiguration = value
}
/**
* @param value jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.
*/
@JvmName("ccvoeyxcqwdnugem")
public suspend fun jsonPatch(`value`: Output) {
this.jsonPatch = value
}
/**
* @param value patchType indicates the patch strategy used. Allowed values are "ApplyConfiguration" and "JSONPatch". Required.
*/
@JvmName("iieyurwgigxoltre")
public suspend fun patchType(`value`: Output) {
this.patchType = value
}
/**
* @param value applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.
*/
@JvmName("ljggojuqewcgarrt")
public suspend fun applyConfiguration(`value`: ApplyConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.applyConfiguration = mapped
}
/**
* @param argument applyConfiguration defines the desired configuration values of an object. The configuration is applied to the admission object using [structured merge diff](https://github.com/kubernetes-sigs/structured-merge-diff). A CEL expression is used to create apply configuration.
*/
@JvmName("mtbfepgwsifcltvd")
public suspend fun applyConfiguration(argument: suspend ApplyConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = ApplyConfigurationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.applyConfiguration = mapped
}
/**
* @param value jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.
*/
@JvmName("asboektflmlldmly")
public suspend fun jsonPatch(`value`: JSONPatchArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.jsonPatch = mapped
}
/**
* @param argument jsonPatch defines a [JSON patch](https://jsonpatch.com/) operation to perform a mutation to the object. A CEL expression is used to create the JSON patch.
*/
@JvmName("tneutflcjgiodhcu")
public suspend fun jsonPatch(argument: suspend JSONPatchArgsBuilder.() -> Unit) {
val toBeMapped = JSONPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.jsonPatch = mapped
}
/**
* @param value patchType indicates the patch strategy used. Allowed values are "ApplyConfiguration" and "JSONPatch". Required.
*/
@JvmName("pafktqokffxmldhu")
public suspend fun patchType(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.patchType = mapped
}
internal fun build(): MutationArgs = MutationArgs(
applyConfiguration = applyConfiguration,
jsonPatch = jsonPatch,
patchType = patchType ?: throw PulumiNullFieldException("patchType"),
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy