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

com.pulumi.azure.dataprotection.kotlin.inputs.BackupPolicyDiskRetentionRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.azure.dataprotection.inputs.BackupPolicyDiskRetentionRuleArgs.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.jvm.JvmName

/**
 *
 * @property criteria A `criteria` block as defined below. Changing this forces a new Backup Policy Disk to be created.
 * @property duration Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
 * @property name The name which should be used for this retention rule. Changing this forces a new Backup Policy Disk to be created.
 * @property priority Retention Tag priority. Changing this forces a new Backup Policy Disk to be created.
 */
public data class BackupPolicyDiskRetentionRuleArgs(
    public val criteria: Output,
    public val duration: Output,
    public val name: Output,
    public val priority: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.dataprotection.inputs.BackupPolicyDiskRetentionRuleArgs =
        com.pulumi.azure.dataprotection.inputs.BackupPolicyDiskRetentionRuleArgs.builder()
            .criteria(criteria.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .duration(duration.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .priority(priority.applyValue({ args0 -> args0 })).build()
}

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

    private var duration: 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 Backup Policy Disk to be created.
     */
    @JvmName("lbbtrxxwmehutrqk")
    public suspend fun criteria(`value`: Output) {
        this.criteria = value
    }

    /**
     * @param value Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
     */
    @JvmName("nqlnnnhqdtxsoebe")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

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

    /**
     * @param value Retention Tag priority. Changing this forces a new Backup Policy Disk to be created.
     */
    @JvmName("niaownlkthcjokrc")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value A `criteria` block as defined below. Changing this forces a new Backup Policy Disk to be created.
     */
    @JvmName("bsccwvokkboomusi")
    public suspend fun criteria(`value`: BackupPolicyDiskRetentionRuleCriteriaArgs) {
        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 Backup Policy Disk to be created.
     */
    @JvmName("hsmugvholnquycxt")
    public suspend fun criteria(argument: suspend BackupPolicyDiskRetentionRuleCriteriaArgsBuilder.() -> Unit) {
        val toBeMapped = BackupPolicyDiskRetentionRuleCriteriaArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.criteria = mapped
    }

    /**
     * @param value Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Disk to be created.
     */
    @JvmName("tilgtfipffmdrrdn")
    public suspend fun duration(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.duration = mapped
    }

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

    /**
     * @param value Retention Tag priority. Changing this forces a new Backup Policy Disk to be created.
     */
    @JvmName("gdleijhylapjbxwc")
    public suspend fun priority(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.priority = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy