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

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

There is a newer version: 4.18.2.0
Show 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.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricSourcePatchArgs.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

/**
 * ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
 * @property averageValue averageValue is the target value of the average of the metric across all relevant pods (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, 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.
 * @property targetValue targetValue is the target value of the metric (as a quantity).
 */
public data class ObjectMetricSourcePatchArgs(
    public val averageValue: Output? = null,
    public val metricName: Output? = null,
    public val selector: Output? = null,
    public val target: Output? = null,
    public val targetValue: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricSourcePatchArgs =
        com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ObjectMetricSourcePatchArgs.builder()
            .averageValue(averageValue?.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() }) }))
            .targetValue(targetValue?.applyValue({ args0 -> args0 })).build()
}

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

    private var metricName: Output? = null

    private var selector: Output? = null

    private var target: Output? = null

    private var targetValue: Output? = null

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

    /**
     * @param value metricName is the name of the metric in question.
     */
    @JvmName("idbefjgbsdabyimw")
    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, 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("xyqccmmhifneclbt")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

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

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

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

    /**
     * @param value metricName is the name of the metric in question.
     */
    @JvmName("igjpbkhtnhjfegfy")
    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, 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("duefrkimiwddguho")
    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("dxkqswmggvcxeyns")
    public suspend fun selector(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = LabelSelectorPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.selector = mapped
    }

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

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

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

    internal fun build(): ObjectMetricSourcePatchArgs = ObjectMetricSourcePatchArgs(
        averageValue = averageValue,
        metricName = metricName,
        selector = selector,
        target = target,
        targetValue = targetValue,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy