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

com.pulumi.gcp.monitoring.kotlin.inputs.AlertPolicyConditionConditionAbsentArgs.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.monitoring.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.monitoring.inputs.AlertPolicyConditionConditionAbsentArgs.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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property aggregations Specifies the alignment of data points in
 * individual time series as well as how to
 * combine the retrieved time series together
 * (such as when aggregating multiple streams
 * on each resource to a single stream for each
 * resource or when aggregating streams across
 * all members of a group of resources).
 * Multiple aggregations are applied in the
 * order specified.
 * Structure is documented below.
 * @property duration The amount of time that a time series must
 * fail to report new data to be considered
 * failing. Currently, only values that are a
 * multiple of a minute--e.g. 60s, 120s, or 300s
 * --are supported.
 * @property filter A filter that identifies which time series
 * should be compared with the threshold.The
 * filter is similar to the one that is
 * specified in the
 * MetricService.ListTimeSeries request (that
 * call is useful to verify the time series
 * that will be retrieved / processed) and must
 * specify the metric type and optionally may
 * contain restrictions on resource type,
 * resource labels, and metric labels. This
 * field may not exceed 2048 Unicode characters
 * in length.
 * @property trigger The number/percent of time series for which
 * the comparison must hold in order for the
 * condition to trigger. If unspecified, then
 * the condition will trigger if the comparison
 * is true for any of the time series that have
 * been identified by filter and aggregations.
 * Structure is documented below.
 */
public data class AlertPolicyConditionConditionAbsentArgs(
    public val aggregations: Output>? = null,
    public val duration: Output,
    public val filter: Output? = null,
    public val trigger: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.monitoring.inputs.AlertPolicyConditionConditionAbsentArgs =
        com.pulumi.gcp.monitoring.inputs.AlertPolicyConditionConditionAbsentArgs.builder()
            .aggregations(
                aggregations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .duration(duration.applyValue({ args0 -> args0 }))
            .filter(filter?.applyValue({ args0 -> args0 }))
            .trigger(trigger?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [AlertPolicyConditionConditionAbsentArgs].
 */
@PulumiTagMarker
public class AlertPolicyConditionConditionAbsentArgsBuilder internal constructor() {
    private var aggregations: Output>? = null

    private var duration: Output? = null

    private var filter: Output? = null

    private var trigger: Output? = null

    /**
     * @param value Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("vghvigbfqddoiayw")
    public suspend fun aggregations(`value`: Output>) {
        this.aggregations = value
    }

    @JvmName("bpvuophjombgrtil")
    public suspend fun aggregations(vararg values: Output) {
        this.aggregations = Output.all(values.asList())
    }

    /**
     * @param values Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("kjllclhbhswotgqm")
    public suspend fun aggregations(values: List>) {
        this.aggregations = Output.all(values)
    }

    /**
     * @param value The amount of time that a time series must
     * fail to report new data to be considered
     * failing. Currently, only values that are a
     * multiple of a minute--e.g. 60s, 120s, or 300s
     * --are supported.
     */
    @JvmName("bljtnnvmsromrlhu")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value A filter that identifies which time series
     * should be compared with the threshold.The
     * filter is similar to the one that is
     * specified in the
     * MetricService.ListTimeSeries request (that
     * call is useful to verify the time series
     * that will be retrieved / processed) and must
     * specify the metric type and optionally may
     * contain restrictions on resource type,
     * resource labels, and metric labels. This
     * field may not exceed 2048 Unicode characters
     * in length.
     */
    @JvmName("mwechxmsbbbtiwhh")
    public suspend fun filter(`value`: Output) {
        this.filter = value
    }

    /**
     * @param value The number/percent of time series for which
     * the comparison must hold in order for the
     * condition to trigger. If unspecified, then
     * the condition will trigger if the comparison
     * is true for any of the time series that have
     * been identified by filter and aggregations.
     * Structure is documented below.
     */
    @JvmName("ygjafolqngtgbdsh")
    public suspend fun trigger(`value`: Output) {
        this.trigger = value
    }

    /**
     * @param value Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("hupgwkeeruhyhnuj")
    public suspend fun aggregations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aggregations = mapped
    }

    /**
     * @param argument Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("lvcrnktcplmdsiri")
    public suspend fun aggregations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AlertPolicyConditionConditionAbsentAggregationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.aggregations = mapped
    }

    /**
     * @param argument Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("nebedmfdswbvjckb")
    public suspend fun aggregations(vararg argument: suspend AlertPolicyConditionConditionAbsentAggregationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AlertPolicyConditionConditionAbsentAggregationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.aggregations = mapped
    }

    /**
     * @param argument Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("wwowupwtmodblshe")
    public suspend fun aggregations(argument: suspend AlertPolicyConditionConditionAbsentAggregationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AlertPolicyConditionConditionAbsentAggregationArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.aggregations = mapped
    }

    /**
     * @param values Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     */
    @JvmName("gmppdypnwmivwddi")
    public suspend fun aggregations(vararg values: AlertPolicyConditionConditionAbsentAggregationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.aggregations = mapped
    }

    /**
     * @param value The amount of time that a time series must
     * fail to report new data to be considered
     * failing. Currently, only values that are a
     * multiple of a minute--e.g. 60s, 120s, or 300s
     * --are supported.
     */
    @JvmName("cqpyittyactohqqv")
    public suspend fun duration(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value A filter that identifies which time series
     * should be compared with the threshold.The
     * filter is similar to the one that is
     * specified in the
     * MetricService.ListTimeSeries request (that
     * call is useful to verify the time series
     * that will be retrieved / processed) and must
     * specify the metric type and optionally may
     * contain restrictions on resource type,
     * resource labels, and metric labels. This
     * field may not exceed 2048 Unicode characters
     * in length.
     */
    @JvmName("txumepgxouqpejfl")
    public suspend fun filter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filter = mapped
    }

    /**
     * @param value The number/percent of time series for which
     * the comparison must hold in order for the
     * condition to trigger. If unspecified, then
     * the condition will trigger if the comparison
     * is true for any of the time series that have
     * been identified by filter and aggregations.
     * Structure is documented below.
     */
    @JvmName("vpglmjsihflcymcl")
    public suspend fun trigger(`value`: AlertPolicyConditionConditionAbsentTriggerArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.trigger = mapped
    }

    /**
     * @param argument The number/percent of time series for which
     * the comparison must hold in order for the
     * condition to trigger. If unspecified, then
     * the condition will trigger if the comparison
     * is true for any of the time series that have
     * been identified by filter and aggregations.
     * Structure is documented below.
     */
    @JvmName("icuhdgnaxebradhn")
    public suspend fun trigger(argument: suspend AlertPolicyConditionConditionAbsentTriggerArgsBuilder.() -> Unit) {
        val toBeMapped = AlertPolicyConditionConditionAbsentTriggerArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.trigger = mapped
    }

    internal fun build(): AlertPolicyConditionConditionAbsentArgs =
        AlertPolicyConditionConditionAbsentArgs(
            aggregations = aggregations,
            duration = duration ?: throw PulumiNullFieldException("duration"),
            filter = filter,
            trigger = trigger,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy