package com.yuchen.saas.device.api.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.nest.springwrap.core.log.exception.ServiceException;

@Getter
@AllArgsConstructor
public enum NetAlarmTypeEnum {
    NET(1, "物联告警"),
    BIZ(2, "业务告警"),

    ;

    private Integer value;
    private String desc;

    public static NetAlarmTypeEnum convert(int intValue) {
        NetAlarmTypeEnum[] allValues = NetAlarmTypeEnum.values();
        for (NetAlarmTypeEnum allValue : allValues) {
            if (allValue.value == intValue) {
                return allValue;
            }
        }
        throw new ServiceException("NetAlarmTypeEnum 非法枚举参数值");
    }
}
