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

import com.pulumi.aws.emr.outputs.ClusterMasterInstanceFleetInstanceTypeConfigConfiguration;
import com.pulumi.aws.emr.outputs.ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig;
import com.pulumi.core.annotations.CustomType;
import java.lang.Double;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ClusterMasterInstanceFleetInstanceTypeConfig {
    /**
     * @return Bid price for each EC2 Spot instance type as defined by `instance_type`. Expressed in USD. If neither `bid_price` nor `bid_price_as_percentage_of_on_demand_price` is provided, `bid_price_as_percentage_of_on_demand_price` defaults to 100%.
     * 
     */
    private @Nullable String bidPrice;
    /**
     * @return Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by `instance_type`. Expressed as a number (for example, 20 specifies 20%). If neither `bid_price` nor `bid_price_as_percentage_of_on_demand_price` is provided, `bid_price_as_percentage_of_on_demand_price` defaults to 100%.
     * 
     */
    private @Nullable Double bidPriceAsPercentageOfOnDemandPrice;
    /**
     * @return Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of `configuration` blocks.
     * 
     */
    private @Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigConfiguration> configurations;
    /**
     * @return Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
     * 
     */
    private @Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig> ebsConfigs;
    /**
     * @return EC2 instance type, such as m4.xlarge.
     * 
     */
    private String instanceType;
    /**
     * @return Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in `aws.emr.InstanceFleet`.
     * 
     */
    private @Nullable Integer weightedCapacity;

    private ClusterMasterInstanceFleetInstanceTypeConfig() {}
    /**
     * @return Bid price for each EC2 Spot instance type as defined by `instance_type`. Expressed in USD. If neither `bid_price` nor `bid_price_as_percentage_of_on_demand_price` is provided, `bid_price_as_percentage_of_on_demand_price` defaults to 100%.
     * 
     */
    public Optional<String> bidPrice() {
        return Optional.ofNullable(this.bidPrice);
    }
    /**
     * @return Bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by `instance_type`. Expressed as a number (for example, 20 specifies 20%). If neither `bid_price` nor `bid_price_as_percentage_of_on_demand_price` is provided, `bid_price_as_percentage_of_on_demand_price` defaults to 100%.
     * 
     */
    public Optional<Double> bidPriceAsPercentageOfOnDemandPrice() {
        return Optional.ofNullable(this.bidPriceAsPercentageOfOnDemandPrice);
    }
    /**
     * @return Configuration classification that applies when provisioning cluster instances, which can include configurations for applications and software that run on the cluster. List of `configuration` blocks.
     * 
     */
    public List<ClusterMasterInstanceFleetInstanceTypeConfigConfiguration> configurations() {
        return this.configurations == null ? List.of() : this.configurations;
    }
    /**
     * @return Configuration block(s) for EBS volumes attached to each instance in the instance group. Detailed below.
     * 
     */
    public List<ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig> ebsConfigs() {
        return this.ebsConfigs == null ? List.of() : this.ebsConfigs;
    }
    /**
     * @return EC2 instance type, such as m4.xlarge.
     * 
     */
    public String instanceType() {
        return this.instanceType;
    }
    /**
     * @return Number of units that a provisioned instance of this type provides toward fulfilling the target capacities defined in `aws.emr.InstanceFleet`.
     * 
     */
    public Optional<Integer> weightedCapacity() {
        return Optional.ofNullable(this.weightedCapacity);
    }

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

    public static Builder builder(ClusterMasterInstanceFleetInstanceTypeConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String bidPrice;
        private @Nullable Double bidPriceAsPercentageOfOnDemandPrice;
        private @Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigConfiguration> configurations;
        private @Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig> ebsConfigs;
        private String instanceType;
        private @Nullable Integer weightedCapacity;
        public Builder() {}
        public Builder(ClusterMasterInstanceFleetInstanceTypeConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.bidPrice = defaults.bidPrice;
    	      this.bidPriceAsPercentageOfOnDemandPrice = defaults.bidPriceAsPercentageOfOnDemandPrice;
    	      this.configurations = defaults.configurations;
    	      this.ebsConfigs = defaults.ebsConfigs;
    	      this.instanceType = defaults.instanceType;
    	      this.weightedCapacity = defaults.weightedCapacity;
        }

        @CustomType.Setter
        public Builder bidPrice(@Nullable String bidPrice) {
            this.bidPrice = bidPrice;
            return this;
        }
        @CustomType.Setter
        public Builder bidPriceAsPercentageOfOnDemandPrice(@Nullable Double bidPriceAsPercentageOfOnDemandPrice) {
            this.bidPriceAsPercentageOfOnDemandPrice = bidPriceAsPercentageOfOnDemandPrice;
            return this;
        }
        @CustomType.Setter
        public Builder configurations(@Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigConfiguration> configurations) {
            this.configurations = configurations;
            return this;
        }
        public Builder configurations(ClusterMasterInstanceFleetInstanceTypeConfigConfiguration... configurations) {
            return configurations(List.of(configurations));
        }
        @CustomType.Setter
        public Builder ebsConfigs(@Nullable List<ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig> ebsConfigs) {
            this.ebsConfigs = ebsConfigs;
            return this;
        }
        public Builder ebsConfigs(ClusterMasterInstanceFleetInstanceTypeConfigEbsConfig... ebsConfigs) {
            return ebsConfigs(List.of(ebsConfigs));
        }
        @CustomType.Setter
        public Builder instanceType(String instanceType) {
            this.instanceType = Objects.requireNonNull(instanceType);
            return this;
        }
        @CustomType.Setter
        public Builder weightedCapacity(@Nullable Integer weightedCapacity) {
            this.weightedCapacity = weightedCapacity;
            return this;
        }
        public ClusterMasterInstanceFleetInstanceTypeConfig build() {
            final var o = new ClusterMasterInstanceFleetInstanceTypeConfig();
            o.bidPrice = bidPrice;
            o.bidPriceAsPercentageOfOnDemandPrice = bidPriceAsPercentageOfOnDemandPrice;
            o.configurations = configurations;
            o.ebsConfigs = ebsConfigs;
            o.instanceType = instanceType;
            o.weightedCapacity = weightedCapacity;
            return o;
        }
    }
}
