package ru.yandex.wmtools.common.data;

/**
 * Date: May 13, 2009
 *
 * @author yakushev
 */
public enum RegionTypeEnum {
    CATALOG(1),
    AUTO(2),
    WMCONSOLE(3);

    private final int id;

    RegionTypeEnum(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public static RegionTypeEnum getByValue(int value) {
        for (RegionTypeEnum type : values()) {
            if (value == type.id) {
                return type;
            }
        }

        return null;
    }
}
