![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.servicefabric.kotlin.inputs.ServiceLoadMetricArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.servicefabric.kotlin.inputs
import com.pulumi.azurenative.servicefabric.inputs.ServiceLoadMetricArgs.builder
import com.pulumi.azurenative.servicefabric.kotlin.enums.ServiceLoadMetricWeight
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Specifies a metric to load balance a service during runtime.
* @property defaultLoad Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
* @property name The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
* @property primaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
* @property secondaryDefaultLoad Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
* @property weight The service load metric relative weight, compared to other metrics configured for this service, as a number.
*/
public data class ServiceLoadMetricArgs(
public val defaultLoad: Output? = null,
public val name: Output,
public val primaryDefaultLoad: Output? = null,
public val secondaryDefaultLoad: Output? = null,
public val weight: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.servicefabric.inputs.ServiceLoadMetricArgs =
com.pulumi.azurenative.servicefabric.inputs.ServiceLoadMetricArgs.builder()
.defaultLoad(defaultLoad?.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 }))
.primaryDefaultLoad(primaryDefaultLoad?.applyValue({ args0 -> args0 }))
.secondaryDefaultLoad(secondaryDefaultLoad?.applyValue({ args0 -> args0 }))
.weight(
weight?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [ServiceLoadMetricArgs].
*/
@PulumiTagMarker
public class ServiceLoadMetricArgsBuilder internal constructor() {
private var defaultLoad: Output? = null
private var name: Output? = null
private var primaryDefaultLoad: Output? = null
private var secondaryDefaultLoad: Output? = null
private var weight: Output>? = null
/**
* @param value Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
*/
@JvmName("qxdniyppijlkvvyy")
public suspend fun defaultLoad(`value`: Output) {
this.defaultLoad = value
}
/**
* @param value The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
*/
@JvmName("ejqwkptiugymifgb")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
*/
@JvmName("xmjqiinkswxhpcah")
public suspend fun primaryDefaultLoad(`value`: Output) {
this.primaryDefaultLoad = value
}
/**
* @param value Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
*/
@JvmName("gqxwafyljltcpsfu")
public suspend fun secondaryDefaultLoad(`value`: Output) {
this.secondaryDefaultLoad = value
}
/**
* @param value The service load metric relative weight, compared to other metrics configured for this service, as a number.
*/
@JvmName("aacprlpohvtocwvj")
public suspend fun weight(`value`: Output>) {
this.weight = value
}
/**
* @param value Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric.
*/
@JvmName("qkkodixfaxnksamx")
public suspend fun defaultLoad(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultLoad = mapped
}
/**
* @param value The name of the metric. If the service chooses to report load during runtime, the load metric name should match the name that is specified in Name exactly. Note that metric names are case sensitive.
*/
@JvmName("uoqiytlawodrirmm")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Primary replica.
*/
@JvmName("hshrqxebvcduroku")
public suspend fun primaryDefaultLoad(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.primaryDefaultLoad = mapped
}
/**
* @param value Used only for Stateful services. The default amount of load, as a number, that this service creates for this metric when it is a Secondary replica.
*/
@JvmName("dbycbaseuoldmrii")
public suspend fun secondaryDefaultLoad(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.secondaryDefaultLoad = mapped
}
/**
* @param value The service load metric relative weight, compared to other metrics configured for this service, as a number.
*/
@JvmName("kpbwixuvhqfsutha")
public suspend fun weight(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weight = mapped
}
/**
* @param value The service load metric relative weight, compared to other metrics configured for this service, as a number.
*/
@JvmName("mcrphxbilxtsvxit")
public fun weight(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.weight = mapped
}
/**
* @param value The service load metric relative weight, compared to other metrics configured for this service, as a number.
*/
@JvmName("ntagssmiifpvjjjq")
public fun weight(`value`: ServiceLoadMetricWeight) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.weight = mapped
}
internal fun build(): ServiceLoadMetricArgs = ServiceLoadMetricArgs(
defaultLoad = defaultLoad,
name = name ?: throw PulumiNullFieldException("name"),
primaryDefaultLoad = primaryDefaultLoad,
secondaryDefaultLoad = secondaryDefaultLoad,
weight = weight,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy