package com.bytesw.bytebot.model.enums;

import lombok.Getter;

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

@Getter
public enum StatusBcdEnum {

    CARGANDO("Cargando"),
    CARGADO("Cargado"),
    INDEXANDO("Indexando"),
    INDEXADO("Indexado");


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

    private String name;

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

    static {
        for (StatusBcdEnum type : StatusBcdEnum.values()) {
            map.put(type.name, type);
        }
    }

    public static StatusBcdEnum fromString(String name) {
        return map.get(name);
    }
}
