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

com.pulumi.azurenative.servicefabricmesh.kotlin.inputs.AutoScalingResourceMetricArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.servicefabricmesh.kotlin.inputs

import com.pulumi.azurenative.servicefabricmesh.inputs.AutoScalingResourceMetricArgs.builder
import com.pulumi.azurenative.servicefabricmesh.kotlin.enums.AutoScalingResourceMetricName
import com.pulumi.core.Either
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.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Describes the resource that is used for triggering auto scaling.
 * @property kind Enumerates the metrics that are used for triggering auto scaling.
 * Expected value is 'Resource'.
 * @property name Name of the resource.
 */
public data class AutoScalingResourceMetricArgs(
    public val kind: Output,
    public val name: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.servicefabricmesh.inputs.AutoScalingResourceMetricArgs =
        com.pulumi.azurenative.servicefabricmesh.inputs.AutoScalingResourceMetricArgs.builder()
            .kind(kind.applyValue({ args0 -> args0 }))
            .name(
                name.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AutoScalingResourceMetricArgs].
 */
@PulumiTagMarker
public class AutoScalingResourceMetricArgsBuilder internal constructor() {
    private var kind: Output? = null

    private var name: Output>? = null

    /**
     * @param value Enumerates the metrics that are used for triggering auto scaling.
     * Expected value is 'Resource'.
     */
    @JvmName("kgutsoyxutbbelql")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value Name of the resource.
     */
    @JvmName("enetkjigtlydffao")
    public suspend fun name(`value`: Output>) {
        this.name = value
    }

    /**
     * @param value Enumerates the metrics that are used for triggering auto scaling.
     * Expected value is 'Resource'.
     */
    @JvmName("rpelrstdycocuoxl")
    public suspend fun kind(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Name of the resource.
     */
    @JvmName("rihrxdwtyaulkmnb")
    public suspend fun name(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Name of the resource.
     */
    @JvmName("pfjyqiwctvbhchma")
    public fun name(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Name of the resource.
     */
    @JvmName("yhusotlwggrmvale")
    public fun name(`value`: AutoScalingResourceMetricName) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): AutoScalingResourceMetricArgs = AutoScalingResourceMetricArgs(
        kind = kind ?: throw PulumiNullFieldException("kind"),
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy