// *** 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.gcp.appengine.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.appengine.inputs.StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final StandardAppVersionAutomaticScalingArgs Empty = new StandardAppVersionAutomaticScalingArgs();

    /**
     * Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.
     * Defaults to a runtime-specific value.
     * 
     */
    @Import(name="maxConcurrentRequests")
    private @Nullable Output<Integer> maxConcurrentRequests;

    /**
     * @return Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.
     * Defaults to a runtime-specific value.
     * 
     */
    public Optional<Output<Integer>> maxConcurrentRequests() {
        return Optional.ofNullable(this.maxConcurrentRequests);
    }

    /**
     * Maximum number of idle instances that should be maintained for this version.
     * 
     */
    @Import(name="maxIdleInstances")
    private @Nullable Output<Integer> maxIdleInstances;

    /**
     * @return Maximum number of idle instances that should be maintained for this version.
     * 
     */
    public Optional<Output<Integer>> maxIdleInstances() {
        return Optional.ofNullable(this.maxIdleInstances);
    }

    /**
     * Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    @Import(name="maxPendingLatency")
    private @Nullable Output<String> maxPendingLatency;

    /**
     * @return Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    public Optional<Output<String>> maxPendingLatency() {
        return Optional.ofNullable(this.maxPendingLatency);
    }

    /**
     * Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
     * 
     */
    @Import(name="minIdleInstances")
    private @Nullable Output<Integer> minIdleInstances;

    /**
     * @return Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
     * 
     */
    public Optional<Output<Integer>> minIdleInstances() {
        return Optional.ofNullable(this.minIdleInstances);
    }

    /**
     * Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    @Import(name="minPendingLatency")
    private @Nullable Output<String> minPendingLatency;

    /**
     * @return Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
     * 
     */
    public Optional<Output<String>> minPendingLatency() {
        return Optional.ofNullable(this.minPendingLatency);
    }

    /**
     * Scheduler settings for standard environment.
     * Structure is documented below.
     * 
     */
    @Import(name="standardSchedulerSettings")
    private @Nullable Output<StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs> standardSchedulerSettings;

    /**
     * @return Scheduler settings for standard environment.
     * Structure is documented below.
     * 
     */
    public Optional<Output<StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs>> standardSchedulerSettings() {
        return Optional.ofNullable(this.standardSchedulerSettings);
    }

    private StandardAppVersionAutomaticScalingArgs() {}

    private StandardAppVersionAutomaticScalingArgs(StandardAppVersionAutomaticScalingArgs $) {
        this.maxConcurrentRequests = $.maxConcurrentRequests;
        this.maxIdleInstances = $.maxIdleInstances;
        this.maxPendingLatency = $.maxPendingLatency;
        this.minIdleInstances = $.minIdleInstances;
        this.minPendingLatency = $.minPendingLatency;
        this.standardSchedulerSettings = $.standardSchedulerSettings;
    }

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

    public static final class Builder {
        private StandardAppVersionAutomaticScalingArgs $;

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

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

        /**
         * @param maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.
         * Defaults to a runtime-specific value.
         * 
         * @return builder
         * 
         */
        public Builder maxConcurrentRequests(@Nullable Output<Integer> maxConcurrentRequests) {
            $.maxConcurrentRequests = maxConcurrentRequests;
            return this;
        }

        /**
         * @param maxConcurrentRequests Number of concurrent requests an automatic scaling instance can accept before the scheduler spawns a new instance.
         * Defaults to a runtime-specific value.
         * 
         * @return builder
         * 
         */
        public Builder maxConcurrentRequests(Integer maxConcurrentRequests) {
            return maxConcurrentRequests(Output.of(maxConcurrentRequests));
        }

        /**
         * @param maxIdleInstances Maximum number of idle instances that should be maintained for this version.
         * 
         * @return builder
         * 
         */
        public Builder maxIdleInstances(@Nullable Output<Integer> maxIdleInstances) {
            $.maxIdleInstances = maxIdleInstances;
            return this;
        }

        /**
         * @param maxIdleInstances Maximum number of idle instances that should be maintained for this version.
         * 
         * @return builder
         * 
         */
        public Builder maxIdleInstances(Integer maxIdleInstances) {
            return maxIdleInstances(Output.of(maxIdleInstances));
        }

        /**
         * @param maxPendingLatency Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
         * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
         * 
         * @return builder
         * 
         */
        public Builder maxPendingLatency(@Nullable Output<String> maxPendingLatency) {
            $.maxPendingLatency = maxPendingLatency;
            return this;
        }

        /**
         * @param maxPendingLatency Maximum amount of time that a request should wait in the pending queue before starting a new instance to handle it.
         * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
         * 
         * @return builder
         * 
         */
        public Builder maxPendingLatency(String maxPendingLatency) {
            return maxPendingLatency(Output.of(maxPendingLatency));
        }

        /**
         * @param minIdleInstances Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
         * 
         * @return builder
         * 
         */
        public Builder minIdleInstances(@Nullable Output<Integer> minIdleInstances) {
            $.minIdleInstances = minIdleInstances;
            return this;
        }

        /**
         * @param minIdleInstances Minimum number of idle instances that should be maintained for this version. Only applicable for the default version of a service.
         * 
         * @return builder
         * 
         */
        public Builder minIdleInstances(Integer minIdleInstances) {
            return minIdleInstances(Output.of(minIdleInstances));
        }

        /**
         * @param minPendingLatency Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
         * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
         * 
         * @return builder
         * 
         */
        public Builder minPendingLatency(@Nullable Output<String> minPendingLatency) {
            $.minPendingLatency = minPendingLatency;
            return this;
        }

        /**
         * @param minPendingLatency Minimum amount of time a request should wait in the pending queue before starting a new instance to handle it.
         * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;.
         * 
         * @return builder
         * 
         */
        public Builder minPendingLatency(String minPendingLatency) {
            return minPendingLatency(Output.of(minPendingLatency));
        }

        /**
         * @param standardSchedulerSettings Scheduler settings for standard environment.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder standardSchedulerSettings(@Nullable Output<StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs> standardSchedulerSettings) {
            $.standardSchedulerSettings = standardSchedulerSettings;
            return this;
        }

        /**
         * @param standardSchedulerSettings Scheduler settings for standard environment.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder standardSchedulerSettings(StandardAppVersionAutomaticScalingStandardSchedulerSettingsArgs standardSchedulerSettings) {
            return standardSchedulerSettings(Output.of(standardSchedulerSettings));
        }

        public StandardAppVersionAutomaticScalingArgs build() {
            return $;
        }
    }

}
