// 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;

/** Represents the billing plan in ISO 8601 format. Required only for monthly billing plans. */
public final class BillingPlan extends ExpandableStringEnum<BillingPlan> {
    /** Static value P1M for BillingPlan. */
    public static final BillingPlan P1M = fromString("P1M");

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

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

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