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

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

import com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelectorPatch
import kotlin.String
import kotlin.Suppress

/**
 * 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 ObjectMetricSourcePatch(
    public val averageValue: String? = null,
    public val metricName: String? = null,
    public val selector: LabelSelectorPatch? = null,
    public val target: CrossVersionObjectReferencePatch? = null,
    public val targetValue: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ObjectMetricSourcePatch): ObjectMetricSourcePatch = ObjectMetricSourcePatch(
            averageValue = javaType.averageValue().map({ args0 -> args0 }).orElse(null),
            metricName = javaType.metricName().map({ args0 -> args0 }).orElse(null),
            selector = javaType.selector().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelectorPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
            target = javaType.target().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.outputs.CrossVersionObjectReferencePatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
            targetValue = javaType.targetValue().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy