// *** 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.outputs;

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

@CustomType
public final class FleetTargetCapacitySpecification {
    /**
     * @return Default target capacity type. Valid values: `on-demand`, `spot`.
     * 
     */
    private String defaultTargetCapacityType;
    /**
     * @return The number of On-Demand units to request.
     * 
     */
    private @Nullable Integer onDemandTargetCapacity;
    /**
     * @return The number of Spot units to request.
     * 
     */
    private @Nullable Integer spotTargetCapacity;
    /**
     * @return The unit for the target capacity.
     * If you specify `target_capacity_unit_type`, `instance_requirements` must be specified.
     * 
     */
    private @Nullable String targetCapacityUnitType;
    /**
     * @return The number of units to request, filled using `default_target_capacity_type`.
     * 
     */
    private Integer totalTargetCapacity;

    private FleetTargetCapacitySpecification() {}
    /**
     * @return Default target capacity type. Valid values: `on-demand`, `spot`.
     * 
     */
    public String defaultTargetCapacityType() {
        return this.defaultTargetCapacityType;
    }
    /**
     * @return The number of On-Demand units to request.
     * 
     */
    public Optional<Integer> onDemandTargetCapacity() {
        return Optional.ofNullable(this.onDemandTargetCapacity);
    }
    /**
     * @return The number of Spot units to request.
     * 
     */
    public Optional<Integer> spotTargetCapacity() {
        return Optional.ofNullable(this.spotTargetCapacity);
    }
    /**
     * @return The unit for the target capacity.
     * If you specify `target_capacity_unit_type`, `instance_requirements` must be specified.
     * 
     */
    public Optional<String> targetCapacityUnitType() {
        return Optional.ofNullable(this.targetCapacityUnitType);
    }
    /**
     * @return The number of units to request, filled using `default_target_capacity_type`.
     * 
     */
    public Integer totalTargetCapacity() {
        return this.totalTargetCapacity;
    }

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

    public static Builder builder(FleetTargetCapacitySpecification defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String defaultTargetCapacityType;
        private @Nullable Integer onDemandTargetCapacity;
        private @Nullable Integer spotTargetCapacity;
        private @Nullable String targetCapacityUnitType;
        private Integer totalTargetCapacity;
        public Builder() {}
        public Builder(FleetTargetCapacitySpecification defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.defaultTargetCapacityType = defaults.defaultTargetCapacityType;
    	      this.onDemandTargetCapacity = defaults.onDemandTargetCapacity;
    	      this.spotTargetCapacity = defaults.spotTargetCapacity;
    	      this.targetCapacityUnitType = defaults.targetCapacityUnitType;
    	      this.totalTargetCapacity = defaults.totalTargetCapacity;
        }

        @CustomType.Setter
        public Builder defaultTargetCapacityType(String defaultTargetCapacityType) {
            this.defaultTargetCapacityType = Objects.requireNonNull(defaultTargetCapacityType);
            return this;
        }
        @CustomType.Setter
        public Builder onDemandTargetCapacity(@Nullable Integer onDemandTargetCapacity) {
            this.onDemandTargetCapacity = onDemandTargetCapacity;
            return this;
        }
        @CustomType.Setter
        public Builder spotTargetCapacity(@Nullable Integer spotTargetCapacity) {
            this.spotTargetCapacity = spotTargetCapacity;
            return this;
        }
        @CustomType.Setter
        public Builder targetCapacityUnitType(@Nullable String targetCapacityUnitType) {
            this.targetCapacityUnitType = targetCapacityUnitType;
            return this;
        }
        @CustomType.Setter
        public Builder totalTargetCapacity(Integer totalTargetCapacity) {
            this.totalTargetCapacity = Objects.requireNonNull(totalTargetCapacity);
            return this;
        }
        public FleetTargetCapacitySpecification build() {
            final var o = new FleetTargetCapacitySpecification();
            o.defaultTargetCapacityType = defaultTargetCapacityType;
            o.onDemandTargetCapacity = onDemandTargetCapacity;
            o.spotTargetCapacity = spotTargetCapacity;
            o.targetCapacityUnitType = targetCapacityUnitType;
            o.totalTargetCapacity = totalTargetCapacity;
            return o;
        }
    }
}
