com.pulumi.azurenative.network.kotlin.inputs.MatchVariableArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin.inputs
import com.pulumi.azurenative.network.inputs.MatchVariableArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.WebApplicationFirewallMatchVariable
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Define match variables.
* @property selector The selector of match variable.
* @property variableName Match Variable.
*/
public data class MatchVariableArgs(
public val selector: Output? = null,
public val variableName: Output>,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.inputs.MatchVariableArgs =
com.pulumi.azurenative.network.inputs.MatchVariableArgs.builder()
.selector(selector?.applyValue({ args0 -> args0 }))
.variableName(
variableName.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [MatchVariableArgs].
*/
@PulumiTagMarker
public class MatchVariableArgsBuilder internal constructor() {
private var selector: Output? = null
private var variableName: Output>? = null
/**
* @param value The selector of match variable.
*/
@JvmName("gdmppqyfaugjoclr")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value Match Variable.
*/
@JvmName("ltbkhesahurrygwe")
public suspend fun variableName(`value`: Output>) {
this.variableName = value
}
/**
* @param value The selector of match variable.
*/
@JvmName("taihioyisnqmvrsp")
public suspend fun selector(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param value Match Variable.
*/
@JvmName("tyamgxnmjdkyrjqj")
public suspend fun variableName(`value`: Either) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.variableName = mapped
}
/**
* @param value Match Variable.
*/
@JvmName("vjxycajnigkidlyt")
public fun variableName(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.variableName = mapped
}
/**
* @param value Match Variable.
*/
@JvmName("wpawayfxsomovgwe")
public fun variableName(`value`: WebApplicationFirewallMatchVariable) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.variableName = mapped
}
internal fun build(): MatchVariableArgs = MatchVariableArgs(
selector = selector,
variableName = variableName ?: throw PulumiNullFieldException("variableName"),
)
}