package com.bocloud.nms.enums;

public enum AgileDeviceStatus {
    ONLINE(0, "ONLINE"), // 在线
    OFFLINE(1, "OFFLINE"), // 离线
    SUBHEALTH(2, "SUBHEALTH"); // 亚健康
    private final int value;
    private final String text;

    AgileDeviceStatus(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static AgileDeviceStatus byValue(int value) {
        for (AgileDeviceStatus deviceStatus : AgileDeviceStatus.values()) {
            if (deviceStatus.value == value) {
                return deviceStatus;
            }
        }
        return null;
    }
}
