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

com.pulumi.kubernetes.autoscaling.v2beta2.kotlin.inputs.ExternalMetricStatusArgs.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.v2beta2.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.v2beta2.inputs.ExternalMetricStatusArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
 * @property current current contains the current value for the given metric
 * @property metric metric identifies the target metric by name and selector
 */
public data class ExternalMetricStatusArgs(
    public val current: Output,
    public val metric: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ExternalMetricStatusArgs =
        com.pulumi.kubernetes.autoscaling.v2beta2.inputs.ExternalMetricStatusArgs.builder()
            .current(current.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .metric(metric.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ExternalMetricStatusArgs].
 */
@PulumiTagMarker
public class ExternalMetricStatusArgsBuilder internal constructor() {
    private var current: Output? = null

    private var metric: Output? = null

    /**
     * @param value current contains the current value for the given metric
     */
    @JvmName("ptekxtakjdwkjdwa")
    public suspend fun current(`value`: Output) {
        this.current = value
    }

    /**
     * @param value metric identifies the target metric by name and selector
     */
    @JvmName("awprnhyvyisahqvi")
    public suspend fun metric(`value`: Output) {
        this.metric = value
    }

    /**
     * @param value current contains the current value for the given metric
     */
    @JvmName("wetyrmjylsgpdndt")
    public suspend fun current(`value`: MetricValueStatusArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.current = mapped
    }

    /**
     * @param argument current contains the current value for the given metric
     */
    @JvmName("arxywrvkmprlofjj")
    public suspend fun current(argument: suspend MetricValueStatusArgsBuilder.() -> Unit) {
        val toBeMapped = MetricValueStatusArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.current = mapped
    }

    /**
     * @param value metric identifies the target metric by name and selector
     */
    @JvmName("rqlqfucfmsvaorch")
    public suspend fun metric(`value`: MetricIdentifierArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metric = mapped
    }

    /**
     * @param argument metric identifies the target metric by name and selector
     */
    @JvmName("fusqihljattpehcd")
    public suspend fun metric(argument: suspend MetricIdentifierArgsBuilder.() -> Unit) {
        val toBeMapped = MetricIdentifierArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.metric = mapped
    }

    internal fun build(): ExternalMetricStatusArgs = ExternalMetricStatusArgs(
        current = current ?: throw PulumiNullFieldException("current"),
        metric = metric ?: throw PulumiNullFieldException("metric"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy