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

com.pulumi.azurenative.appplatform.kotlin.inputs.ScaleRuleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.appplatform.kotlin.inputs

import com.pulumi.azurenative.appplatform.inputs.ScaleRuleArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Azure Spring Apps App Instance scaling rule.
 * @property azureQueue Azure Queue based scaling.
 * @property custom Custom scale rule.
 * @property http HTTP requests based scaling.
 * @property name Scale Rule Name
 * @property tcp Tcp requests based scaling.
 */
public data class ScaleRuleArgs(
    public val azureQueue: Output? = null,
    public val custom: Output? = null,
    public val http: Output? = null,
    public val name: Output? = null,
    public val tcp: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.appplatform.inputs.ScaleRuleArgs =
        com.pulumi.azurenative.appplatform.inputs.ScaleRuleArgs.builder()
            .azureQueue(azureQueue?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .custom(custom?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .http(http?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tcp(tcp?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ScaleRuleArgs].
 */
@PulumiTagMarker
public class ScaleRuleArgsBuilder internal constructor() {
    private var azureQueue: Output? = null

    private var custom: Output? = null

    private var http: Output? = null

    private var name: Output? = null

    private var tcp: Output? = null

    /**
     * @param value Azure Queue based scaling.
     */
    @JvmName("gtcjsarbmnfxobnu")
    public suspend fun azureQueue(`value`: Output) {
        this.azureQueue = value
    }

    /**
     * @param value Custom scale rule.
     */
    @JvmName("joooqdswvqskdovs")
    public suspend fun custom(`value`: Output) {
        this.custom = value
    }

    /**
     * @param value HTTP requests based scaling.
     */
    @JvmName("ajcolpdmygajymal")
    public suspend fun http(`value`: Output) {
        this.http = value
    }

    /**
     * @param value Scale Rule Name
     */
    @JvmName("fymiyxtkiafvyrxe")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Tcp requests based scaling.
     */
    @JvmName("ccdiuptgyafwxbtn")
    public suspend fun tcp(`value`: Output) {
        this.tcp = value
    }

    /**
     * @param value Azure Queue based scaling.
     */
    @JvmName("uaoijopggpcgncqe")
    public suspend fun azureQueue(`value`: QueueScaleRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.azureQueue = mapped
    }

    /**
     * @param argument Azure Queue based scaling.
     */
    @JvmName("wsewgwumkierijdd")
    public suspend fun azureQueue(argument: suspend QueueScaleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = QueueScaleRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.azureQueue = mapped
    }

    /**
     * @param value Custom scale rule.
     */
    @JvmName("uxbsyhknfswmycga")
    public suspend fun custom(`value`: CustomScaleRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.custom = mapped
    }

    /**
     * @param argument Custom scale rule.
     */
    @JvmName("ywwxnstnbnbqjpqs")
    public suspend fun custom(argument: suspend CustomScaleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = CustomScaleRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.custom = mapped
    }

    /**
     * @param value HTTP requests based scaling.
     */
    @JvmName("auluioqcpxgiyurc")
    public suspend fun http(`value`: HttpScaleRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.http = mapped
    }

    /**
     * @param argument HTTP requests based scaling.
     */
    @JvmName("rvfsrgvvvggytvnj")
    public suspend fun http(argument: suspend HttpScaleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = HttpScaleRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.http = mapped
    }

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

    /**
     * @param value Tcp requests based scaling.
     */
    @JvmName("ncwfhvwkmiwynthi")
    public suspend fun tcp(`value`: TcpScaleRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tcp = mapped
    }

    /**
     * @param argument Tcp requests based scaling.
     */
    @JvmName("inccjxnbnkhbtjnc")
    public suspend fun tcp(argument: suspend TcpScaleRuleArgsBuilder.() -> Unit) {
        val toBeMapped = TcpScaleRuleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.tcp = mapped
    }

    internal fun build(): ScaleRuleArgs = ScaleRuleArgs(
        azureQueue = azureQueue,
        custom = custom,
        http = http,
        name = name,
        tcp = tcp,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy