package it.integry.plugins.barcode_base_library.model;

public enum BarcodeType {

    NIL(0),
    AIRLINE_2OF5_13_DIGIT(1),
    AIRLINE_2OF5_15_DIGIT(2),
    AZTEC(3),
    AUSTRALIAN_POSTAL(4),
    BOOKLAND_EAN(5),
    BPO(6),
    CANPOST(7),
    CHINAPOST(8),
    CHINESE_2OF5(9),
    CODABAR(10),
    CODABLOCK(11),
    CODE11(12),
    CODE128(13),
    CODE16K(14),
    CODE32(15),
    CODE39(16),
    CODE49(17),
    CODE93(18),
    COMPOSITE(19),
    COUPON_CODE(20),
    DATAMATRIX(21),
    DISCRETE_2OF5(22),
    DUTCH_POSTAL(23),
    EAN128(24),
    EAN13(25),
    EAN8(26),
    GS1_DATABAR_14(27),
    GS1_DATABAR_EXPANDED(28),
    GS1_DATABAR_LIMITED(29),
    HONGKONG_2OF5(30),
    IATA_2OF5(31),
    IDTAG(32),
    INTERLEAVED_2OF5(33),
    ISBT128(34),
    JAPANESE_POSTAL(35),
    KOREAN_POSTAL(36),
    MATRIX_2OF5(37),
    MAXICODE(38),
    MESA(39),
    MICRO_PDF417(40),
    MICRO_QR(41),
    MSI(42),
    NEC_2OF5(43),
    OCR(44),
    PDF417(45),
    PLESSEY(46),
    POSICODE(47),
    POST_US4(48),
    QR(49),
    STRAIGHT_2OF5(50),
    STANDARD_2OF5(51),
    TELEPEN(52),
    TLCODE39(53),
    TRIOPTIC(54),
    UK_POSTAL(55),
    UPCA(56),
    UPCE(57),
    UPCE1(58),
    US_PLANET(59),
    US_POSTNET(60),
    USPS_4CB(61),
    RSS(62),
    LABEL(63),
    HANXIN(64),
    GRIDMATRIX(65),
    INFO_MAIL(66),
    INTELLIGENT_MAIL(67),
    SWEDENPOST(68),
    LAST(69);

    private Integer text;
    BarcodeType(Integer text) {
        this.text = text;
    }
    public Integer getValue() {
        return this.text;
    }

    public static BarcodeType fromInt(Integer text) {
        for (BarcodeType b : BarcodeType.values()) {
            if (b.text.equals(text)) return b;
        }
        return null;
    }

}
