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

com.pulumi.azurenative.alertsmanagement.kotlin.inputs.ScopeArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.azurenative.alertsmanagement.inputs.ScopeArgs.builder
import com.pulumi.azurenative.alertsmanagement.kotlin.enums.ScopeType
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.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Target scope for a given action rule. By default scope will be the subscription. User can also provide list of resource groups or list of resources from the scope subscription as well.
 * @property scopeType type of target scope
 * @property values list of ARM IDs of the given scope type which will be the target of the given action rule.
 */
public data class ScopeArgs(
    public val scopeType: Output>? = null,
    public val values: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.alertsmanagement.inputs.ScopeArgs =
        com.pulumi.azurenative.alertsmanagement.inputs.ScopeArgs.builder()
            .scopeType(
                scopeType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .values(values?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var values: Output>? = null

    /**
     * @param value type of target scope
     */
    @JvmName("nuyhblceaucducmh")
    public suspend fun scopeType(`value`: Output>) {
        this.scopeType = value
    }

    /**
     * @param value list of ARM IDs of the given scope type which will be the target of the given action rule.
     */
    @JvmName("jvunjgbfjhwullka")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

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

    /**
     * @param values list of ARM IDs of the given scope type which will be the target of the given action rule.
     */
    @JvmName("vfjbiqlhbdkwpthv")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

    /**
     * @param value type of target scope
     */
    @JvmName("swffsntmbcrgnfki")
    public suspend fun scopeType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scopeType = mapped
    }

    /**
     * @param value type of target scope
     */
    @JvmName("cmwuhrorxfhmtgas")
    public fun scopeType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopeType = mapped
    }

    /**
     * @param value type of target scope
     */
    @JvmName("arclxpcqaloaqofc")
    public fun scopeType(`value`: ScopeType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scopeType = mapped
    }

    /**
     * @param value list of ARM IDs of the given scope type which will be the target of the given action rule.
     */
    @JvmName("aphquxumwyumytxk")
    public suspend fun values(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param values list of ARM IDs of the given scope type which will be the target of the given action rule.
     */
    @JvmName("xrnhxrrdhtqugxjd")
    public suspend fun values(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

    internal fun build(): ScopeArgs = ScopeArgs(
        scopeType = scopeType,
        values = values,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy