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

com.pulumi.azurenative.recoveryservices.kotlin.inputs.GenericProtectionPolicyArgs.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.recoveryservices.kotlin.inputs

import com.pulumi.azurenative.recoveryservices.inputs.GenericProtectionPolicyArgs.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

/**
 * Azure VM (Mercury) workload-specific backup policy.
 * @property backupManagementType This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
 * Expected value is 'GenericProtectionPolicy'.
 * @property fabricName Name of this policy's fabric.
 * @property protectedItemsCount Number of items associated with this policy.
 * @property resourceGuardOperationRequests ResourceGuard Operation Requests
 * @property subProtectionPolicy List of sub-protection policies which includes schedule and retention
 * @property timeZone TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
 */
public data class GenericProtectionPolicyArgs(
    public val backupManagementType: Output,
    public val fabricName: Output? = null,
    public val protectedItemsCount: Output? = null,
    public val resourceGuardOperationRequests: Output>? = null,
    public val subProtectionPolicy: Output>? = null,
    public val timeZone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.recoveryservices.inputs.GenericProtectionPolicyArgs = com.pulumi.azurenative.recoveryservices.inputs.GenericProtectionPolicyArgs.builder()
        .backupManagementType(backupManagementType.applyValue({ args0 -> args0 }))
        .fabricName(fabricName?.applyValue({ args0 -> args0 }))
        .protectedItemsCount(protectedItemsCount?.applyValue({ args0 -> args0 }))
        .resourceGuardOperationRequests(
            resourceGuardOperationRequests?.applyValue({ args0 ->
                args0.map({ args0 -> args0 })
            }),
        )
        .subProtectionPolicy(
            subProtectionPolicy?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}

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

    private var fabricName: Output? = null

    private var protectedItemsCount: Output? = null

    private var resourceGuardOperationRequests: Output>? = null

    private var subProtectionPolicy: 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 'GenericProtectionPolicy'.
     */
    @JvmName("sqqfesctvigfmcuy")
    public suspend fun backupManagementType(`value`: Output) {
        this.backupManagementType = value
    }

    /**
     * @param value Name of this policy's fabric.
     */
    @JvmName("mlerthrtfjbyiwnc")
    public suspend fun fabricName(`value`: Output) {
        this.fabricName = value
    }

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

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

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

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

    /**
     * @param value List of sub-protection policies which includes schedule and retention
     */
    @JvmName("geqpuvyseauflhnu")
    public suspend fun subProtectionPolicy(`value`: Output>) {
        this.subProtectionPolicy = value
    }

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

    /**
     * @param values List of sub-protection policies which includes schedule and retention
     */
    @JvmName("ddhrupusttjfslha")
    public suspend fun subProtectionPolicy(values: List>) {
        this.subProtectionPolicy = Output.all(values)
    }

    /**
     * @param value TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".
     */
    @JvmName("xtpsbgunktjpqvkd")
    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 'GenericProtectionPolicy'.
     */
    @JvmName("hwmpvlsfmgfpgqes")
    public suspend fun backupManagementType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupManagementType = mapped
    }

    /**
     * @param value Name of this policy's fabric.
     */
    @JvmName("rcyevxxiigtgjnmf")
    public suspend fun fabricName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fabricName = mapped
    }

    /**
     * @param value Number of items associated with this policy.
     */
    @JvmName("yfdgrfwaaiavbhwu")
    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("cknpefkgoqkqwbdj")
    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("mfuxbocnkwiscnda")
    public suspend fun resourceGuardOperationRequests(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceGuardOperationRequests = mapped
    }

    /**
     * @param value List of sub-protection policies which includes schedule and retention
     */
    @JvmName("wdwrfmrbqxcyuieh")
    public suspend fun subProtectionPolicy(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subProtectionPolicy = mapped
    }

    /**
     * @param argument List of sub-protection policies which includes schedule and retention
     */
    @JvmName("mokhwqdnhokkatwg")
    public suspend fun subProtectionPolicy(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SubProtectionPolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.subProtectionPolicy = mapped
    }

    /**
     * @param argument List of sub-protection policies which includes schedule and retention
     */
    @JvmName("coafpskyqskajpxj")
    public suspend fun subProtectionPolicy(vararg argument: suspend SubProtectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SubProtectionPolicyArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.subProtectionPolicy = mapped
    }

    /**
     * @param argument List of sub-protection policies which includes schedule and retention
     */
    @JvmName("oiumljlgfegfvpwy")
    public suspend fun subProtectionPolicy(argument: suspend SubProtectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SubProtectionPolicyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.subProtectionPolicy = mapped
    }

    /**
     * @param values List of sub-protection policies which includes schedule and retention
     */
    @JvmName("crqrxhkddsvsgdxh")
    public suspend fun subProtectionPolicy(vararg values: SubProtectionPolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subProtectionPolicy = mapped
    }

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

    internal fun build(): GenericProtectionPolicyArgs = GenericProtectionPolicyArgs(
        backupManagementType = backupManagementType ?: throw
            PulumiNullFieldException("backupManagementType"),
        fabricName = fabricName,
        protectedItemsCount = protectedItemsCount,
        resourceGuardOperationRequests = resourceGuardOperationRequests,
        subProtectionPolicy = subProtectionPolicy,
        timeZone = timeZone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy