// Path: src/main/java/net/ilexiconn/magister/container/type/AppointmentType.java
// public enum AppointmentType implements Serializable {
//     PERSONAL(1),
//     GENERAL(2),
//     SCHOOLWIDE(3),
//     INTERNSHIP(4),
//     INTAKE(4),
//     SHEDULE_FREE(5),
//     KWT(6),
//     STANDBY(7),
//     BLOCK(8),
//     MISCELLANEOUS(9),
//     LOCAL_BLOCK(10),
//     CLASS_BLOCK(11),
//     //12?
//     LESSON(13),
//     SHEDULE_FREE_STUDY(14),
//     //15?
//     PLANNING(16),
//     ACTIONS(101),
//     PRESENCES(102),
//     EXAM_SHUDULE(103);
// 
//     private int id;
// 
//     AppointmentType(int i) {
//         id = i;
//     }
// 
//     public static AppointmentType getTypeById(int i) {
//         for (AppointmentType type : values()) {
//             if (type.getID() == i) {
//                 return type;
//             }
//         }
//         return null;
//     }
// 
//     public int getID() {
//         return id;
//     }
// }
// 
// Path: src/main/java/net/ilexiconn/magister/util/DateUtil.java
// public class DateUtil {
//     /**
//      * Parse a String date into a Date object.
//      *
//      * @param date the String date.
//      * @return the new Date instance.
//      * @throws ParseException if the date String can't be parsed.
//      */
//     public static Date stringToDate(String date) throws ParseException {
//         if (date == null) {
//             return null;
//         }
//         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
//         format.setTimeZone(TimeZone.getTimeZone("GMT-0"));
//         return format.parse(date);
//     }
// 
//     /**
//      * Parse a Date object into a String.
//      *
//      * @param date the Date instance.
//      * @return the date as String.
//      * @throws ParseException if the Date object can't be parsed.
//      */
//     public static String dateToString(Date date) throws ParseException {
//         if (date == null) {
//             return null;
//         }
//         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSS");
//         format.setTimeZone(TimeZone.getTimeZone("GMT-0"));
//         return format.format(date) + "Z";
//     }
// }


import java.text.ParseException;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
import net.ilexiconn.magister.container.type.AppointmentType;
import net.ilexiconn.magister.util.DateUtil;
import java.io.Serializable;
import java.security.InvalidParameterException;
    public int displayType = 1;

    @SerializedName("Type")
    public int appointmentType = 1;

    @SerializedName("Afgerond")
    public boolean finished = false;

    @SerializedName("Inhoud")
    public String content;

    @SerializedName("Omschrijving")
    public String description;

    @SerializedName("Status")
    public int classState = 2;

    @SerializedName("OpdrachtId")
    public int asignmentId = 0;

    public PersonalAppointment(String title, String content, String location, AppointmentType type, Date start, Date end) throws ParseException {
        this.location = location;
        this.content = content;
        if (title == null || "".equals(title)) {
            throw new InvalidParameterException("The appointment's title must be set!");
        }
        description = title;
        if (start.after(end) || start.equals(end)) {
            throw new InvalidParameterException("The appointment's start date must be before and not equal to the end date!");
        }
// Path: src/main/java/net/ilexiconn/magister/container/type/AppointmentType.java
// public enum AppointmentType implements Serializable {
//     PERSONAL(1),
//     GENERAL(2),
//     SCHOOLWIDE(3),
//     INTERNSHIP(4),
//     INTAKE(4),
//     SHEDULE_FREE(5),
//     KWT(6),
//     STANDBY(7),
//     BLOCK(8),
//     MISCELLANEOUS(9),
//     LOCAL_BLOCK(10),
//     CLASS_BLOCK(11),
//     //12?
//     LESSON(13),
//     SHEDULE_FREE_STUDY(14),
//     //15?
//     PLANNING(16),
//     ACTIONS(101),
//     PRESENCES(102),
//     EXAM_SHUDULE(103);
// 
//     private int id;
// 
//     AppointmentType(int i) {
//         id = i;
//     }
// 
//     public static AppointmentType getTypeById(int i) {
//         for (AppointmentType type : values()) {
//             if (type.getID() == i) {
//                 return type;
//             }
//         }
//         return null;
//     }
// 
//     public int getID() {
//         return id;
//     }
// }
// 
// Path: src/main/java/net/ilexiconn/magister/util/DateUtil.java
// public class DateUtil {
//     /**
//      * Parse a String date into a Date object.
//      *
//      * @param date the String date.
//      * @return the new Date instance.
//      * @throws ParseException if the date String can't be parsed.
//      */
//     public static Date stringToDate(String date) throws ParseException {
//         if (date == null) {
//             return null;
//         }
//         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
//         format.setTimeZone(TimeZone.getTimeZone("GMT-0"));
//         return format.parse(date);
//     }
// 
//     /**
//      * Parse a Date object into a String.
//      *
//      * @param date the Date instance.
//      * @return the date as String.
//      * @throws ParseException if the Date object can't be parsed.
//      */
//     public static String dateToString(Date date) throws ParseException {
//         if (date == null) {
//             return null;
//         }
//         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSSS");
//         format.setTimeZone(TimeZone.getTimeZone("GMT-0"));
//         return format.format(date) + "Z";
//     }
// }


// Path: src/main/java/net/ilexiconn/magister/container/PersonalAppointment.java
import java.text.ParseException;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
import net.ilexiconn.magister.container.type.AppointmentType;
import net.ilexiconn.magister.util.DateUtil;
import java.io.Serializable;
import java.security.InvalidParameterException;

    public int displayType = 1;

    @SerializedName("Type")
    public int appointmentType = 1;

    @SerializedName("Afgerond")
    public boolean finished = false;

    @SerializedName("Inhoud")
    public String content;

    @SerializedName("Omschrijving")
    public String description;

    @SerializedName("Status")
    public int classState = 2;

    @SerializedName("OpdrachtId")
    public int asignmentId = 0;

    public PersonalAppointment(String title, String content, String location, AppointmentType type, Date start, Date end) throws ParseException {
        this.location = location;
        this.content = content;
        if (title == null || "".equals(title)) {
            throw new InvalidParameterException("The appointment's title must be set!");
        }
        description = title;
        if (start.after(end) || start.equals(end)) {
            throw new InvalidParameterException("The appointment's start date must be before and not equal to the end date!");
        }
        startDate = DateUtil.dateToString(start);