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

com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ExternalMetricStatus Maven / Gradle / Ivy

There is a newer version: 4.19.0
Show newest version
// *** 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 com.pulumi.kubernetes.meta.v1.outputs.LabelSelector;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ExternalMetricStatus {
    /**
     * @return currentAverageValue is the current value of metric averaged over autoscaled pods.
     * 
     */
    private @Nullable String currentAverageValue;
    /**
     * @return currentValue is the current value of the metric (as a quantity)
     * 
     */
    private String currentValue;
    /**
     * @return metricName is the name of a metric used for autoscaling in metric system.
     * 
     */
    private String metricName;
    /**
     * @return metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    private @Nullable LabelSelector metricSelector;

    private ExternalMetricStatus() {}
    /**
     * @return currentAverageValue is the current value of metric averaged over autoscaled pods.
     * 
     */
    public Optional currentAverageValue() {
        return Optional.ofNullable(this.currentAverageValue);
    }
    /**
     * @return currentValue is the current value of the metric (as a quantity)
     * 
     */
    public String currentValue() {
        return this.currentValue;
    }
    /**
     * @return metricName is the name of a metric used for autoscaling in metric system.
     * 
     */
    public String metricName() {
        return this.metricName;
    }
    /**
     * @return metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    public Optional metricSelector() {
        return Optional.ofNullable(this.metricSelector);
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(ExternalMetricStatus defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String currentAverageValue;
        private String currentValue;
        private String metricName;
        private @Nullable LabelSelector metricSelector;
        public Builder() {}
        public Builder(ExternalMetricStatus defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.currentAverageValue = defaults.currentAverageValue;
    	      this.currentValue = defaults.currentValue;
    	      this.metricName = defaults.metricName;
    	      this.metricSelector = defaults.metricSelector;
        }

        @CustomType.Setter
        public Builder currentAverageValue(@Nullable String currentAverageValue) {

            this.currentAverageValue = currentAverageValue;
            return this;
        }
        @CustomType.Setter
        public Builder currentValue(String currentValue) {
            if (currentValue == null) {
              throw new MissingRequiredPropertyException("ExternalMetricStatus", "currentValue");
            }
            this.currentValue = currentValue;
            return this;
        }
        @CustomType.Setter
        public Builder metricName(String metricName) {
            if (metricName == null) {
              throw new MissingRequiredPropertyException("ExternalMetricStatus", "metricName");
            }
            this.metricName = metricName;
            return this;
        }
        @CustomType.Setter
        public Builder metricSelector(@Nullable LabelSelector metricSelector) {

            this.metricSelector = metricSelector;
            return this;
        }
        public ExternalMetricStatus build() {
            final var _resultValue = new ExternalMetricStatus();
            _resultValue.currentAverageValue = currentAverageValue;
            _resultValue.currentValue = currentValue;
            _resultValue.metricName = metricName;
            _resultValue.metricSelector = metricSelector;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy