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

com.pulumi.azurenative.recoveryservices.kotlin.inputs.MabProtectionPolicyArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.recoveryservices.kotlin.inputs

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

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

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

    private var protectedItemsCount: Output? = null

    private var resourceGuardOperationRequests: Output>? = null

    private var retentionPolicy:
        Output>? = null

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

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

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

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

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

    /**
     * @param value Retention policy details.
     */
    @JvmName("kywgdihvhssxvacf")
    public suspend fun retentionPolicy(`value`: Output>) {
        this.retentionPolicy = value
    }

    /**
     * @param value Backup schedule of backup policy.
     */
    @JvmName("mxdbntnqtuutkdrt")
    public suspend fun schedulePolicy(`value`: Output) {
        this.schedulePolicy = 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 'MAB'.
     */
    @JvmName("xjcusxajfxdydidj")
    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("gkweeudkeivhvwtk")
    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("jtywomhhaqrsuclk")
    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("ypgtlmejliangihi")
    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("iioxwuvegpclfikm")
    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("oipnxexfekfeqafu")
    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("xsnjbvhbiaywgwjq")
    public fun retentionPolicy(`value`: SimpleRetentionPolicyArgs) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPolicy = mapped
    }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy