package com.inspect.metadata.montdata.montenum;

public enum NestStaDataEnum {
    RunState("1", "运行状态"),
    RunState_0("1-0", "初始化"),
    RunState_1("1-1", "自检中"),
    RunState_2("1-2", "等待重置"),
    RunState_3("1-3", "重置中"),
    RunState_4("1-4", "待机"),
    RunState_5("1-5", "异常"),
    HatchSta("2", "启动"),
    HatchSta_0("2-0", "关闭"),
    HatchSta_1("2-1", "舱门状态"),
    PlatSta("3", "平台状态"),
    PlatSta_0("3-0", "关闭"),
    PlatSta_1("3-1", "启动"),
    ChangeSta("4", "充电状态"),
    ChangeSta_0("4-0", "未充电"),
    ChangeSta_1("4-1", "充电中"),
    ChangeSta_2("4-2", "充电完成"),
    ACState("5", "空调状态"),
    ACState_0("5-0", "关闭"),
    ACState_1("5-1", "启动"),
    ACState_2("5-2", "异常");

    private String typeCode;
    private String targetValue;

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

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

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

        return null;
    }

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

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

        return null;
    }

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

        for (int var3 = 0; var3 < var2; ++var3) {
            NestStaDataEnum 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);
        NestStaDataEnum enumM = getEnumObjectByTypeCode("2");
        System.out.println(enumM.name());
        System.out.println(enumM.getTargetValue());
    }
}
