/*
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template
|
*/
|
package com.megatim.fdxcommons.model.dataproduction;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.megatim.fdxcommons.model.search.EnumValue;
|
|
/**
|
*
|
* @author ASUS
|
*/
|
public enum DataProductionSource {
|
API("API"), FICHIER("FICHIER");
|
|
private final String value;
|
|
private DataProductionSource(String value) {
|
this.value = value;
|
}
|
|
@Override
|
public String toString() {
|
return this.value;
|
}
|
|
@JsonValue
|
public String getValue() {
|
return this.value;
|
}
|
|
@EnumValue
|
public static DataProductionSource fromValue(String value) {
|
if (value == null) {
|
return null;
|
}
|
if (value.equalsIgnoreCase("api")) {
|
return DataProductionSource.API;
|
} else if (value.equalsIgnoreCase("fichier")) {
|
return DataProductionSource.FICHIER;
|
} else {
|
return null;
|
|
}
|
}
|
}
|