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

com.pulumi.azurenative.insights.kotlin.inputs.LogFilesDataSourceArgs.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.insights.kotlin.inputs

import com.pulumi.azurenative.insights.inputs.LogFilesDataSourceArgs.builder
import com.pulumi.azurenative.insights.kotlin.enums.KnownLogFilesDataSourceFormat
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.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

/**
 * Definition of which custom log files will be collected by this data collection rule
 * @property filePatterns File Patterns where the log files are located
 * @property format The data format of the log files
 * @property name A friendly name for the data source.
 * This name should be unique across all data sources (regardless of type) within the data collection rule.
 * @property settings The log files specific settings.
 * @property streams List of streams that this data source will be sent to.
 * A stream indicates what schema will be used for this data source
 */
public data class LogFilesDataSourceArgs(
    public val filePatterns: Output>,
    public val format: Output>,
    public val name: Output? = null,
    public val settings: Output? = null,
    public val streams: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.LogFilesDataSourceArgs =
        com.pulumi.azurenative.insights.inputs.LogFilesDataSourceArgs.builder()
            .filePatterns(filePatterns.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .format(
                format.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .settings(settings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .streams(streams.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var format: Output>? = null

    private var name: Output? = null

    private var settings: Output? = null

    private var streams: Output>? = null

    /**
     * @param value File Patterns where the log files are located
     */
    @JvmName("appdtfpwawcnutye")
    public suspend fun filePatterns(`value`: Output>) {
        this.filePatterns = value
    }

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

    /**
     * @param values File Patterns where the log files are located
     */
    @JvmName("hivmoytsinlwmpat")
    public suspend fun filePatterns(values: List>) {
        this.filePatterns = Output.all(values)
    }

    /**
     * @param value The data format of the log files
     */
    @JvmName("rdiugfscftprrgof")
    public suspend fun format(`value`: Output>) {
        this.format = value
    }

    /**
     * @param value A friendly name for the data source.
     * This name should be unique across all data sources (regardless of type) within the data collection rule.
     */
    @JvmName("qjmlyccvkdlbnmss")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The log files specific settings.
     */
    @JvmName("fjxttbpedkjvbqbc")
    public suspend fun settings(`value`: Output) {
        this.settings = value
    }

    /**
     * @param value List of streams that this data source will be sent to.
     * A stream indicates what schema will be used for this data source
     */
    @JvmName("jkyltxyecmmyktjq")
    public suspend fun streams(`value`: Output>) {
        this.streams = value
    }

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

    /**
     * @param values List of streams that this data source will be sent to.
     * A stream indicates what schema will be used for this data source
     */
    @JvmName("ucuvvtsxscnytpam")
    public suspend fun streams(values: List>) {
        this.streams = Output.all(values)
    }

    /**
     * @param value File Patterns where the log files are located
     */
    @JvmName("noyblhvbrhvqrccp")
    public suspend fun filePatterns(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filePatterns = mapped
    }

    /**
     * @param values File Patterns where the log files are located
     */
    @JvmName("spnfgwlxmrvrnqsr")
    public suspend fun filePatterns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filePatterns = mapped
    }

    /**
     * @param value The data format of the log files
     */
    @JvmName("mtqjldfhbwgiqeql")
    public suspend fun format(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value The data format of the log files
     */
    @JvmName("mcnnaagptwhcwhga")
    public fun format(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value The data format of the log files
     */
    @JvmName("djtqdbbruaixyyut")
    public fun format(`value`: KnownLogFilesDataSourceFormat) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.format = mapped
    }

    /**
     * @param value A friendly name for the data source.
     * This name should be unique across all data sources (regardless of type) within the data collection rule.
     */
    @JvmName("mmcnfwbeycjskmou")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The log files specific settings.
     */
    @JvmName("pjhjpjhfortuvwon")
    public suspend fun settings(`value`: LogFilesDataSourceSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.settings = mapped
    }

    /**
     * @param argument The log files specific settings.
     */
    @JvmName("rsgedmfteccqrssa")
    public suspend fun settings(argument: suspend LogFilesDataSourceSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = LogFilesDataSourceSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.settings = mapped
    }

    /**
     * @param value List of streams that this data source will be sent to.
     * A stream indicates what schema will be used for this data source
     */
    @JvmName("jammmhohdpwxtsuv")
    public suspend fun streams(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.streams = mapped
    }

    /**
     * @param values List of streams that this data source will be sent to.
     * A stream indicates what schema will be used for this data source
     */
    @JvmName("nqtdohitrirtelkf")
    public suspend fun streams(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.streams = mapped
    }

    internal fun build(): LogFilesDataSourceArgs = LogFilesDataSourceArgs(
        filePatterns = filePatterns ?: throw PulumiNullFieldException("filePatterns"),
        format = format ?: throw PulumiNullFieldException("format"),
        name = name,
        settings = settings,
        streams = streams ?: throw PulumiNullFieldException("streams"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy