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

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

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

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

import com.pulumi.azurenative.web.inputs.DaprComponentArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Dapr component configuration
 * @property metadata Component metadata
 * @property name Component name
 * @property type Component type
 * @property version Component version
 */
public data class DaprComponentArgs(
    public val metadata: Output>? = null,
    public val name: Output? = null,
    public val type: Output? = null,
    public val version: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.DaprComponentArgs =
        com.pulumi.azurenative.web.inputs.DaprComponentArgs.builder()
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 }))
            .version(version?.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    private var type: Output? = null

    private var version: Output? = null

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

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

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

    /**
     * @param value Component name
     */
    @JvmName("aehmlvwqngvulims")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Component type
     */
    @JvmName("qcxwajdxffclmmge")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Component version
     */
    @JvmName("agnsncdpelyvnndd")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

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

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

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

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

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

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

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

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

    internal fun build(): DaprComponentArgs = DaprComponentArgs(
        metadata = metadata,
        name = name,
        type = type,
        version = version,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy