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

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

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

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

import com.pulumi.azurenative.recoveryservices.inputs.AzureVmWorkloadSQLDatabaseProtectedItemArgs.builder
import com.pulumi.azurenative.recoveryservices.kotlin.enums.CreateMode
import com.pulumi.azurenative.recoveryservices.kotlin.enums.LastBackupStatus
import com.pulumi.azurenative.recoveryservices.kotlin.enums.ProtectedItemHealthStatus
import com.pulumi.azurenative.recoveryservices.kotlin.enums.ProtectionState
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.Boolean
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

/**
 * Azure VM workload-specific protected item representing SQL Database.
 * @property backupSetName Name of the backup set the backup item belongs to
 * @property containerName Unique name of container
 * @property createMode Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
 * @property deferredDeleteTimeInUTC Time for deferred deletion in UTC
 * @property deferredDeleteTimeRemaining Time remaining before the DS marked for deferred delete is permanently deleted
 * @property extendedInfo Additional information for this backup item.
 * @property isArchiveEnabled Flag to identify whether datasource is protected in archive
 * @property isDeferredDeleteScheduleUpcoming Flag to identify whether the deferred deleted DS is to be purged soon
 * @property isRehydrate Flag to identify that deferred deleted DS is to be moved into Pause state
 * @property isScheduledForDeferredDelete Flag to identify whether the DS is scheduled for deferred delete
 * @property kpisHealths Health details of different KPIs
 * @property lastBackupStatus Last backup operation status. Possible values: Healthy, Unhealthy.
 * @property lastBackupTime Timestamp of the last backup operation on this backup item.
 * @property lastRecoveryPoint Timestamp when the last (latest) backup copy was created for this backup item.
 * @property nodesList List of the nodes in case of distributed container.
 * @property parentName Parent name of the DB such as Instance or Availability Group.
 * @property parentType Parent type of protected item, example: for a DB, standalone server or distributed
 * @property policyId ID of the backup policy with which this item is backed up.
 * @property policyName Name of the policy used for protection
 * @property protectedItemDataSourceId Data ID of the protected item.
 * @property protectedItemHealthStatus Health status of the backup item, evaluated based on last heartbeat received
 * @property protectedItemType backup item type.
 * Expected value is 'AzureVmWorkloadSQLDatabase'.
 * @property protectionState Backup state of this backup item.
 * @property resourceGuardOperationRequests ResourceGuardOperationRequests on which LAC check will be performed
 * @property serverName Host/Cluster Name for instance or AG
 * @property softDeleteRetentionPeriodInDays Soft delete retention period in days
 * @property sourceResourceId ARM ID of the resource to be backed up.
 */
public data class AzureVmWorkloadSQLDatabaseProtectedItemArgs(
    public val backupSetName: Output? = null,
    public val containerName: Output? = null,
    public val createMode: Output>? = null,
    public val deferredDeleteTimeInUTC: Output? = null,
    public val deferredDeleteTimeRemaining: Output? = null,
    public val extendedInfo: Output? = null,
    public val isArchiveEnabled: Output? = null,
    public val isDeferredDeleteScheduleUpcoming: Output? = null,
    public val isRehydrate: Output? = null,
    public val isScheduledForDeferredDelete: Output? = null,
    public val kpisHealths: Output>? = null,
    public val lastBackupStatus: Output>? = null,
    public val lastBackupTime: Output? = null,
    public val lastRecoveryPoint: Output? = null,
    public val nodesList: Output>? = null,
    public val parentName: Output? = null,
    public val parentType: Output? = null,
    public val policyId: Output? = null,
    public val policyName: Output? = null,
    public val protectedItemDataSourceId: Output? = null,
    public val protectedItemHealthStatus: Output>? = null,
    public val protectedItemType: Output,
    public val protectionState: Output>? = null,
    public val resourceGuardOperationRequests: Output>? = null,
    public val serverName: Output? = null,
    public val softDeleteRetentionPeriodInDays: Output? = null,
    public val sourceResourceId: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.recoveryservices.inputs.AzureVmWorkloadSQLDatabaseProtectedItemArgs =
        com.pulumi.azurenative.recoveryservices.inputs.AzureVmWorkloadSQLDatabaseProtectedItemArgs.builder()
            .backupSetName(backupSetName?.applyValue({ args0 -> args0 }))
            .containerName(containerName?.applyValue({ args0 -> args0 }))
            .createMode(
                createMode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .deferredDeleteTimeInUTC(deferredDeleteTimeInUTC?.applyValue({ args0 -> args0 }))
            .deferredDeleteTimeRemaining(deferredDeleteTimeRemaining?.applyValue({ args0 -> args0 }))
            .extendedInfo(extendedInfo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .isArchiveEnabled(isArchiveEnabled?.applyValue({ args0 -> args0 }))
            .isDeferredDeleteScheduleUpcoming(isDeferredDeleteScheduleUpcoming?.applyValue({ args0 -> args0 }))
            .isRehydrate(isRehydrate?.applyValue({ args0 -> args0 }))
            .isScheduledForDeferredDelete(isScheduledForDeferredDelete?.applyValue({ args0 -> args0 }))
            .kpisHealths(
                kpisHealths?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .lastBackupStatus(
                lastBackupStatus?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .lastBackupTime(lastBackupTime?.applyValue({ args0 -> args0 }))
            .lastRecoveryPoint(lastRecoveryPoint?.applyValue({ args0 -> args0 }))
            .nodesList(
                nodesList?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .parentName(parentName?.applyValue({ args0 -> args0 }))
            .parentType(parentType?.applyValue({ args0 -> args0 }))
            .policyId(policyId?.applyValue({ args0 -> args0 }))
            .policyName(policyName?.applyValue({ args0 -> args0 }))
            .protectedItemDataSourceId(protectedItemDataSourceId?.applyValue({ args0 -> args0 }))
            .protectedItemHealthStatus(
                protectedItemHealthStatus?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .protectedItemType(protectedItemType.applyValue({ args0 -> args0 }))
            .protectionState(
                protectionState?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGuardOperationRequests(
                resourceGuardOperationRequests?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .serverName(serverName?.applyValue({ args0 -> args0 }))
            .softDeleteRetentionPeriodInDays(softDeleteRetentionPeriodInDays?.applyValue({ args0 -> args0 }))
            .sourceResourceId(sourceResourceId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AzureVmWorkloadSQLDatabaseProtectedItemArgs].
 */
@PulumiTagMarker
public class AzureVmWorkloadSQLDatabaseProtectedItemArgsBuilder internal constructor() {
    private var backupSetName: Output? = null

    private var containerName: Output? = null

    private var createMode: Output>? = null

    private var deferredDeleteTimeInUTC: Output? = null

    private var deferredDeleteTimeRemaining: Output? = null

    private var extendedInfo: Output? = null

    private var isArchiveEnabled: Output? = null

    private var isDeferredDeleteScheduleUpcoming: Output? = null

    private var isRehydrate: Output? = null

    private var isScheduledForDeferredDelete: Output? = null

    private var kpisHealths: Output>? = null

    private var lastBackupStatus: Output>? = null

    private var lastBackupTime: Output? = null

    private var lastRecoveryPoint: Output? = null

    private var nodesList: Output>? = null

    private var parentName: Output? = null

    private var parentType: Output? = null

    private var policyId: Output? = null

    private var policyName: Output? = null

    private var protectedItemDataSourceId: Output? = null

    private var protectedItemHealthStatus: Output>? = null

    private var protectedItemType: Output? = null

    private var protectionState: Output>? = null

    private var resourceGuardOperationRequests: Output>? = null

    private var serverName: Output? = null

    private var softDeleteRetentionPeriodInDays: Output? = null

    private var sourceResourceId: Output? = null

    /**
     * @param value Name of the backup set the backup item belongs to
     */
    @JvmName("nfkrrgkldnytwvta")
    public suspend fun backupSetName(`value`: Output) {
        this.backupSetName = value
    }

    /**
     * @param value Unique name of container
     */
    @JvmName("wrillwqdbvuxqnsv")
    public suspend fun containerName(`value`: Output) {
        this.containerName = value
    }

    /**
     * @param value Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
     */
    @JvmName("uuieiouubaysifja")
    public suspend fun createMode(`value`: Output>) {
        this.createMode = value
    }

    /**
     * @param value Time for deferred deletion in UTC
     */
    @JvmName("xbcxhnvjmvcgvois")
    public suspend fun deferredDeleteTimeInUTC(`value`: Output) {
        this.deferredDeleteTimeInUTC = value
    }

    /**
     * @param value Time remaining before the DS marked for deferred delete is permanently deleted
     */
    @JvmName("gisqavmcvqmhwssr")
    public suspend fun deferredDeleteTimeRemaining(`value`: Output) {
        this.deferredDeleteTimeRemaining = value
    }

    /**
     * @param value Additional information for this backup item.
     */
    @JvmName("qvfhhmgcehhgcnkn")
    public suspend fun extendedInfo(`value`: Output) {
        this.extendedInfo = value
    }

    /**
     * @param value Flag to identify whether datasource is protected in archive
     */
    @JvmName("ipnljuurcsiawrdc")
    public suspend fun isArchiveEnabled(`value`: Output) {
        this.isArchiveEnabled = value
    }

    /**
     * @param value Flag to identify whether the deferred deleted DS is to be purged soon
     */
    @JvmName("goxpfrlhcloefpvl")
    public suspend fun isDeferredDeleteScheduleUpcoming(`value`: Output) {
        this.isDeferredDeleteScheduleUpcoming = value
    }

    /**
     * @param value Flag to identify that deferred deleted DS is to be moved into Pause state
     */
    @JvmName("pvqxbculkstnmmga")
    public suspend fun isRehydrate(`value`: Output) {
        this.isRehydrate = value
    }

    /**
     * @param value Flag to identify whether the DS is scheduled for deferred delete
     */
    @JvmName("eevmfqjhfskpkldf")
    public suspend fun isScheduledForDeferredDelete(`value`: Output) {
        this.isScheduledForDeferredDelete = value
    }

    /**
     * @param value Health details of different KPIs
     */
    @JvmName("hayemlbuijffqrkf")
    public suspend fun kpisHealths(`value`: Output>) {
        this.kpisHealths = value
    }

    /**
     * @param value Last backup operation status. Possible values: Healthy, Unhealthy.
     */
    @JvmName("sgnriqiygajkvgcn")
    public suspend fun lastBackupStatus(`value`: Output>) {
        this.lastBackupStatus = value
    }

    /**
     * @param value Timestamp of the last backup operation on this backup item.
     */
    @JvmName("smoyqwqkrjmryeea")
    public suspend fun lastBackupTime(`value`: Output) {
        this.lastBackupTime = value
    }

    /**
     * @param value Timestamp when the last (latest) backup copy was created for this backup item.
     */
    @JvmName("dvxamkkoopqnvvng")
    public suspend fun lastRecoveryPoint(`value`: Output) {
        this.lastRecoveryPoint = value
    }

    /**
     * @param value List of the nodes in case of distributed container.
     */
    @JvmName("btlrhuxjsqacqlrr")
    public suspend fun nodesList(`value`: Output>) {
        this.nodesList = value
    }

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

    /**
     * @param values List of the nodes in case of distributed container.
     */
    @JvmName("rjvlscnlslqckfwl")
    public suspend fun nodesList(values: List>) {
        this.nodesList = Output.all(values)
    }

    /**
     * @param value Parent name of the DB such as Instance or Availability Group.
     */
    @JvmName("wudesqabokyvyjij")
    public suspend fun parentName(`value`: Output) {
        this.parentName = value
    }

    /**
     * @param value Parent type of protected item, example: for a DB, standalone server or distributed
     */
    @JvmName("pwwrtdnilrbfixxj")
    public suspend fun parentType(`value`: Output) {
        this.parentType = value
    }

    /**
     * @param value ID of the backup policy with which this item is backed up.
     */
    @JvmName("fefniktqwfmckxgs")
    public suspend fun policyId(`value`: Output) {
        this.policyId = value
    }

    /**
     * @param value Name of the policy used for protection
     */
    @JvmName("hgaefkoyveuhmvyl")
    public suspend fun policyName(`value`: Output) {
        this.policyName = value
    }

    /**
     * @param value Data ID of the protected item.
     */
    @JvmName("qywffjheuowbmrwe")
    public suspend fun protectedItemDataSourceId(`value`: Output) {
        this.protectedItemDataSourceId = value
    }

    /**
     * @param value Health status of the backup item, evaluated based on last heartbeat received
     */
    @JvmName("eynigpcrrcqpnoar")
    public suspend fun protectedItemHealthStatus(`value`: Output>) {
        this.protectedItemHealthStatus = value
    }

    /**
     * @param value backup item type.
     * Expected value is 'AzureVmWorkloadSQLDatabase'.
     */
    @JvmName("jtcmfufnmhhoqnaw")
    public suspend fun protectedItemType(`value`: Output) {
        this.protectedItemType = value
    }

    /**
     * @param value Backup state of this backup item.
     */
    @JvmName("wmjgyldhsgduotfu")
    public suspend fun protectionState(`value`: Output>) {
        this.protectionState = value
    }

    /**
     * @param value ResourceGuardOperationRequests on which LAC check will be performed
     */
    @JvmName("jofmiryrejqhdjqt")
    public suspend fun resourceGuardOperationRequests(`value`: Output>) {
        this.resourceGuardOperationRequests = value
    }

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

    /**
     * @param values ResourceGuardOperationRequests on which LAC check will be performed
     */
    @JvmName("gfwslbfmesycrntq")
    public suspend fun resourceGuardOperationRequests(values: List>) {
        this.resourceGuardOperationRequests = Output.all(values)
    }

    /**
     * @param value Host/Cluster Name for instance or AG
     */
    @JvmName("llfiunreaqjdgvus")
    public suspend fun serverName(`value`: Output) {
        this.serverName = value
    }

    /**
     * @param value Soft delete retention period in days
     */
    @JvmName("nlbtfojpyqyrvlkl")
    public suspend fun softDeleteRetentionPeriodInDays(`value`: Output) {
        this.softDeleteRetentionPeriodInDays = value
    }

    /**
     * @param value ARM ID of the resource to be backed up.
     */
    @JvmName("khyrentjkqtqytye")
    public suspend fun sourceResourceId(`value`: Output) {
        this.sourceResourceId = value
    }

    /**
     * @param value Name of the backup set the backup item belongs to
     */
    @JvmName("fttdfpldympfywlj")
    public suspend fun backupSetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupSetName = mapped
    }

    /**
     * @param value Unique name of container
     */
    @JvmName("mmmflfixupghbmjm")
    public suspend fun containerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerName = mapped
    }

    /**
     * @param value Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
     */
    @JvmName("fqmkjochdsehesoh")
    public suspend fun createMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createMode = mapped
    }

    /**
     * @param value Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
     */
    @JvmName("bjpyvugbtxffvolj")
    public fun createMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.createMode = mapped
    }

    /**
     * @param value Create mode to indicate recovery of existing soft deleted data source or creation of new data source.
     */
    @JvmName("ydsaplddyoxptjds")
    public fun createMode(`value`: CreateMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.createMode = mapped
    }

    /**
     * @param value Time for deferred deletion in UTC
     */
    @JvmName("mxupycewofprltnb")
    public suspend fun deferredDeleteTimeInUTC(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deferredDeleteTimeInUTC = mapped
    }

    /**
     * @param value Time remaining before the DS marked for deferred delete is permanently deleted
     */
    @JvmName("yisbmgyokdedldrr")
    public suspend fun deferredDeleteTimeRemaining(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deferredDeleteTimeRemaining = mapped
    }

    /**
     * @param value Additional information for this backup item.
     */
    @JvmName("vfytahemgnwursus")
    public suspend fun extendedInfo(`value`: AzureVmWorkloadProtectedItemExtendedInfoArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedInfo = mapped
    }

    /**
     * @param argument Additional information for this backup item.
     */
    @JvmName("rxehncdbondkmavq")
    public suspend fun extendedInfo(argument: suspend AzureVmWorkloadProtectedItemExtendedInfoArgsBuilder.() -> Unit) {
        val toBeMapped = AzureVmWorkloadProtectedItemExtendedInfoArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.extendedInfo = mapped
    }

    /**
     * @param value Flag to identify whether datasource is protected in archive
     */
    @JvmName("mjaxbgfkkqlivuar")
    public suspend fun isArchiveEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isArchiveEnabled = mapped
    }

    /**
     * @param value Flag to identify whether the deferred deleted DS is to be purged soon
     */
    @JvmName("hqbuyqvuewdrfbhg")
    public suspend fun isDeferredDeleteScheduleUpcoming(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isDeferredDeleteScheduleUpcoming = mapped
    }

    /**
     * @param value Flag to identify that deferred deleted DS is to be moved into Pause state
     */
    @JvmName("gyihmctwfcfplueh")
    public suspend fun isRehydrate(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isRehydrate = mapped
    }

    /**
     * @param value Flag to identify whether the DS is scheduled for deferred delete
     */
    @JvmName("vgjmbepgigimbobo")
    public suspend fun isScheduledForDeferredDelete(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isScheduledForDeferredDelete = mapped
    }

    /**
     * @param value Health details of different KPIs
     */
    @JvmName("bnmmjggqearigbcp")
    public suspend fun kpisHealths(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kpisHealths = mapped
    }

    /**
     * @param argument Health details of different KPIs
     */
    @JvmName("uryyvgrxcrwebloj")
    public suspend fun kpisHealths(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                KPIResourceHealthDetailsArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.kpisHealths = mapped
    }

    /**
     * @param values Health details of different KPIs
     */
    @JvmName("qhiktghtkmbnabwp")
    public fun kpisHealths(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kpisHealths = mapped
    }

    /**
     * @param value Last backup operation status. Possible values: Healthy, Unhealthy.
     */
    @JvmName("udefmlhbvexkscaf")
    public suspend fun lastBackupStatus(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastBackupStatus = mapped
    }

    /**
     * @param value Last backup operation status. Possible values: Healthy, Unhealthy.
     */
    @JvmName("hhhfsbacjovbkeae")
    public fun lastBackupStatus(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lastBackupStatus = mapped
    }

    /**
     * @param value Last backup operation status. Possible values: Healthy, Unhealthy.
     */
    @JvmName("sihaxwiuasqiesqf")
    public fun lastBackupStatus(`value`: LastBackupStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lastBackupStatus = mapped
    }

    /**
     * @param value Timestamp of the last backup operation on this backup item.
     */
    @JvmName("jovsdlyritjtgbwl")
    public suspend fun lastBackupTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastBackupTime = mapped
    }

    /**
     * @param value Timestamp when the last (latest) backup copy was created for this backup item.
     */
    @JvmName("imifiwmmrqsetgbc")
    public suspend fun lastRecoveryPoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastRecoveryPoint = mapped
    }

    /**
     * @param value List of the nodes in case of distributed container.
     */
    @JvmName("omdqahtuqfkmlnja")
    public suspend fun nodesList(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodesList = mapped
    }

    /**
     * @param argument List of the nodes in case of distributed container.
     */
    @JvmName("fpuogunhqjekssim")
    public suspend fun nodesList(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DistributedNodesInfoArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.nodesList = mapped
    }

    /**
     * @param argument List of the nodes in case of distributed container.
     */
    @JvmName("mjlryltjysfoqaxp")
    public suspend fun nodesList(vararg argument: suspend DistributedNodesInfoArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DistributedNodesInfoArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.nodesList = mapped
    }

    /**
     * @param argument List of the nodes in case of distributed container.
     */
    @JvmName("ydbeoslgalajguuv")
    public suspend fun nodesList(argument: suspend DistributedNodesInfoArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DistributedNodesInfoArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.nodesList = mapped
    }

    /**
     * @param values List of the nodes in case of distributed container.
     */
    @JvmName("nfbfcilnfiurhbis")
    public suspend fun nodesList(vararg values: DistributedNodesInfoArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nodesList = mapped
    }

    /**
     * @param value Parent name of the DB such as Instance or Availability Group.
     */
    @JvmName("pkjifctwkwquvoqa")
    public suspend fun parentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentName = mapped
    }

    /**
     * @param value Parent type of protected item, example: for a DB, standalone server or distributed
     */
    @JvmName("hqhbmwrebtbxjywa")
    public suspend fun parentType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentType = mapped
    }

    /**
     * @param value ID of the backup policy with which this item is backed up.
     */
    @JvmName("vlpwixknxolbdbux")
    public suspend fun policyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyId = mapped
    }

    /**
     * @param value Name of the policy used for protection
     */
    @JvmName("lfvimauhrayttjna")
    public suspend fun policyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyName = mapped
    }

    /**
     * @param value Data ID of the protected item.
     */
    @JvmName("pqxyqlemeacyxaui")
    public suspend fun protectedItemDataSourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectedItemDataSourceId = mapped
    }

    /**
     * @param value Health status of the backup item, evaluated based on last heartbeat received
     */
    @JvmName("pebwfayihcommxli")
    public suspend fun protectedItemHealthStatus(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectedItemHealthStatus = mapped
    }

    /**
     * @param value Health status of the backup item, evaluated based on last heartbeat received
     */
    @JvmName("pmvpikaobqpjigvg")
    public fun protectedItemHealthStatus(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectedItemHealthStatus = mapped
    }

    /**
     * @param value Health status of the backup item, evaluated based on last heartbeat received
     */
    @JvmName("clqdbbrhcqklknen")
    public fun protectedItemHealthStatus(`value`: ProtectedItemHealthStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectedItemHealthStatus = mapped
    }

    /**
     * @param value backup item type.
     * Expected value is 'AzureVmWorkloadSQLDatabase'.
     */
    @JvmName("vqpahwqbvxydcrfl")
    public suspend fun protectedItemType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectedItemType = mapped
    }

    /**
     * @param value Backup state of this backup item.
     */
    @JvmName("qekfwirifwlkrfqi")
    public suspend fun protectionState(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protectionState = mapped
    }

    /**
     * @param value Backup state of this backup item.
     */
    @JvmName("pqlflnvoxjgctbxc")
    public fun protectionState(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectionState = mapped
    }

    /**
     * @param value Backup state of this backup item.
     */
    @JvmName("itdgulkqehdnbhio")
    public fun protectionState(`value`: ProtectionState) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protectionState = mapped
    }

    /**
     * @param value ResourceGuardOperationRequests on which LAC check will be performed
     */
    @JvmName("ncvauulqtbctgrsu")
    public suspend fun resourceGuardOperationRequests(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGuardOperationRequests = mapped
    }

    /**
     * @param values ResourceGuardOperationRequests on which LAC check will be performed
     */
    @JvmName("elsmgrdgjrsmcmdi")
    public suspend fun resourceGuardOperationRequests(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceGuardOperationRequests = mapped
    }

    /**
     * @param value Host/Cluster Name for instance or AG
     */
    @JvmName("gqfkgmtagctulssw")
    public suspend fun serverName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverName = mapped
    }

    /**
     * @param value Soft delete retention period in days
     */
    @JvmName("hbvcvwfqvhppmail")
    public suspend fun softDeleteRetentionPeriodInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softDeleteRetentionPeriodInDays = mapped
    }

    /**
     * @param value ARM ID of the resource to be backed up.
     */
    @JvmName("jtkytkuepomntxbp")
    public suspend fun sourceResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceResourceId = mapped
    }

    internal fun build(): AzureVmWorkloadSQLDatabaseProtectedItemArgs =
        AzureVmWorkloadSQLDatabaseProtectedItemArgs(
            backupSetName = backupSetName,
            containerName = containerName,
            createMode = createMode,
            deferredDeleteTimeInUTC = deferredDeleteTimeInUTC,
            deferredDeleteTimeRemaining = deferredDeleteTimeRemaining,
            extendedInfo = extendedInfo,
            isArchiveEnabled = isArchiveEnabled,
            isDeferredDeleteScheduleUpcoming = isDeferredDeleteScheduleUpcoming,
            isRehydrate = isRehydrate,
            isScheduledForDeferredDelete = isScheduledForDeferredDelete,
            kpisHealths = kpisHealths,
            lastBackupStatus = lastBackupStatus,
            lastBackupTime = lastBackupTime,
            lastRecoveryPoint = lastRecoveryPoint,
            nodesList = nodesList,
            parentName = parentName,
            parentType = parentType,
            policyId = policyId,
            policyName = policyName,
            protectedItemDataSourceId = protectedItemDataSourceId,
            protectedItemHealthStatus = protectedItemHealthStatus,
            protectedItemType = protectedItemType ?: throw PulumiNullFieldException("protectedItemType"),
            protectionState = protectionState,
            resourceGuardOperationRequests = resourceGuardOperationRequests,
            serverName = serverName,
            softDeleteRetentionPeriodInDays = softDeleteRetentionPeriodInDays,
            sourceResourceId = sourceResourceId,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy