package com.netsdk.lib.enumeration; /** * @author 291189 * @description 呼å«ç”µæ¢¯æ–¹å¼ * @date 2022/10/19 14:01:07 */ public enum EM_CALLLIFT_ACTION { /** 未知 */ EM_CALLLIFT_ACTION_UNKNOWN(-1,"未知"), /** 用户通过对讲分机打开å•å…ƒé—¨é”,åŒæ—¶å‘¼å«ç”µæ¢¯åˆ°å•å…ƒé—¨å¤„ */ EM_CALLLIFT_ACTION_USER_UNLOCK_CALL(0,"用户通过对讲分机打开å•å…ƒé—¨é”,åŒæ—¶å‘¼å«ç”µæ¢¯åˆ°å•å…ƒé—¨å¤„"), /** 用户呼å«ç”µæ¢¯åˆ°ç”¨æˆ·æ‰€åœ¨æ¥¼å±‚ */ EM_CALLLIFT_ACTION_USER_DIRECT_CALL(1,"用户呼å«ç”µæ¢¯åˆ°ç”¨æˆ·æ‰€åœ¨æ¥¼å±‚"), /** 用户呼å«ç”µæ¢¯ç»ç”±æŸå±‚到æŸå±‚ */ EM_CALLLIFT_ACTION_USER_REDIRECT_CALL(2,"用户呼å«ç”µæ¢¯ç»ç”±æŸå±‚到æŸå±‚"), /** å•å…ƒé—¨å¼€é”,åŒæ—¶å‘¼å«ç”µæ¢¯åˆ°å•å…ƒé—¨å¤„ */ EM_CALLLIFT_ACTION_DIRECT_UNLOCK_CALL(3,"å•å…ƒé—¨å¼€é”,åŒæ—¶å‘¼å«ç”µæ¢¯åˆ°å•å…ƒé—¨å¤„"); private int value; private String note; public String getNote() { return note; } public int getValue() { return value; } EM_CALLLIFT_ACTION(int givenValue, String note) { this.value = givenValue; this.note = note; } public static String getNoteByValue(int givenValue) { for (EM_CALLLIFT_ACTION enumType : EM_CALLLIFT_ACTION.values()) { if (givenValue == enumType.getValue()) { return enumType.getNote(); } } return null; } public static int getValueByNote(String givenNote) { for (EM_CALLLIFT_ACTION enumType : EM_CALLLIFT_ACTION.values()) { if (givenNote.equals(enumType.getNote())) { return enumType.getValue(); } } return -2; } public static EM_CALLLIFT_ACTION getEnum(int value) { for (EM_CALLLIFT_ACTION e : EM_CALLLIFT_ACTION.values()) { if (e.getValue() == value) return e; } return EM_CALLLIFT_ACTION.EM_CALLLIFT_ACTION_UNKNOWN; } }