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

com.pulumi.azurenative.web.kotlin.inputs.IngressArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.web.kotlin.inputs

import com.pulumi.azurenative.web.inputs.IngressArgs.builder
import com.pulumi.azurenative.web.kotlin.enums.IngressTransportMethod
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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Container App Ingress configuration.
 * @property allowInsecure Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
 * @property external Bool indicating if app exposes an external http endpoint
 * @property targetPort Target Port in containers for traffic from ingress
 * @property traffic
 * @property transport Ingress transport protocol
 */
public data class IngressArgs(
    public val allowInsecure: Output? = null,
    public val `external`: Output? = null,
    public val targetPort: Output? = null,
    public val traffic: Output>? = null,
    public val transport: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.IngressArgs =
        com.pulumi.azurenative.web.inputs.IngressArgs.builder()
            .allowInsecure(allowInsecure?.applyValue({ args0 -> args0 }))
            .`external`(`external`?.applyValue({ args0 -> args0 }))
            .targetPort(targetPort?.applyValue({ args0 -> args0 }))
            .traffic(
                traffic?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .transport(
                transport?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [IngressArgs].
 */
@PulumiTagMarker
public class IngressArgsBuilder internal constructor() {
    private var allowInsecure: Output? = null

    private var `external`: Output? = null

    private var targetPort: Output? = null

    private var traffic: Output>? = null

    private var transport: Output>? = null

    /**
     * @param value Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     */
    @JvmName("eynyjhldqxjsrjnr")
    public suspend fun allowInsecure(`value`: Output) {
        this.allowInsecure = value
    }

    /**
     * @param value Bool indicating if app exposes an external http endpoint
     */
    @JvmName("qrliuloxfocjubty")
    public suspend fun `external`(`value`: Output) {
        this.`external` = value
    }

    /**
     * @param value Target Port in containers for traffic from ingress
     */
    @JvmName("htbsxrjdryjofwod")
    public suspend fun targetPort(`value`: Output) {
        this.targetPort = value
    }

    /**
     * @param value
     */
    @JvmName("koqrbgldttlvodwt")
    public suspend fun traffic(`value`: Output>) {
        this.traffic = value
    }

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

    /**
     * @param values
     */
    @JvmName("uqkgyvbiryneaerb")
    public suspend fun traffic(values: List>) {
        this.traffic = Output.all(values)
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("trpgndtogmvmtupa")
    public suspend fun transport(`value`: Output>) {
        this.transport = value
    }

    /**
     * @param value Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections
     */
    @JvmName("wpiidrsoqffvyaqi")
    public suspend fun allowInsecure(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowInsecure = mapped
    }

    /**
     * @param value Bool indicating if app exposes an external http endpoint
     */
    @JvmName("mdrcnpyyebmffogm")
    public suspend fun `external`(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`external` = mapped
    }

    /**
     * @param value Target Port in containers for traffic from ingress
     */
    @JvmName("hdurnottmsmfhikf")
    public suspend fun targetPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetPort = mapped
    }

    /**
     * @param value
     */
    @JvmName("hreaidlnbdbyqnbk")
    public suspend fun traffic(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    /**
     * @param argument
     */
    @JvmName("okxpctlkrmmbpcia")
    public suspend fun traffic(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TrafficWeightArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param argument
     */
    @JvmName("kdwlhscxmxuhjxdo")
    public suspend fun traffic(vararg argument: suspend TrafficWeightArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TrafficWeightArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param argument
     */
    @JvmName("rfwrkulodokvietx")
    public suspend fun traffic(argument: suspend TrafficWeightArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TrafficWeightArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.traffic = mapped
    }

    /**
     * @param values
     */
    @JvmName("hbbkfboclmfpighk")
    public suspend fun traffic(vararg values: TrafficWeightArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.traffic = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("roxonjdvnxrdorre")
    public suspend fun transport(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("wxcqbwwvhtttfylo")
    public fun transport(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    /**
     * @param value Ingress transport protocol
     */
    @JvmName("oshapupaidiplwac")
    public fun transport(`value`: IngressTransportMethod) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transport = mapped
    }

    internal fun build(): IngressArgs = IngressArgs(
        allowInsecure = allowInsecure,
        `external` = `external`,
        targetPort = targetPort,
        traffic = traffic,
        transport = transport,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy