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

com.pulumi.azure.containerservice.kotlin.inputs.KubernetesClusterMaintenanceWindowAutoUpgradeArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.containerservice.kotlin.inputs

import com.pulumi.azure.containerservice.inputs.KubernetesClusterMaintenanceWindowAutoUpgradeArgs.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 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 dayOfMonth The day of the month for the maintenance run. Required in combination with AbsoluteMonthly frequency. Value between 0 and 31 (inclusive).
 * @property dayOfWeek The day of the week for the maintenance run. Required in combination with weekly frequency. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`.
 * @property duration The duration of the window for maintenance to run in hours.
 * @property frequency Frequency of maintenance. Possible options are `Weekly`, `AbsoluteMonthly` and `RelativeMonthly`.
 * @property interval The interval for maintenance runs. Depending on the frequency this interval is week or month based.
 * @property notAlloweds One or more `not_allowed` block as defined below.
 * @property startDate The date on which the maintenance window begins to take effect.
 * @property startTime The time for maintenance to begin, based on the timezone determined by `utc_offset`. Format is `HH:mm`.
 * @property utcOffset Used to determine the timezone for cluster maintenance.
 * @property weekIndex Specifies on which instance of the allowed days specified in `day_of_week` the maintenance occurs. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`.
 * Required in combination with relative monthly frequency.
 */
public data class KubernetesClusterMaintenanceWindowAutoUpgradeArgs(
    public val dayOfMonth: Output? = null,
    public val dayOfWeek: Output? = null,
    public val duration: Output,
    public val frequency: Output,
    public val interval: Output,
    public val notAlloweds: Output>? =
        null,
    public val startDate: Output? = null,
    public val startTime: Output? = null,
    public val utcOffset: Output? = null,
    public val weekIndex: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava():
        com.pulumi.azure.containerservice.inputs.KubernetesClusterMaintenanceWindowAutoUpgradeArgs =
        com.pulumi.azure.containerservice.inputs.KubernetesClusterMaintenanceWindowAutoUpgradeArgs.builder()
            .dayOfMonth(dayOfMonth?.applyValue({ args0 -> args0 }))
            .dayOfWeek(dayOfWeek?.applyValue({ args0 -> args0 }))
            .duration(duration.applyValue({ args0 -> args0 }))
            .frequency(frequency.applyValue({ args0 -> args0 }))
            .interval(interval.applyValue({ args0 -> args0 }))
            .notAlloweds(
                notAlloweds?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .startDate(startDate?.applyValue({ args0 -> args0 }))
            .startTime(startTime?.applyValue({ args0 -> args0 }))
            .utcOffset(utcOffset?.applyValue({ args0 -> args0 }))
            .weekIndex(weekIndex?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [KubernetesClusterMaintenanceWindowAutoUpgradeArgs].
 */
@PulumiTagMarker
public class KubernetesClusterMaintenanceWindowAutoUpgradeArgsBuilder internal constructor() {
    private var dayOfMonth: Output? = null

    private var dayOfWeek: Output? = null

    private var duration: Output? = null

    private var frequency: Output? = null

    private var interval: Output? = null

    private var notAlloweds:
        Output>? = null

    private var startDate: Output? = null

    private var startTime: Output? = null

    private var utcOffset: Output? = null

    private var weekIndex: Output? = null

    /**
     * @param value The day of the month for the maintenance run. Required in combination with AbsoluteMonthly frequency. Value between 0 and 31 (inclusive).
     */
    @JvmName("rjoxgfreedalmksn")
    public suspend fun dayOfMonth(`value`: Output) {
        this.dayOfMonth = value
    }

    /**
     * @param value The day of the week for the maintenance run. Required in combination with weekly frequency. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`.
     */
    @JvmName("yqhgrbupqsptakph")
    public suspend fun dayOfWeek(`value`: Output) {
        this.dayOfWeek = value
    }

    /**
     * @param value The duration of the window for maintenance to run in hours.
     */
    @JvmName("pdxhcbgqujpxuioo")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value Frequency of maintenance. Possible options are `Weekly`, `AbsoluteMonthly` and `RelativeMonthly`.
     */
    @JvmName("cfvoetdqrmiwyify")
    public suspend fun frequency(`value`: Output) {
        this.frequency = value
    }

    /**
     * @param value The interval for maintenance runs. Depending on the frequency this interval is week or month based.
     */
    @JvmName("myhsgeqnjnmvlfel")
    public suspend fun interval(`value`: Output) {
        this.interval = value
    }

    /**
     * @param value One or more `not_allowed` block as defined below.
     */
    @JvmName("brdpjbnnpirlwpuk")
    public suspend
    fun notAlloweds(`value`: Output>) {
        this.notAlloweds = value
    }

    @JvmName("cuaxitfhqfaviarx")
    public suspend fun notAlloweds(
        vararg
        values: Output,
    ) {
        this.notAlloweds = Output.all(values.asList())
    }

    /**
     * @param values One or more `not_allowed` block as defined below.
     */
    @JvmName("uacneqfbvwxigpgc")
    public suspend
    fun notAlloweds(values: List>) {
        this.notAlloweds = Output.all(values)
    }

    /**
     * @param value The date on which the maintenance window begins to take effect.
     */
    @JvmName("mokjpfjcoamiosrl")
    public suspend fun startDate(`value`: Output) {
        this.startDate = value
    }

    /**
     * @param value The time for maintenance to begin, based on the timezone determined by `utc_offset`. Format is `HH:mm`.
     */
    @JvmName("fisetggqfdfeyiot")
    public suspend fun startTime(`value`: Output) {
        this.startTime = value
    }

    /**
     * @param value Used to determine the timezone for cluster maintenance.
     */
    @JvmName("xmqvswwayylaadit")
    public suspend fun utcOffset(`value`: Output) {
        this.utcOffset = value
    }

    /**
     * @param value Specifies on which instance of the allowed days specified in `day_of_week` the maintenance occurs. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`.
     * Required in combination with relative monthly frequency.
     */
    @JvmName("vhfuyrvqhejluoox")
    public suspend fun weekIndex(`value`: Output) {
        this.weekIndex = value
    }

    /**
     * @param value The day of the month for the maintenance run. Required in combination with AbsoluteMonthly frequency. Value between 0 and 31 (inclusive).
     */
    @JvmName("uuhoijaiulnpajni")
    public suspend fun dayOfMonth(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dayOfMonth = mapped
    }

    /**
     * @param value The day of the week for the maintenance run. Required in combination with weekly frequency. Possible values are `Friday`, `Monday`, `Saturday`, `Sunday`, `Thursday`, `Tuesday` and `Wednesday`.
     */
    @JvmName("rdhqnuhsvdighqov")
    public suspend fun dayOfWeek(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dayOfWeek = mapped
    }

    /**
     * @param value The duration of the window for maintenance to run in hours.
     */
    @JvmName("ureyqilicpahokgp")
    public suspend fun duration(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value Frequency of maintenance. Possible options are `Weekly`, `AbsoluteMonthly` and `RelativeMonthly`.
     */
    @JvmName("hjigprojmrjsbgbg")
    public suspend fun frequency(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.frequency = mapped
    }

    /**
     * @param value The interval for maintenance runs. Depending on the frequency this interval is week or month based.
     */
    @JvmName("lgyeymaqnnuueavy")
    public suspend fun interval(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.interval = mapped
    }

    /**
     * @param value One or more `not_allowed` block as defined below.
     */
    @JvmName("fyvfwqxvfoixcwdb")
    public suspend
    fun notAlloweds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notAlloweds = mapped
    }

    /**
     * @param argument One or more `not_allowed` block as defined below.
     */
    @JvmName("xgfbtfvshriomvhf")
    public suspend
    fun notAlloweds(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.notAlloweds = mapped
    }

    /**
     * @param argument One or more `not_allowed` block as defined below.
     */
    @JvmName("nbtwesftmlxixvbk")
    public suspend fun notAlloweds(
        vararg
        argument: suspend KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.notAlloweds = mapped
    }

    /**
     * @param argument One or more `not_allowed` block as defined below.
     */
    @JvmName("nwxpcqcswapuobpg")
    public suspend
    fun notAlloweds(argument: suspend KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.notAlloweds = mapped
    }

    /**
     * @param values One or more `not_allowed` block as defined below.
     */
    @JvmName("ieseujgrnbrhbfen")
    public suspend fun notAlloweds(
        vararg
        values: KubernetesClusterMaintenanceWindowAutoUpgradeNotAllowedArgs,
    ) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.notAlloweds = mapped
    }

    /**
     * @param value The date on which the maintenance window begins to take effect.
     */
    @JvmName("kwuypbqwdsybloal")
    public suspend fun startDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startDate = mapped
    }

    /**
     * @param value The time for maintenance to begin, based on the timezone determined by `utc_offset`. Format is `HH:mm`.
     */
    @JvmName("tmaojrnysafooqup")
    public suspend fun startTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startTime = mapped
    }

    /**
     * @param value Used to determine the timezone for cluster maintenance.
     */
    @JvmName("cnnvmstmjsamtsjh")
    public suspend fun utcOffset(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.utcOffset = mapped
    }

    /**
     * @param value Specifies on which instance of the allowed days specified in `day_of_week` the maintenance occurs. Options are `First`, `Second`, `Third`, `Fourth`, and `Last`.
     * Required in combination with relative monthly frequency.
     */
    @JvmName("rptcdfbxlhegmbvr")
    public suspend fun weekIndex(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weekIndex = mapped
    }

    internal fun build(): KubernetesClusterMaintenanceWindowAutoUpgradeArgs =
        KubernetesClusterMaintenanceWindowAutoUpgradeArgs(
            dayOfMonth = dayOfMonth,
            dayOfWeek = dayOfWeek,
            duration = duration ?: throw PulumiNullFieldException("duration"),
            frequency = frequency ?: throw PulumiNullFieldException("frequency"),
            interval = interval ?: throw PulumiNullFieldException("interval"),
            notAlloweds = notAlloweds,
            startDate = startDate,
            startTime = startTime,
            utcOffset = utcOffset,
            weekIndex = weekIndex,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy