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

com.pulumi.azure.siterecovery.kotlin.inputs.ReplicationRecoveryPlanRecoveryGroupArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.siterecovery.kotlin.inputs

import com.pulumi.azure.siterecovery.inputs.ReplicationRecoveryPlanRecoveryGroupArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property postActions one or more `action` block as defined below. which will be executed after the group recovery.
 * @property preActions one or more `action` block as defined below. which will be executed before the group recovery.
 * @property replicatedProtectedItems One or more protected VM IDs. It must not be specified when `type` is `Shutdown`.
 * @property type The Recovery Plan Group Type. Possible values are `Boot`, `Failover` and `Shutdown`.
 */
public data class ReplicationRecoveryPlanRecoveryGroupArgs(
    public val postActions: Output>? = null,
    public val preActions: Output>? = null,
    public val replicatedProtectedItems: Output>? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.siterecovery.inputs.ReplicationRecoveryPlanRecoveryGroupArgs =
        com.pulumi.azure.siterecovery.inputs.ReplicationRecoveryPlanRecoveryGroupArgs.builder()
            .postActions(
                postActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .preActions(
                preActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .replicatedProtectedItems(
                replicatedProtectedItems?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

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

    private var preActions: Output>? = null

    private var replicatedProtectedItems: Output>? = null

    private var type: Output? = null

    /**
     * @param value one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("wistuhipdasdlkom")
    public suspend fun postActions(`value`: Output>) {
        this.postActions = value
    }

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

    /**
     * @param values one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("xgnlrxvpclxxhfdb")
    public suspend fun postActions(values: List>) {
        this.postActions = Output.all(values)
    }

    /**
     * @param value one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("cwpqnsepjcbxuhrk")
    public suspend fun preActions(`value`: Output>) {
        this.preActions = value
    }

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

    /**
     * @param values one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("momxipvlxnkpadwv")
    public suspend fun preActions(values: List>) {
        this.preActions = Output.all(values)
    }

    /**
     * @param value One or more protected VM IDs. It must not be specified when `type` is `Shutdown`.
     */
    @JvmName("elfiqwklefottvev")
    public suspend fun replicatedProtectedItems(`value`: Output>) {
        this.replicatedProtectedItems = value
    }

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

    /**
     * @param values One or more protected VM IDs. It must not be specified when `type` is `Shutdown`.
     */
    @JvmName("wtxnfjvktpvclpnx")
    public suspend fun replicatedProtectedItems(values: List>) {
        this.replicatedProtectedItems = Output.all(values)
    }

    /**
     * @param value The Recovery Plan Group Type. Possible values are `Boot`, `Failover` and `Shutdown`.
     */
    @JvmName("wcbblyjjetuqwxso")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("nkhtwkghlpsqyfrg")
    public suspend fun postActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.postActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("jdlscgbiaryjaemn")
    public suspend fun postActions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ReplicationRecoveryPlanRecoveryGroupPostActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.postActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("ssnwbqiixaqmdvol")
    public suspend fun postActions(vararg argument: suspend ReplicationRecoveryPlanRecoveryGroupPostActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ReplicationRecoveryPlanRecoveryGroupPostActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.postActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("ogqcgukadyfqkfvl")
    public suspend fun postActions(argument: suspend ReplicationRecoveryPlanRecoveryGroupPostActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ReplicationRecoveryPlanRecoveryGroupPostActionArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.postActions = mapped
    }

    /**
     * @param values one or more `action` block as defined below. which will be executed after the group recovery.
     */
    @JvmName("vafrcxwmvlpnqpgo")
    public suspend fun postActions(vararg values: ReplicationRecoveryPlanRecoveryGroupPostActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.postActions = mapped
    }

    /**
     * @param value one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("ujlukvpkiqajvhmp")
    public suspend fun preActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("nfhnufyvhqyggjhs")
    public suspend fun preActions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ReplicationRecoveryPlanRecoveryGroupPreActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("hbhyetkjicdxkdtn")
    public suspend fun preActions(vararg argument: suspend ReplicationRecoveryPlanRecoveryGroupPreActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ReplicationRecoveryPlanRecoveryGroupPreActionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preActions = mapped
    }

    /**
     * @param argument one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("slujxsqukyebipqb")
    public suspend fun preActions(argument: suspend ReplicationRecoveryPlanRecoveryGroupPreActionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ReplicationRecoveryPlanRecoveryGroupPreActionArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.preActions = mapped
    }

    /**
     * @param values one or more `action` block as defined below. which will be executed before the group recovery.
     */
    @JvmName("lxlgtsmhimqxisnl")
    public suspend fun preActions(vararg values: ReplicationRecoveryPlanRecoveryGroupPreActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.preActions = mapped
    }

    /**
     * @param value One or more protected VM IDs. It must not be specified when `type` is `Shutdown`.
     */
    @JvmName("jrtfepbhpbjdufah")
    public suspend fun replicatedProtectedItems(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replicatedProtectedItems = mapped
    }

    /**
     * @param values One or more protected VM IDs. It must not be specified when `type` is `Shutdown`.
     */
    @JvmName("ybaxrfstsuudanwo")
    public suspend fun replicatedProtectedItems(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.replicatedProtectedItems = mapped
    }

    /**
     * @param value The Recovery Plan Group Type. Possible values are `Boot`, `Failover` and `Shutdown`.
     */
    @JvmName("kkxdjwrucpcpmaxl")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ReplicationRecoveryPlanRecoveryGroupArgs =
        ReplicationRecoveryPlanRecoveryGroupArgs(
            postActions = postActions,
            preActions = preActions,
            replicatedProtectedItems = replicatedProtectedItems,
            type = type ?: throw PulumiNullFieldException("type"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy