com.pulumi.azurenative.cache.kotlin.inputs.PersistenceArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.cache.kotlin.inputs
import com.pulumi.azurenative.cache.inputs.PersistenceArgs.builder
import com.pulumi.azurenative.cache.kotlin.enums.AofFrequency
import com.pulumi.azurenative.cache.kotlin.enums.RdbFrequency
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.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Persistence-related configuration for the RedisEnterprise database
* @property aofEnabled Sets whether AOF is enabled.
* @property aofFrequency Sets the frequency at which data is written to disk.
* @property rdbEnabled Sets whether RDB is enabled.
* @property rdbFrequency Sets the frequency at which a snapshot of the database is created.
*/
public data class PersistenceArgs(
public val aofEnabled: Output? = null,
public val aofFrequency: Output>? = null,
public val rdbEnabled: Output? = null,
public val rdbFrequency: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.cache.inputs.PersistenceArgs =
com.pulumi.azurenative.cache.inputs.PersistenceArgs.builder()
.aofEnabled(aofEnabled?.applyValue({ args0 -> args0 }))
.aofFrequency(
aofFrequency?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.rdbEnabled(rdbEnabled?.applyValue({ args0 -> args0 }))
.rdbFrequency(
rdbFrequency?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [PersistenceArgs].
*/
@PulumiTagMarker
public class PersistenceArgsBuilder internal constructor() {
private var aofEnabled: Output? = null
private var aofFrequency: Output>? = null
private var rdbEnabled: Output? = null
private var rdbFrequency: Output>? = null
/**
* @param value Sets whether AOF is enabled.
*/
@JvmName("dwbqvexthmceepdy")
public suspend fun aofEnabled(`value`: Output) {
this.aofEnabled = value
}
/**
* @param value Sets the frequency at which data is written to disk.
*/
@JvmName("lcoiyvstildvwkcv")
public suspend fun aofFrequency(`value`: Output>) {
this.aofFrequency = value
}
/**
* @param value Sets whether RDB is enabled.
*/
@JvmName("kisawydamocsvarm")
public suspend fun rdbEnabled(`value`: Output) {
this.rdbEnabled = value
}
/**
* @param value Sets the frequency at which a snapshot of the database is created.
*/
@JvmName("rgbdveuhyqfhnkfi")
public suspend fun rdbFrequency(`value`: Output>) {
this.rdbFrequency = value
}
/**
* @param value Sets whether AOF is enabled.
*/
@JvmName("cnymwfmteueoejgq")
public suspend fun aofEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.aofEnabled = mapped
}
/**
* @param value Sets the frequency at which data is written to disk.
*/
@JvmName("nddgpllgbalufwhu")
public suspend fun aofFrequency(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.aofFrequency = mapped
}
/**
* @param value Sets the frequency at which data is written to disk.
*/
@JvmName("kymrqvwhsdgdyntl")
public fun aofFrequency(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.aofFrequency = mapped
}
/**
* @param value Sets the frequency at which data is written to disk.
*/
@JvmName("qnldmnienebmmjwi")
public fun aofFrequency(`value`: AofFrequency) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.aofFrequency = mapped
}
/**
* @param value Sets whether RDB is enabled.
*/
@JvmName("cqveawtmoeqqjjue")
public suspend fun rdbEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rdbEnabled = mapped
}
/**
* @param value Sets the frequency at which a snapshot of the database is created.
*/
@JvmName("lvufctuaoxjnabse")
public suspend fun rdbFrequency(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.rdbFrequency = mapped
}
/**
* @param value Sets the frequency at which a snapshot of the database is created.
*/
@JvmName("dtqfuwiugpnhjnig")
public fun rdbFrequency(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.rdbFrequency = mapped
}
/**
* @param value Sets the frequency at which a snapshot of the database is created.
*/
@JvmName("eeyjbgasvadjqvjp")
public fun rdbFrequency(`value`: RdbFrequency) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.rdbFrequency = mapped
}
internal fun build(): PersistenceArgs = PersistenceArgs(
aofEnabled = aofEnabled,
aofFrequency = aofFrequency,
rdbEnabled = rdbEnabled,
rdbFrequency = rdbFrequency,
)
}