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

com.pulumi.azurenative.network.kotlin.inputs.ApplicationGatewayRoutingRuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.network.kotlin.inputs

import com.pulumi.azurenative.network.inputs.ApplicationGatewayRoutingRuleArgs.builder
import com.pulumi.azurenative.network.kotlin.enums.ApplicationGatewayRequestRoutingRuleType
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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Routing rule of an application gateway.
 * @property backendAddressPool Backend address pool resource of the application gateway.
 * @property backendSettings Backend settings resource of the application gateway.
 * @property id Resource ID.
 * @property listener Listener resource of the application gateway.
 * @property name Name of the routing rule that is unique within an Application Gateway.
 * @property priority Priority of the routing rule.
 * @property ruleType Rule type.
 */
public data class ApplicationGatewayRoutingRuleArgs(
    public val backendAddressPool: Output? = null,
    public val backendSettings: Output? = null,
    public val id: Output? = null,
    public val listener: Output? = null,
    public val name: Output? = null,
    public val priority: Output,
    public val ruleType: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.ApplicationGatewayRoutingRuleArgs =
        com.pulumi.azurenative.network.inputs.ApplicationGatewayRoutingRuleArgs.builder()
            .backendAddressPool(
                backendAddressPool?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .backendSettings(backendSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .id(id?.applyValue({ args0 -> args0 }))
            .listener(listener?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .priority(priority.applyValue({ args0 -> args0 }))
            .ruleType(
                ruleType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [ApplicationGatewayRoutingRuleArgs].
 */
@PulumiTagMarker
public class ApplicationGatewayRoutingRuleArgsBuilder internal constructor() {
    private var backendAddressPool: Output? = null

    private var backendSettings: Output? = null

    private var id: Output? = null

    private var listener: Output? = null

    private var name: Output? = null

    private var priority: Output? = null

    private var ruleType: Output>? = null

    /**
     * @param value Backend address pool resource of the application gateway.
     */
    @JvmName("tsulasebkxohaali")
    public suspend fun backendAddressPool(`value`: Output) {
        this.backendAddressPool = value
    }

    /**
     * @param value Backend settings resource of the application gateway.
     */
    @JvmName("cihqlmpphhscnvpi")
    public suspend fun backendSettings(`value`: Output) {
        this.backendSettings = value
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("arnwnrnracxxwxff")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Listener resource of the application gateway.
     */
    @JvmName("idxyggnfwucbsxin")
    public suspend fun listener(`value`: Output) {
        this.listener = value
    }

    /**
     * @param value Name of the routing rule that is unique within an Application Gateway.
     */
    @JvmName("ahffveeyhmjgltsu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Priority of the routing rule.
     */
    @JvmName("aslfeqhrtpbflbxy")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value Rule type.
     */
    @JvmName("nsxkytxtrllnviux")
    public suspend fun ruleType(`value`: Output>) {
        this.ruleType = value
    }

    /**
     * @param value Backend address pool resource of the application gateway.
     */
    @JvmName("siojsqlpxbohrgxs")
    public suspend fun backendAddressPool(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backendAddressPool = mapped
    }

    /**
     * @param argument Backend address pool resource of the application gateway.
     */
    @JvmName("pstigylsfjnpkvug")
    public suspend fun backendAddressPool(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backendAddressPool = mapped
    }

    /**
     * @param value Backend settings resource of the application gateway.
     */
    @JvmName("ourvowhhsbbmeteb")
    public suspend fun backendSettings(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backendSettings = mapped
    }

    /**
     * @param argument Backend settings resource of the application gateway.
     */
    @JvmName("jqriisposvbswjkn")
    public suspend fun backendSettings(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backendSettings = mapped
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("mtllvswbhyichgfn")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Listener resource of the application gateway.
     */
    @JvmName("lohkpndrclltuhrm")
    public suspend fun listener(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.listener = mapped
    }

    /**
     * @param argument Listener resource of the application gateway.
     */
    @JvmName("tcdtwvwfhxxulsmt")
    public suspend fun listener(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.listener = mapped
    }

    /**
     * @param value Name of the routing rule that is unique within an Application Gateway.
     */
    @JvmName("eoqrbrdpihatpkvj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Priority of the routing rule.
     */
    @JvmName("eqnkeeikkddbsyhs")
    public suspend fun priority(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value Rule type.
     */
    @JvmName("kjiyebwyrqhevddm")
    public suspend fun ruleType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ruleType = mapped
    }

    /**
     * @param value Rule type.
     */
    @JvmName("isljwwquakivnehq")
    public fun ruleType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleType = mapped
    }

    /**
     * @param value Rule type.
     */
    @JvmName("sgblhvsaefutbtft")
    public fun ruleType(`value`: ApplicationGatewayRequestRoutingRuleType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ruleType = mapped
    }

    internal fun build(): ApplicationGatewayRoutingRuleArgs = ApplicationGatewayRoutingRuleArgs(
        backendAddressPool = backendAddressPool,
        backendSettings = backendSettings,
        id = id,
        listener = listener,
        name = name,
        priority = priority ?: throw PulumiNullFieldException("priority"),
        ruleType = ruleType,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy