/* * Copyright 2015. Emin Yahyayev * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ewintory.udacity.popularmovies.data.model; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; public final class Review implements Parcelable { @Expose private String id; @Expose private String author; @Expose private String content; @Expose private String url; public Review() {} public String getId() { return id; } public Review setId(String id) { this.id = id; return this; } public String getAuthor() { return author; } public Review setAuthor(String author) { this.author = author; return this; } public String getContent() { return content; } public Review setContent(String content) { this.content = content; return this; } public String getUrl() { return url; } public Review setUrl(String url) { this.url = url; return this; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.id); dest.writeString(this.author); dest.writeString(this.content); dest.writeString(this.url); } protected Review(Parcel in) { this.id = in.readString(); this.author = in.readString(); this.content = in.readString(); this.url = in.readString(); } public static final Creator<Review> CREATOR = new Creator<Review>() { public Review createFromParcel(Parcel source) {return new Review(source);} public Review[] newArray(int size) {return new Review[size];} }; public static final class Response { @Expose public long id; @Expose public int page; @Expose @SerializedName("results") public List<Review> reviews; @Expose @SerializedName("total_pages") public int totalPages; @Expose @SerializedName("total_results") public int totalResults; } }