package com.inspect.metadata.montdata.montenum;

public enum PatrolDeviceRunDataEnum {
    HorSpd("1", "水平速度"),
    TrlDistan("2", "行驶里程"),
    BatPwr("3", "电池电量"),
    VerSpd("4", "垂直速度"),
    Distance("5", "飞行距离"),
    Height("6", "飞行高度"),
    FliDuration("7", "飞行时长"),
    PitchAngle("8", "云台俯仰角"),
    RollAngle("9", "云台横滚角"),
    YawAngle("10", "云台偏航角"),
    ChargeAmps("11", "充电电流");

    private String typeCode;
    private String targetValue;

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

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

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

        return null;
    }

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

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

        return null;
    }

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

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