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

com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs.ObjectMetricStatusArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.inputs

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 com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricStatusArgs.builder
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
 * @property averageValue averageValue is the current value of the average of the metric across all relevant pods (as a quantity)
 * @property currentValue currentValue is the current value of the metric (as a quantity).
 * @property metricName metricName is the name of the metric in question.
 * @property selector selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.
 * @property target target is the described Kubernetes object.
 */
public data class ObjectMetricStatusArgs(
    public val averageValue: Output? = null,
    public val currentValue: Output,
    public val metricName: Output,
    public val selector: Output? = null,
    public val target: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricStatusArgs =
        com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricStatusArgs.builder()
            .averageValue(averageValue?.applyValue({ args0 -> args0 }))
            .currentValue(currentValue.applyValue({ args0 -> args0 }))
            .metricName(metricName.applyValue({ args0 -> args0 }))
            .selector(selector?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .target(target.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ObjectMetricStatusArgs].
 */
@PulumiTagMarker
public class ObjectMetricStatusArgsBuilder internal constructor() {
    private var averageValue: Output? = null

    private var currentValue: Output? = null

    private var metricName: Output? = null

    private var selector: Output? = null

    private var target: Output? = null

    /**
     * @param value averageValue is the current value of the average of the metric across all relevant pods (as a quantity)
     */
    @JvmName("ctryswuuysxfevnr")
    public suspend fun averageValue(`value`: Output) {
        this.averageValue = value
    }

    /**
     * @param value currentValue is the current value of the metric (as a quantity).
     */
    @JvmName("vodyunxvumkdvgni")
    public suspend fun currentValue(`value`: Output) {
        this.currentValue = value
    }

    /**
     * @param value metricName is the name of the metric in question.
     */
    @JvmName("kqxvyxnlsshhmnov")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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("annrltfmxildaeab")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value target is the described Kubernetes object.
     */
    @JvmName("pdwrpmcqmfevlraq")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value averageValue is the current value of the average of the metric across all relevant pods (as a quantity)
     */
    @JvmName("mknnmfhfafekssao")
    public suspend fun averageValue(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.averageValue = mapped
    }

    /**
     * @param value currentValue is the current value of the metric (as a quantity).
     */
    @JvmName("fwbdwssfmvwwikpp")
    public suspend fun currentValue(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.currentValue = mapped
    }

    /**
     * @param value metricName is the name of the metric in question.
     */
    @JvmName("xihmobwkdqbwhuyi")
    public suspend fun metricName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

    /**
     * @param value selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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("cwpdauvthjwxqnbl")
    public suspend fun selector(`value`: LabelSelectorArgs?) {
        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 in the ObjectMetricSource, 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("pmmwjrpdwltcubbv")
    public suspend fun selector(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

    /**
     * @param value target is the described Kubernetes object.
     */
    @JvmName("oeobdvtvrmhhhjvm")
    public suspend fun target(`value`: CrossVersionObjectReferenceArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument target is the described Kubernetes object.
     */
    @JvmName("lsghwfjyymqqbbte")
    public suspend fun target(argument: suspend CrossVersionObjectReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = CrossVersionObjectReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    internal fun build(): ObjectMetricStatusArgs = ObjectMetricStatusArgs(
        averageValue = averageValue,
        currentValue = currentValue ?: throw PulumiNullFieldException("currentValue"),
        metricName = metricName ?: throw PulumiNullFieldException("metricName"),
        selector = selector,
        target = target ?: throw PulumiNullFieldException("target"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy