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

com.pulumi.azurenative.alertsmanagement.kotlin.inputs.ActionGroupArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.alertsmanagement.kotlin.inputs

import com.pulumi.azurenative.alertsmanagement.inputs.ActionGroupArgs.builder
import com.pulumi.azurenative.alertsmanagement.kotlin.enums.ActionRuleStatus
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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.jvm.JvmName

/**
 * Action rule with action group configuration
 * @property actionGroupId Action group to trigger if action rule matches
 * @property conditions conditions on which alerts will be filtered
 * @property description Description of action rule
 * @property scope scope on which action rule will apply
 * @property status Indicates if the given action rule is enabled or disabled
 * @property type Indicates type of action rule
 * Expected value is 'ActionGroup'.
 */
public data class ActionGroupArgs(
    public val actionGroupId: Output,
    public val conditions: Output? = null,
    public val description: Output? = null,
    public val scope: Output? = null,
    public val status: Output>? = null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.alertsmanagement.inputs.ActionGroupArgs =
        com.pulumi.azurenative.alertsmanagement.inputs.ActionGroupArgs.builder()
            .actionGroupId(actionGroupId.applyValue({ args0 -> args0 }))
            .conditions(conditions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .scope(scope?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .status(
                status?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ActionGroupArgs].
 */
@PulumiTagMarker
public class ActionGroupArgsBuilder internal constructor() {
    private var actionGroupId: Output? = null

    private var conditions: Output? = null

    private var description: Output? = null

    private var scope: Output? = null

    private var status: Output>? = null

    private var type: Output? = null

    /**
     * @param value Action group to trigger if action rule matches
     */
    @JvmName("ineffwxhrsikgdjp")
    public suspend fun actionGroupId(`value`: Output) {
        this.actionGroupId = value
    }

    /**
     * @param value conditions on which alerts will be filtered
     */
    @JvmName("gvrvqjbgqxflbkns")
    public suspend fun conditions(`value`: Output) {
        this.conditions = value
    }

    /**
     * @param value Description of action rule
     */
    @JvmName("wsoepayruwmmfnul")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value scope on which action rule will apply
     */
    @JvmName("qccylvsbjyijjpew")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value Indicates if the given action rule is enabled or disabled
     */
    @JvmName("gbeergekohiubkar")
    public suspend fun status(`value`: Output>) {
        this.status = value
    }

    /**
     * @param value Indicates type of action rule
     * Expected value is 'ActionGroup'.
     */
    @JvmName("pwcaoptepnmdouiw")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Action group to trigger if action rule matches
     */
    @JvmName("rnxjwmhdluuvkwsf")
    public suspend fun actionGroupId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actionGroupId = mapped
    }

    /**
     * @param value conditions on which alerts will be filtered
     */
    @JvmName("oawswqvtnxldingo")
    public suspend fun conditions(`value`: ConditionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditions = mapped
    }

    /**
     * @param argument conditions on which alerts will be filtered
     */
    @JvmName("vvkagnlymuygpeax")
    public suspend fun conditions(argument: suspend ConditionsArgsBuilder.() -> Unit) {
        val toBeMapped = ConditionsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.conditions = mapped
    }

    /**
     * @param value Description of action rule
     */
    @JvmName("cikscrfgkatvyqjw")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value scope on which action rule will apply
     */
    @JvmName("hgmmbwoiepxwtdon")
    public suspend fun scope(`value`: ScopeArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param argument scope on which action rule will apply
     */
    @JvmName("ctecrmsnrqkjndmr")
    public suspend fun scope(argument: suspend ScopeArgsBuilder.() -> Unit) {
        val toBeMapped = ScopeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scope = mapped
    }

    /**
     * @param value Indicates if the given action rule is enabled or disabled
     */
    @JvmName("bhbodkyeitpokibn")
    public suspend fun status(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Indicates if the given action rule is enabled or disabled
     */
    @JvmName("cukoctrqjtasnpyl")
    public fun status(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Indicates if the given action rule is enabled or disabled
     */
    @JvmName("rvftkvvjwnblyosd")
    public fun status(`value`: ActionRuleStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Indicates type of action rule
     * Expected value is 'ActionGroup'.
     */
    @JvmName("wwlacvaidwyeejfp")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ActionGroupArgs = ActionGroupArgs(
        actionGroupId = actionGroupId ?: throw PulumiNullFieldException("actionGroupId"),
        conditions = conditions,
        description = description,
        scope = scope,
        status = status,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy