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

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

/**
 * ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
 * @property describedObject describedObject specifies the descriptions of a object,such as kind,name apiVersion
 * @property metric metric identifies the target metric by name and selector
 * @property target target specifies the target value for the given metric
 */
public data class ObjectMetricSourcePatchArgs(
    public val describedObject: Output? = null,
    public val metric: Output? = null,
    public val target: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2.inputs.ObjectMetricSourcePatchArgs =
        com.pulumi.kubernetes.autoscaling.v2.inputs.ObjectMetricSourcePatchArgs.builder()
            .describedObject(describedObject?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .metric(metric?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ObjectMetricSourcePatchArgs].
 */
@PulumiTagMarker
public class ObjectMetricSourcePatchArgsBuilder internal constructor() {
    private var describedObject: Output? = null

    private var metric: Output? = null

    private var target: Output? = null

    /**
     * @param value describedObject specifies the descriptions of a object,such as kind,name apiVersion
     */
    @JvmName("btuwgdulittoxgbt")
    public suspend fun describedObject(`value`: Output) {
        this.describedObject = value
    }

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

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

    /**
     * @param value describedObject specifies the descriptions of a object,such as kind,name apiVersion
     */
    @JvmName("skvcjtvupjwhxpvd")
    public suspend fun describedObject(`value`: CrossVersionObjectReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.describedObject = mapped
    }

    /**
     * @param argument describedObject specifies the descriptions of a object,such as kind,name apiVersion
     */
    @JvmName("txloxupnennufrkg")
    public suspend fun describedObject(argument: suspend CrossVersionObjectReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = CrossVersionObjectReferencePatchArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.describedObject = mapped
    }

    /**
     * @param value metric identifies the target metric by name and selector
     */
    @JvmName("gaoqhongrtpwduac")
    public suspend fun metric(`value`: MetricIdentifierPatchArgs?) {
        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("bilblwgmbxgkldbh")
    public suspend fun metric(argument: suspend MetricIdentifierPatchArgsBuilder.() -> Unit) {
        val toBeMapped = MetricIdentifierPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.metric = mapped
    }

    /**
     * @param value target specifies the target value for the given metric
     */
    @JvmName("pgngjhegfphmdalv")
    public suspend fun target(`value`: MetricTargetPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

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

    internal fun build(): ObjectMetricSourcePatchArgs = ObjectMetricSourcePatchArgs(
        describedObject = describedObject,
        metric = metric,
        target = target,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy