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

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

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

/**
 * ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one "target" type should be set.
 * @property metricName metricName is the name of the metric in question.
 * @property metricSelector metricSelector is used to identify a specific time series within a given metric.
 * @property targetAverageValue targetAverageValue is the target per-pod value of global metric (as a quantity). Mutually exclusive with TargetValue.
 * @property targetValue targetValue is the target value of the metric (as a quantity). Mutually exclusive with TargetAverageValue.
 */
public data class ExternalMetricSourcePatch(
    public val metricName: String? = null,
    public val metricSelector: LabelSelectorPatch? = null,
    public val targetAverageValue: String? = null,
    public val targetValue: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ExternalMetricSourcePatch): ExternalMetricSourcePatch = ExternalMetricSourcePatch(
            metricName = javaType.metricName().map({ args0 -> args0 }).orElse(null),
            metricSelector = javaType.metricSelector().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.meta.v1.kotlin.outputs.LabelSelectorPatch.Companion.toKotlin(args0)
                })
            }).orElse(null),
            targetAverageValue = javaType.targetAverageValue().map({ args0 -> args0 }).orElse(null),
            targetValue = javaType.targetValue().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy