// Path: src/main/java/info/interactivesystems/gamificationengine/api/exeption/ErrorMessage.java
// public class ErrorMessage implements Serializable {
// 
// 	private static final long serialVersionUID = 9039774438272543442L;
// 
// 	private CharSequence message;
// 
// 	public static ErrorMessage of(CharSequence message) {
// 		ErrorMessage errorMessage = new ErrorMessage();
// 		errorMessage.setMessage(message);
// 		return errorMessage;
// 	}
// 
// 	public void setMessage(CharSequence message) {
// 		this.message = message;
// 	}
// 
// 	public CharSequence getMessage() {
// 		return message;
// 	}
// }
// 
// Path: src/main/java/info/interactivesystems/gamificationengine/api/exeption/Notification.java
// public class Notification {
// 
// 	private final List<ErrorMessage> errors = new ArrayList<>();
// 	
// 	public static Notification of(CharSequence... messages) {
// 		Notification notification = new Notification();
// 		Stream.of(messages).forEach(notification::addError);
// 		return notification;
// 	}
// 
// 	public void addError(CharSequence message) {
// 		errors.add(ErrorMessage.of(message));
// 	}
// 
// 	public List<ErrorMessage> getErrors() {
// 		return errors;
// 	}
// 
// 	public boolean hasErrors() {
// 		return !errors.isEmpty();
// 	}
// 
// }


import info.interactivesystems.gamificationengine.api.exeption.ErrorMessage;
import info.interactivesystems.gamificationengine.api.exeption.Notification;
import java.util.List;
import java.util.Optional;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.fasterxml.jackson.annotation.JsonProperty;
package info.interactivesystems.gamificationengine.api;





/**
 * This surrogate is used to add to each returned object an error field. The
 * error field may contain a list of errors. The deputized object is unwrapped,
 * so it seems the error field exists in any response object.
 * 
 * @param <T>
 */
public class ResponseSurrogate<T> {

	@SuppressWarnings("FieldCanBeLocal")
	// @JsonUnwrapped
	@JsonProperty
	final T content;

	@JsonProperty
	final Response.Status contentResponseType;

	@SuppressWarnings("FieldCanBeLocal")
	@JsonProperty
	final List<ErrorMessage> info;

// Path: src/main/java/info/interactivesystems/gamificationengine/api/exeption/ErrorMessage.java
// public class ErrorMessage implements Serializable {
// 
// 	private static final long serialVersionUID = 9039774438272543442L;
// 
// 	private CharSequence message;
// 
// 	public static ErrorMessage of(CharSequence message) {
// 		ErrorMessage errorMessage = new ErrorMessage();
// 		errorMessage.setMessage(message);
// 		return errorMessage;
// 	}
// 
// 	public void setMessage(CharSequence message) {
// 		this.message = message;
// 	}
// 
// 	public CharSequence getMessage() {
// 		return message;
// 	}
// }
// 
// Path: src/main/java/info/interactivesystems/gamificationengine/api/exeption/Notification.java
// public class Notification {
// 
// 	private final List<ErrorMessage> errors = new ArrayList<>();
// 	
// 	public static Notification of(CharSequence... messages) {
// 		Notification notification = new Notification();
// 		Stream.of(messages).forEach(notification::addError);
// 		return notification;
// 	}
// 
// 	public void addError(CharSequence message) {
// 		errors.add(ErrorMessage.of(message));
// 	}
// 
// 	public List<ErrorMessage> getErrors() {
// 		return errors;
// 	}
// 
// 	public boolean hasErrors() {
// 		return !errors.isEmpty();
// 	}
// 
// }


// Path: src/main/java/info/interactivesystems/gamificationengine/api/ResponseSurrogate.java
import info.interactivesystems.gamificationengine.api.exeption.ErrorMessage;
import info.interactivesystems.gamificationengine.api.exeption.Notification;
import java.util.List;
import java.util.Optional;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import com.fasterxml.jackson.annotation.JsonProperty;

package info.interactivesystems.gamificationengine.api;





/**
 * This surrogate is used to add to each returned object an error field. The
 * error field may contain a list of errors. The deputized object is unwrapped,
 * so it seems the error field exists in any response object.
 * 
 * @param <T>
 */
public class ResponseSurrogate<T> {

	@SuppressWarnings("FieldCanBeLocal")
	// @JsonUnwrapped
	@JsonProperty
	final T content;

	@JsonProperty
	final Response.Status contentResponseType;

	@SuppressWarnings("FieldCanBeLocal")
	@JsonProperty
	final List<ErrorMessage> info;

	private ResponseSurrogate(T content, Response.Status contentResponseType, Notification info) {