com.pulumi.azurenative.network.kotlin.inputs.FrontendEndpointArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.network.kotlin.inputs
import com.pulumi.azurenative.network.inputs.FrontendEndpointArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.SessionAffinityEnabledState
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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A frontend endpoint used for routing.
* @property hostName The host name of the frontendEndpoint. Must be a domain name.
* @property id Resource ID.
* @property name Resource name.
* @property sessionAffinityEnabledState Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
* @property sessionAffinityTtlSeconds UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable.
* @property webApplicationFirewallPolicyLink Defines the Web Application Firewall policy for each host (if applicable)
*/
public data class FrontendEndpointArgs(
public val hostName: Output? = null,
public val id: Output? = null,
public val name: Output? = null,
public val sessionAffinityEnabledState: Output>? =
null,
public val sessionAffinityTtlSeconds: Output? = null,
public val webApplicationFirewallPolicyLink: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.network.inputs.FrontendEndpointArgs =
com.pulumi.azurenative.network.inputs.FrontendEndpointArgs.builder()
.hostName(hostName?.applyValue({ args0 -> args0 }))
.id(id?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.sessionAffinityEnabledState(
sessionAffinityEnabledState?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.sessionAffinityTtlSeconds(sessionAffinityTtlSeconds?.applyValue({ args0 -> args0 }))
.webApplicationFirewallPolicyLink(
webApplicationFirewallPolicyLink?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
).build()
}
/**
* Builder for [FrontendEndpointArgs].
*/
@PulumiTagMarker
public class FrontendEndpointArgsBuilder internal constructor() {
private var hostName: Output? = null
private var id: Output? = null
private var name: Output? = null
private var sessionAffinityEnabledState: Output>? =
null
private var sessionAffinityTtlSeconds: Output? = null
private var webApplicationFirewallPolicyLink:
Output? = null
/**
* @param value The host name of the frontendEndpoint. Must be a domain name.
*/
@JvmName("uqqyrdoeegvsfedm")
public suspend fun hostName(`value`: Output) {
this.hostName = value
}
/**
* @param value Resource ID.
*/
@JvmName("rtublfxufkbknftk")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value Resource name.
*/
@JvmName("qotxxqmqlokwpaxn")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
*/
@JvmName("nqreqehsysfulnei")
public suspend fun sessionAffinityEnabledState(`value`: Output>) {
this.sessionAffinityEnabledState = value
}
/**
* @param value UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable.
*/
@JvmName("chtxdapnxbpbdynq")
public suspend fun sessionAffinityTtlSeconds(`value`: Output) {
this.sessionAffinityTtlSeconds = value
}
/**
* @param value Defines the Web Application Firewall policy for each host (if applicable)
*/
@JvmName("hfymmslernafoiyr")
public suspend fun webApplicationFirewallPolicyLink(`value`: Output) {
this.webApplicationFirewallPolicyLink = value
}
/**
* @param value The host name of the frontendEndpoint. Must be a domain name.
*/
@JvmName("twgjaxgixyjsdqhw")
public suspend fun hostName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.hostName = mapped
}
/**
* @param value Resource ID.
*/
@JvmName("ignuvlawipbncrjf")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value Resource name.
*/
@JvmName("etbvqgysdknfxteu")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
*/
@JvmName("doyaanadejpeopvs")
public suspend fun sessionAffinityEnabledState(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sessionAffinityEnabledState = mapped
}
/**
* @param value Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
*/
@JvmName("afcsnhlynjlpuqbc")
public fun sessionAffinityEnabledState(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.sessionAffinityEnabledState = mapped
}
/**
* @param value Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'
*/
@JvmName("ehxqyoauuxgnukhs")
public fun sessionAffinityEnabledState(`value`: SessionAffinityEnabledState) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.sessionAffinityEnabledState = mapped
}
/**
* @param value UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if applicable.
*/
@JvmName("fllwrrnitvfmwxex")
public suspend fun sessionAffinityTtlSeconds(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sessionAffinityTtlSeconds = mapped
}
/**
* @param value Defines the Web Application Firewall policy for each host (if applicable)
*/
@JvmName("scplhyklgaxrlxjh")
public suspend fun webApplicationFirewallPolicyLink(`value`: FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.webApplicationFirewallPolicyLink = mapped
}
/**
* @param argument Defines the Web Application Firewall policy for each host (if applicable)
*/
@JvmName("eqplykrmsdfwbqom")
public suspend fun webApplicationFirewallPolicyLink(argument: suspend FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgsBuilder.() -> Unit) {
val toBeMapped =
FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLinkArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.webApplicationFirewallPolicyLink = mapped
}
internal fun build(): FrontendEndpointArgs = FrontendEndpointArgs(
hostName = hostName,
id = id,
name = name,
sessionAffinityEnabledState = sessionAffinityEnabledState,
sessionAffinityTtlSeconds = sessionAffinityTtlSeconds,
webApplicationFirewallPolicyLink = webApplicationFirewallPolicyLink,
)
}