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

com.pulumi.azurenative.workloads.kotlin.inputs.VMBackupPolicyPropertiesArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.workloads.kotlin.inputs

import com.pulumi.azurenative.workloads.inputs.VMBackupPolicyPropertiesArgs.builder
import com.pulumi.azurenative.workloads.kotlin.enums.IAASVMPolicyType
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 com.pulumi.kotlin.applySuspend
import kotlin.Any
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Defines the policy properties for virtual machine backup.
 * @property backupManagementType This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
 * Expected value is 'AzureIaasVM'.
 * @property instantRPDetails Instant recovery point additional details.
 * @property instantRpRetentionRangeInDays Instant RP retention policy range in days
 * @property name The name of the VM Backup policy.
 * @property policyType The policy type.
 * @property protectedItemsCount Number of items associated with this policy.
 * @property resourceGuardOperationRequests ResourceGuard Operation Requests
 * @property retentionPolicy Retention policy with the details on backup copy retention ranges.
 * @property schedulePolicy Backup schedule specified as part of backup policy.
 * @property tieringPolicy Tiering policy to automatically move RPs to another tier
 * Key is Target Tier, defined in RecoveryPointTierType enum.
 * Tiering policy specifies the criteria to move RP to the target tier.
 * @property timeZone Time zone optional input as string. For example: "Pacific Standard Time".
 */
public data class VMBackupPolicyPropertiesArgs(
    public val backupManagementType: Output,
    public val instantRPDetails: Output? = null,
    public val instantRpRetentionRangeInDays: Output? = null,
    public val name: Output,
    public val policyType: Output>? = null,
    public val protectedItemsCount: Output? = null,
    public val resourceGuardOperationRequests: Output>? = null,
    public val retentionPolicy: Output>? = null,
    public val schedulePolicy: Output? = null,
    public val tieringPolicy: Output>? = null,
    public val timeZone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.workloads.inputs.VMBackupPolicyPropertiesArgs =
        com.pulumi.azurenative.workloads.inputs.VMBackupPolicyPropertiesArgs.builder()
            .backupManagementType(backupManagementType.applyValue({ args0 -> args0 }))
            .instantRPDetails(instantRPDetails?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .instantRpRetentionRangeInDays(instantRpRetentionRangeInDays?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .policyType(
                policyType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .protectedItemsCount(protectedItemsCount?.applyValue({ args0 -> args0 }))
            .resourceGuardOperationRequests(
                resourceGuardOperationRequests?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .retentionPolicy(
                retentionPolicy?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .schedulePolicy(schedulePolicy?.applyValue({ args0 -> args0 }))
            .tieringPolicy(
                tieringPolicy?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VMBackupPolicyPropertiesArgs].
 */
@PulumiTagMarker
public class VMBackupPolicyPropertiesArgsBuilder internal constructor() {
    private var backupManagementType: Output? = null

    private var instantRPDetails: Output? = null

    private var instantRpRetentionRangeInDays: Output? = null

    private var name: Output? = null

    private var policyType: Output>? = null

    private var protectedItemsCount: Output? = null

    private var resourceGuardOperationRequests: Output>? = null

    private var retentionPolicy:
        Output>? = null

    private var schedulePolicy: Output? = null

    private var tieringPolicy: Output>? = null

    private var timeZone: Output? = null

    /**
     * @param value This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureIaasVM'.
     */
    @JvmName("sjnqkyxbgccnlvgj")
    public suspend fun backupManagementType(`value`: Output) {
        this.backupManagementType = value
    }

    /**
     * @param value Instant recovery point additional details.
     */
    @JvmName("dejdaeqsoeyudion")
    public suspend fun instantRPDetails(`value`: Output) {
        this.instantRPDetails = value
    }

    /**
     * @param value Instant RP retention policy range in days
     */
    @JvmName("sxdxqlapxgdkjsre")
    public suspend fun instantRpRetentionRangeInDays(`value`: Output) {
        this.instantRpRetentionRangeInDays = value
    }

    /**
     * @param value The name of the VM Backup policy.
     */
    @JvmName("bomtcmyydhxmfskl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The policy type.
     */
    @JvmName("fynqhwhgfuchijxu")
    public suspend fun policyType(`value`: Output>) {
        this.policyType = value
    }

    /**
     * @param value Number of items associated with this policy.
     */
    @JvmName("nxyqfcuqqbkfvjyc")
    public suspend fun protectedItemsCount(`value`: Output) {
        this.protectedItemsCount = value
    }

    /**
     * @param value ResourceGuard Operation Requests
     */
    @JvmName("ihiirckcegcnunda")
    public suspend fun resourceGuardOperationRequests(`value`: Output>) {
        this.resourceGuardOperationRequests = value
    }

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

    /**
     * @param values ResourceGuard Operation Requests
     */
    @JvmName("omuhtiwyevuopjdd")
    public suspend fun resourceGuardOperationRequests(values: List>) {
        this.resourceGuardOperationRequests = Output.all(values)
    }

    /**
     * @param value Retention policy with the details on backup copy retention ranges.
     */
    @JvmName("nhgjmjrgjtgaoikr")
    public suspend fun retentionPolicy(`value`: Output>) {
        this.retentionPolicy = value
    }

    /**
     * @param value Backup schedule specified as part of backup policy.
     */
    @JvmName("vumfpmsavvlibhvs")
    public suspend fun schedulePolicy(`value`: Output) {
        this.schedulePolicy = value
    }

    /**
     * @param value Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     */
    @JvmName("dipwaycxvjpoykby")
    public suspend fun tieringPolicy(`value`: Output>) {
        this.tieringPolicy = value
    }

    /**
     * @param value Time zone optional input as string. For example: "Pacific Standard Time".
     */
    @JvmName("rnqdcoaxvhcptslp")
    public suspend fun timeZone(`value`: Output) {
        this.timeZone = value
    }

    /**
     * @param value This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'AzureIaasVM'.
     */
    @JvmName("uoncrnqglefvstll")
    public suspend fun backupManagementType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupManagementType = mapped
    }

    /**
     * @param value Instant recovery point additional details.
     */
    @JvmName("sbyvugkrlvqhbejg")
    public suspend fun instantRPDetails(`value`: InstantRPAdditionalDetailsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instantRPDetails = mapped
    }

    /**
     * @param argument Instant recovery point additional details.
     */
    @JvmName("xaemccukoohfdkql")
    public suspend fun instantRPDetails(argument: suspend InstantRPAdditionalDetailsArgsBuilder.() -> Unit) {
        val toBeMapped = InstantRPAdditionalDetailsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.instantRPDetails = mapped
    }

    /**
     * @param value Instant RP retention policy range in days
     */
    @JvmName("veorylvqttnfoxvb")
    public suspend fun instantRpRetentionRangeInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instantRpRetentionRangeInDays = mapped
    }

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

    /**
     * @param value The policy type.
     */
    @JvmName("wikgwyftkvbctkpx")
    public suspend fun policyType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyType = mapped
    }

    /**
     * @param value The policy type.
     */
    @JvmName("wobhlkrsyojktcgf")
    public fun policyType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyType = mapped
    }

    /**
     * @param value The policy type.
     */
    @JvmName("tcniljgigvysilai")
    public fun policyType(`value`: IAASVMPolicyType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyType = mapped
    }

    /**
     * @param value Number of items associated with this policy.
     */
    @JvmName("diercmwjlvmfkwey")
    public suspend fun protectedItemsCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectedItemsCount = mapped
    }

    /**
     * @param value ResourceGuard Operation Requests
     */
    @JvmName("ykfabijptaekhkid")
    public suspend fun resourceGuardOperationRequests(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGuardOperationRequests = mapped
    }

    /**
     * @param values ResourceGuard Operation Requests
     */
    @JvmName("vldamnmmyceaskrh")
    public suspend fun resourceGuardOperationRequests(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceGuardOperationRequests = mapped
    }

    /**
     * @param value Retention policy with the details on backup copy retention ranges.
     */
    @JvmName("gwmqkpijjeellryi")
    public suspend fun retentionPolicy(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param value Retention policy with the details on backup copy retention ranges.
     */
    @JvmName("ayxsfsxrjugpfpjv")
    public fun retentionPolicy(`value`: LongTermRetentionPolicyArgs) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param value Retention policy with the details on backup copy retention ranges.
     */
    @JvmName("yvwalorrekejjesx")
    public fun retentionPolicy(`value`: SimpleRetentionPolicyArgs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param value Backup schedule specified as part of backup policy.
     */
    @JvmName("xfkyytagsytbtjve")
    public suspend fun schedulePolicy(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedulePolicy = mapped
    }

    /**
     * @param value Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     */
    @JvmName("dbnunrjoaumkuego")
    public suspend fun tieringPolicy(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tieringPolicy = mapped
    }

    /**
     * @param argument Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     */
    @JvmName("mxfifxjxrjoloelk")
    public suspend fun tieringPolicy(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                TieringPolicyArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.tieringPolicy = mapped
    }

    /**
     * @param values Tiering policy to automatically move RPs to another tier
     * Key is Target Tier, defined in RecoveryPointTierType enum.
     * Tiering policy specifies the criteria to move RP to the target tier.
     */
    @JvmName("thgffwyrufptrree")
    public fun tieringPolicy(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tieringPolicy = mapped
    }

    /**
     * @param value Time zone optional input as string. For example: "Pacific Standard Time".
     */
    @JvmName("aiopnsatdgkxfkex")
    public suspend fun timeZone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeZone = mapped
    }

    internal fun build(): VMBackupPolicyPropertiesArgs = VMBackupPolicyPropertiesArgs(
        backupManagementType = backupManagementType ?: throw
            PulumiNullFieldException("backupManagementType"),
        instantRPDetails = instantRPDetails,
        instantRpRetentionRangeInDays = instantRpRetentionRangeInDays,
        name = name ?: throw PulumiNullFieldException("name"),
        policyType = policyType,
        protectedItemsCount = protectedItemsCount,
        resourceGuardOperationRequests = resourceGuardOperationRequests,
        retentionPolicy = retentionPolicy,
        schedulePolicy = schedulePolicy,
        tieringPolicy = tieringPolicy,
        timeZone = timeZone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy