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

com.pulumi.azurenative.chaos.kotlin.inputs.ContinuousActionArgs.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.chaos.kotlin.inputs

import com.pulumi.azurenative.chaos.inputs.ContinuousActionArgs.builder
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.collections.List
import kotlin.jvm.JvmName

/**
 * Model that represents a continuous action.
 * @property duration ISO8601 formatted string that represents a duration.
 * @property name String that represents a Capability URN.
 * @property parameters List of key value pairs.
 * @property selectorId String that represents a selector.
 * @property type Enum that discriminates between action models.
 * Expected value is 'continuous'.
 */
public data class ContinuousActionArgs(
    public val duration: Output,
    public val name: Output,
    public val parameters: Output>,
    public val selectorId: Output,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.chaos.inputs.ContinuousActionArgs =
        com.pulumi.azurenative.chaos.inputs.ContinuousActionArgs.builder()
            .duration(duration.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .parameters(
                parameters.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .selectorId(selectorId.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContinuousActionArgs].
 */
@PulumiTagMarker
public class ContinuousActionArgsBuilder internal constructor() {
    private var duration: Output? = null

    private var name: Output? = null

    private var parameters: Output>? = null

    private var selectorId: Output? = null

    private var type: Output? = null

    /**
     * @param value ISO8601 formatted string that represents a duration.
     */
    @JvmName("jygmgdmjigakvepd")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value String that represents a Capability URN.
     */
    @JvmName("djagfannmfrbvnwx")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value List of key value pairs.
     */
    @JvmName("ygexqrkunibffdkq")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values List of key value pairs.
     */
    @JvmName("lfcrimkrupouuaxm")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value String that represents a selector.
     */
    @JvmName("eyrrjomnlelucadv")
    public suspend fun selectorId(`value`: Output) {
        this.selectorId = value
    }

    /**
     * @param value Enum that discriminates between action models.
     * Expected value is 'continuous'.
     */
    @JvmName("dpkphcavwukbtqgw")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value ISO8601 formatted string that represents a duration.
     */
    @JvmName("wnlbxxuiojfoyobp")
    public suspend fun duration(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value String that represents a Capability URN.
     */
    @JvmName("xugytbodwpynumkb")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value List of key value pairs.
     */
    @JvmName("tmapixispmyfsxok")
    public suspend fun parameters(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument List of key value pairs.
     */
    @JvmName("okwtnwmcckhbgdiq")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            KeyValuePairArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument List of key value pairs.
     */
    @JvmName("kgfraftoyrubqawo")
    public suspend fun parameters(vararg argument: suspend KeyValuePairArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            KeyValuePairArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument List of key value pairs.
     */
    @JvmName("yichnxappjgsegfg")
    public suspend fun parameters(argument: suspend KeyValuePairArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(KeyValuePairArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values List of key value pairs.
     */
    @JvmName("corvmmbywxtompkn")
    public suspend fun parameters(vararg values: KeyValuePairArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value String that represents a selector.
     */
    @JvmName("qqsdfcmfmotbhxta")
    public suspend fun selectorId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectorId = mapped
    }

    /**
     * @param value Enum that discriminates between action models.
     * Expected value is 'continuous'.
     */
    @JvmName("mbeaygwgdtvtinpn")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ContinuousActionArgs = ContinuousActionArgs(
        duration = duration ?: throw PulumiNullFieldException("duration"),
        name = name ?: throw PulumiNullFieldException("name"),
        parameters = parameters ?: throw PulumiNullFieldException("parameters"),
        selectorId = selectorId ?: throw PulumiNullFieldException("selectorId"),
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy