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

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

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

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

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

/**
 * Specifies a metric dimension.
 * @property name Name of the dimension.
 * @property operator the dimension operator. Only 'Include' and 'Exclude' are supported
 * @property values list of dimension values.
 */
public data class MetricDimensionArgs(
    public val name: Output,
    public val `operator`: Output,
    public val values: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.MetricDimensionArgs =
        com.pulumi.azurenative.insights.inputs.MetricDimensionArgs.builder()
            .name(name.applyValue({ args0 -> args0 }))
            .`operator`(`operator`.applyValue({ args0 -> args0 }))
            .values(values.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [MetricDimensionArgs].
 */
@PulumiTagMarker
public class MetricDimensionArgsBuilder internal constructor() {
    private var name: Output? = null

    private var `operator`: Output? = null

    private var values: Output>? = null

    /**
     * @param value Name of the dimension.
     */
    @JvmName("eaoxbqipoebvvobn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value the dimension operator. Only 'Include' and 'Exclude' are supported
     */
    @JvmName("vymkptbmfnywkjig")
    public suspend fun `operator`(`value`: Output) {
        this.`operator` = value
    }

    /**
     * @param value list of dimension values.
     */
    @JvmName("rrqgvlmdomyldjkh")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

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

    /**
     * @param values list of dimension values.
     */
    @JvmName("gmwnldmxlnyrhvtw")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

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

    /**
     * @param value the dimension operator. Only 'Include' and 'Exclude' are supported
     */
    @JvmName("qkotnhjjvuxabxxb")
    public suspend fun `operator`(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

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

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

    internal fun build(): MetricDimensionArgs = MetricDimensionArgs(
        name = name ?: throw PulumiNullFieldException("name"),
        `operator` = `operator` ?: throw PulumiNullFieldException("operator"),
        values = values ?: throw PulumiNullFieldException("values"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy