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

com.pulumi.azure.dataprotection.kotlin.inputs.BackupPolicyKubernetesClusterRetentionRuleArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.dataprotection.kotlin.inputs

import com.pulumi.azure.dataprotection.inputs.BackupPolicyKubernetesClusterRetentionRuleArgs.builder
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 kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property criteria A `criteria` block as defined below. Changing this forces a new resource to be created.
 * @property lifeCycles A `life_cycle` block as defined below. Changing this forces a new resource to be created.
 * @property name The name which should be used for this retention rule. Changing this forces a new resource to be created.
 * @property priority Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created.
 */
public data class BackupPolicyKubernetesClusterRetentionRuleArgs(
    public val criteria: Output,
    public val lifeCycles: Output>,
    public val name: Output,
    public val priority: Output,
) :
    ConvertibleToJava {
    override fun toJava():
        com.pulumi.azure.dataprotection.inputs.BackupPolicyKubernetesClusterRetentionRuleArgs =
        com.pulumi.azure.dataprotection.inputs.BackupPolicyKubernetesClusterRetentionRuleArgs.builder()
            .criteria(criteria.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .lifeCycles(
                lifeCycles.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .priority(priority.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BackupPolicyKubernetesClusterRetentionRuleArgs].
 */
@PulumiTagMarker
public class BackupPolicyKubernetesClusterRetentionRuleArgsBuilder internal constructor() {
    private var criteria: Output? = null

    private var lifeCycles: Output>? =
        null

    private var name: Output? = null

    private var priority: Output? = null

    /**
     * @param value A `criteria` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("sbdhqygodrkrlacs")
    public suspend
    fun criteria(`value`: Output) {
        this.criteria = value
    }

    /**
     * @param value A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("hijmuaujljumxbhk")
    public suspend
    fun lifeCycles(`value`: Output>) {
        this.lifeCycles = value
    }

    @JvmName("lcoflbrtcxyxsltd")
    public suspend fun lifeCycles(
        vararg
        values: Output,
    ) {
        this.lifeCycles = Output.all(values.asList())
    }

    /**
     * @param values A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("qamwkpnhutufjqxd")
    public suspend
    fun lifeCycles(values: List>) {
        this.lifeCycles = Output.all(values)
    }

    /**
     * @param value The name which should be used for this retention rule. Changing this forces a new resource to be created.
     */
    @JvmName("bjqtpbsqadjiwgvm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created.
     */
    @JvmName("ptuhqxbbiylgkskv")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value A `criteria` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("yvmqgmaxqrfinsml")
    public suspend fun criteria(`value`: BackupPolicyKubernetesClusterRetentionRuleCriteriaArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.criteria = mapped
    }

    /**
     * @param argument A `criteria` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("pcovbwcqsnqbdhoc")
    public suspend
    fun criteria(argument: suspend BackupPolicyKubernetesClusterRetentionRuleCriteriaArgsBuilder.() -> Unit) {
        val toBeMapped = BackupPolicyKubernetesClusterRetentionRuleCriteriaArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.criteria = mapped
    }

    /**
     * @param value A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("qtsuhobvrnamljrh")
    public suspend
    fun lifeCycles(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifeCycles = mapped
    }

    /**
     * @param argument A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("xrixgpexrnrqwstw")
    public suspend
    fun lifeCycles(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifeCycles = mapped
    }

    /**
     * @param argument A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("pcfxqhbvxjfdvqxf")
    public suspend fun lifeCycles(
        vararg
        argument: suspend BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifeCycles = mapped
    }

    /**
     * @param argument A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("jeeqovabyjhonedj")
    public suspend
    fun lifeCycles(argument: suspend BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.lifeCycles = mapped
    }

    /**
     * @param values A `life_cycle` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("egskkvfeokeltjla")
    public suspend fun lifeCycles(
        vararg
        values: BackupPolicyKubernetesClusterRetentionRuleLifeCycleArgs,
    ) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifeCycles = mapped
    }

    /**
     * @param value The name which should be used for this retention rule. Changing this forces a new resource to be created.
     */
    @JvmName("ymjkiljneaxrkrmc")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies the priority of the rule. The priority number must be unique for each rule. The lower the priority number, the higher the priority of the rule. Changing this forces a new resource to be created.
     */
    @JvmName("xxkgnoeihcnrfylr")
    public suspend fun priority(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    internal fun build(): BackupPolicyKubernetesClusterRetentionRuleArgs =
        BackupPolicyKubernetesClusterRetentionRuleArgs(
            criteria = criteria ?: throw PulumiNullFieldException("criteria"),
            lifeCycles = lifeCycles ?: throw PulumiNullFieldException("lifeCycles"),
            name = name ?: throw PulumiNullFieldException("name"),
            priority = priority ?: throw PulumiNullFieldException("priority"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy