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

com.pulumi.azurenative.web.kotlin.inputs.BackupScheduleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.web.kotlin.inputs

import com.pulumi.azurenative.web.inputs.BackupScheduleArgs.builder
import com.pulumi.azurenative.web.kotlin.enums.FrequencyUnit
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 kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Description of a backup schedule. Describes how often should be the backup performed and what should be the retention policy.
 * @property frequencyInterval How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
 * @property frequencyUnit The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
 * @property keepAtLeastOneBackup True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
 * @property retentionPeriodInDays After how many days backups should be deleted.
 * @property startTime When the schedule should start working.
 */
public data class BackupScheduleArgs(
    public val frequencyInterval: Output,
    public val frequencyUnit: Output,
    public val keepAtLeastOneBackup: Output,
    public val retentionPeriodInDays: Output,
    public val startTime: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.BackupScheduleArgs =
        com.pulumi.azurenative.web.inputs.BackupScheduleArgs.builder()
            .frequencyInterval(frequencyInterval.applyValue({ args0 -> args0 }))
            .frequencyUnit(frequencyUnit.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .keepAtLeastOneBackup(keepAtLeastOneBackup.applyValue({ args0 -> args0 }))
            .retentionPeriodInDays(retentionPeriodInDays.applyValue({ args0 -> args0 }))
            .startTime(startTime?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BackupScheduleArgs].
 */
@PulumiTagMarker
public class BackupScheduleArgsBuilder internal constructor() {
    private var frequencyInterval: Output? = null

    private var frequencyUnit: Output? = null

    private var keepAtLeastOneBackup: Output? = null

    private var retentionPeriodInDays: Output? = null

    private var startTime: Output? = null

    /**
     * @param value How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
     */
    @JvmName("aufxkkicrrtpoccs")
    public suspend fun frequencyInterval(`value`: Output) {
        this.frequencyInterval = value
    }

    /**
     * @param value The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
     */
    @JvmName("wogtstypcboyxarb")
    public suspend fun frequencyUnit(`value`: Output) {
        this.frequencyUnit = value
    }

    /**
     * @param value True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
     */
    @JvmName("odwpfjtgtclkospc")
    public suspend fun keepAtLeastOneBackup(`value`: Output) {
        this.keepAtLeastOneBackup = value
    }

    /**
     * @param value After how many days backups should be deleted.
     */
    @JvmName("knaaeirqwkgetxwb")
    public suspend fun retentionPeriodInDays(`value`: Output) {
        this.retentionPeriodInDays = value
    }

    /**
     * @param value When the schedule should start working.
     */
    @JvmName("mjfgdqtweakkitak")
    public suspend fun startTime(`value`: Output) {
        this.startTime = value
    }

    /**
     * @param value How often the backup should be executed (e.g. for weekly backup, this should be set to 7 and FrequencyUnit should be set to Day)
     */
    @JvmName("dmiwhjrckxmmfedm")
    public suspend fun frequencyInterval(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frequencyInterval = mapped
    }

    /**
     * @param value The unit of time for how often the backup should be executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7)
     */
    @JvmName("nhuncxgplcuyirex")
    public suspend fun frequencyUnit(`value`: FrequencyUnit) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frequencyUnit = mapped
    }

    /**
     * @param value True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise.
     */
    @JvmName("qwiltcjrramugjmg")
    public suspend fun keepAtLeastOneBackup(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keepAtLeastOneBackup = mapped
    }

    /**
     * @param value After how many days backups should be deleted.
     */
    @JvmName("qlbvrfiioxajoljn")
    public suspend fun retentionPeriodInDays(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPeriodInDays = mapped
    }

    /**
     * @param value When the schedule should start working.
     */
    @JvmName("gwshbyjrqdwwxjvy")
    public suspend fun startTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startTime = mapped
    }

    internal fun build(): BackupScheduleArgs = BackupScheduleArgs(
        frequencyInterval = frequencyInterval ?: throw PulumiNullFieldException("frequencyInterval"),
        frequencyUnit = frequencyUnit ?: throw PulumiNullFieldException("frequencyUnit"),
        keepAtLeastOneBackup = keepAtLeastOneBackup ?: throw
            PulumiNullFieldException("keepAtLeastOneBackup"),
        retentionPeriodInDays = retentionPeriodInDays ?: throw
            PulumiNullFieldException("retentionPeriodInDays"),
        startTime = startTime,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy