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

com.pulumi.gcp.logging.kotlin.inputs.MetricMetricDescriptorArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.logging.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.logging.inputs.MetricMetricDescriptorArgs.builder
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

/**
 *
 * @property displayName A concise name for the metric, which can be displayed in user interfaces. Use sentence case
 * without an ending period, for example "Request count". This field is optional but it is
 * recommended to be set for any metrics associated with user-visible concepts, such as Quota.
 * @property labels The set of labels that can be used to describe a specific instance of this metric type. For
 * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
 * for the HTTP response code, response_code, so you can look at latencies for successful responses
 * or just for responses that failed.
 * Structure is documented below.
 * @property metricKind Whether the metric records instantaneous values, changes to a value, etc.
 * Some combinations of metricKind and valueType might not be supported.
 * For counter metrics, set this to DELTA.
 * Possible values are: `DELTA`, `GAUGE`, `CUMULATIVE`.
 * @property unit The unit in which the metric value is reported. It is only applicable if the valueType is
 * `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of
 * [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard
 * @property valueType Whether the measurement is an integer, a floating-point number, etc.
 * Some combinations of metricKind and valueType might not be supported.
 * For counter metrics, set this to INT64.
 * Possible values are: `BOOL`, `INT64`, `DOUBLE`, `STRING`, `DISTRIBUTION`, `MONEY`.
 */
public data class MetricMetricDescriptorArgs(
    public val displayName: Output? = null,
    public val labels: Output>? = null,
    public val metricKind: Output,
    public val unit: Output? = null,
    public val valueType: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.logging.inputs.MetricMetricDescriptorArgs =
        com.pulumi.gcp.logging.inputs.MetricMetricDescriptorArgs.builder()
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .metricKind(metricKind.applyValue({ args0 -> args0 }))
            .unit(unit?.applyValue({ args0 -> args0 }))
            .valueType(valueType.applyValue({ args0 -> args0 })).build()
}

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

    private var labels: Output>? = null

    private var metricKind: Output? = null

    private var unit: Output? = null

    private var valueType: Output? = null

    /**
     * @param value A concise name for the metric, which can be displayed in user interfaces. Use sentence case
     * without an ending period, for example "Request count". This field is optional but it is
     * recommended to be set for any metrics associated with user-visible concepts, such as Quota.
     */
    @JvmName("jvldekdcpgjutpjl")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("hecsljihmihenyfr")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

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

    /**
     * @param values The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("xhgaiopkaxepvpol")
    public suspend fun labels(values: List>) {
        this.labels = Output.all(values)
    }

    /**
     * @param value Whether the metric records instantaneous values, changes to a value, etc.
     * Some combinations of metricKind and valueType might not be supported.
     * For counter metrics, set this to DELTA.
     * Possible values are: `DELTA`, `GAUGE`, `CUMULATIVE`.
     */
    @JvmName("lyhtumerpyaqqlam")
    public suspend fun metricKind(`value`: Output) {
        this.metricKind = value
    }

    /**
     * @param value The unit in which the metric value is reported. It is only applicable if the valueType is
     * `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of
     * [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard
     */
    @JvmName("nlnhobujytshbyak")
    public suspend fun unit(`value`: Output) {
        this.unit = value
    }

    /**
     * @param value Whether the measurement is an integer, a floating-point number, etc.
     * Some combinations of metricKind and valueType might not be supported.
     * For counter metrics, set this to INT64.
     * Possible values are: `BOOL`, `INT64`, `DOUBLE`, `STRING`, `DISTRIBUTION`, `MONEY`.
     */
    @JvmName("nhhyeupaigyorduk")
    public suspend fun valueType(`value`: Output) {
        this.valueType = value
    }

    /**
     * @param value A concise name for the metric, which can be displayed in user interfaces. Use sentence case
     * without an ending period, for example "Request count". This field is optional but it is
     * recommended to be set for any metrics associated with user-visible concepts, such as Quota.
     */
    @JvmName("yofogdafmbxqlkgq")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("osylxufgdfsiadgm")
    public suspend fun labels(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param argument The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("nejqfbeuogbkemxd")
    public suspend fun labels(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MetricMetricDescriptorLabelArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.labels = mapped
    }

    /**
     * @param argument The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("gkftypumpapwwvry")
    public suspend fun labels(vararg argument: suspend MetricMetricDescriptorLabelArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MetricMetricDescriptorLabelArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.labels = mapped
    }

    /**
     * @param argument The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("lqultdxlctwoemqk")
    public suspend fun labels(argument: suspend MetricMetricDescriptorLabelArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            MetricMetricDescriptorLabelArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.labels = mapped
    }

    /**
     * @param values The set of labels that can be used to describe a specific instance of this metric type. For
     * example, the appengine.googleapis.com/http/server/response_latencies metric type has a label
     * for the HTTP response code, response_code, so you can look at latencies for successful responses
     * or just for responses that failed.
     * Structure is documented below.
     */
    @JvmName("noraepqmttokwycd")
    public suspend fun labels(vararg values: MetricMetricDescriptorLabelArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value Whether the metric records instantaneous values, changes to a value, etc.
     * Some combinations of metricKind and valueType might not be supported.
     * For counter metrics, set this to DELTA.
     * Possible values are: `DELTA`, `GAUGE`, `CUMULATIVE`.
     */
    @JvmName("kgnaxrcgvpqednrx")
    public suspend fun metricKind(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metricKind = mapped
    }

    /**
     * @param value The unit in which the metric value is reported. It is only applicable if the valueType is
     * `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of
     * [The Unified Code for Units of Measure](http://unitsofmeasure.org/ucum.html) standard
     */
    @JvmName("ykdovxxipkupoarp")
    public suspend fun unit(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unit = mapped
    }

    /**
     * @param value Whether the measurement is an integer, a floating-point number, etc.
     * Some combinations of metricKind and valueType might not be supported.
     * For counter metrics, set this to INT64.
     * Possible values are: `BOOL`, `INT64`, `DOUBLE`, `STRING`, `DISTRIBUTION`, `MONEY`.
     */
    @JvmName("bsqqeywglldqmidf")
    public suspend fun valueType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.valueType = mapped
    }

    internal fun build(): MetricMetricDescriptorArgs = MetricMetricDescriptorArgs(
        displayName = displayName,
        labels = labels,
        metricKind = metricKind ?: throw PulumiNullFieldException("metricKind"),
        unit = unit,
        valueType = valueType ?: throw PulumiNullFieldException("valueType"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy