// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.advisor.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/**
 * Minimum percentage threshold for Advisor low CPU utilization evaluation. Valid only for subscriptions. Valid values:
 * 5 (default), 10, 15 or 20.
 */
public final class CpuThreshold extends ExpandableStringEnum<CpuThreshold> {
    /** Static value 5 for CpuThreshold. */
    public static final CpuThreshold FIVE = fromString("5");

    /** Static value 10 for CpuThreshold. */
    public static final CpuThreshold ONE_ZERO = fromString("10");

    /** Static value 15 for CpuThreshold. */
    public static final CpuThreshold ONE_FIVE = fromString("15");

    /** Static value 20 for CpuThreshold. */
    public static final CpuThreshold TWO_ZERO = fromString("20");

    /**
     * Creates a new instance of CpuThreshold value.
     *
     * @deprecated Use the {@link #fromString(String)} factory method.
     */
    @Deprecated
    public CpuThreshold() {
    }

    /**
     * Creates or finds a CpuThreshold from its string representation.
     *
     * @param name a name to look for.
     * @return the corresponding CpuThreshold.
     */
    @JsonCreator
    public static CpuThreshold fromString(String name) {
        return fromString(name, CpuThreshold.class);
    }

    /**
     * Gets known CpuThreshold values.
     *
     * @return known CpuThreshold values.
     */
    public static Collection<CpuThreshold> values() {
        return values(CpuThreshold.class);
    }
}
