// *** 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.azure.batch.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class PoolAutoScaleArgs extends com.pulumi.resources.ResourceArgs {

    public static final PoolAutoScaleArgs Empty = new PoolAutoScaleArgs();

    /**
     * The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
     * 
     */
    @Import(name="evaluationInterval")
    private @Nullable Output<String> evaluationInterval;

    /**
     * @return The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
     * 
     */
    public Optional<Output<String>> evaluationInterval() {
        return Optional.ofNullable(this.evaluationInterval);
    }

    /**
     * The autoscale formula that needs to be used for scaling the Batch pool.
     * 
     */
    @Import(name="formula", required=true)
    private Output<String> formula;

    /**
     * @return The autoscale formula that needs to be used for scaling the Batch pool.
     * 
     */
    public Output<String> formula() {
        return this.formula;
    }

    private PoolAutoScaleArgs() {}

    private PoolAutoScaleArgs(PoolAutoScaleArgs $) {
        this.evaluationInterval = $.evaluationInterval;
        this.formula = $.formula;
    }

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

    public static final class Builder {
        private PoolAutoScaleArgs $;

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

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

        /**
         * @param evaluationInterval The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
         * 
         * @return builder
         * 
         */
        public Builder evaluationInterval(@Nullable Output<String> evaluationInterval) {
            $.evaluationInterval = evaluationInterval;
            return this;
        }

        /**
         * @param evaluationInterval The interval to wait before evaluating if the pool needs to be scaled. Defaults to `PT15M`.
         * 
         * @return builder
         * 
         */
        public Builder evaluationInterval(String evaluationInterval) {
            return evaluationInterval(Output.of(evaluationInterval));
        }

        /**
         * @param formula The autoscale formula that needs to be used for scaling the Batch pool.
         * 
         * @return builder
         * 
         */
        public Builder formula(Output<String> formula) {
            $.formula = formula;
            return this;
        }

        /**
         * @param formula The autoscale formula that needs to be used for scaling the Batch pool.
         * 
         * @return builder
         * 
         */
        public Builder formula(String formula) {
            return formula(Output.of(formula));
        }

        public PoolAutoScaleArgs build() {
            $.formula = Objects.requireNonNull($.formula, "expected parameter 'formula' to be non-null");
            return $;
        }
    }

}
