com.dahuatech.icc.event.enums.CategoryEnums Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-event Show documentation
Show all versions of java-sdk-event Show documentation
Dahua ICC Open API SDK for Java
package com.dahuatech.icc.event.enums;
import com.dahuatech.icc.util.StringUtils;
/**
* 事件大类枚举
*/
public enum CategoryEnums {
alarm("alarm","报警事件") ,
business("business","业务事件") ,
perception("perception","感知类事件") ,
state("state","状态事件") ,
;
public String code;
public String msg;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
CategoryEnums(String code, String msg){
this.code = code;
this.msg = msg;
}
public static boolean isRight(String code){
if(StringUtils.isEmpty(code)){
return false;
}
for(CategoryEnums item : CategoryEnums.values()){
if(code.equals(item.code)){
return true;
}
}
return false;
}
}