com.pulumi.azure.appservice.kotlin.inputs.AppServiceBackupArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.appservice.kotlin.inputs
import com.pulumi.azure.appservice.inputs.AppServiceBackupArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property enabled Is this Backup enabled? Defaults to `true`.
* @property name Specifies the name for this Backup.
* @property schedule A `schedule` block as defined below.
* @property storageAccountUrl The SAS URL to a Storage Container where Backups should be saved.
*/
public data class AppServiceBackupArgs(
public val enabled: Output? = null,
public val name: Output,
public val schedule: Output,
public val storageAccountUrl: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.appservice.inputs.AppServiceBackupArgs =
com.pulumi.azure.appservice.inputs.AppServiceBackupArgs.builder()
.enabled(enabled?.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 }))
.schedule(schedule.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.storageAccountUrl(storageAccountUrl.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AppServiceBackupArgs].
*/
@PulumiTagMarker
public class AppServiceBackupArgsBuilder internal constructor() {
private var enabled: Output? = null
private var name: Output? = null
private var schedule: Output? = null
private var storageAccountUrl: Output? = null
/**
* @param value Is this Backup enabled? Defaults to `true`.
*/
@JvmName("tuwjjmukvgbrwkju")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value Specifies the name for this Backup.
*/
@JvmName("ktglfwbpguiusbdn")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A `schedule` block as defined below.
*/
@JvmName("xutfjrjfldylhwcx")
public suspend fun schedule(`value`: Output) {
this.schedule = value
}
/**
* @param value The SAS URL to a Storage Container where Backups should be saved.
*/
@JvmName("saoebghhllrashys")
public suspend fun storageAccountUrl(`value`: Output) {
this.storageAccountUrl = value
}
/**
* @param value Is this Backup enabled? Defaults to `true`.
*/
@JvmName("nicrlaexfkxupcii")
public suspend fun enabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value Specifies the name for this Backup.
*/
@JvmName("hgucduxjxhbbpteq")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A `schedule` block as defined below.
*/
@JvmName("ojldwdwodqrobfla")
public suspend fun schedule(`value`: AppServiceBackupScheduleArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.schedule = mapped
}
/**
* @param argument A `schedule` block as defined below.
*/
@JvmName("mkhjvacnbxjpppnv")
public suspend fun schedule(argument: suspend AppServiceBackupScheduleArgsBuilder.() -> Unit) {
val toBeMapped = AppServiceBackupScheduleArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.schedule = mapped
}
/**
* @param value The SAS URL to a Storage Container where Backups should be saved.
*/
@JvmName("avlgotjatvnqidpe")
public suspend fun storageAccountUrl(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageAccountUrl = mapped
}
internal fun build(): AppServiceBackupArgs = AppServiceBackupArgs(
enabled = enabled,
name = name ?: throw PulumiNullFieldException("name"),
schedule = schedule ?: throw PulumiNullFieldException("schedule"),
storageAccountUrl = storageAccountUrl ?: throw PulumiNullFieldException("storageAccountUrl"),
)
}