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

com.pulumi.digitalocean.kotlin.inputs.AppSpecIngressArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.AppSpecIngressArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property rules Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
 */
public data class AppSpecIngressArgs(
    public val rules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.AppSpecIngressArgs =
        com.pulumi.digitalocean.inputs.AppSpecIngressArgs.builder()
            .rules(
                rules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AppSpecIngressArgs].
 */
@PulumiTagMarker
public class AppSpecIngressArgsBuilder internal constructor() {
    private var rules: Output>? = null

    /**
     * @param value Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("lrqfbpgfyheegbmx")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("oyjbytdivqyatdhq")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("wmuovrwiqdtdgukh")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("tnuvqwjcflosqhei")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppSpecIngressRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("oxrctdiejhhuctlh")
    public suspend fun rules(vararg argument: suspend AppSpecIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AppSpecIngressRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("hqwyfwclbffromle")
    public suspend fun rules(argument: suspend AppSpecIngressRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AppSpecIngressRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects.
     */
    @JvmName("viadwqkurinssdsk")
    public suspend fun rules(vararg values: AppSpecIngressRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): AppSpecIngressArgs = AppSpecIngressArgs(
        rules = rules,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy