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

com.pulumi.azurenative.sql.kotlin.inputs.ScheduleItemArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.sql.kotlin.inputs

import com.pulumi.azurenative.sql.inputs.ScheduleItemArgs.builder
import com.pulumi.azurenative.sql.kotlin.enums.DayOfWeek
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Schedule info describing when the server should be started or stopped.
 * @property startDay Start day.
 * @property startTime Start time.
 * @property stopDay Stop day.
 * @property stopTime Stop time.
 */
public data class ScheduleItemArgs(
    public val startDay: Output>,
    public val startTime: Output,
    public val stopDay: Output>,
    public val stopTime: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.sql.inputs.ScheduleItemArgs =
        com.pulumi.azurenative.sql.inputs.ScheduleItemArgs.builder()
            .startDay(
                startDay.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .startTime(startTime.applyValue({ args0 -> args0 }))
            .stopDay(
                stopDay.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .stopTime(stopTime.applyValue({ args0 -> args0 })).build()
}

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

    private var startTime: Output? = null

    private var stopDay: Output>? = null

    private var stopTime: Output? = null

    /**
     * @param value Start day.
     */
    @JvmName("liqcxwuphcfsonwa")
    public suspend fun startDay(`value`: Output>) {
        this.startDay = value
    }

    /**
     * @param value Start time.
     */
    @JvmName("pfdvgnknuhnaebmp")
    public suspend fun startTime(`value`: Output) {
        this.startTime = value
    }

    /**
     * @param value Stop day.
     */
    @JvmName("hwiocaacssuhfsqw")
    public suspend fun stopDay(`value`: Output>) {
        this.stopDay = value
    }

    /**
     * @param value Stop time.
     */
    @JvmName("xmhjjddjkgbefgbg")
    public suspend fun stopTime(`value`: Output) {
        this.stopTime = value
    }

    /**
     * @param value Start day.
     */
    @JvmName("mengosvxxrsoqcyw")
    public suspend fun startDay(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startDay = mapped
    }

    /**
     * @param value Start day.
     */
    @JvmName("cjxwgwhjhdxuhwdw")
    public fun startDay(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startDay = mapped
    }

    /**
     * @param value Start day.
     */
    @JvmName("tkelxpscqgcfxlwe")
    public fun startDay(`value`: DayOfWeek) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startDay = mapped
    }

    /**
     * @param value Start time.
     */
    @JvmName("dhscjcdmfxfopskg")
    public suspend fun startTime(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.startTime = mapped
    }

    /**
     * @param value Stop day.
     */
    @JvmName("yxoctvaleypcypry")
    public suspend fun stopDay(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stopDay = mapped
    }

    /**
     * @param value Stop day.
     */
    @JvmName("cpdqdtgtlcwolpym")
    public fun stopDay(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stopDay = mapped
    }

    /**
     * @param value Stop day.
     */
    @JvmName("thpavaijgxbnvmgp")
    public fun stopDay(`value`: DayOfWeek) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stopDay = mapped
    }

    /**
     * @param value Stop time.
     */
    @JvmName("wnolowqdqjcmtshc")
    public suspend fun stopTime(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stopTime = mapped
    }

    internal fun build(): ScheduleItemArgs = ScheduleItemArgs(
        startDay = startDay ?: throw PulumiNullFieldException("startDay"),
        startTime = startTime ?: throw PulumiNullFieldException("startTime"),
        stopDay = stopDay ?: throw PulumiNullFieldException("stopDay"),
        stopTime = stopTime ?: throw PulumiNullFieldException("stopTime"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy