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

com.pulumi.azurenative.web.kotlin.WebAppBackupConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.web.kotlin

import com.pulumi.azurenative.web.WebAppBackupConfigurationArgs.builder
import com.pulumi.azurenative.web.kotlin.inputs.BackupScheduleArgs
import com.pulumi.azurenative.web.kotlin.inputs.BackupScheduleArgsBuilder
import com.pulumi.azurenative.web.kotlin.inputs.DatabaseBackupSettingArgs
import com.pulumi.azurenative.web.kotlin.inputs.DatabaseBackupSettingArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Description of a backup which will be performed.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2016-08-01, 2020-10-01, 2023-01-01, 2023-12-01.
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:web:WebAppBackupConfiguration myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup
 * ```
 * @property backupName Name of the backup.
 * @property backupSchedule Schedule for the backup if it is executed periodically.
 * @property databases Databases included in the backup.
 * @property enabled True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled.
 * @property kind Kind of resource.
 * @property name Name of the app.
 * @property resourceGroupName Name of the resource group to which the resource belongs.
 * @property storageAccountUrl SAS URL to the container.
 */
public data class WebAppBackupConfigurationArgs(
    public val backupName: Output? = null,
    public val backupSchedule: Output? = null,
    public val databases: Output>? = null,
    public val enabled: Output? = null,
    public val kind: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val storageAccountUrl: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.WebAppBackupConfigurationArgs =
        com.pulumi.azurenative.web.WebAppBackupConfigurationArgs.builder()
            .backupName(backupName?.applyValue({ args0 -> args0 }))
            .backupSchedule(backupSchedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .databases(
                databases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .storageAccountUrl(storageAccountUrl?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [WebAppBackupConfigurationArgs].
 */
@PulumiTagMarker
public class WebAppBackupConfigurationArgsBuilder internal constructor() {
    private var backupName: Output? = null

    private var backupSchedule: Output? = null

    private var databases: Output>? = null

    private var enabled: Output? = null

    private var kind: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var storageAccountUrl: Output? = null

    /**
     * @param value Name of the backup.
     */
    @JvmName("satuagoylgxlrirv")
    public suspend fun backupName(`value`: Output) {
        this.backupName = value
    }

    /**
     * @param value Schedule for the backup if it is executed periodically.
     */
    @JvmName("elnbadutfrndatwl")
    public suspend fun backupSchedule(`value`: Output) {
        this.backupSchedule = value
    }

    /**
     * @param value Databases included in the backup.
     */
    @JvmName("prhmlbaqhsqpvela")
    public suspend fun databases(`value`: Output>) {
        this.databases = value
    }

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

    /**
     * @param values Databases included in the backup.
     */
    @JvmName("rarlcllkknlheosn")
    public suspend fun databases(values: List>) {
        this.databases = Output.all(values)
    }

    /**
     * @param value True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled.
     */
    @JvmName("bhwdkpbfqwlwfsdo")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Kind of resource.
     */
    @JvmName("xgvsrvyqbprvvtxn")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Name of the app.
     */
    @JvmName("lutvbtqruufnekjx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("gixwpyflfwruqivo")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value SAS URL to the container.
     */
    @JvmName("bxiuqxkkllnhvcsh")
    public suspend fun storageAccountUrl(`value`: Output) {
        this.storageAccountUrl = value
    }

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

    /**
     * @param value Schedule for the backup if it is executed periodically.
     */
    @JvmName("hvibnhikhlqtubfh")
    public suspend fun backupSchedule(`value`: BackupScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupSchedule = mapped
    }

    /**
     * @param argument Schedule for the backup if it is executed periodically.
     */
    @JvmName("pcatahdangwhevij")
    public suspend fun backupSchedule(argument: suspend BackupScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = BackupScheduleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backupSchedule = mapped
    }

    /**
     * @param value Databases included in the backup.
     */
    @JvmName("kdblmjujrcluqtps")
    public suspend fun databases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databases = mapped
    }

    /**
     * @param argument Databases included in the backup.
     */
    @JvmName("dnoghwjhtkirykad")
    public suspend fun databases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DatabaseBackupSettingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param argument Databases included in the backup.
     */
    @JvmName("amvfcotkmqfebyig")
    public suspend fun databases(vararg argument: suspend DatabaseBackupSettingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DatabaseBackupSettingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param argument Databases included in the backup.
     */
    @JvmName("pdfvxrveerjwcybs")
    public suspend fun databases(argument: suspend DatabaseBackupSettingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DatabaseBackupSettingArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param values Databases included in the backup.
     */
    @JvmName("sjpcxuwibfmnutwu")
    public suspend fun databases(vararg values: DatabaseBackupSettingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.databases = mapped
    }

    /**
     * @param value True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled.
     */
    @JvmName("cnetytyejdhbkgos")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Kind of resource.
     */
    @JvmName("ygaqiyrdyfjorjsi")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Name of the app.
     */
    @JvmName("qcurtymrfdudixqd")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Name of the resource group to which the resource belongs.
     */
    @JvmName("mdhcxlfbvlurnfmm")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value SAS URL to the container.
     */
    @JvmName("ppbgxsssgutwtvvm")
    public suspend fun storageAccountUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageAccountUrl = mapped
    }

    internal fun build(): WebAppBackupConfigurationArgs = WebAppBackupConfigurationArgs(
        backupName = backupName,
        backupSchedule = backupSchedule,
        databases = databases,
        enabled = enabled,
        kind = kind,
        name = name,
        resourceGroupName = resourceGroupName,
        storageAccountUrl = storageAccountUrl,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy