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

com.pulumi.aws.autoscalingplans.kotlin.inputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.autoscalingplans.kotlin.inputs

import com.pulumi.aws.autoscalingplans.inputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property dimensions Dimensions of the metric.
 * @property metricName Name of the metric.
 * @property namespace Namespace of the metric.
 * @property statistic Statistic of the metric. Currently, the value must always be `Sum`.
 * @property unit Unit of the metric.
 */
public data class ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs(
    public val dimensions: Output>? = null,
    public val metricName: Output,
    public val namespace: Output,
    public val statistic: Output,
    public val unit: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.autoscalingplans.inputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs =
        com.pulumi.aws.autoscalingplans.inputs.ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs.builder()
            .dimensions(
                dimensions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .metricName(metricName.applyValue({ args0 -> args0 }))
            .namespace(namespace.applyValue({ args0 -> args0 }))
            .statistic(statistic.applyValue({ args0 -> args0 }))
            .unit(unit?.applyValue({ args0 -> args0 })).build()
}

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

    private var metricName: Output? = null

    private var namespace: Output? = null

    private var statistic: Output? = null

    private var unit: Output? = null

    /**
     * @param value Dimensions of the metric.
     */
    @JvmName("efepuhjmbchkabpb")
    public suspend fun dimensions(`value`: Output>) {
        this.dimensions = value
    }

    /**
     * @param value Name of the metric.
     */
    @JvmName("mcwmqkkqnxnixsta")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value Namespace of the metric.
     */
    @JvmName("jqtstjyxyscisnbt")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value Statistic of the metric. Currently, the value must always be `Sum`.
     */
    @JvmName("tqepciilsahertpg")
    public suspend fun statistic(`value`: Output) {
        this.statistic = value
    }

    /**
     * @param value Unit of the metric.
     */
    @JvmName("iaqegrkpxufhvgkm")
    public suspend fun unit(`value`: Output) {
        this.unit = value
    }

    /**
     * @param value Dimensions of the metric.
     */
    @JvmName("cyhgfphdsuwjrdpn")
    public suspend fun dimensions(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param values Dimensions of the metric.
     */
    @JvmName("qrvetdmrnljfuqfu")
    public fun dimensions(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

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

    /**
     * @param value Namespace of the metric.
     */
    @JvmName("lgoalqgxxfbvkrke")
    public suspend fun namespace(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    /**
     * @param value Statistic of the metric. Currently, the value must always be `Sum`.
     */
    @JvmName("ofkxldhkuvjgistd")
    public suspend fun statistic(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statistic = mapped
    }

    /**
     * @param value Unit of the metric.
     */
    @JvmName("qntoqkmdinfumomu")
    public suspend fun unit(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.unit = mapped
    }

    internal fun build(): ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs =
        ScalingPlanScalingInstructionCustomizedLoadMetricSpecificationArgs(
            dimensions = dimensions,
            metricName = metricName ?: throw PulumiNullFieldException("metricName"),
            namespace = namespace ?: throw PulumiNullFieldException("namespace"),
            statistic = statistic ?: throw PulumiNullFieldException("statistic"),
            unit = unit,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy