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

com.pulumi.kubernetes.autoscaling.v2beta1.kotlin.outputs.ResourceMetricStatus.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 kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 * ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory).  Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the "pods" source.
 * @property currentAverageUtilization currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.  It will only be present if `targetAverageValue` was set in the corresponding metric specification.
 * @property currentAverageValue currentAverageValue is the current value of the average of the resource metric across all relevant pods, as a raw value (instead of as a percentage of the request), similar to the "pods" metric source type. It will always be set, regardless of the corresponding metric specification.
 * @property name name is the name of the resource in question.
 */
public data class ResourceMetricStatus(
    public val currentAverageUtilization: Int? = null,
    public val currentAverageValue: String,
    public val name: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ResourceMetricStatus): ResourceMetricStatus = ResourceMetricStatus(
            currentAverageUtilization = javaType.currentAverageUtilization().map({ args0 ->
                args0
            }).orElse(null),
            currentAverageValue = javaType.currentAverageValue(),
            name = javaType.name(),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy