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

package com.azure.resourcemanager.mariadb.models;

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

/**
 * Whether or not public network access is allowed for this server. Value is optional but if passed in, must be
 * 'Enabled' or 'Disabled'.
 */
public final class PublicNetworkAccessEnum extends ExpandableStringEnum<PublicNetworkAccessEnum> {
    /** Static value Enabled for PublicNetworkAccessEnum. */
    public static final PublicNetworkAccessEnum ENABLED = fromString("Enabled");

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

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

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

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