package com.daksh.tmdbsample.data.model;

import com.google.gson.annotations.SerializedName;

import java.util.Date;

/**
 * Created by daksh on 03-Sep-16.
 */
public class Movie {

    private final String title;

    @SerializedName("poster_path")
    private final String imageUrl;

    @SerializedName("overview")
    private final String synopsis;

    @SerializedName("vote_average")
    private final double userRating;

    private final Date releaseDate;

    public Movie(String title, String imageUrl, String synopsis, double userRating, Date releaseDate) {
        this.title = title;
        this.imageUrl = imageUrl;
        this.synopsis = synopsis;
        this.userRating = userRating;
        this.releaseDate = releaseDate;
    }

    public String getTitle() {
        return title;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public String getSynopsis() {
        return synopsis;
    }

    public double getUserRating() {
        return userRating;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }
}

@@ -35,16 +35,73 @@
 model;%0A%0A
+import android.os.Parcel;%0Aimport android.os.Parcelable;%0A%0A
 import c
@@ -229,18 +229,371 @@
 s Movie 
-%7B%0A
+implements Parcelable %7B%0A%0A    public static final Parcelable.Creator%3CMovie%3E CREATOR = new Parcelable.Creator%3CMovie%3E() %7B%0A        @Override%0A        public Movie createFromParcel(Parcel source) %7B%0A            return new Movie(source);%0A        %7D%0A%0A        @Override%0A        public Movie%5B%5D newArray(int size) %7B%0A            return new Movie%5Bsize%5D;%0A        %7D%0A    %7D;
 %0A    pri
@@ -617,17 +617,16 @@
  title;%0A
-%0A
     @Ser
@@ -687,17 +687,16 @@
 ageUrl;%0A
-%0A
     @Ser
@@ -754,17 +754,16 @@
 nopsis;%0A
-%0A
     @Ser
@@ -827,17 +827,16 @@
 Rating;%0A
-%0A
     priv
@@ -1158,326 +1158,1056 @@
    p
-ublic String getTitle() %7B%0A        return title;%0A    %7D%0A%0A    public String getImageUrl() %7B%0A        return imageUrl;%0A    %7D%0A%0A    public String getSynopsis() %7B%0A        return synopsis;%0A    %7D%0A%0A    public double getUserRating() %7B%0A        return userRating;%0A    %7D%0A%0A    public Date getReleaseDate() %7B%0A        return releaseDate
+rotected Movie(Parcel in) %7B%0A        this.title = in.readString();%0A        this.imageUrl = in.readString();%0A        this.synopsis = in.readString();%0A        this.userRating = in.readDouble();%0A        long tmpReleaseDate = in.readLong();%0A        this.releaseDate = tmpReleaseDate == -1 ? null : new Date(tmpReleaseDate);%0A    %7D%0A%0A    public String getTitle() %7B%0A        return title;%0A    %7D%0A%0A    public String getImageUrl() %7B%0A        return imageUrl;%0A    %7D%0A%0A    public String getSynopsis() %7B%0A        return synopsis;%0A    %7D%0A%0A    public double getUserRating() %7B%0A        return userRating;%0A    %7D%0A%0A    public Date getReleaseDate() %7B%0A        return releaseDate;%0A    %7D%0A%0A    @Override%0A    public int describeContents() %7B%0A        return 0;%0A    %7D%0A%0A    @Override%0A    public void writeToParcel(Parcel dest, int flags) %7B%0A        dest.writeString(this.title);%0A        dest.writeString(this.imageUrl);%0A        dest.writeString(this.synopsis);%0A        dest.writeDouble(this.userRating);%0A        dest.writeLong(this.releaseDate != null ? this.releaseDate.getTime() : -1)
 ;%0A  

Make Movie model implement Parcelable