com.pulumi.kubernetes.autoscaling.v2.kotlin.inputs.MetricIdentifierPatchArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.kubernetes.autoscaling.v2.kotlin.inputs
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 com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierPatchArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* MetricIdentifier defines the name and optionally selector for a metric
* @property name name is the name of the given metric
* @property selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
public data class MetricIdentifierPatchArgs(
public val name: Output? = null,
public val selector: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierPatchArgs =
com.pulumi.kubernetes.autoscaling.v2.inputs.MetricIdentifierPatchArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [MetricIdentifierPatchArgs].
*/
@PulumiTagMarker
public class MetricIdentifierPatchArgsBuilder internal constructor() {
private var name: Output? = null
private var selector: Output? = null
/**
* @param value name is the name of the given metric
*/
@JvmName("rurngndavgggocep")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("iowvntpvahsoyxrt")
public suspend fun selector(`value`: Output) {
this.selector = value
}
/**
* @param value name is the name of the given metric
*/
@JvmName("ogghotvcaadukfys")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("fdbtvxafikrdhkbb")
public suspend fun selector(`value`: LabelSelectorPatchArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.selector = mapped
}
/**
* @param argument selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.
*/
@JvmName("kjxesicwsydxferr")
public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.selector = mapped
}
internal fun build(): MetricIdentifierPatchArgs = MetricIdentifierPatchArgs(
name = name,
selector = selector,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy