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

com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs.BackupPlanBackupRuleStandardScheduleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.backupdisasterrecovery.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleStandardScheduleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property backupWindow A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
 * `NOT_RUN` if they do not start by the end of the window.
 * Structure is documented below.
 * @property daysOfMonths Specifies days of months like 1, 5, or 14 on which jobs will run.
 * @property daysOfWeeks Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for `recurrence_type`, `WEEKLY` and is not applicable otherwise.
 * Each value may be one of: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`.
 * @property hourlyFrequency Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
 * This is required for `recurrence_type`, `HOURLY` and is not applicable otherwise.
 * @property months Specifies values of months
 * Each value may be one of: `MONTH_UNSPECIFIED`, `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
 * @property recurrenceType RecurrenceType enumerates the applicable periodicity for the schedule.
 * Possible values are: `HOURLY`, `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`.
 * @property timeZone The time zone to be used when interpreting the schedule.
 * @property weekDayOfMonth Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run.
 * Structure is documented below.
 */
public data class BackupPlanBackupRuleStandardScheduleArgs(
    public val backupWindow: Output? = null,
    public val daysOfMonths: Output>? = null,
    public val daysOfWeeks: Output>? = null,
    public val hourlyFrequency: Output? = null,
    public val months: Output>? = null,
    public val recurrenceType: Output,
    public val timeZone: Output,
    public val weekDayOfMonth: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleStandardScheduleArgs =
        com.pulumi.gcp.backupdisasterrecovery.inputs.BackupPlanBackupRuleStandardScheduleArgs.builder()
            .backupWindow(backupWindow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .daysOfMonths(daysOfMonths?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .daysOfWeeks(daysOfWeeks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .hourlyFrequency(hourlyFrequency?.applyValue({ args0 -> args0 }))
            .months(months?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .recurrenceType(recurrenceType.applyValue({ args0 -> args0 }))
            .timeZone(timeZone.applyValue({ args0 -> args0 }))
            .weekDayOfMonth(
                weekDayOfMonth?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [BackupPlanBackupRuleStandardScheduleArgs].
 */
@PulumiTagMarker
public class BackupPlanBackupRuleStandardScheduleArgsBuilder internal constructor() {
    private var backupWindow: Output? = null

    private var daysOfMonths: Output>? = null

    private var daysOfWeeks: Output>? = null

    private var hourlyFrequency: Output? = null

    private var months: Output>? = null

    private var recurrenceType: Output? = null

    private var timeZone: Output? = null

    private var weekDayOfMonth: Output? = null

    /**
     * @param value A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
     * `NOT_RUN` if they do not start by the end of the window.
     * Structure is documented below.
     */
    @JvmName("ghmfgylbaswkfmbv")
    public suspend fun backupWindow(`value`: Output) {
        this.backupWindow = value
    }

    /**
     * @param value Specifies days of months like 1, 5, or 14 on which jobs will run.
     */
    @JvmName("iqhxiicdaxrgjjbd")
    public suspend fun daysOfMonths(`value`: Output>) {
        this.daysOfMonths = value
    }

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

    /**
     * @param values Specifies days of months like 1, 5, or 14 on which jobs will run.
     */
    @JvmName("sjemxnawyygrkanb")
    public suspend fun daysOfMonths(values: List>) {
        this.daysOfMonths = Output.all(values)
    }

    /**
     * @param value Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for `recurrence_type`, `WEEKLY` and is not applicable otherwise.
     * Each value may be one of: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`.
     */
    @JvmName("hvgfkwjttsqogmer")
    public suspend fun daysOfWeeks(`value`: Output>) {
        this.daysOfWeeks = value
    }

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

    /**
     * @param values Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for `recurrence_type`, `WEEKLY` and is not applicable otherwise.
     * Each value may be one of: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`.
     */
    @JvmName("fcresrpwcpkbwbln")
    public suspend fun daysOfWeeks(values: List>) {
        this.daysOfWeeks = Output.all(values)
    }

    /**
     * @param value Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
     * This is required for `recurrence_type`, `HOURLY` and is not applicable otherwise.
     */
    @JvmName("ubkhwjcmriijdred")
    public suspend fun hourlyFrequency(`value`: Output) {
        this.hourlyFrequency = value
    }

    /**
     * @param value Specifies values of months
     * Each value may be one of: `MONTH_UNSPECIFIED`, `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
     */
    @JvmName("gprmsrrgjunpgtod")
    public suspend fun months(`value`: Output>) {
        this.months = value
    }

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

    /**
     * @param values Specifies values of months
     * Each value may be one of: `MONTH_UNSPECIFIED`, `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
     */
    @JvmName("wylfxbbowqlaiiaj")
    public suspend fun months(values: List>) {
        this.months = Output.all(values)
    }

    /**
     * @param value RecurrenceType enumerates the applicable periodicity for the schedule.
     * Possible values are: `HOURLY`, `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`.
     */
    @JvmName("qixbcpsswhavpqai")
    public suspend fun recurrenceType(`value`: Output) {
        this.recurrenceType = value
    }

    /**
     * @param value The time zone to be used when interpreting the schedule.
     */
    @JvmName("hynqyljpccsevjed")
    public suspend fun timeZone(`value`: Output) {
        this.timeZone = value
    }

    /**
     * @param value Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run.
     * Structure is documented below.
     */
    @JvmName("yrfmrnearixjbgmq")
    public suspend fun weekDayOfMonth(`value`: Output) {
        this.weekDayOfMonth = value
    }

    /**
     * @param value A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
     * `NOT_RUN` if they do not start by the end of the window.
     * Structure is documented below.
     */
    @JvmName("jvsialfcceeprtvr")
    public suspend fun backupWindow(`value`: BackupPlanBackupRuleStandardScheduleBackupWindowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupWindow = mapped
    }

    /**
     * @param argument A BackupWindow defines the window of the day during which backup jobs will run. Jobs are queued at the beginning of the window and will be marked as
     * `NOT_RUN` if they do not start by the end of the window.
     * Structure is documented below.
     */
    @JvmName("achfojjujbddvjwa")
    public suspend fun backupWindow(argument: suspend BackupPlanBackupRuleStandardScheduleBackupWindowArgsBuilder.() -> Unit) {
        val toBeMapped = BackupPlanBackupRuleStandardScheduleBackupWindowArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.backupWindow = mapped
    }

    /**
     * @param value Specifies days of months like 1, 5, or 14 on which jobs will run.
     */
    @JvmName("monssehkjxhpxbog")
    public suspend fun daysOfMonths(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysOfMonths = mapped
    }

    /**
     * @param values Specifies days of months like 1, 5, or 14 on which jobs will run.
     */
    @JvmName("trrwnumvbejoxwku")
    public suspend fun daysOfMonths(vararg values: Int) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.daysOfMonths = mapped
    }

    /**
     * @param value Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for `recurrence_type`, `WEEKLY` and is not applicable otherwise.
     * Each value may be one of: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`.
     */
    @JvmName("mfrccaehvjyokgbx")
    public suspend fun daysOfWeeks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysOfWeeks = mapped
    }

    /**
     * @param values Specifies days of week like MONDAY or TUESDAY, on which jobs will run. This is required for `recurrence_type`, `WEEKLY` and is not applicable otherwise.
     * Each value may be one of: `DAY_OF_WEEK_UNSPECIFIED`, `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`.
     */
    @JvmName("mtycydtuklimhxnv")
    public suspend fun daysOfWeeks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.daysOfWeeks = mapped
    }

    /**
     * @param value Specifies frequency for hourly backups. An hourly frequency of 2 means jobs will run every 2 hours from start time till end time defined.
     * This is required for `recurrence_type`, `HOURLY` and is not applicable otherwise.
     */
    @JvmName("ltcceubceuxfaaiv")
    public suspend fun hourlyFrequency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hourlyFrequency = mapped
    }

    /**
     * @param value Specifies values of months
     * Each value may be one of: `MONTH_UNSPECIFIED`, `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
     */
    @JvmName("stavtidyokabjejv")
    public suspend fun months(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.months = mapped
    }

    /**
     * @param values Specifies values of months
     * Each value may be one of: `MONTH_UNSPECIFIED`, `JANUARY`, `FEBRUARY`, `MARCH`, `APRIL`, `MAY`, `JUNE`, `JULY`, `AUGUST`, `SEPTEMBER`, `OCTOBER`, `NOVEMBER`, `DECEMBER`.
     */
    @JvmName("dcnopnvqjqarhkcf")
    public suspend fun months(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.months = mapped
    }

    /**
     * @param value RecurrenceType enumerates the applicable periodicity for the schedule.
     * Possible values are: `HOURLY`, `DAILY`, `WEEKLY`, `MONTHLY`, `YEARLY`.
     */
    @JvmName("gvodhuevrqicwtry")
    public suspend fun recurrenceType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.recurrenceType = mapped
    }

    /**
     * @param value The time zone to be used when interpreting the schedule.
     */
    @JvmName("itnepwnullaromri")
    public suspend fun timeZone(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeZone = mapped
    }

    /**
     * @param value Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run.
     * Structure is documented below.
     */
    @JvmName("rccrpmojkjjlibak")
    public suspend fun weekDayOfMonth(`value`: BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weekDayOfMonth = mapped
    }

    /**
     * @param argument Specifies a week day of the month like FIRST SUNDAY or LAST MONDAY, on which jobs will run.
     * Structure is documented below.
     */
    @JvmName("mjviqfwenniphhco")
    public suspend fun weekDayOfMonth(argument: suspend BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgsBuilder.() -> Unit) {
        val toBeMapped = BackupPlanBackupRuleStandardScheduleWeekDayOfMonthArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.weekDayOfMonth = mapped
    }

    internal fun build(): BackupPlanBackupRuleStandardScheduleArgs =
        BackupPlanBackupRuleStandardScheduleArgs(
            backupWindow = backupWindow,
            daysOfMonths = daysOfMonths,
            daysOfWeeks = daysOfWeeks,
            hourlyFrequency = hourlyFrequency,
            months = months,
            recurrenceType = recurrenceType ?: throw PulumiNullFieldException("recurrenceType"),
            timeZone = timeZone ?: throw PulumiNullFieldException("timeZone"),
            weekDayOfMonth = weekDayOfMonth,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy