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

com.pulumi.azurenative.app.kotlin.inputs.ConfigurationArgs.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.app.kotlin.inputs

import com.pulumi.azurenative.app.inputs.ConfigurationArgs.builder
import com.pulumi.azurenative.app.kotlin.enums.ActiveRevisionsMode
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.collections.List
import kotlin.jvm.JvmName

/**
 * Non versioned Container App configuration properties that define the mutable settings of a Container app
 * @property activeRevisionsMode ActiveRevisionsMode controls how active revisions are handled for the Container app:
 * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default.
 * @property dapr Dapr configuration for the Container App.
 * @property ingress Ingress configurations.
 * @property maxInactiveRevisions Optional. Max inactive revisions a Container App can have.
 * @property registries Collection of private container registry credentials for containers used by the Container app
 * @property secrets Collection of secrets used by a Container app
 */
public data class ConfigurationArgs(
    public val activeRevisionsMode: Output>? = null,
    public val dapr: Output? = null,
    public val ingress: Output? = null,
    public val maxInactiveRevisions: Output? = null,
    public val registries: Output>? = null,
    public val secrets: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.inputs.ConfigurationArgs =
        com.pulumi.azurenative.app.inputs.ConfigurationArgs.builder()
            .activeRevisionsMode(
                activeRevisionsMode?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .dapr(dapr?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ingress(ingress?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .maxInactiveRevisions(maxInactiveRevisions?.applyValue({ args0 -> args0 }))
            .registries(
                registries?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .secrets(
                secrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var dapr: Output? = null

    private var ingress: Output? = null

    private var maxInactiveRevisions: Output? = null

    private var registries: Output>? = null

    private var secrets: Output>? = null

    /**
     * @param value ActiveRevisionsMode controls how active revisions are handled for the Container app:
     * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default.
     */
    @JvmName("gubvubucfdefefou")
    public suspend fun activeRevisionsMode(`value`: Output>) {
        this.activeRevisionsMode = value
    }

    /**
     * @param value Dapr configuration for the Container App.
     */
    @JvmName("mnetukbhxuawbmlt")
    public suspend fun dapr(`value`: Output) {
        this.dapr = value
    }

    /**
     * @param value Ingress configurations.
     */
    @JvmName("djvvqtwnihvysjpx")
    public suspend fun ingress(`value`: Output) {
        this.ingress = value
    }

    /**
     * @param value Optional. Max inactive revisions a Container App can have.
     */
    @JvmName("brhwpachsmdopvml")
    public suspend fun maxInactiveRevisions(`value`: Output) {
        this.maxInactiveRevisions = value
    }

    /**
     * @param value Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("qhmphmuxdjrypkcj")
    public suspend fun registries(`value`: Output>) {
        this.registries = value
    }

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

    /**
     * @param values Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("iuwgfsqdlmnnuasv")
    public suspend fun registries(values: List>) {
        this.registries = Output.all(values)
    }

    /**
     * @param value Collection of secrets used by a Container app
     */
    @JvmName("dpxslylrpdmoanyb")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

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

    /**
     * @param values Collection of secrets used by a Container app
     */
    @JvmName("cvtwhbirbadojtqr")
    public suspend fun secrets(values: List>) {
        this.secrets = Output.all(values)
    }

    /**
     * @param value ActiveRevisionsMode controls how active revisions are handled for the Container app:
     * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default.
     */
    @JvmName("jsrtnferuaitplcf")
    public suspend fun activeRevisionsMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.activeRevisionsMode = mapped
    }

    /**
     * @param value ActiveRevisionsMode controls how active revisions are handled for the Container app:
     * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default.
     */
    @JvmName("rmqbajatvcmtocit")
    public fun activeRevisionsMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.activeRevisionsMode = mapped
    }

    /**
     * @param value ActiveRevisionsMode controls how active revisions are handled for the Container app:
     * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default.
     */
    @JvmName("kbtpkkulhgefhjbw")
    public fun activeRevisionsMode(`value`: ActiveRevisionsMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.activeRevisionsMode = mapped
    }

    /**
     * @param value Dapr configuration for the Container App.
     */
    @JvmName("ulaahbddqacmpwfg")
    public suspend fun dapr(`value`: DaprArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dapr = mapped
    }

    /**
     * @param argument Dapr configuration for the Container App.
     */
    @JvmName("ehqgcxgugcbptbny")
    public suspend fun dapr(argument: suspend DaprArgsBuilder.() -> Unit) {
        val toBeMapped = DaprArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dapr = mapped
    }

    /**
     * @param value Ingress configurations.
     */
    @JvmName("nsdwuppbybwlwkba")
    public suspend fun ingress(`value`: IngressArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingress = mapped
    }

    /**
     * @param argument Ingress configurations.
     */
    @JvmName("qqkparmqjarbrxro")
    public suspend fun ingress(argument: suspend IngressArgsBuilder.() -> Unit) {
        val toBeMapped = IngressArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ingress = mapped
    }

    /**
     * @param value Optional. Max inactive revisions a Container App can have.
     */
    @JvmName("ucpmdowcvelvtbyy")
    public suspend fun maxInactiveRevisions(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxInactiveRevisions = mapped
    }

    /**
     * @param value Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("gypxycmlfuhnrntx")
    public suspend fun registries(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param argument Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("xgiuuoemvtioetsb")
    public suspend fun registries(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RegistryCredentialsArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("pjinffsjewkwusky")
    public suspend fun registries(vararg argument: suspend RegistryCredentialsArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RegistryCredentialsArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("qtycyidaxrwqqcjh")
    public suspend fun registries(argument: suspend RegistryCredentialsArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RegistryCredentialsArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param values Collection of private container registry credentials for containers used by the Container app
     */
    @JvmName("ujlrgqmcfxxwnnsi")
    public suspend fun registries(vararg values: RegistryCredentialsArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param value Collection of secrets used by a Container app
     */
    @JvmName("dsgyvhyaiwecmlgv")
    public suspend fun secrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param argument Collection of secrets used by a Container app
     */
    @JvmName("jabnarmemgjhghdj")
    public suspend fun secrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument Collection of secrets used by a Container app
     */
    @JvmName("jqebuuriwxvxydrg")
    public suspend fun secrets(vararg argument: suspend SecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SecretArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument Collection of secrets used by a Container app
     */
    @JvmName("kfqkpujmlmnpymdt")
    public suspend fun secrets(argument: suspend SecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param values Collection of secrets used by a Container app
     */
    @JvmName("qjgtahhprpnyqmic")
    public suspend fun secrets(vararg values: SecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    internal fun build(): ConfigurationArgs = ConfigurationArgs(
        activeRevisionsMode = activeRevisionsMode,
        dapr = dapr,
        ingress = ingress,
        maxInactiveRevisions = maxInactiveRevisions,
        registries = registries,
        secrets = secrets,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy