class Session extends Model {

    public static Model fromMap(Map<String, Object> map) {
        return new Session(
            (String) map.get("id"),
            (String) map.get("owner"),
            (String) map.get("renewer"),
            (String) map.get("target"),
            (String) map.get("scopes"),
            (Long) map.get("expiresAt"),
            (Long) map.get("creationTime")
        );
    }

    public  Session(@JsonProperty("id") String id,
                   @JsonProperty("owner") String owner,
                   @JsonProperty("renewer") String renewer,
                   @JsonProperty("target") String target,
                   @JsonProperty("scopes") String scopes,
                   @JsonProperty("expiresAt") Long expiresAt,
                   @JsonProperty("creationTime") Long creationTime);

}