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

com.pulumi.azure.chaosstudio.kotlin.inputs.ExperimentStepBranchActionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.chaosstudio.kotlin.inputs

import com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchActionArgs.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 kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property actionType The type of action that should be added to the experiment. Possible values are `continuous`, `delay` and `discrete`.
 * @property duration An ISO8601 formatted string specifying the duration for a `delay` or `continuous` action.
 * @property parameters A key-value map of additional parameters to configure the action. The values that are accepted by this depend on the `urn` i.e. the capability/fault that is applied. Possible parameter values can be found in this [documentation](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-library)
 * @property selectorName The name of the Selector to which this action should apply to. This must be specified if the `action_type` is `continuous` or `discrete`.
 * @property urn The Unique Resource Name of the action, this value is provided by the `azure.chaosstudio.Capability` resource e.g. `azurerm_chaos_studio_capability.example.urn`. This must be specified if the `action_type` is `continuous` or `discrete`.
 */
public data class ExperimentStepBranchActionArgs(
    public val actionType: Output,
    public val duration: Output? = null,
    public val parameters: Output>? = null,
    public val selectorName: Output? = null,
    public val urn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchActionArgs =
        com.pulumi.azure.chaosstudio.inputs.ExperimentStepBranchActionArgs.builder()
            .actionType(actionType.applyValue({ args0 -> args0 }))
            .duration(duration?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .selectorName(selectorName?.applyValue({ args0 -> args0 }))
            .urn(urn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ExperimentStepBranchActionArgs].
 */
@PulumiTagMarker
public class ExperimentStepBranchActionArgsBuilder internal constructor() {
    private var actionType: Output? = null

    private var duration: Output? = null

    private var parameters: Output>? = null

    private var selectorName: Output? = null

    private var urn: Output? = null

    /**
     * @param value The type of action that should be added to the experiment. Possible values are `continuous`, `delay` and `discrete`.
     */
    @JvmName("rctkrlkkorpqbxob")
    public suspend fun actionType(`value`: Output) {
        this.actionType = value
    }

    /**
     * @param value An ISO8601 formatted string specifying the duration for a `delay` or `continuous` action.
     */
    @JvmName("csynhvyucpxrogmw")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value A key-value map of additional parameters to configure the action. The values that are accepted by this depend on the `urn` i.e. the capability/fault that is applied. Possible parameter values can be found in this [documentation](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-library)
     */
    @JvmName("dfymthjsnoxfbdpa")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value The name of the Selector to which this action should apply to. This must be specified if the `action_type` is `continuous` or `discrete`.
     */
    @JvmName("axgjjqpwvyrxksey")
    public suspend fun selectorName(`value`: Output) {
        this.selectorName = value
    }

    /**
     * @param value The Unique Resource Name of the action, this value is provided by the `azure.chaosstudio.Capability` resource e.g. `azurerm_chaos_studio_capability.example.urn`. This must be specified if the `action_type` is `continuous` or `discrete`.
     */
    @JvmName("mbnkvguamilsprvm")
    public suspend fun urn(`value`: Output) {
        this.urn = value
    }

    /**
     * @param value The type of action that should be added to the experiment. Possible values are `continuous`, `delay` and `discrete`.
     */
    @JvmName("rvhrsvgvchdqdnfu")
    public suspend fun actionType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actionType = mapped
    }

    /**
     * @param value An ISO8601 formatted string specifying the duration for a `delay` or `continuous` action.
     */
    @JvmName("liplavrpcxkcoovl")
    public suspend fun duration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value A key-value map of additional parameters to configure the action. The values that are accepted by this depend on the `urn` i.e. the capability/fault that is applied. Possible parameter values can be found in this [documentation](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-library)
     */
    @JvmName("snrplqpwwbafxjqm")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param values A key-value map of additional parameters to configure the action. The values that are accepted by this depend on the `urn` i.e. the capability/fault that is applied. Possible parameter values can be found in this [documentation](https://learn.microsoft.com/azure/chaos-studio/chaos-studio-fault-library)
     */
    @JvmName("eesgnqqipwroyxhc")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The name of the Selector to which this action should apply to. This must be specified if the `action_type` is `continuous` or `discrete`.
     */
    @JvmName("aqpvebsxpuawehpr")
    public suspend fun selectorName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selectorName = mapped
    }

    /**
     * @param value The Unique Resource Name of the action, this value is provided by the `azure.chaosstudio.Capability` resource e.g. `azurerm_chaos_studio_capability.example.urn`. This must be specified if the `action_type` is `continuous` or `discrete`.
     */
    @JvmName("hnjiiwwhkmexixgj")
    public suspend fun urn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.urn = mapped
    }

    internal fun build(): ExperimentStepBranchActionArgs = ExperimentStepBranchActionArgs(
        actionType = actionType ?: throw PulumiNullFieldException("actionType"),
        duration = duration,
        parameters = parameters,
        selectorName = selectorName,
        urn = urn,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy