package org.opencb.commons.datastore.core;

public class Event {

    private Type type;
    private int code;
    private String id;
    private String name;
    private String description;

    public Event() {
    }

    public Event(Type type, String description) {
        this.type = type;
        this.description = description;
    }

    public Event(Type type, String id, String description) {
        this.type = type;
        this.id = id;
        this.description = description;
    }

    public Event(Type type, int code, String name, String description) {
        this.type = type;
        this.code = code;
        this.name = name;
        this.description = description;
    }

    public Event(Type type, int code, String id, String name, String description) {
        this.type = type;
        this.code = code;
        this.id = id;
        this.name = name;
        this.description = description;
    }

    public enum Type {
        INFO,
        WARNING,
        ERROR
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Event{");
        sb.append("type=").append(type);
        sb.append(", code=").append(code);
        sb.append(", id='").append(id).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public Type getType() {
        return type;
    }

    public Event setType(Type type) {
        this.type = type;
        return this;
    }

    public int getCode() {
        return code;
    }

    public Event setCode(int code) {
        this.code = code;
        return this;
    }

    public String getId() {
        return id;
    }

    public Event setId(String id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public Event setName(String name) {
        this.name = name;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public Event setDescription(String description) {
        this.description = description;
        return this;
    }
}

@@ -171,27 +171,23 @@
  String 
-description
+message
 ;%0A%0A    p
@@ -240,35 +240,31 @@
 ype, String 
-description
+message
 ) %7B%0A        
@@ -298,33 +298,25 @@
 his.
-description = description
+message = message
 ;%0A  
@@ -362,35 +362,31 @@
  id, String 
-description
+message
 ) %7B%0A        
@@ -442,33 +442,25 @@
 his.
-description = description
+message = message
 ;%0A  
@@ -518,35 +518,31 @@
 ame, String 
-description
+message
 ) %7B%0A        
@@ -628,33 +628,25 @@
 his.
-description = description
+message = message
 ;%0A  
@@ -715,35 +715,31 @@
 ame, String 
-description
+message
 ) %7B%0A        
@@ -847,33 +847,25 @@
 his.
-description = description
+message = message
 ;%0A  
@@ -1289,27 +1289,23 @@
 .append(
-description
+message
 ).append
@@ -1980,27 +1980,23 @@
 ring get
-Description
+Message
 () %7B%0A   
@@ -2007,27 +2007,23 @@
  return 
-description
+message
 ;%0A    %7D%0A
@@ -2047,27 +2047,23 @@
  set
-Description
+Message
 (String 
 desc
@@ -2058,27 +2058,23 @@
 (String 
-description
+message
 ) %7B%0A    
@@ -2086,33 +2086,25 @@
 his.
-description = description
+message = message
 ;%0A  

rename 'description' for 'message' in Event class