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

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

package com.pulumi.azurenative.dataprotection.kotlin.inputs

import com.pulumi.azurenative.dataprotection.inputs.AzureRetentionRuleArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Azure retention rule
 * @property isDefault
 * @property lifecycles
 * @property name
 * @property objectType
 * Expected value is 'AzureRetentionRule'.
 */
public data class AzureRetentionRuleArgs(
    public val isDefault: Output? = null,
    public val lifecycles: Output>,
    public val name: Output,
    public val objectType: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.dataprotection.inputs.AzureRetentionRuleArgs =
        com.pulumi.azurenative.dataprotection.inputs.AzureRetentionRuleArgs.builder()
            .isDefault(isDefault?.applyValue({ args0 -> args0 }))
            .lifecycles(
                lifecycles.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .objectType(objectType.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AzureRetentionRuleArgs].
 */
@PulumiTagMarker
public class AzureRetentionRuleArgsBuilder internal constructor() {
    private var isDefault: Output? = null

    private var lifecycles: Output>? = null

    private var name: Output? = null

    private var objectType: Output? = null

    /**
     * @param value
     */
    @JvmName("jkkttcvepffkkhry")
    public suspend fun isDefault(`value`: Output) {
        this.isDefault = value
    }

    /**
     * @param value
     */
    @JvmName("brbsxirgxakimima")
    public suspend fun lifecycles(`value`: Output>) {
        this.lifecycles = value
    }

    @JvmName("xpxojuymajswqpoq")
    public suspend fun lifecycles(vararg values: Output) {
        this.lifecycles = Output.all(values.asList())
    }

    /**
     * @param values
     */
    @JvmName("xqoykwfjrichfphc")
    public suspend fun lifecycles(values: List>) {
        this.lifecycles = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("jigommaicfprehek")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value
     * Expected value is 'AzureRetentionRule'.
     */
    @JvmName("fpvdlcqovdyiqwah")
    public suspend fun objectType(`value`: Output) {
        this.objectType = value
    }

    /**
     * @param value
     */
    @JvmName("bniaggsfmhsnyudm")
    public suspend fun isDefault(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isDefault = mapped
    }

    /**
     * @param value
     */
    @JvmName("wcanjyturpatqwqm")
    public suspend fun lifecycles(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifecycles = mapped
    }

    /**
     * @param argument
     */
    @JvmName("jbbfndidlyyigkxq")
    public suspend fun lifecycles(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SourceLifeCycleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycles = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ijxucllhujqkcpxe")
    public suspend fun lifecycles(vararg argument: suspend SourceLifeCycleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SourceLifeCycleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.lifecycles = mapped
    }

    /**
     * @param argument
     */
    @JvmName("ygcnaawsihjhrpvk")
    public suspend fun lifecycles(argument: suspend SourceLifeCycleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SourceLifeCycleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.lifecycles = mapped
    }

    /**
     * @param values
     */
    @JvmName("bpywdteyogufsqhv")
    public suspend fun lifecycles(vararg values: SourceLifeCycleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lifecycles = mapped
    }

    /**
     * @param value
     */
    @JvmName("catsprbjhtgemamq")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value
     * Expected value is 'AzureRetentionRule'.
     */
    @JvmName("srhbgtavshmifgvh")
    public suspend fun objectType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.objectType = mapped
    }

    internal fun build(): AzureRetentionRuleArgs = AzureRetentionRuleArgs(
        isDefault = isDefault,
        lifecycles = lifecycles ?: throw PulumiNullFieldException("lifecycles"),
        name = name ?: throw PulumiNullFieldException("name"),
        objectType = objectType ?: throw PulumiNullFieldException("objectType"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy