package com.megatim.fdxconsultation.model.api.token;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.megatim.fdxcommons.model.search.EnumValue;
|
|
/**
|
*
|
* @author Gabuntu
|
*/
|
public enum ApiTokenStatut {
|
|
UNLOCKED("ACTIF"),
|
LOCKED("INACTIF");
|
|
private final String value;
|
|
private ApiTokenStatut(String value) {
|
this.value = value;
|
}
|
|
@JsonValue
|
public String getValue() {
|
return value;
|
}
|
|
@EnumValue
|
public static ApiTokenStatut fromValeur(String value) {
|
switch (value) {
|
case "INACTIF":
|
return ApiTokenStatut.LOCKED;
|
case "ACTIF":
|
return ApiTokenStatut.UNLOCKED;
|
default:
|
return null;
|
}
|
}
|
}
|