All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.admissionregistration.v1alpha1.kotlin.inputs.MutationPatchArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.18.2.0
Show newest version
@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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutationPatchArgs.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 MutationPatchArgs(
    public val applyConfiguration: Output? = null,
    public val jsonPatch: Output? = null,
    public val patchType: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutationPatchArgs =
        com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutationPatchArgs.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 [MutationPatchArgs].
 */
@PulumiTagMarker
public class MutationPatchArgsBuilder 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("polpjptsumqwfpnr")
    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("bhxvuascadbdoeqr")
    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("ypjngahhxhmjvqax")
    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("xhcvhvqlakeerhlv")
    public suspend fun applyConfiguration(`value`: ApplyConfigurationPatchArgs?) {
        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("xoxafuslyueuvbbk")
    public suspend fun applyConfiguration(argument: suspend ApplyConfigurationPatchArgsBuilder.() -> Unit) {
        val toBeMapped = ApplyConfigurationPatchArgsBuilder().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("rhqvolpubdxgqwtl")
    public suspend fun jsonPatch(`value`: JSONPatchPatchArgs?) {
        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("ipgdkkedfyiyxgop")
    public suspend fun jsonPatch(argument: suspend JSONPatchPatchArgsBuilder.() -> Unit) {
        val toBeMapped = JSONPatchPatchArgsBuilder().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("ktxlwlcpoujadnlu")
    public suspend fun patchType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.patchType = mapped
    }

    internal fun build(): MutationPatchArgs = MutationPatchArgs(
        applyConfiguration = applyConfiguration,
        jsonPatch = jsonPatch,
        patchType = patchType,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy