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

com.pulumi.awsnative.iot.kotlin.CustomMetricArgs.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.iot.kotlin

import com.pulumi.awsnative.iot.CustomMetricArgs.builder
import com.pulumi.awsnative.iot.kotlin.enums.CustomMetricMetricType
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
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 custom metric published by your devices to Device Defender.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * @property displayName Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
 * @property metricName The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
 * @property metricType The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class CustomMetricArgs(
    public val displayName: Output? = null,
    public val metricName: Output? = null,
    public val metricType: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iot.CustomMetricArgs =
        com.pulumi.awsnative.iot.CustomMetricArgs.builder()
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .metricName(metricName?.applyValue({ args0 -> args0 }))
            .metricType(metricType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [CustomMetricArgs].
 */
@PulumiTagMarker
public class CustomMetricArgsBuilder internal constructor() {
    private var displayName: Output? = null

    private var metricName: Output? = null

    private var metricType: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
     */
    @JvmName("ubiotvrutfkrygdv")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
     */
    @JvmName("edijaxhwwfhbpeib")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
     */
    @JvmName("ecxeihwtcsjnlpvt")
    public suspend fun metricType(`value`: Output) {
        this.metricType = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("helnbwjgdebpgqgf")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("uqhpjgcjaqljbxuf")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
     */
    @JvmName("ddldmiyvwsfsxsql")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws: . Cannot be updated once defined.
     */
    @JvmName("kkrspjuuoicianfj")
    public suspend fun metricName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

    /**
     * @param value The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
     */
    @JvmName("jnxvpiqlfeoqaslm")
    public suspend fun metricType(`value`: CustomMetricMetricType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricType = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("ybswlndchnedmlub")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("lyvareyllqquwlcm")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("ffbkeqqxvijbssud")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("eqjwedhnutrlnlge")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("uemadmnfeilowrwg")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): CustomMetricArgs = CustomMetricArgs(
        displayName = displayName,
        metricName = metricName,
        metricType = metricType,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy