package mn.devfest.api.model;

import android.os.Parcel;
import android.os.Parcelable;

import org.joda.time.DateTime;

import java.util.ArrayList;

/**
 * Represents a session at the conference (e.g. – a talk, workshop, etc)
 * Created by chris.black on 12/5/15.
 */
public class Session implements Parcelable {
    private boolean all;
    private String description;
    private DateTime endTime;
    private String room;
    private ArrayList<String> speakers;
    private DateTime startTime;
    private String title;

    private String id;

    protected Session(Parcel in) {
        all = in.readByte() != 0;
        description = in.readString();
        endTime = new DateTime(in.readLong());
        room = in.readString();
        speakers = in.createStringArrayList();
        startTime = new DateTime(in.readLong());
        title = in.readString();
        id = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeByte((byte) (all ? 1 : 0));
        dest.writeString(description);
        dest.writeLong(endTime.getMillis());
        dest.writeString(room);
        dest.writeStringList(speakers);
        dest.writeLong(startTime.getMillis());
        dest.writeString(title);
        dest.writeString(id);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<Session> CREATOR = new Creator<Session>() {
        @Override
        public Session createFromParcel(Parcel in) {
            return new Session(in);
        }

        @Override
        public Session[] newArray(int size) {
            return new Session[size];
        }
    };

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

    public String getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public String getDescription() {
        return description;
    }

    public DateTime getEndTime() {
        return endTime;
    }

    public String getRoom() {
        return room;
    }

    public ArrayList<String> getSpeakers() {
        return speakers;
    }

    public DateTime getStartTime() {
        return startTime;
    }
}

@@ -517,16 +517,53 @@
 title;%0A%0A
+    private ArrayList%3CString%3E tags;%0A%0A
     priv
@@ -577,16 +577,16 @@
 ing id;%0A
-
 %0A    pro
@@ -886,32 +886,75 @@
 n.readString();%0A
+        tags = in.createStringArrayList();%0A
         id = in.
@@ -1326,16 +1326,52 @@
 title);%0A
+        dest.writeStringList(tags);%0A
         
@@ -2203,24 +2203,24 @@
 peakers() %7B%0A
-
         retu
@@ -2231,32 +2231,101 @@
 peakers;%0A    %7D%0A%0A
+    public ArrayList%3CString%3E getTags() %7B%0A        return tags;%0A    %7D%0A%0A
     public DateT

Add tags to the session model