com.pulumi.gcp.billing.kotlin.inputs.BudgetThresholdRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.billing.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.billing.inputs.BudgetThresholdRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property spendBasis The type of basis used to determine if spend has passed
* the threshold.
* Default value is `CURRENT_SPEND`.
* Possible values are: `CURRENT_SPEND`, `FORECASTED_SPEND`.
* @property thresholdPercent Send an alert when this threshold is exceeded. This is a
* 1.0-based percentage, so 0.5 = 50%. Must be >= 0.
*/
public data class BudgetThresholdRuleArgs(
public val spendBasis: Output? = null,
public val thresholdPercent: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.billing.inputs.BudgetThresholdRuleArgs =
com.pulumi.gcp.billing.inputs.BudgetThresholdRuleArgs.builder()
.spendBasis(spendBasis?.applyValue({ args0 -> args0 }))
.thresholdPercent(thresholdPercent.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BudgetThresholdRuleArgs].
*/
@PulumiTagMarker
public class BudgetThresholdRuleArgsBuilder internal constructor() {
private var spendBasis: Output? = null
private var thresholdPercent: Output? = null
/**
* @param value The type of basis used to determine if spend has passed
* the threshold.
* Default value is `CURRENT_SPEND`.
* Possible values are: `CURRENT_SPEND`, `FORECASTED_SPEND`.
*/
@JvmName("cqpfbjauupyrrqqf")
public suspend fun spendBasis(`value`: Output) {
this.spendBasis = value
}
/**
* @param value Send an alert when this threshold is exceeded. This is a
* 1.0-based percentage, so 0.5 = 50%. Must be >= 0.
*/
@JvmName("ivvyoilowxxuxsfj")
public suspend fun thresholdPercent(`value`: Output) {
this.thresholdPercent = value
}
/**
* @param value The type of basis used to determine if spend has passed
* the threshold.
* Default value is `CURRENT_SPEND`.
* Possible values are: `CURRENT_SPEND`, `FORECASTED_SPEND`.
*/
@JvmName("lxygovwinrqvwkan")
public suspend fun spendBasis(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.spendBasis = mapped
}
/**
* @param value Send an alert when this threshold is exceeded. This is a
* 1.0-based percentage, so 0.5 = 50%. Must be >= 0.
*/
@JvmName("gkaohkmaupfstqjk")
public suspend fun thresholdPercent(`value`: Double) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.thresholdPercent = mapped
}
internal fun build(): BudgetThresholdRuleArgs = BudgetThresholdRuleArgs(
spendBasis = spendBasis,
thresholdPercent = thresholdPercent ?: throw PulumiNullFieldException("thresholdPercent"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy