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

com.pulumi.digitalocean.kotlin.inputs.AppSpecJobAlertArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.AppSpecJobAlertArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property disabled Determines whether or not the alert is disabled (default: `false`).
 * @property operator The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`.
 * @property rule The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`.
 * @property value The threshold for the type of the warning.
 * @property window The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`.
 */
public data class AppSpecJobAlertArgs(
    public val disabled: Output? = null,
    public val `operator`: Output,
    public val rule: Output,
    public val `value`: Output,
    public val window: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.AppSpecJobAlertArgs =
        com.pulumi.digitalocean.inputs.AppSpecJobAlertArgs.builder()
            .disabled(disabled?.applyValue({ args0 -> args0 }))
            .`operator`(`operator`.applyValue({ args0 -> args0 }))
            .rule(rule.applyValue({ args0 -> args0 }))
            .`value`(`value`.applyValue({ args0 -> args0 }))
            .window(window.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AppSpecJobAlertArgs].
 */
@PulumiTagMarker
public class AppSpecJobAlertArgsBuilder internal constructor() {
    private var disabled: Output? = null

    private var `operator`: Output? = null

    private var rule: Output? = null

    private var `value`: Output? = null

    private var window: Output? = null

    /**
     * @param value Determines whether or not the alert is disabled (default: `false`).
     */
    @JvmName("kgtojmidgmslieuw")
    public suspend fun disabled(`value`: Output) {
        this.disabled = value
    }

    /**
     * @param value The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`.
     */
    @JvmName("kjcxfwbkdqphskmi")
    public suspend fun `operator`(`value`: Output) {
        this.`operator` = value
    }

    /**
     * @param value The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`.
     */
    @JvmName("ipedrgfwujdmvnlw")
    public suspend fun rule(`value`: Output) {
        this.rule = value
    }

    /**
     * @param value The threshold for the type of the warning.
     */
    @JvmName("bvfooctruekgtpkj")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`.
     */
    @JvmName("jbieoicgaawqagas")
    public suspend fun window(`value`: Output) {
        this.window = value
    }

    /**
     * @param value Determines whether or not the alert is disabled (default: `false`).
     */
    @JvmName("xgdjytyxtrhvwuoe")
    public suspend fun disabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disabled = mapped
    }

    /**
     * @param value The operator to use. This is either of `GREATER_THAN` or `LESS_THAN`.
     */
    @JvmName("dbjanklybvdeooct")
    public suspend fun `operator`(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value The type of the alert to configure. Component app alert policies can be: `CPU_UTILIZATION`, `MEM_UTILIZATION`, or `RESTART_COUNT`.
     */
    @JvmName("ygjludebvwcwustn")
    public suspend fun rule(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rule = mapped
    }

    /**
     * @param value The threshold for the type of the warning.
     */
    @JvmName("nlrbpodmbohwrisl")
    public suspend fun `value`(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    /**
     * @param value The time before alerts should be triggered. This is may be one of: `FIVE_MINUTES`, `TEN_MINUTES`, `THIRTY_MINUTES`, `ONE_HOUR`.
     */
    @JvmName("gvbcqwcwktxwydhh")
    public suspend fun window(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.window = mapped
    }

    internal fun build(): AppSpecJobAlertArgs = AppSpecJobAlertArgs(
        disabled = disabled,
        `operator` = `operator` ?: throw PulumiNullFieldException("operator"),
        rule = rule ?: throw PulumiNullFieldException("rule"),
        `value` = `value` ?: throw PulumiNullFieldException("value"),
        window = window ?: throw PulumiNullFieldException("window"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy