package com.bytesw.bytebot.model.enums;

import lombok.Getter;

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

public enum ProcessETLEnum {

    PROCESS_DELETE ( "Eliminación de Data Sensible");

    private final String name;

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

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

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

    public String getName() {
        return name;
    }

    public static ProcessETLEnum fromString(String name) {
        if (map.containsKey(name)) {
            return map.get(name);
        }
        throw new NoSuchElementException(name + " not found");
    }
}