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

com.pulumi.alicloud.sae.kotlin.inputs.ApplicationScalingRuleScalingRuleMetricArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.sae.kotlin.inputs

import com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricArgs.builder
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.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property maxReplicas Maximum number of instances applied.
 * @property metrics Indicator rule configuration. See `metrics` below.
 * @property minReplicas Minimum number of instances applied.
 * @property scaleDownRules Apply shrink rules. See `scale_down_rules` below.
 * @property scaleUpRules Apply expansion rules. See `scale_up_rules` below.
 */
public data class ApplicationScalingRuleScalingRuleMetricArgs(
    public val maxReplicas: Output? = null,
    public val metrics: Output>? = null,
    public val minReplicas: Output? = null,
    public val scaleDownRules: Output? =
        null,
    public val scaleUpRules: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricArgs = com.pulumi.alicloud.sae.inputs.ApplicationScalingRuleScalingRuleMetricArgs.builder()
        .maxReplicas(maxReplicas?.applyValue({ args0 -> args0 }))
        .metrics(
            metrics?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        )
        .minReplicas(minReplicas?.applyValue({ args0 -> args0 }))
        .scaleDownRules(scaleDownRules?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .scaleUpRules(scaleUpRules?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ApplicationScalingRuleScalingRuleMetricArgs].
 */
@PulumiTagMarker
public class ApplicationScalingRuleScalingRuleMetricArgsBuilder internal constructor() {
    private var maxReplicas: Output? = null

    private var metrics: Output>? = null

    private var minReplicas: Output? = null

    private var scaleDownRules: Output? =
        null

    private var scaleUpRules: Output? = null

    /**
     * @param value Maximum number of instances applied.
     */
    @JvmName("xomsfjuawmnlphei")
    public suspend fun maxReplicas(`value`: Output) {
        this.maxReplicas = value
    }

    /**
     * @param value Indicator rule configuration. See `metrics` below.
     */
    @JvmName("wffvbydtlisrkkuk")
    public suspend fun metrics(`value`: Output>) {
        this.metrics = value
    }

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

    /**
     * @param values Indicator rule configuration. See `metrics` below.
     */
    @JvmName("mgmqrofybbipmqiq")
    public suspend fun metrics(values: List>) {
        this.metrics = Output.all(values)
    }

    /**
     * @param value Minimum number of instances applied.
     */
    @JvmName("dddxoquhfcxrflgg")
    public suspend fun minReplicas(`value`: Output) {
        this.minReplicas = value
    }

    /**
     * @param value Apply shrink rules. See `scale_down_rules` below.
     */
    @JvmName("cwbvqjcchhfogyag")
    public suspend fun scaleDownRules(`value`: Output) {
        this.scaleDownRules = value
    }

    /**
     * @param value Apply expansion rules. See `scale_up_rules` below.
     */
    @JvmName("nkkvbshphqfxfnoe")
    public suspend fun scaleUpRules(`value`: Output) {
        this.scaleUpRules = value
    }

    /**
     * @param value Maximum number of instances applied.
     */
    @JvmName("cqukoolqfpcplavd")
    public suspend fun maxReplicas(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxReplicas = mapped
    }

    /**
     * @param value Indicator rule configuration. See `metrics` below.
     */
    @JvmName("xukiscmvuxnqicql")
    public suspend fun metrics(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    /**
     * @param argument Indicator rule configuration. See `metrics` below.
     */
    @JvmName("juyshfjctkvwiifj")
    public suspend fun metrics(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApplicationScalingRuleScalingRuleMetricMetricArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param argument Indicator rule configuration. See `metrics` below.
     */
    @JvmName("ryfiiyapshggfsjb")
    public suspend fun metrics(vararg argument: suspend ApplicationScalingRuleScalingRuleMetricMetricArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApplicationScalingRuleScalingRuleMetricMetricArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param argument Indicator rule configuration. See `metrics` below.
     */
    @JvmName("hnjsjpntcivaensa")
    public suspend fun metrics(argument: suspend ApplicationScalingRuleScalingRuleMetricMetricArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ApplicationScalingRuleScalingRuleMetricMetricArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.metrics = mapped
    }

    /**
     * @param values Indicator rule configuration. See `metrics` below.
     */
    @JvmName("mgfbvgwaalydqpqq")
    public suspend fun metrics(vararg values: ApplicationScalingRuleScalingRuleMetricMetricArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metrics = mapped
    }

    /**
     * @param value Minimum number of instances applied.
     */
    @JvmName("tnihtqoilggupxdh")
    public suspend fun minReplicas(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minReplicas = mapped
    }

    /**
     * @param value Apply shrink rules. See `scale_down_rules` below.
     */
    @JvmName("rkhsrlqualxcvici")
    public suspend fun scaleDownRules(`value`: ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scaleDownRules = mapped
    }

    /**
     * @param argument Apply shrink rules. See `scale_down_rules` below.
     */
    @JvmName("vjseuoqbchecspae")
    public suspend fun scaleDownRules(argument: suspend ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgsBuilder.() -> Unit) {
        val toBeMapped =
            ApplicationScalingRuleScalingRuleMetricScaleDownRulesArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.scaleDownRules = mapped
    }

    /**
     * @param value Apply expansion rules. See `scale_up_rules` below.
     */
    @JvmName("adqsrswssjopaypi")
    public suspend fun scaleUpRules(`value`: ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scaleUpRules = mapped
    }

    /**
     * @param argument Apply expansion rules. See `scale_up_rules` below.
     */
    @JvmName("myjsinrbuvvligfh")
    public suspend fun scaleUpRules(argument: suspend ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgsBuilder.() -> Unit) {
        val toBeMapped = ApplicationScalingRuleScalingRuleMetricScaleUpRulesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.scaleUpRules = mapped
    }

    internal fun build(): ApplicationScalingRuleScalingRuleMetricArgs =
        ApplicationScalingRuleScalingRuleMetricArgs(
            maxReplicas = maxReplicas,
            metrics = metrics,
            minReplicas = minReplicas,
            scaleDownRules = scaleDownRules,
            scaleUpRules = scaleUpRules,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy