com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ContainerResourceMetricStatus Maven / Gradle / Ivy
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.kubernetes.autoscaling.v2beta1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ContainerResourceMetricStatus {
/**
* @return container is the name of the container in the pods of the scaling target
*
*/
private String container;
/**
* @return 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.
*
*/
private @Nullable Integer currentAverageUtilization;
/**
* @return 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.
*
*/
private String currentAverageValue;
/**
* @return name is the name of the resource in question.
*
*/
private String name;
private ContainerResourceMetricStatus() {}
/**
* @return container is the name of the container in the pods of the scaling target
*
*/
public String container() {
return this.container;
}
/**
* @return 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.
*
*/
public Optional currentAverageUtilization() {
return Optional.ofNullable(this.currentAverageUtilization);
}
/**
* @return 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.
*
*/
public String currentAverageValue() {
return this.currentAverageValue;
}
/**
* @return name is the name of the resource in question.
*
*/
public String name() {
return this.name;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ContainerResourceMetricStatus defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String container;
private @Nullable Integer currentAverageUtilization;
private String currentAverageValue;
private String name;
public Builder() {}
public Builder(ContainerResourceMetricStatus defaults) {
Objects.requireNonNull(defaults);
this.container = defaults.container;
this.currentAverageUtilization = defaults.currentAverageUtilization;
this.currentAverageValue = defaults.currentAverageValue;
this.name = defaults.name;
}
@CustomType.Setter
public Builder container(String container) {
if (container == null) {
throw new MissingRequiredPropertyException("ContainerResourceMetricStatus", "container");
}
this.container = container;
return this;
}
@CustomType.Setter
public Builder currentAverageUtilization(@Nullable Integer currentAverageUtilization) {
this.currentAverageUtilization = currentAverageUtilization;
return this;
}
@CustomType.Setter
public Builder currentAverageValue(String currentAverageValue) {
if (currentAverageValue == null) {
throw new MissingRequiredPropertyException("ContainerResourceMetricStatus", "currentAverageValue");
}
this.currentAverageValue = currentAverageValue;
return this;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("ContainerResourceMetricStatus", "name");
}
this.name = name;
return this;
}
public ContainerResourceMetricStatus build() {
final var _resultValue = new ContainerResourceMetricStatus();
_resultValue.container = container;
_resultValue.currentAverageUtilization = currentAverageUtilization;
_resultValue.currentAverageValue = currentAverageValue;
_resultValue.name = name;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy