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

com.pulumi.azure.backup.kotlin.inputs.PolicyVMBackupArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.backup.kotlin.inputs

import com.pulumi.azure.backup.inputs.PolicyVMBackupArgs.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 kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property frequency Sets the backup frequency. Possible values are `Hourly`, `Daily` and `Weekly`.
 * @property hourDuration Duration of the backup window in hours. Possible values are between `4` and `24` This is used when `frequency` is `Hourly`.
 * > **NOTE:** `hour_duration` must be multiplier of `hour_interval`
 * @property hourInterval Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`.
 * @property time The time of day to perform the backup in 24hour format.
 * @property weekdays The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
 */
public data class PolicyVMBackupArgs(
    public val frequency: Output,
    public val hourDuration: Output? = null,
    public val hourInterval: Output? = null,
    public val time: Output,
    public val weekdays: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.backup.inputs.PolicyVMBackupArgs =
        com.pulumi.azure.backup.inputs.PolicyVMBackupArgs.builder()
            .frequency(frequency.applyValue({ args0 -> args0 }))
            .hourDuration(hourDuration?.applyValue({ args0 -> args0 }))
            .hourInterval(hourInterval?.applyValue({ args0 -> args0 }))
            .time(time.applyValue({ args0 -> args0 }))
            .weekdays(weekdays?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [PolicyVMBackupArgs].
 */
@PulumiTagMarker
public class PolicyVMBackupArgsBuilder internal constructor() {
    private var frequency: Output? = null

    private var hourDuration: Output? = null

    private var hourInterval: Output? = null

    private var time: Output? = null

    private var weekdays: Output>? = null

    /**
     * @param value Sets the backup frequency. Possible values are `Hourly`, `Daily` and `Weekly`.
     */
    @JvmName("toyrxpnpoiahjpsi")
    public suspend fun frequency(`value`: Output) {
        this.frequency = value
    }

    /**
     * @param value Duration of the backup window in hours. Possible values are between `4` and `24` This is used when `frequency` is `Hourly`.
     * > **NOTE:** `hour_duration` must be multiplier of `hour_interval`
     */
    @JvmName("jmrhdxvxqrporslv")
    public suspend fun hourDuration(`value`: Output) {
        this.hourDuration = value
    }

    /**
     * @param value Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`.
     */
    @JvmName("vnohxpupjrdcxaej")
    public suspend fun hourInterval(`value`: Output) {
        this.hourInterval = value
    }

    /**
     * @param value The time of day to perform the backup in 24hour format.
     */
    @JvmName("gjgbmgseiwvsspvl")
    public suspend fun time(`value`: Output) {
        this.time = value
    }

    /**
     * @param value The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
     */
    @JvmName("mltuiprmplxymgsk")
    public suspend fun weekdays(`value`: Output>) {
        this.weekdays = value
    }

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

    /**
     * @param values The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
     */
    @JvmName("ktwvcncyafadxtie")
    public suspend fun weekdays(values: List>) {
        this.weekdays = Output.all(values)
    }

    /**
     * @param value Sets the backup frequency. Possible values are `Hourly`, `Daily` and `Weekly`.
     */
    @JvmName("qghftqjcasrivatv")
    public suspend fun frequency(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frequency = mapped
    }

    /**
     * @param value Duration of the backup window in hours. Possible values are between `4` and `24` This is used when `frequency` is `Hourly`.
     * > **NOTE:** `hour_duration` must be multiplier of `hour_interval`
     */
    @JvmName("allvthdaxahkektm")
    public suspend fun hourDuration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hourDuration = mapped
    }

    /**
     * @param value Interval in hour at which backup is triggered. Possible values are `4`, `6`, `8` and `12`. This is used when `frequency` is `Hourly`.
     */
    @JvmName("gxjeakkvkgthxjdh")
    public suspend fun hourInterval(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hourInterval = mapped
    }

    /**
     * @param value The time of day to perform the backup in 24hour format.
     */
    @JvmName("tasvmqrxybdetwnj")
    public suspend fun time(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.time = mapped
    }

    /**
     * @param value The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
     */
    @JvmName("vawnfpgaaieswhcm")
    public suspend fun weekdays(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weekdays = mapped
    }

    /**
     * @param values The days of the week to perform backups on. Must be one of `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday` or `Saturday`. This is used when `frequency` is `Weekly`.
     */
    @JvmName("hhnvliuilcvvoksg")
    public suspend fun weekdays(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.weekdays = mapped
    }

    internal fun build(): PolicyVMBackupArgs = PolicyVMBackupArgs(
        frequency = frequency ?: throw PulumiNullFieldException("frequency"),
        hourDuration = hourDuration,
        hourInterval = hourInterval,
        time = time ?: throw PulumiNullFieldException("time"),
        weekdays = weekdays,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy