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

com.pulumi.azurenative.workloads.kotlin.inputs.SimpleSchedulePolicyArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.workloads.kotlin.inputs

import com.pulumi.azurenative.workloads.inputs.SimpleSchedulePolicyArgs.builder
import com.pulumi.azurenative.workloads.kotlin.enums.DayOfWeek
import com.pulumi.azurenative.workloads.kotlin.enums.ScheduleRunType
import com.pulumi.core.Either
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

/**
 * Simple policy schedule.
 * @property hourlySchedule Hourly Schedule of this Policy
 * @property schedulePolicyType This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
 * Expected value is 'SimpleSchedulePolicy'.
 * @property scheduleRunDays List of days of week this schedule has to be run.
 * @property scheduleRunFrequency Frequency of the schedule operation of this policy.
 * @property scheduleRunTimes List of times of day this schedule has to be run.
 * @property scheduleWeeklyFrequency At every number weeks this schedule has to be run.
 */
public data class SimpleSchedulePolicyArgs(
    public val hourlySchedule: Output? = null,
    public val schedulePolicyType: Output,
    public val scheduleRunDays: Output>? = null,
    public val scheduleRunFrequency: Output>? = null,
    public val scheduleRunTimes: Output>? = null,
    public val scheduleWeeklyFrequency: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.workloads.inputs.SimpleSchedulePolicyArgs =
        com.pulumi.azurenative.workloads.inputs.SimpleSchedulePolicyArgs.builder()
            .hourlySchedule(hourlySchedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schedulePolicyType(schedulePolicyType.applyValue({ args0 -> args0 }))
            .scheduleRunDays(
                scheduleRunDays?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .scheduleRunFrequency(
                scheduleRunFrequency?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .scheduleRunTimes(scheduleRunTimes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .scheduleWeeklyFrequency(scheduleWeeklyFrequency?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SimpleSchedulePolicyArgs].
 */
@PulumiTagMarker
public class SimpleSchedulePolicyArgsBuilder internal constructor() {
    private var hourlySchedule: Output? = null

    private var schedulePolicyType: Output? = null

    private var scheduleRunDays: Output>? = null

    private var scheduleRunFrequency: Output>? = null

    private var scheduleRunTimes: Output>? = null

    private var scheduleWeeklyFrequency: Output? = null

    /**
     * @param value Hourly Schedule of this Policy
     */
    @JvmName("utntganihnojbldh")
    public suspend fun hourlySchedule(`value`: Output) {
        this.hourlySchedule = value
    }

    /**
     * @param value This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'SimpleSchedulePolicy'.
     */
    @JvmName("dglnxabarkqttrqj")
    public suspend fun schedulePolicyType(`value`: Output) {
        this.schedulePolicyType = value
    }

    /**
     * @param value List of days of week this schedule has to be run.
     */
    @JvmName("rxmnpkjodehaujua")
    public suspend fun scheduleRunDays(`value`: Output>) {
        this.scheduleRunDays = value
    }

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

    /**
     * @param values List of days of week this schedule has to be run.
     */
    @JvmName("xbqsvftxblcrpapl")
    public suspend fun scheduleRunDays(values: List>) {
        this.scheduleRunDays = Output.all(values)
    }

    /**
     * @param value Frequency of the schedule operation of this policy.
     */
    @JvmName("gromsgwtoojctnoe")
    public suspend fun scheduleRunFrequency(`value`: Output>) {
        this.scheduleRunFrequency = value
    }

    /**
     * @param value List of times of day this schedule has to be run.
     */
    @JvmName("goevtwdicgbwwqal")
    public suspend fun scheduleRunTimes(`value`: Output>) {
        this.scheduleRunTimes = value
    }

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

    /**
     * @param values List of times of day this schedule has to be run.
     */
    @JvmName("knaqiwvaiftmoxjk")
    public suspend fun scheduleRunTimes(values: List>) {
        this.scheduleRunTimes = Output.all(values)
    }

    /**
     * @param value At every number weeks this schedule has to be run.
     */
    @JvmName("vkabrocfegaseedl")
    public suspend fun scheduleWeeklyFrequency(`value`: Output) {
        this.scheduleWeeklyFrequency = value
    }

    /**
     * @param value Hourly Schedule of this Policy
     */
    @JvmName("olxkoqpdyuovdpcf")
    public suspend fun hourlySchedule(`value`: HourlyScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hourlySchedule = mapped
    }

    /**
     * @param argument Hourly Schedule of this Policy
     */
    @JvmName("akuihadphuykxoll")
    public suspend fun hourlySchedule(argument: suspend HourlyScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = HourlyScheduleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.hourlySchedule = mapped
    }

    /**
     * @param value This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.
     * Expected value is 'SimpleSchedulePolicy'.
     */
    @JvmName("uacrvgsihwwtehio")
    public suspend fun schedulePolicyType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.schedulePolicyType = mapped
    }

    /**
     * @param value List of days of week this schedule has to be run.
     */
    @JvmName("gktqpxasnenghxjg")
    public suspend fun scheduleRunDays(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleRunDays = mapped
    }

    /**
     * @param values List of days of week this schedule has to be run.
     */
    @JvmName("kdrfcxyipafdmlfg")
    public suspend fun scheduleRunDays(vararg values: DayOfWeek) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleRunDays = mapped
    }

    /**
     * @param value Frequency of the schedule operation of this policy.
     */
    @JvmName("ukyyruvgihfnjsrc")
    public suspend fun scheduleRunFrequency(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleRunFrequency = mapped
    }

    /**
     * @param value Frequency of the schedule operation of this policy.
     */
    @JvmName("abkgudnlaghbexlb")
    public fun scheduleRunFrequency(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleRunFrequency = mapped
    }

    /**
     * @param value Frequency of the schedule operation of this policy.
     */
    @JvmName("onumhnwlwrftsrxt")
    public fun scheduleRunFrequency(`value`: ScheduleRunType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleRunFrequency = mapped
    }

    /**
     * @param value List of times of day this schedule has to be run.
     */
    @JvmName("vgykqmognudmqxqb")
    public suspend fun scheduleRunTimes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleRunTimes = mapped
    }

    /**
     * @param values List of times of day this schedule has to be run.
     */
    @JvmName("ovpcsbvftyctujli")
    public suspend fun scheduleRunTimes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleRunTimes = mapped
    }

    /**
     * @param value At every number weeks this schedule has to be run.
     */
    @JvmName("pbcnvpfjescnmjqk")
    public suspend fun scheduleWeeklyFrequency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleWeeklyFrequency = mapped
    }

    internal fun build(): SimpleSchedulePolicyArgs = SimpleSchedulePolicyArgs(
        hourlySchedule = hourlySchedule,
        schedulePolicyType = schedulePolicyType ?: throw PulumiNullFieldException("schedulePolicyType"),
        scheduleRunDays = scheduleRunDays,
        scheduleRunFrequency = scheduleRunFrequency,
        scheduleRunTimes = scheduleRunTimes,
        scheduleWeeklyFrequency = scheduleWeeklyFrequency,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy