package com.hitherejoe.bourboncorecommon.data.model; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.SerializedName; public class User implements Parcelable { public int id; public String name; public String username; @SerializedName("html_url") public String htmlUrl; @SerializedName("avatar_url") public String avatarUrl; @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeInt(this.id); dest.writeString(this.name); dest.writeString(this.username); dest.writeString(this.htmlUrl); dest.writeString(this.avatarUrl); } public User() { } protected User(Parcel in) { this.id = in.readInt(); this.name = in.readString(); this.username = in.readString(); this.htmlUrl = in.readString(); this.avatarUrl = in.readString(); } public static final Parcelable.Creator<User> CREATOR = new Parcelable.Creator<User>() { @Override public User createFromParcel(Parcel source) { return new User(source); } @Override public User[] newArray(int size) { return new User[size]; } }; }