// Path: app/src/main/java/se/oort/diplicity/apigen/Game.java
// public class Game implements java.io.Serializable {
//   public String ID;
//   public Boolean Started;
//   public Boolean Closed;
//   public Boolean Finished;
//   public String Desc;
//   public String Variant;
//   public Long PhaseLengthMinutes;
//   public Long NonMovementPhaseLengthMinutes;
//   public Double MaxHated;
//   public Double MaxHater;
//   public Double MinRating;
//   public Double MaxRating;
//   public Double MinReliability;
//   public Double MinQuickness;
//   public Boolean Private;
//   public Boolean NoMerge;
//   public Boolean DisableConferenceChat;
//   public Boolean DisableGroupChat;
//   public Boolean DisablePrivateChat;
//   public Long NationAllocation;
//   public Boolean Anonymous;
//   public Long LastYear;
//   public Long NMembers;
//   public java.util.List<Member> Members;
//   public java.util.Date StartETA;
//   public java.util.List<PhaseMeta> NewestPhaseMeta;
//   public java.util.List<Ban> ActiveBans;
//   public java.util.List<String> FailedRequirements;
//   public Member FirstMember;
//   public java.util.Date CreatedAt;
//   public Ticker CreatedAgo;
//   public java.util.Date StartedAt;
//   public Ticker StartedAgo;
//   public java.util.Date FinishedAt;
//   public Ticker FinishedAgo;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/Member.java
// public class Member implements java.io.Serializable {
//   public User User;
//   public String Nation;
//   public String GameAlias;
//   public String NationPreferences;
//   public PhaseState NewestPhaseState;
//   public Long UnreadMessages;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/Ticker.java
// public class Ticker implements java.io.Serializable {
//   public Long nanos;
//   public Date unserializedAt;
//   public Ticker(Date unserializedAt, Long nanos) {
//     this.unserializedAt = unserializedAt;
//     this.nanos = nanos;
//   }
//   public Date createdAt() {
// 		Calendar cal = Calendar.getInstance();
// 		cal.setTime(unserializedAt);
// 		cal.add(Calendar.SECOND, (int) (nanos / (long) -1000000000));
// 		return cal.getTime();
// 	}
//   public Date deadlineAt() {
// 		Calendar cal = Calendar.getInstance();
// 		cal.setTime(unserializedAt);
// 		cal.add(Calendar.SECOND, (int) (nanos / (long) 1000000000));
// 		return cal.getTime();
// 	}
// 	public Long millisLeft() {
// 		return (long) (deadlineAt().getTime() - unserializedAt.getTime());
// 	}
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/TickerUnserializer.java
// public class TickerUnserializer implements JsonDeserializer<Ticker> {
//   public Ticker deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//     return new Ticker(new Date(), json.getAsLong());
//   }
// }


import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.SystemClock;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import java.lang.reflect.Type;
import java.util.Date;
import se.oort.diplicity.apigen.Game;
import se.oort.diplicity.apigen.Member;
import se.oort.diplicity.apigen.Ticker;
import se.oort.diplicity.apigen.TickerUnserializer;
package se.oort.diplicity;





public class GameUnserializer implements JsonDeserializer<Game> {
    private Gson baseGson;
    private RetrofitActivity retrofitActivity;
    public GameUnserializer(RetrofitActivity retrofitActivity) {
        this.retrofitActivity = retrofitActivity;
        baseGson = new GsonBuilder()
// Path: app/src/main/java/se/oort/diplicity/apigen/Game.java
// public class Game implements java.io.Serializable {
//   public String ID;
//   public Boolean Started;
//   public Boolean Closed;
//   public Boolean Finished;
//   public String Desc;
//   public String Variant;
//   public Long PhaseLengthMinutes;
//   public Long NonMovementPhaseLengthMinutes;
//   public Double MaxHated;
//   public Double MaxHater;
//   public Double MinRating;
//   public Double MaxRating;
//   public Double MinReliability;
//   public Double MinQuickness;
//   public Boolean Private;
//   public Boolean NoMerge;
//   public Boolean DisableConferenceChat;
//   public Boolean DisableGroupChat;
//   public Boolean DisablePrivateChat;
//   public Long NationAllocation;
//   public Boolean Anonymous;
//   public Long LastYear;
//   public Long NMembers;
//   public java.util.List<Member> Members;
//   public java.util.Date StartETA;
//   public java.util.List<PhaseMeta> NewestPhaseMeta;
//   public java.util.List<Ban> ActiveBans;
//   public java.util.List<String> FailedRequirements;
//   public Member FirstMember;
//   public java.util.Date CreatedAt;
//   public Ticker CreatedAgo;
//   public java.util.Date StartedAt;
//   public Ticker StartedAgo;
//   public java.util.Date FinishedAt;
//   public Ticker FinishedAgo;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/Member.java
// public class Member implements java.io.Serializable {
//   public User User;
//   public String Nation;
//   public String GameAlias;
//   public String NationPreferences;
//   public PhaseState NewestPhaseState;
//   public Long UnreadMessages;
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/Ticker.java
// public class Ticker implements java.io.Serializable {
//   public Long nanos;
//   public Date unserializedAt;
//   public Ticker(Date unserializedAt, Long nanos) {
//     this.unserializedAt = unserializedAt;
//     this.nanos = nanos;
//   }
//   public Date createdAt() {
// 		Calendar cal = Calendar.getInstance();
// 		cal.setTime(unserializedAt);
// 		cal.add(Calendar.SECOND, (int) (nanos / (long) -1000000000));
// 		return cal.getTime();
// 	}
//   public Date deadlineAt() {
// 		Calendar cal = Calendar.getInstance();
// 		cal.setTime(unserializedAt);
// 		cal.add(Calendar.SECOND, (int) (nanos / (long) 1000000000));
// 		return cal.getTime();
// 	}
// 	public Long millisLeft() {
// 		return (long) (deadlineAt().getTime() - unserializedAt.getTime());
// 	}
// }
// 
// Path: app/src/main/java/se/oort/diplicity/apigen/TickerUnserializer.java
// public class TickerUnserializer implements JsonDeserializer<Ticker> {
//   public Ticker deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//     return new Ticker(new Date(), json.getAsLong());
//   }
// }


// Path: app/src/main/java/se/oort/diplicity/GameUnserializer.java
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.os.SystemClock;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import java.lang.reflect.Type;
import java.util.Date;
import se.oort.diplicity.apigen.Game;
import se.oort.diplicity.apigen.Member;
import se.oort.diplicity.apigen.Ticker;
import se.oort.diplicity.apigen.TickerUnserializer;

package se.oort.diplicity;





public class GameUnserializer implements JsonDeserializer<Game> {
    private Gson baseGson;
    private RetrofitActivity retrofitActivity;
    public GameUnserializer(RetrofitActivity retrofitActivity) {
        this.retrofitActivity = retrofitActivity;
        baseGson = new GsonBuilder()
                .registerTypeAdapter(Ticker.class, new TickerUnserializer())