com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.inputs.LimitResponseArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.inputs
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 com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.LimitResponseArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* LimitResponse defines how to handle requests that can not be executed right now.
* @property queuing `queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `"Queue"`.
* @property type `type` is "Queue" or "Reject". "Queue" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. "Reject" means that requests that can not be executed upon arrival are rejected. Required.
*/
public data class LimitResponseArgs(
public val queuing: Output? = null,
public val type: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.LimitResponseArgs =
com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.LimitResponseArgs.builder()
.queuing(queuing?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.type(type.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [LimitResponseArgs].
*/
@PulumiTagMarker
public class LimitResponseArgsBuilder internal constructor() {
private var queuing: Output? = null
private var type: Output? = null
/**
* @param value `queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `"Queue"`.
*/
@JvmName("lrjpbmheytiyypbm")
public suspend fun queuing(`value`: Output) {
this.queuing = value
}
/**
* @param value `type` is "Queue" or "Reject". "Queue" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. "Reject" means that requests that can not be executed upon arrival are rejected. Required.
*/
@JvmName("hskwgrbeacdrvwpe")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value `queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `"Queue"`.
*/
@JvmName("qvgkhomlrednffsu")
public suspend fun queuing(`value`: QueuingConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.queuing = mapped
}
/**
* @param argument `queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `"Queue"`.
*/
@JvmName("ctlnuefnfpgtvbop")
public suspend fun queuing(argument: suspend QueuingConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = QueuingConfigurationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.queuing = mapped
}
/**
* @param value `type` is "Queue" or "Reject". "Queue" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. "Reject" means that requests that can not be executed upon arrival are rejected. Required.
*/
@JvmName("yqhmslrhtlwjuvle")
public suspend fun type(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): LimitResponseArgs = LimitResponseArgs(
queuing = queuing,
type = type ?: throw PulumiNullFieldException("type"),
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy