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

com.pulumi.gcp.compute.kotlin.inputs.ResourcePolicyInstanceSchedulePolicyArgs.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: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyArgs.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.jvm.JvmName

/**
 *
 * @property expirationTime The expiration time of the schedule. The timestamp is an RFC3339 string.
 * @property startTime The start time of the schedule. The timestamp is an RFC3339 string.
 * @property timeZone Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name
 * from the tz database: http://en.wikipedia.org/wiki/Tz_database.
 * @property vmStartSchedule Specifies the schedule for starting instances.
 * Structure is documented below.
 * @property vmStopSchedule Specifies the schedule for stopping instances.
 * Structure is documented below.
 */
public data class ResourcePolicyInstanceSchedulePolicyArgs(
    public val expirationTime: Output? = null,
    public val startTime: Output? = null,
    public val timeZone: Output,
    public val vmStartSchedule: Output? =
        null,
    public val vmStopSchedule: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyArgs =
        com.pulumi.gcp.compute.inputs.ResourcePolicyInstanceSchedulePolicyArgs.builder()
            .expirationTime(expirationTime?.applyValue({ args0 -> args0 }))
            .startTime(startTime?.applyValue({ args0 -> args0 }))
            .timeZone(timeZone.applyValue({ args0 -> args0 }))
            .vmStartSchedule(vmStartSchedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vmStopSchedule(
                vmStopSchedule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [ResourcePolicyInstanceSchedulePolicyArgs].
 */
@PulumiTagMarker
public class ResourcePolicyInstanceSchedulePolicyArgsBuilder internal constructor() {
    private var expirationTime: Output? = null

    private var startTime: Output? = null

    private var timeZone: Output? = null

    private var vmStartSchedule: Output? =
        null

    private var vmStopSchedule: Output? = null

    /**
     * @param value The expiration time of the schedule. The timestamp is an RFC3339 string.
     */
    @JvmName("mqdblyvbewnxdign")
    public suspend fun expirationTime(`value`: Output) {
        this.expirationTime = value
    }

    /**
     * @param value The start time of the schedule. The timestamp is an RFC3339 string.
     */
    @JvmName("ouhuxoyotlmafifu")
    public suspend fun startTime(`value`: Output) {
        this.startTime = value
    }

    /**
     * @param value Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name
     * from the tz database: http://en.wikipedia.org/wiki/Tz_database.
     */
    @JvmName("omhtkwcnjajbdvkm")
    public suspend fun timeZone(`value`: Output) {
        this.timeZone = value
    }

    /**
     * @param value Specifies the schedule for starting instances.
     * Structure is documented below.
     */
    @JvmName("ritaebxwnmwibdjc")
    public suspend fun vmStartSchedule(`value`: Output) {
        this.vmStartSchedule = value
    }

    /**
     * @param value Specifies the schedule for stopping instances.
     * Structure is documented below.
     */
    @JvmName("isfhfbnbqtflsljl")
    public suspend fun vmStopSchedule(`value`: Output) {
        this.vmStopSchedule = value
    }

    /**
     * @param value The expiration time of the schedule. The timestamp is an RFC3339 string.
     */
    @JvmName("uykdwhcmbaggcbrl")
    public suspend fun expirationTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirationTime = mapped
    }

    /**
     * @param value The start time of the schedule. The timestamp is an RFC3339 string.
     */
    @JvmName("gsiyiuuqokkehxqe")
    public suspend fun startTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.startTime = mapped
    }

    /**
     * @param value Specifies the time zone to be used in interpreting the schedule. The value of this field must be a time zone name
     * from the tz database: http://en.wikipedia.org/wiki/Tz_database.
     */
    @JvmName("xjneolltybyjjvqx")
    public suspend fun timeZone(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeZone = mapped
    }

    /**
     * @param value Specifies the schedule for starting instances.
     * Structure is documented below.
     */
    @JvmName("ndouypnxtlofhfmr")
    public suspend fun vmStartSchedule(`value`: ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmStartSchedule = mapped
    }

    /**
     * @param argument Specifies the schedule for starting instances.
     * Structure is documented below.
     */
    @JvmName("vcygiowitsaomcmw")
    public suspend fun vmStartSchedule(argument: suspend ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = ResourcePolicyInstanceSchedulePolicyVmStartScheduleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.vmStartSchedule = mapped
    }

    /**
     * @param value Specifies the schedule for stopping instances.
     * Structure is documented below.
     */
    @JvmName("vncwwsgesxvokbtd")
    public suspend fun vmStopSchedule(`value`: ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmStopSchedule = mapped
    }

    /**
     * @param argument Specifies the schedule for stopping instances.
     * Structure is documented below.
     */
    @JvmName("sasdvoykrlpesnhp")
    public suspend fun vmStopSchedule(argument: suspend ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = ResourcePolicyInstanceSchedulePolicyVmStopScheduleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.vmStopSchedule = mapped
    }

    internal fun build(): ResourcePolicyInstanceSchedulePolicyArgs =
        ResourcePolicyInstanceSchedulePolicyArgs(
            expirationTime = expirationTime,
            startTime = startTime,
            timeZone = timeZone ?: throw PulumiNullFieldException("timeZone"),
            vmStartSchedule = vmStartSchedule,
            vmStopSchedule = vmStopSchedule,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy