package com.yuchen.saas.park.api.enums.security;

/**
 * @description:
 * @author: 洪铭铭
 * @time: 2024/9/11 10:52
 */
public enum ElectronicFenceChannelActionEnum {

    SINGLE_CHANNEL(0, "单防区布防"),
    CANCEL_CHANNEL(1, "单防区撤防"),
    SIDE_CHANNEL(2, "单防区旁路"),
    SIDE_CHANNEL_RESET(3, "单防区旁路恢复");


    private final int value;
    private final String description;

    ElectronicFenceChannelActionEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static ElectronicFenceChannelActionEnum fromValue(int value) {
        for (ElectronicFenceChannelActionEnum type : ElectronicFenceChannelActionEnum.values()) {
            if (type.value == value) {
                return type;
            }
        }
        throw new IllegalArgumentException("Unknown enum value: " + value);
    }

}
