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

com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ResourceMetricSource 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 java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ResourceMetricSource {
    /**
     * @return name is the name of the resource in question.
     * 
     */
    private String name;
    /**
     * @return targetAverageUtilization 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.
     * 
     */
    private @Nullable Integer targetAverageUtilization;
    /**
     * @return targetAverageValue is the target 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.
     * 
     */
    private @Nullable String targetAverageValue;

    private ResourceMetricSource() {}
    /**
     * @return name is the name of the resource in question.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return targetAverageUtilization 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.
     * 
     */
    public Optional targetAverageUtilization() {
        return Optional.ofNullable(this.targetAverageUtilization);
    }
    /**
     * @return targetAverageValue is the target 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.
     * 
     */
    public Optional targetAverageValue() {
        return Optional.ofNullable(this.targetAverageValue);
    }

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

    public static Builder builder(ResourceMetricSource defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String name;
        private @Nullable Integer targetAverageUtilization;
        private @Nullable String targetAverageValue;
        public Builder() {}
        public Builder(ResourceMetricSource defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.name = defaults.name;
    	      this.targetAverageUtilization = defaults.targetAverageUtilization;
    	      this.targetAverageValue = defaults.targetAverageValue;
        }

        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("ResourceMetricSource", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder targetAverageUtilization(@Nullable Integer targetAverageUtilization) {

            this.targetAverageUtilization = targetAverageUtilization;
            return this;
        }
        @CustomType.Setter
        public Builder targetAverageValue(@Nullable String targetAverageValue) {

            this.targetAverageValue = targetAverageValue;
            return this;
        }
        public ResourceMetricSource build() {
            final var _resultValue = new ResourceMetricSource();
            _resultValue.name = name;
            _resultValue.targetAverageUtilization = targetAverageUtilization;
            _resultValue.targetAverageValue = targetAverageValue;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy