You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
argos/dmp-backend/src/main/java/eu/eudat/types/ApiResponseType.java

30 lines
636 B
Java

package eu.eudat.types;
/**
* Created by ikalyvas on 3/5/2018.
*/
public enum ApiResponseType {
JSON_RESPONSE(0), FILE_RESPONSE(1);
private Integer value;
private ApiResponseType(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
public static ApiResponseType fromInteger(Integer value) {
switch (value) {
case 0:
return JSON_RESPONSE;
case 200:
return FILE_RESPONSE;
default:
throw new RuntimeException("Unsupported Api Response Type Code");
}
}
}