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

package com.azure.resourcemanager.billing.models;

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

/** The policy that controls whether Azure reservation purchases are allowed for a billing profile. */
public final class ReservationPurchasesPolicy extends ExpandableStringEnum<ReservationPurchasesPolicy> {
    /** Static value Allowed for ReservationPurchasesPolicy. */
    public static final ReservationPurchasesPolicy ALLOWED = fromString("Allowed");

    /** Static value NotAllowed for ReservationPurchasesPolicy. */
    public static final ReservationPurchasesPolicy NOT_ALLOWED = fromString("NotAllowed");

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

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

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