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

com.pulumi.azurenative.insights.kotlin.inputs.DataSourceArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.insights.kotlin.inputs

import com.pulumi.azurenative.insights.inputs.DataSourceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 * Data source object contains configuration to collect telemetry and one or more sinks to send that telemetry data to
 * @property configuration
 * @property kind Datasource kind
 * @property sinks
 */
public data class DataSourceArgs(
    public val configuration: Output,
    public val kind: Output,
    public val sinks: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.DataSourceArgs =
        com.pulumi.azurenative.insights.inputs.DataSourceArgs.builder()
            .configuration(configuration.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .kind(kind.applyValue({ args0 -> args0 }))
            .sinks(
                sinks.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DataSourceArgs].
 */
@PulumiTagMarker
public class DataSourceArgsBuilder internal constructor() {
    private var configuration: Output? = null

    private var kind: Output? = null

    private var sinks: Output>? = null

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

    /**
     * @param value Datasource kind
     */
    @JvmName("oxmchyfltbieltvj")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

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

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

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

    /**
     * @param value
     */
    @JvmName("gjkpytpagmkdcsem")
    public suspend fun configuration(`value`: DataSourceConfigurationArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.configuration = mapped
    }

    /**
     * @param argument
     */
    @JvmName("arsvdqayhgeaguqq")
    public suspend fun configuration(argument: suspend DataSourceConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = DataSourceConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.configuration = mapped
    }

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

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

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

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

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

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

    internal fun build(): DataSourceArgs = DataSourceArgs(
        configuration = configuration ?: throw PulumiNullFieldException("configuration"),
        kind = kind ?: throw PulumiNullFieldException("kind"),
        sinks = sinks ?: throw PulumiNullFieldException("sinks"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy