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

package com.azure.resourcemanager.mobilenetwork.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/** The core network technology generation (5G core, EPC / 4G core or EPC / 4G + 5G core). */
public enum CoreNetworkType {
    /** Enum value 5GC. */
    FIVE_GC("5GC"),

    /** Enum value EPC. */
    EPC("EPC"),

    /** Enum value EPC + 5GC. */
    EPC_5GC("EPC + 5GC");

    /** The actual serialized value for a CoreNetworkType instance. */
    private final String value;

    CoreNetworkType(String value) {
        this.value = value;
    }

    /**
     * Parses a serialized value to a CoreNetworkType instance.
     *
     * @param value the serialized value to parse.
     * @return the parsed CoreNetworkType object, or null if unable to parse.
     */
    @JsonCreator
    public static CoreNetworkType fromString(String value) {
        if (value == null) {
            return null;
        }
        CoreNetworkType[] items = CoreNetworkType.values();
        for (CoreNetworkType item : items) {
            if (item.toString().equalsIgnoreCase(value)) {
                return item;
            }
        }
        return null;
    }

    /** {@inheritDoc} */
    @JsonValue
    @Override
    public String toString() {
        return this.value;
    }
}
