// *** 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.aws.ec2.inputs;

import com.pulumi.aws.ec2.inputs.FleetSpotOptionsMaintenanceStrategiesArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FleetSpotOptionsArgs Empty = new FleetSpotOptionsArgs();

    /**
     * How to allocate the target capacity across the Spot pools. Valid values: `diversified`, `lowestPrice`, `capacity-optimized`, `capacity-optimized-prioritized` and `price-capacity-optimized`. Default: `lowestPrice`.
     * 
     */
    @Import(name="allocationStrategy")
    private @Nullable Output<String> allocationStrategy;

    /**
     * @return How to allocate the target capacity across the Spot pools. Valid values: `diversified`, `lowestPrice`, `capacity-optimized`, `capacity-optimized-prioritized` and `price-capacity-optimized`. Default: `lowestPrice`.
     * 
     */
    public Optional<Output<String>> allocationStrategy() {
        return Optional.ofNullable(this.allocationStrategy);
    }

    /**
     * Behavior when a Spot Instance is interrupted. Valid values: `hibernate`, `stop`, `terminate`. Default: `terminate`.
     * 
     */
    @Import(name="instanceInterruptionBehavior")
    private @Nullable Output<String> instanceInterruptionBehavior;

    /**
     * @return Behavior when a Spot Instance is interrupted. Valid values: `hibernate`, `stop`, `terminate`. Default: `terminate`.
     * 
     */
    public Optional<Output<String>> instanceInterruptionBehavior() {
        return Optional.ofNullable(this.instanceInterruptionBehavior);
    }

    /**
     * Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot `allocation_strategy` is set to `lowestPrice`. Default: `1`.
     * 
     */
    @Import(name="instancePoolsToUseCount")
    private @Nullable Output<Integer> instancePoolsToUseCount;

    /**
     * @return Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot `allocation_strategy` is set to `lowestPrice`. Default: `1`.
     * 
     */
    public Optional<Output<Integer>> instancePoolsToUseCount() {
        return Optional.ofNullable(this.instancePoolsToUseCount);
    }

    /**
     * Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
     * 
     */
    @Import(name="maintenanceStrategies")
    private @Nullable Output<FleetSpotOptionsMaintenanceStrategiesArgs> maintenanceStrategies;

    /**
     * @return Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
     * 
     */
    public Optional<Output<FleetSpotOptionsMaintenanceStrategiesArgs>> maintenanceStrategies() {
        return Optional.ofNullable(this.maintenanceStrategies);
    }

    private FleetSpotOptionsArgs() {}

    private FleetSpotOptionsArgs(FleetSpotOptionsArgs $) {
        this.allocationStrategy = $.allocationStrategy;
        this.instanceInterruptionBehavior = $.instanceInterruptionBehavior;
        this.instancePoolsToUseCount = $.instancePoolsToUseCount;
        this.maintenanceStrategies = $.maintenanceStrategies;
    }

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

    public static final class Builder {
        private FleetSpotOptionsArgs $;

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

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

        /**
         * @param allocationStrategy How to allocate the target capacity across the Spot pools. Valid values: `diversified`, `lowestPrice`, `capacity-optimized`, `capacity-optimized-prioritized` and `price-capacity-optimized`. Default: `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(@Nullable Output<String> allocationStrategy) {
            $.allocationStrategy = allocationStrategy;
            return this;
        }

        /**
         * @param allocationStrategy How to allocate the target capacity across the Spot pools. Valid values: `diversified`, `lowestPrice`, `capacity-optimized`, `capacity-optimized-prioritized` and `price-capacity-optimized`. Default: `lowestPrice`.
         * 
         * @return builder
         * 
         */
        public Builder allocationStrategy(String allocationStrategy) {
            return allocationStrategy(Output.of(allocationStrategy));
        }

        /**
         * @param instanceInterruptionBehavior Behavior when a Spot Instance is interrupted. Valid values: `hibernate`, `stop`, `terminate`. Default: `terminate`.
         * 
         * @return builder
         * 
         */
        public Builder instanceInterruptionBehavior(@Nullable Output<String> instanceInterruptionBehavior) {
            $.instanceInterruptionBehavior = instanceInterruptionBehavior;
            return this;
        }

        /**
         * @param instanceInterruptionBehavior Behavior when a Spot Instance is interrupted. Valid values: `hibernate`, `stop`, `terminate`. Default: `terminate`.
         * 
         * @return builder
         * 
         */
        public Builder instanceInterruptionBehavior(String instanceInterruptionBehavior) {
            return instanceInterruptionBehavior(Output.of(instanceInterruptionBehavior));
        }

        /**
         * @param instancePoolsToUseCount Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot `allocation_strategy` is set to `lowestPrice`. Default: `1`.
         * 
         * @return builder
         * 
         */
        public Builder instancePoolsToUseCount(@Nullable Output<Integer> instancePoolsToUseCount) {
            $.instancePoolsToUseCount = instancePoolsToUseCount;
            return this;
        }

        /**
         * @param instancePoolsToUseCount Number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot `allocation_strategy` is set to `lowestPrice`. Default: `1`.
         * 
         * @return builder
         * 
         */
        public Builder instancePoolsToUseCount(Integer instancePoolsToUseCount) {
            return instancePoolsToUseCount(Output.of(instancePoolsToUseCount));
        }

        /**
         * @param maintenanceStrategies Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder maintenanceStrategies(@Nullable Output<FleetSpotOptionsMaintenanceStrategiesArgs> maintenanceStrategies) {
            $.maintenanceStrategies = maintenanceStrategies;
            return this;
        }

        /**
         * @param maintenanceStrategies Nested argument containing maintenance strategies for managing your Spot Instances that are at an elevated risk of being interrupted. Defined below.
         * 
         * @return builder
         * 
         */
        public Builder maintenanceStrategies(FleetSpotOptionsMaintenanceStrategiesArgs maintenanceStrategies) {
            return maintenanceStrategies(Output.of(maintenanceStrategies));
        }

        public FleetSpotOptionsArgs build() {
            return $;
        }
    }

}
