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

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

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

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

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

/**
 * Dimension splitting and filtering definition
 * @property name Name of the dimension
 * @property operator Operator for dimension values
 * @property values List of dimension values
 */
public data class DimensionArgs(
    public val name: Output,
    public val `operator`: Output>,
    public val values: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.insights.inputs.DimensionArgs =
        com.pulumi.azurenative.insights.inputs.DimensionArgs.builder()
            .name(name.applyValue({ args0 -> args0 }))
            .`operator`(
                `operator`.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .values(values.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var `operator`: Output>? = null

    private var values: Output>? = null

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

    /**
     * @param value Operator for dimension values
     */
    @JvmName("vjlfqsrfeajlliwb")
    public suspend fun `operator`(`value`: Output>) {
        this.`operator` = value
    }

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

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

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

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

    /**
     * @param value Operator for dimension values
     */
    @JvmName("kbwmfhfvqdoappna")
    public suspend fun `operator`(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value Operator for dimension values
     */
    @JvmName("lofnuhfslschrqle")
    public fun `operator`(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value Operator for dimension values
     */
    @JvmName("lsyvyjcnxsivktmb")
    public fun `operator`(`value`: DimensionOperator) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value List of dimension values
     */
    @JvmName("fciuikdsgekhfoqn")
    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("tbpijtutwshsccmm")
    public suspend fun values(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy