package cz.hobrasoft.pdfmu.jackson;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;

/**
 *
 * @author <a href="mailto:filip.bartek@hobrasoft.cz">Filip Bartek</a>
 */
public class RpcError {

    @JsonPropertyDescription("A Number that indicates the error type that occurred.")
    @JsonProperty(required = true)
    public int code;

    @JsonPropertyDescription("A String providing a short description of the error.\n"
            + "The message SHOULD be limited to a concise single sentence.")
    @JsonProperty(required = true)
    public String message;

    @JsonPropertyDescription("A Primitive or Structured value that contains additional information about the error.\n"
            + "This may be omitted.\n"
            + "The value of this member is defined by the Server (e.g. detailed error information, nested errors etc.).")
    @JsonInclude(Include.NON_NULL)
    public Object data = null;

    public RpcError(int code, String message) {
        this.code = code;
        this.message = message;
    }
}

@@ -268,16 +268,45 @@
 iption;%0D
+%0Aimport java.util.SortedMap;%0D
 %0A%0D%0A/**%0D%0A
@@ -787,24 +787,253 @@
 message;%0D%0A%0D%0A
+    public static class Data %7B%0D%0A%0D%0A        @JsonInclude(Include.NON_NULL)%0D%0A        public String causeMessage = null;%0D%0A%0D%0A        @JsonInclude(Include.NON_NULL)%0D%0A        public SortedMap%3CString, Object%3E arguments = null;%0D%0A    %7D%0D%0A%0D%0A
     @JsonPro
@@ -1350,22 +1350,20 @@
  public 
-Object
+Data
  data = 

Structure field `data`