package com.bytesw.bytebot.model.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

@Getter
public enum ProviderErrorEnum {
    AUTHENTICATE("Authenticate"),
    CONEXION("name resolution");

    private static final Map<String, ProviderErrorEnum> map = new HashMap<>();

    private String name;

    ProviderErrorEnum(String name){ this.name = name;}

    public  String getName() {return name;}

    static {
        for (ProviderErrorEnum type : ProviderErrorEnum.values()) {
            map.put(type.name, type);
        }
    }
    public static ProviderErrorEnum fromString(String name) {
        return map.get(name);
    }
}
