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

com.pulumi.kubernetes.autoscaling.v2beta1.inputs.ExternalMetricStatusArgs 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.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.
 * 
 */
public final class ExternalMetricStatusArgs extends com.pulumi.resources.ResourceArgs {

    public static final ExternalMetricStatusArgs Empty = new ExternalMetricStatusArgs();

    /**
     * currentAverageValue is the current value of metric averaged over autoscaled pods.
     * 
     */
    @Import(name="currentAverageValue")
    private @Nullable Output currentAverageValue;

    /**
     * @return currentAverageValue is the current value of metric averaged over autoscaled pods.
     * 
     */
    public Optional> currentAverageValue() {
        return Optional.ofNullable(this.currentAverageValue);
    }

    /**
     * currentValue is the current value of the metric (as a quantity)
     * 
     */
    @Import(name="currentValue", required=true)
    private Output currentValue;

    /**
     * @return currentValue is the current value of the metric (as a quantity)
     * 
     */
    public Output currentValue() {
        return this.currentValue;
    }

    /**
     * metricName is the name of a metric used for autoscaling in metric system.
     * 
     */
    @Import(name="metricName", required=true)
    private Output metricName;

    /**
     * @return metricName is the name of a metric used for autoscaling in metric system.
     * 
     */
    public Output metricName() {
        return this.metricName;
    }

    /**
     * metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    @Import(name="metricSelector")
    private @Nullable Output metricSelector;

    /**
     * @return metricSelector is used to identify a specific time series within a given metric.
     * 
     */
    public Optional> metricSelector() {
        return Optional.ofNullable(this.metricSelector);
    }

    private ExternalMetricStatusArgs() {}

    private ExternalMetricStatusArgs(ExternalMetricStatusArgs $) {
        this.currentAverageValue = $.currentAverageValue;
        this.currentValue = $.currentValue;
        this.metricName = $.metricName;
        this.metricSelector = $.metricSelector;
    }

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

    public static final class Builder {
        private ExternalMetricStatusArgs $;

        public Builder() {
            $ = new ExternalMetricStatusArgs();
        }

        public Builder(ExternalMetricStatusArgs defaults) {
            $ = new ExternalMetricStatusArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param currentAverageValue currentAverageValue is the current value of metric averaged over autoscaled pods.
         * 
         * @return builder
         * 
         */
        public Builder currentAverageValue(@Nullable Output currentAverageValue) {
            $.currentAverageValue = currentAverageValue;
            return this;
        }

        /**
         * @param currentAverageValue currentAverageValue is the current value of metric averaged over autoscaled pods.
         * 
         * @return builder
         * 
         */
        public Builder currentAverageValue(String currentAverageValue) {
            return currentAverageValue(Output.of(currentAverageValue));
        }

        /**
         * @param currentValue currentValue is the current value of the metric (as a quantity)
         * 
         * @return builder
         * 
         */
        public Builder currentValue(Output currentValue) {
            $.currentValue = currentValue;
            return this;
        }

        /**
         * @param currentValue currentValue is the current value of the metric (as a quantity)
         * 
         * @return builder
         * 
         */
        public Builder currentValue(String currentValue) {
            return currentValue(Output.of(currentValue));
        }

        /**
         * @param metricName metricName is the name of a metric used for autoscaling in metric system.
         * 
         * @return builder
         * 
         */
        public Builder metricName(Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName metricName is the name of a metric used for autoscaling in metric system.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param metricSelector metricSelector is used to identify a specific time series within a given metric.
         * 
         * @return builder
         * 
         */
        public Builder metricSelector(@Nullable Output metricSelector) {
            $.metricSelector = metricSelector;
            return this;
        }

        /**
         * @param metricSelector metricSelector is used to identify a specific time series within a given metric.
         * 
         * @return builder
         * 
         */
        public Builder metricSelector(LabelSelectorArgs metricSelector) {
            return metricSelector(Output.of(metricSelector));
        }

        public ExternalMetricStatusArgs build() {
            if ($.currentValue == null) {
                throw new MissingRequiredPropertyException("ExternalMetricStatusArgs", "currentValue");
            }
            if ($.metricName == null) {
                throw new MissingRequiredPropertyException("ExternalMetricStatusArgs", "metricName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy