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

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

There is a newer version: 4.19.0-alpha.1730750641
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.autoscaling.v2beta1.outputs.CrossVersionObjectReference;
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 ObjectMetricStatus {
    /**
     * @return averageValue is the current value of the average of the metric across all relevant pods (as a quantity)
     * 
     */
    private @Nullable String averageValue;
    /**
     * @return currentValue is the current value of the metric (as a quantity).
     * 
     */
    private String currentValue;
    /**
     * @return metricName is the name of the metric in question.
     * 
     */
    private String metricName;
    /**
     * @return selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.
     * 
     */
    private @Nullable LabelSelector selector;
    /**
     * @return target is the described Kubernetes object.
     * 
     */
    private CrossVersionObjectReference target;

    private ObjectMetricStatus() {}
    /**
     * @return averageValue is the current value of the average of the metric across all relevant pods (as a quantity)
     * 
     */
    public Optional averageValue() {
        return Optional.ofNullable(this.averageValue);
    }
    /**
     * @return currentValue is the current value of the metric (as a quantity).
     * 
     */
    public String currentValue() {
        return this.currentValue;
    }
    /**
     * @return metricName is the name of the metric in question.
     * 
     */
    public String metricName() {
        return this.metricName;
    }
    /**
     * @return selector is the string-encoded form of a standard kubernetes label selector for the given metric When set in the ObjectMetricSource, 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.
     * 
     */
    public Optional selector() {
        return Optional.ofNullable(this.selector);
    }
    /**
     * @return target is the described Kubernetes object.
     * 
     */
    public CrossVersionObjectReference target() {
        return this.target;
    }

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

    public static Builder builder(ObjectMetricStatus defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String averageValue;
        private String currentValue;
        private String metricName;
        private @Nullable LabelSelector selector;
        private CrossVersionObjectReference target;
        public Builder() {}
        public Builder(ObjectMetricStatus defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.averageValue = defaults.averageValue;
    	      this.currentValue = defaults.currentValue;
    	      this.metricName = defaults.metricName;
    	      this.selector = defaults.selector;
    	      this.target = defaults.target;
        }

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

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

            this.selector = selector;
            return this;
        }
        @CustomType.Setter
        public Builder target(CrossVersionObjectReference target) {
            if (target == null) {
              throw new MissingRequiredPropertyException("ObjectMetricStatus", "target");
            }
            this.target = target;
            return this;
        }
        public ObjectMetricStatus build() {
            final var _resultValue = new ObjectMetricStatus();
            _resultValue.averageValue = averageValue;
            _resultValue.currentValue = currentValue;
            _resultValue.metricName = metricName;
            _resultValue.selector = selector;
            _resultValue.target = target;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy