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

package com.azure.resourcemanager.billingbenefits.models;

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

/** Commitment grain. */
public final class CommitmentGrain extends ExpandableStringEnum<CommitmentGrain> {
    /** Static value Hourly for CommitmentGrain. */
    public static final CommitmentGrain HOURLY = fromString("Hourly");

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

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

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