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

com.pulumi.azurenative.recoveryservices.kotlin.inputs.AzureSqlProtectionPolicyArgs.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.AzureSqlProtectionPolicyArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Azure SQL 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 'AzureSql'.
 * @property protectedItemsCount Number of items associated with this policy.
 * @property resourceGuardOperationRequests ResourceGuard Operation Requests
 * @property retentionPolicy Retention policy details.
 */
public data class AzureSqlProtectionPolicyArgs(
    public val backupManagementType: Output,
    public val protectedItemsCount: Output? = null,
    public val resourceGuardOperationRequests: Output>? = null,
    public val retentionPolicy: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.recoveryservices.inputs.AzureSqlProtectionPolicyArgs = com.pulumi.azurenative.recoveryservices.inputs.AzureSqlProtectionPolicyArgs.builder()
        .backupManagementType(backupManagementType.applyValue({ args0 -> args0 }))
        .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()
                    })
                })
            }),
        ).build()
}

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

    private var protectedItemsCount: Output? = null

    private var resourceGuardOperationRequests: Output>? = null

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

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

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

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

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

    /**
     * @param value Retention policy details.
     */
    @JvmName("pyyffvhssgyosimy")
    public suspend fun retentionPolicy(`value`: Output>) {
        this.retentionPolicy = 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 'AzureSql'.
     */
    @JvmName("ledivqgavgctccff")
    public suspend fun backupManagementType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupManagementType = mapped
    }

    /**
     * @param value Number of items associated with this policy.
     */
    @JvmName("hfvvndufjkmuhcpi")
    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("mkpwobuhhdwtelby")
    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("dkmgobiwtqrfngmn")
    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 details.
     */
    @JvmName("fvcdxqkwncxavsvg")
    public suspend fun retentionPolicy(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param value Retention policy details.
     */
    @JvmName("suhipqdmjkicqvru")
    public fun retentionPolicy(`value`: LongTermRetentionPolicyArgs) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    /**
     * @param value Retention policy details.
     */
    @JvmName("njbkxmmuxtubwlwl")
    public fun retentionPolicy(`value`: SimpleRetentionPolicyArgs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

    internal fun build(): AzureSqlProtectionPolicyArgs = AzureSqlProtectionPolicyArgs(
        backupManagementType = backupManagementType ?: throw
            PulumiNullFieldException("backupManagementType"),
        protectedItemsCount = protectedItemsCount,
        resourceGuardOperationRequests = resourceGuardOperationRequests,
        retentionPolicy = retentionPolicy,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy