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

com.pulumi.kubernetes.autoscaling.v2.inputs.MetricTargetArgs 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.v2.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


/**
 * MetricTarget defines the target value, average value, or average utilization of a specific metric
 * 
 */
public final class MetricTargetArgs extends com.pulumi.resources.ResourceArgs {

    public static final MetricTargetArgs Empty = new MetricTargetArgs();

    /**
     * averageUtilization is the target 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. Currently only valid for Resource metric source type
     * 
     */
    @Import(name="averageUtilization")
    private @Nullable Output averageUtilization;

    /**
     * @return averageUtilization is the target 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. Currently only valid for Resource metric source type
     * 
     */
    public Optional> averageUtilization() {
        return Optional.ofNullable(this.averageUtilization);
    }

    /**
     * averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
     * 
     */
    @Import(name="averageValue")
    private @Nullable Output averageValue;

    /**
     * @return averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
     * 
     */
    public Optional> averageValue() {
        return Optional.ofNullable(this.averageValue);
    }

    /**
     * type represents whether the metric type is Utilization, Value, or AverageValue
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return type represents whether the metric type is Utilization, Value, or AverageValue
     * 
     */
    public Output type() {
        return this.type;
    }

    /**
     * value is the target value of the metric (as a quantity).
     * 
     */
    @Import(name="value")
    private @Nullable Output value;

    /**
     * @return value is the target value of the metric (as a quantity).
     * 
     */
    public Optional> value() {
        return Optional.ofNullable(this.value);
    }

    private MetricTargetArgs() {}

    private MetricTargetArgs(MetricTargetArgs $) {
        this.averageUtilization = $.averageUtilization;
        this.averageValue = $.averageValue;
        this.type = $.type;
        this.value = $.value;
    }

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

    public static final class Builder {
        private MetricTargetArgs $;

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

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

        /**
         * @param averageUtilization averageUtilization is the target 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. Currently only valid for Resource metric source type
         * 
         * @return builder
         * 
         */
        public Builder averageUtilization(@Nullable Output averageUtilization) {
            $.averageUtilization = averageUtilization;
            return this;
        }

        /**
         * @param averageUtilization averageUtilization is the target 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. Currently only valid for Resource metric source type
         * 
         * @return builder
         * 
         */
        public Builder averageUtilization(Integer averageUtilization) {
            return averageUtilization(Output.of(averageUtilization));
        }

        /**
         * @param averageValue averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
         * 
         * @return builder
         * 
         */
        public Builder averageValue(@Nullable Output averageValue) {
            $.averageValue = averageValue;
            return this;
        }

        /**
         * @param averageValue averageValue is the target value of the average of the metric across all relevant pods (as a quantity)
         * 
         * @return builder
         * 
         */
        public Builder averageValue(String averageValue) {
            return averageValue(Output.of(averageValue));
        }

        /**
         * @param type type represents whether the metric type is Utilization, Value, or AverageValue
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type type represents whether the metric type is Utilization, Value, or AverageValue
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

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

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

        public MetricTargetArgs build() {
            if ($.type == null) {
                throw new MissingRequiredPropertyException("MetricTargetArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy