package com.ai.da.model.enums;

import com.fasterxml.jackson.annotation.JsonValue;

public enum UserBehaviorType implements IEnumDisplay {

    PORTFOLIO_CLICK("portfolioClick"),
    PORTFOLIO_LIKE("portfolioLike"),
    SECOND_CREATION("secondCreation"),
    SKETCH_LIKE("sketchLike")

//    CHILD("Child")
    ;

    private String value;

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

    public static boolean isValidName(String name) {
        for (Sex sex : Sex.values()) {
            if (sex.name().equalsIgnoreCase(name)) {
                return true;
            }
        }
        return false;
    }

    @Override
    @JsonValue
    public String getValue() {
        return this.value;
    }

    public static UserBehaviorType getType(String value) {
        for (UserBehaviorType type : values()) {
            if (type.value.equalsIgnoreCase(value)) {
                return type;
            }
        }
        throw new IllegalArgumentException("No matching constant for [" + value + "]");
    }
}
