Merged in NETEXP-2959 (pull request #3)

[NETEXP-2959] update LedStatus to pass tests

Approved-by: mike.hansen
This commit is contained in:
Thomas Leung
2021-09-17 18:22:36 +00:00
committed by Thomas-Leung2021
parent 267fb477a3
commit e8dd8724fb

View File

@@ -0,0 +1,27 @@
package com.telecominfraproject.wlan.core.model.equipment;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.telecominfraproject.wlan.core.model.json.JsonDeserializationUtils;
public enum LedStatus {
led_on(1),
led_off(2),
led_blink(3),
UNKNOWN(-1);
private final int id;
LedStatus(int id) {
this.id = id;
}
public long getId() {
return id;
}
@JsonCreator
public static LedStatus getByName(String value) {
return JsonDeserializationUtils.deserializEnum(value, LedStatus.class, UNKNOWN);
}
}