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

com.pulumi.azurenative.dataprotection.kotlin.inputs.BackupPolicyArgs.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.BackupPolicyArgs.builder
import com.pulumi.core.Either
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 kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Rule based backup policy
 * @property datasourceTypes Type of datasource for the backup management
 * @property objectType
 * Expected value is 'BackupPolicy'.
 * @property policyRules Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
 */
public data class BackupPolicyArgs(
    public val datasourceTypes: Output>,
    public val objectType: Output,
    public val policyRules: Output>>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.dataprotection.inputs.BackupPolicyArgs =
        com.pulumi.azurenative.dataprotection.inputs.BackupPolicyArgs.builder()
            .datasourceTypes(datasourceTypes.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .objectType(objectType.applyValue({ args0 -> args0 }))
            .policyRules(
                policyRules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform({ args0 ->
                            args0.let({ args0 -> args0.toJava() })
                        }, { args0 ->
                            args0.let({ args0 ->
                                args0.toJava()
                            })
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BackupPolicyArgs].
 */
@PulumiTagMarker
public class BackupPolicyArgsBuilder internal constructor() {
    private var datasourceTypes: Output>? = null

    private var objectType: Output? = null

    private var policyRules: Output>>? = null

    /**
     * @param value Type of datasource for the backup management
     */
    @JvmName("vukvuvapgaxnwrrk")
    public suspend fun datasourceTypes(`value`: Output>) {
        this.datasourceTypes = value
    }

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

    /**
     * @param values Type of datasource for the backup management
     */
    @JvmName("lbltbffxwuubymrf")
    public suspend fun datasourceTypes(values: List>) {
        this.datasourceTypes = Output.all(values)
    }

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

    /**
     * @param value Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
     */
    @JvmName("xvfrklbqssxiaore")
    public suspend fun policyRules(`value`: Output>>) {
        this.policyRules = value
    }

    @JvmName("yyigqnalbrqcnttq")
    public suspend fun policyRules(vararg values: Output>) {
        this.policyRules = Output.all(values.asList())
    }

    /**
     * @param values Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
     */
    @JvmName("dngehtmuhnmxairp")
    public suspend fun policyRules(values: List>>) {
        this.policyRules = Output.all(values)
    }

    /**
     * @param value Type of datasource for the backup management
     */
    @JvmName("kvwtejyyntiailqo")
    public suspend fun datasourceTypes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.datasourceTypes = mapped
    }

    /**
     * @param values Type of datasource for the backup management
     */
    @JvmName("yycmexcfnwqssasy")
    public suspend fun datasourceTypes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.datasourceTypes = mapped
    }

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

    /**
     * @param value Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
     */
    @JvmName("fjucclrdbxdwfwug")
    public suspend fun policyRules(`value`: List>) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyRules = mapped
    }

    /**
     * @param values Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
     */
    @JvmName("vealxsrqidsoptlx")
    public suspend fun policyRules(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyRules = mapped
    }

    internal fun build(): BackupPolicyArgs = BackupPolicyArgs(
        datasourceTypes = datasourceTypes ?: throw PulumiNullFieldException("datasourceTypes"),
        objectType = objectType ?: throw PulumiNullFieldException("objectType"),
        policyRules = policyRules ?: throw PulumiNullFieldException("policyRules"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy