public static boolean isAutoScalingEnabled(Replicas replicas, Boolean persistMsg) {
        if (replicas == null) {
            return false;
        }

        if (replicas.getMin() == null || replicas.getMin() < 1) {
            return false;
        }

        if (replicas.getMax() == null) {
            if (StringUtils.isBlank(replicas.getCpuThreshold())) {
                return false;
            }
            persistWarnMsg(persistMsg, ManifestGeneratorActivity.IGNORING_REPLICAS, "Missing field max replicas");
            return false;
        }

        if (replicas.getMax() < replicas.getMin()) {
            persistWarnMsg(persistMsg, ManifestGeneratorActivity.IGNORING_REPLICAS,
                    "Min replicas should be less than max replicas");
            return false;
        }
        if (StringUtils.isBlank(replicas.getCpuThreshold())) {
            persistWarnMsg(persistMsg, ManifestGeneratorActivity.IGNORING_REPLICAS, "Missing field cpuThreshold");
            return false;
        }

        if (!replicas.getCpuThreshold().matches(CPU_THRESHOLD_REGEX)) {
            persistWarnMsg(persistMsg, ManifestGeneratorActivity.IGNORING_REPLICAS,
                    "The field cpuThreshold should match the regex " + CPU_THRESHOLD_REGEX);
            return false;
        }
        int cpuThreshold = Integer.parseInt(replicas.getCpuThreshold().replace("%", ""));
        if (cpuThreshold < 1) {
            persistWarnMsg(persistMsg, ManifestGeneratorActivity.IGNORING_REPLICAS,
                    "The field cpuThreshold should be greater than 0");
            return false;
        }
        
        return true;
    }
Auto scaling is enabled when
Min, max and cpuThreshold are provided,
Min is less than max and
CPU threshold matches the {@value #CPU_THRESHOLD_REGEX}
@param replicas
@param persistMsg whether to persist warn messages
@return whether auto scaling is enabled
manifest-generator/generator-services/src/main/java/io/hyscale/generator/services/utils/ReplicasUtil.java