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

com.pulumi.awsnative.applicationinsights.kotlin.inputs.ApplicationProcessArgs.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.applicationinsights.kotlin.inputs

import com.pulumi.awsnative.applicationinsights.inputs.ApplicationProcessArgs.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

/**
 * A process to be monitored for the component.
 * @property alarmMetrics A list of metrics to monitor for the component.
 * @property processName The name of the process to be monitored for the component.
 */
public data class ApplicationProcessArgs(
    public val alarmMetrics: Output>,
    public val processName: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.applicationinsights.inputs.ApplicationProcessArgs =
        com.pulumi.awsnative.applicationinsights.inputs.ApplicationProcessArgs.builder()
            .alarmMetrics(
                alarmMetrics.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .processName(processName.applyValue({ args0 -> args0 })).build()
}

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

    private var processName: Output? = null

    /**
     * @param value A list of metrics to monitor for the component.
     */
    @JvmName("gjnayhktxjtgigcm")
    public suspend fun alarmMetrics(`value`: Output>) {
        this.alarmMetrics = value
    }

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

    /**
     * @param values A list of metrics to monitor for the component.
     */
    @JvmName("plskdtesgounqhav")
    public suspend fun alarmMetrics(values: List>) {
        this.alarmMetrics = Output.all(values)
    }

    /**
     * @param value The name of the process to be monitored for the component.
     */
    @JvmName("bwnutqomwdubsems")
    public suspend fun processName(`value`: Output) {
        this.processName = value
    }

    /**
     * @param value A list of metrics to monitor for the component.
     */
    @JvmName("tyheewfsbcbgpesu")
    public suspend fun alarmMetrics(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarmMetrics = mapped
    }

    /**
     * @param argument A list of metrics to monitor for the component.
     */
    @JvmName("ssafcsduqfjcvqll")
    public suspend fun alarmMetrics(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApplicationAlarmMetricArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alarmMetrics = mapped
    }

    /**
     * @param argument A list of metrics to monitor for the component.
     */
    @JvmName("wsmasqafcbcmhxdu")
    public suspend fun alarmMetrics(vararg argument: suspend ApplicationAlarmMetricArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApplicationAlarmMetricArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.alarmMetrics = mapped
    }

    /**
     * @param argument A list of metrics to monitor for the component.
     */
    @JvmName("isxrckrmcgdamfjl")
    public suspend fun alarmMetrics(argument: suspend ApplicationAlarmMetricArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ApplicationAlarmMetricArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.alarmMetrics = mapped
    }

    /**
     * @param values A list of metrics to monitor for the component.
     */
    @JvmName("cmiactwhdqcefwlu")
    public suspend fun alarmMetrics(vararg values: ApplicationAlarmMetricArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarmMetrics = mapped
    }

    /**
     * @param value The name of the process to be monitored for the component.
     */
    @JvmName("caxbbltobchsygqn")
    public suspend fun processName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.processName = mapped
    }

    internal fun build(): ApplicationProcessArgs = ApplicationProcessArgs(
        alarmMetrics = alarmMetrics ?: throw PulumiNullFieldException("alarmMetrics"),
        processName = processName ?: throw PulumiNullFieldException("processName"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy