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

com.pulumi.digitalocean.kotlin.inputs.AppSpecFunctionAlertArgs.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: 4.35.0.0
Show newest version
@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.AppSpecFunctionAlertArgs.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 AppSpecFunctionAlertArgs(
    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.AppSpecFunctionAlertArgs =
        com.pulumi.digitalocean.inputs.AppSpecFunctionAlertArgs.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 [AppSpecFunctionAlertArgs].
 */
@PulumiTagMarker
public class AppSpecFunctionAlertArgsBuilder 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("uadaaklaximtyhhs")
    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("iyeqalqakfehboco")
    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("ejwimenyvftvkgeo")
    public suspend fun rule(`value`: Output) {
        this.rule = value
    }

    /**
     * @param value The threshold for the type of the warning.
     */
    @JvmName("dtxtisqqmrkmqeso")
    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("dcbfpjkajdurisiq")
    public suspend fun window(`value`: Output) {
        this.window = value
    }

    /**
     * @param value Determines whether or not the alert is disabled (default: `false`).
     */
    @JvmName("mevxkgvcrcevedqu")
    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("ccubakylnnhjopyl")
    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("noexxrgnpojihair")
    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("abijtdwhowdjssyg")
    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("ctcvywyseggutjky")
    public suspend fun window(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.window = mapped
    }

    internal fun build(): AppSpecFunctionAlertArgs = AppSpecFunctionAlertArgs(
        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