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

com.pulumi.azurenative.apimanagement.kotlin.inputs.BackendCircuitBreakerArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.apimanagement.kotlin.inputs

import com.pulumi.azurenative.apimanagement.inputs.BackendCircuitBreakerArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The configuration of the backend circuit breaker
 * @property rules The rules for tripping the backend.
 */
public data class BackendCircuitBreakerArgs(
    public val rules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.apimanagement.inputs.BackendCircuitBreakerArgs =
        com.pulumi.azurenative.apimanagement.inputs.BackendCircuitBreakerArgs.builder()
            .rules(
                rules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value The rules for tripping the backend.
     */
    @JvmName("oiaxvcpohcwmqqsn")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values The rules for tripping the backend.
     */
    @JvmName("urqfflfvrjdnrmpe")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value The rules for tripping the backend.
     */
    @JvmName("voygqhqeckwvucre")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument The rules for tripping the backend.
     */
    @JvmName("dklfaxwhwmcxacfb")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CircuitBreakerRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument The rules for tripping the backend.
     */
    @JvmName("ivxhkrpxloryvnok")
    public suspend fun rules(vararg argument: suspend CircuitBreakerRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CircuitBreakerRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument The rules for tripping the backend.
     */
    @JvmName("txubclrmdneqkorx")
    public suspend fun rules(argument: suspend CircuitBreakerRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CircuitBreakerRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values The rules for tripping the backend.
     */
    @JvmName("iykwmdlmkomufqch")
    public suspend fun rules(vararg values: CircuitBreakerRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): BackendCircuitBreakerArgs = BackendCircuitBreakerArgs(
        rules = rules,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy