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

com.pulumi.digitalocean.kotlin.inputs.AppSpecServiceAlertArgs.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.AppSpecServiceAlertArgs.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 AppSpecServiceAlertArgs(
    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.AppSpecServiceAlertArgs =
        com.pulumi.digitalocean.inputs.AppSpecServiceAlertArgs.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 [AppSpecServiceAlertArgs].
 */
@PulumiTagMarker
public class AppSpecServiceAlertArgsBuilder 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("xsihsdperjmkdgav")
    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("wgjtfkdhwvkaocsf")
    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("hjuvbpnixjuqjpku")
    public suspend fun rule(`value`: Output) {
        this.rule = value
    }

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

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

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