package net.kencochrane.raven.sentrystub.event;

import com.fasterxml.jackson.annotation.JsonProperty;
import net.kencochrane.raven.sentrystub.event.interfaces.ExceptionInterface;
import net.kencochrane.raven.sentrystub.event.interfaces.MessageInterface;
import net.kencochrane.raven.sentrystub.event.interfaces.StackTraceInterface;

import java.util.Date;
import java.util.Map;

public class Event {
    @JsonProperty(value = "event_id", required = true)
    private String eventId;
    @JsonProperty(value = "checksum")
    private String checksum;
    @JsonProperty(value = "message")
    private String message;
    @JsonProperty(value = "timestamp", required = true)
    private Date timestamp;
    @JsonProperty(value = "level")
    private String level;
    @JsonProperty(value = "logger")
    private String logger;
    @JsonProperty(value = "platform")
    private String platform;
    @JsonProperty(value = "culprit")
    private String culprit;
    @JsonProperty(value = "tags")
    private Map<String, String> tags;
    @JsonProperty(value = "server_name")
    private String serverName;
    @JsonProperty(value = "modules")
    private Map<String, String> modules;
    @JsonProperty(value = "extra")
    private Map<String, Object> extras;
    @JsonProperty(value = "sentry.interfaces.Message")
    private MessageInterface messageInterface;
    @JsonProperty(value = "sentry.interfaces.Exception")
    private ExceptionInterface exceptionInterface;
    @JsonProperty(value = "sentry.interfaces.StackTrace")
    private StackTraceInterface stackTraceInterface;

    @JsonProperty(value = "exception")
    public void setExceptionInterface(ExceptionInterface exceptionInterface) {
        this.exceptionInterface = exceptionInterface;
    }

    @JsonProperty(value = "stacktrace")
    public void setStackTraceInterface(StackTraceInterface stackTraceInterface) {
        this.stackTraceInterface = stackTraceInterface;
    }
}

@@ -350,16 +350,39 @@
 l.Date;%0A
+import java.util.List;%0A
 import j
@@ -1440,16 +1440,21 @@
 private 
+List%3C
 Exceptio
@@ -1455,32 +1455,33 @@
 ceptionInterface
+%3E
  exceptionInterf
@@ -1475,32 +1475,33 @@
 ceptionInterface
+s
 ;%0A    @JsonPrope
@@ -1674,17 +1674,23 @@
 nterface
-(
+s(List%3C
 Exceptio
@@ -1699,16 +1699,17 @@
 nterface
+%3E
  excepti
@@ -1711,32 +1711,33 @@
 ceptionInterface
+s
 ) %7B%0A        this
@@ -1755,16 +1755,17 @@
 nterface
+s
  = excep
@@ -1769,32 +1769,33 @@
 ceptionInterface
+s
 ;%0A    %7D%0A%0A    @Js

Handle exception as a list of exceptions