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

import com.pulumi.aws.autoscaling.outputs.PolicyTargetTrackingConfigurationCustomizedMetricSpecification;
import com.pulumi.aws.autoscaling.outputs.PolicyTargetTrackingConfigurationPredefinedMetricSpecification;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Double;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class PolicyTargetTrackingConfiguration {
    /**
     * @return Customized metric. Conflicts with `predefined_metric_specification`.
     * 
     */
    private @Nullable PolicyTargetTrackingConfigurationCustomizedMetricSpecification customizedMetricSpecification;
    /**
     * @return Whether scale in by the target tracking policy is disabled.
     * 
     */
    private @Nullable Boolean disableScaleIn;
    /**
     * @return Predefined metric. Conflicts with `customized_metric_specification`.
     * 
     */
    private @Nullable PolicyTargetTrackingConfigurationPredefinedMetricSpecification predefinedMetricSpecification;
    /**
     * @return Target value for the metric.
     * 
     */
    private Double targetValue;

    private PolicyTargetTrackingConfiguration() {}
    /**
     * @return Customized metric. Conflicts with `predefined_metric_specification`.
     * 
     */
    public Optional<PolicyTargetTrackingConfigurationCustomizedMetricSpecification> customizedMetricSpecification() {
        return Optional.ofNullable(this.customizedMetricSpecification);
    }
    /**
     * @return Whether scale in by the target tracking policy is disabled.
     * 
     */
    public Optional<Boolean> disableScaleIn() {
        return Optional.ofNullable(this.disableScaleIn);
    }
    /**
     * @return Predefined metric. Conflicts with `customized_metric_specification`.
     * 
     */
    public Optional<PolicyTargetTrackingConfigurationPredefinedMetricSpecification> predefinedMetricSpecification() {
        return Optional.ofNullable(this.predefinedMetricSpecification);
    }
    /**
     * @return Target value for the metric.
     * 
     */
    public Double targetValue() {
        return this.targetValue;
    }

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

    public static Builder builder(PolicyTargetTrackingConfiguration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable PolicyTargetTrackingConfigurationCustomizedMetricSpecification customizedMetricSpecification;
        private @Nullable Boolean disableScaleIn;
        private @Nullable PolicyTargetTrackingConfigurationPredefinedMetricSpecification predefinedMetricSpecification;
        private Double targetValue;
        public Builder() {}
        public Builder(PolicyTargetTrackingConfiguration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.customizedMetricSpecification = defaults.customizedMetricSpecification;
    	      this.disableScaleIn = defaults.disableScaleIn;
    	      this.predefinedMetricSpecification = defaults.predefinedMetricSpecification;
    	      this.targetValue = defaults.targetValue;
        }

        @CustomType.Setter
        public Builder customizedMetricSpecification(@Nullable PolicyTargetTrackingConfigurationCustomizedMetricSpecification customizedMetricSpecification) {
            this.customizedMetricSpecification = customizedMetricSpecification;
            return this;
        }
        @CustomType.Setter
        public Builder disableScaleIn(@Nullable Boolean disableScaleIn) {
            this.disableScaleIn = disableScaleIn;
            return this;
        }
        @CustomType.Setter
        public Builder predefinedMetricSpecification(@Nullable PolicyTargetTrackingConfigurationPredefinedMetricSpecification predefinedMetricSpecification) {
            this.predefinedMetricSpecification = predefinedMetricSpecification;
            return this;
        }
        @CustomType.Setter
        public Builder targetValue(Double targetValue) {
            this.targetValue = Objects.requireNonNull(targetValue);
            return this;
        }
        public PolicyTargetTrackingConfiguration build() {
            final var o = new PolicyTargetTrackingConfiguration();
            o.customizedMetricSpecification = customizedMetricSpecification;
            o.disableScaleIn = disableScaleIn;
            o.predefinedMetricSpecification = predefinedMetricSpecification;
            o.targetValue = targetValue;
            return o;
        }
    }
}
