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

package com.azure.resourcemanager.sql.models;

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

/** The unit of the metric. */
public final class QueryMetricUnitType extends ExpandableStringEnum<QueryMetricUnitType> {
    /** Static value percentage for QueryMetricUnitType. */
    public static final QueryMetricUnitType PERCENTAGE = fromString("percentage");

    /** Static value KB for QueryMetricUnitType. */
    public static final QueryMetricUnitType KB = fromString("KB");

    /** Static value microseconds for QueryMetricUnitType. */
    public static final QueryMetricUnitType MICROSECONDS = fromString("microseconds");

    /** Static value count for QueryMetricUnitType. */
    public static final QueryMetricUnitType COUNT = fromString("count");

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

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