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

package com.azure.resourcemanager.postgresqlflexibleserver.models;

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

/**
 * A value indicating whether this region is restricted. "Enabled" means region is restricted. "Disabled" stands for
 * region is not restricted.
 */
public final class RestrictedEnum extends ExpandableStringEnum<RestrictedEnum> {
    /** Static value Enabled for RestrictedEnum. */
    public static final RestrictedEnum ENABLED = fromString("Enabled");

    /** Static value Disabled for RestrictedEnum. */
    public static final RestrictedEnum DISABLED = fromString("Disabled");

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

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

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