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

com.pulumi.gcp.alloydb.kotlin.inputs.ClusterAutomatedBackupPolicyWeeklyScheduleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.alloydb.kotlin.inputs

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

/**
 *
 * @property daysOfWeeks The days of the week to perform a backup. At least one day of the week must be provided.
 * Each value may be one of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
 * @property startTimes The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
 * Structure is documented below.
 */
public data class ClusterAutomatedBackupPolicyWeeklyScheduleArgs(
    public val daysOfWeeks: Output>? = null,
    public val startTimes: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.alloydb.inputs.ClusterAutomatedBackupPolicyWeeklyScheduleArgs =
        com.pulumi.gcp.alloydb.inputs.ClusterAutomatedBackupPolicyWeeklyScheduleArgs.builder()
            .daysOfWeeks(daysOfWeeks?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .startTimes(
                startTimes.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ClusterAutomatedBackupPolicyWeeklyScheduleArgs].
 */
@PulumiTagMarker
public class ClusterAutomatedBackupPolicyWeeklyScheduleArgsBuilder internal constructor() {
    private var daysOfWeeks: Output>? = null

    private var startTimes: Output>? =
        null

    /**
     * @param value The days of the week to perform a backup. At least one day of the week must be provided.
     * Each value may be one of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     */
    @JvmName("vkdbfplgoviatoht")
    public suspend fun daysOfWeeks(`value`: Output>) {
        this.daysOfWeeks = value
    }

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

    /**
     * @param values The days of the week to perform a backup. At least one day of the week must be provided.
     * Each value may be one of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     */
    @JvmName("cerhxgysaucwetli")
    public suspend fun daysOfWeeks(values: List>) {
        this.daysOfWeeks = Output.all(values)
    }

    /**
     * @param value The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("uujnowtcrjkwpmhm")
    public suspend fun startTimes(`value`: Output>) {
        this.startTimes = value
    }

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

    /**
     * @param values The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("jkcerxicurlgqdtg")
    public suspend fun startTimes(values: List>) {
        this.startTimes = Output.all(values)
    }

    /**
     * @param value The days of the week to perform a backup. At least one day of the week must be provided.
     * Each value may be one of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     */
    @JvmName("bgaangtqdriifojn")
    public suspend fun daysOfWeeks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysOfWeeks = mapped
    }

    /**
     * @param values The days of the week to perform a backup. At least one day of the week must be provided.
     * Each value may be one of: `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, `SUNDAY`.
     */
    @JvmName("npygenjrwsvmmxtl")
    public suspend fun daysOfWeeks(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.daysOfWeeks = mapped
    }

    /**
     * @param value The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("vmxvofchgjdameog")
    public suspend fun startTimes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startTimes = mapped
    }

    /**
     * @param argument The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("kooonolgybiqeqqx")
    public suspend fun startTimes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.startTimes = mapped
    }

    /**
     * @param argument The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("tdpmqfibqvdxpaxn")
    public suspend fun startTimes(vararg argument: suspend ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.startTimes = mapped
    }

    /**
     * @param argument The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("mssxowmuydesdjhg")
    public suspend fun startTimes(argument: suspend ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.startTimes = mapped
    }

    /**
     * @param values The times during the day to start a backup. At least one start time must be provided. The start times are assumed to be in UTC and to be an exact hour (e.g., 04:00:00).
     * Structure is documented below.
     */
    @JvmName("cafsdiocletswocv")
    public suspend fun startTimes(vararg values: ClusterAutomatedBackupPolicyWeeklyScheduleStartTimeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startTimes = mapped
    }

    internal fun build(): ClusterAutomatedBackupPolicyWeeklyScheduleArgs =
        ClusterAutomatedBackupPolicyWeeklyScheduleArgs(
            daysOfWeeks = daysOfWeeks,
            startTimes = startTimes ?: throw PulumiNullFieldException("startTimes"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy