package com.ai.da.model.enums;

import com.fasterxml.jackson.annotation.JsonValue;

public enum CollectionType implements IEnumDisplay {
    DESIGN("Design"),
    TO_PRODUCT_IMAGE("ToProductImage"),
    RELIGHT("Relight"),
    POSE_TRANSFORM("PoseTransfer")
    ;

    private String value;

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

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

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

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