package com.inspect.metadata.montdata.montenum;

public enum NestRunDataEnum {
    BatPwr("1", "电池电量"),
    BatUseSta("2", "电池使用状态"),
    BatUseSta_Charge("2-1", "充电中"),
    BatUseSta_Using("2-2", "使用中"),
    BatSta("3", "电池状态"),
    BatSta_Nor("3-1", "正常"),
    BatSta_Abn("3-2", "异常"),
    BatLo("4", "电池电压"),
    RoomTmp("5", "舱内温度"),
    RoomHum("6", "舱内湿度");

    private String typeCode;
    private String targetValue;

    private NestRunDataEnum(String typeCode, String targetValue) {
        this.typeCode = typeCode;
        this.targetValue = targetValue;
    }

    public static String getTargetValueByTypeCode(String typeCode) {
        NestRunDataEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            NestRunDataEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c.getTargetValue();
            }
        }

        return null;
    }

    public static String getNameByTypeCode(String typeCode) {
        NestRunDataEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            NestRunDataEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c.name();
            }
        }

        return null;
    }

    public static NestRunDataEnum getEnumObjectByTypeCode(String typeCode) {
        NestRunDataEnum[] var1 = values();
        int var2 = var1.length;

        for (int var3 = 0; var3 < var2; ++var3) {
            NestRunDataEnum c = var1[var3];
            if (c.typeCode.equals(typeCode)) {
                return c;
            }
        }

        return null;
    }

    public String getTypeCode() {
        return this.typeCode;
    }

    public void setTypeCode(String typeCode) {
        this.typeCode = typeCode;
    }

    public String getTargetValue() {
        return this.targetValue;
    }

    public void setTargetValue(String targetValue) {
        this.targetValue = targetValue;
    }

    public static void main(String[] args) {
        String a = getNameByTypeCode("1");
        System.out.println(a);
        NestRunDataEnum enumM = getEnumObjectByTypeCode("2");
        System.out.println(enumM.name());
        System.out.println(enumM.getTargetValue());
    }
}
