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

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

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

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

import com.pulumi.azurenative.web.inputs.DaprArgs.builder
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 Dapr configuration.
 * @property appId Dapr application identifier
 * @property appPort Port on which the Dapr side car
 * @property components Collection of Dapr components
 * @property enabled Boolean indicating if the Dapr side car is enabled
 */
public data class DaprArgs(
    public val appId: Output? = null,
    public val appPort: Output? = null,
    public val components: Output>? = null,
    public val enabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.DaprArgs =
        com.pulumi.azurenative.web.inputs.DaprArgs.builder()
            .appId(appId?.applyValue({ args0 -> args0 }))
            .appPort(appPort?.applyValue({ args0 -> args0 }))
            .components(
                components?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .enabled(enabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DaprArgs].
 */
@PulumiTagMarker
public class DaprArgsBuilder internal constructor() {
    private var appId: Output? = null

    private var appPort: Output? = null

    private var components: Output>? = null

    private var enabled: Output? = null

    /**
     * @param value Dapr application identifier
     */
    @JvmName("aqlyjevcaivoihyg")
    public suspend fun appId(`value`: Output) {
        this.appId = value
    }

    /**
     * @param value Port on which the Dapr side car
     */
    @JvmName("qstftmwcxceyaagt")
    public suspend fun appPort(`value`: Output) {
        this.appPort = value
    }

    /**
     * @param value Collection of Dapr components
     */
    @JvmName("wkviswxtdhgdlcjb")
    public suspend fun components(`value`: Output>) {
        this.components = value
    }

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

    /**
     * @param values Collection of Dapr components
     */
    @JvmName("efnagbjboksyfowg")
    public suspend fun components(values: List>) {
        this.components = Output.all(values)
    }

    /**
     * @param value Boolean indicating if the Dapr side car is enabled
     */
    @JvmName("wrhlphakwpinsmyw")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Dapr application identifier
     */
    @JvmName("pdvosunivprrpxix")
    public suspend fun appId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appId = mapped
    }

    /**
     * @param value Port on which the Dapr side car
     */
    @JvmName("amgnllniaowvidda")
    public suspend fun appPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appPort = mapped
    }

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

    /**
     * @param argument Collection of Dapr components
     */
    @JvmName("pxpdbdarbckhucyv")
    public suspend fun components(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DaprComponentArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.components = mapped
    }

    /**
     * @param argument Collection of Dapr components
     */
    @JvmName("pxxjyhhgiauqtuwe")
    public suspend fun components(vararg argument: suspend DaprComponentArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DaprComponentArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.components = mapped
    }

    /**
     * @param argument Collection of Dapr components
     */
    @JvmName("uksvgeudvwshfktc")
    public suspend fun components(argument: suspend DaprComponentArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DaprComponentArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.components = mapped
    }

    /**
     * @param values Collection of Dapr components
     */
    @JvmName("deaorbhcbarrnnov")
    public suspend fun components(vararg values: DaprComponentArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.components = mapped
    }

    /**
     * @param value Boolean indicating if the Dapr side car is enabled
     */
    @JvmName("gpsarxdjycpslrni")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    internal fun build(): DaprArgs = DaprArgs(
        appId = appId,
        appPort = appPort,
        components = components,
        enabled = enabled,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy