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

com.pulumi.kubernetes.autoscaling.v2beta1.outputs.ContainerResourceMetricSource 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 ContainerResourceMetricSource {
    /**
     * @return container is the name of the container in the pods of the scaling target
     * 
     */
    private String container;
    /**
     * @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 ContainerResourceMetricSource() {}
    /**
     * @return container is the name of the container in the pods of the scaling target
     * 
     */
    public String container() {
        return this.container;
    }
    /**
     * @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(ContainerResourceMetricSource defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String container;
        private String name;
        private @Nullable Integer targetAverageUtilization;
        private @Nullable String targetAverageValue;
        public Builder() {}
        public Builder(ContainerResourceMetricSource defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.container = defaults.container;
    	      this.name = defaults.name;
    	      this.targetAverageUtilization = defaults.targetAverageUtilization;
    	      this.targetAverageValue = defaults.targetAverageValue;
        }

        @CustomType.Setter
        public Builder container(String container) {
            if (container == null) {
              throw new MissingRequiredPropertyException("ContainerResourceMetricSource", "container");
            }
            this.container = container;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("ContainerResourceMetricSource", "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 ContainerResourceMetricSource build() {
            final var _resultValue = new ContainerResourceMetricSource();
            _resultValue.container = container;
            _resultValue.name = name;
            _resultValue.targetAverageUtilization = targetAverageUtilization;
            _resultValue.targetAverageValue = targetAverageValue;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy