package Ġedu . ill inois . cs . cs 1 2 5 . je ed . server Ċ Ċ import Ġcom . squareup . mos hi . Json Adapter Ċ import Ġedu . ill inois . cs . cs 1 2 5 . je ed . core . Interval Ċ import Ġedu . ill inois . cs . cs 1 2 5 . je ed . core . server . Completed Tasks Ċ import Ġedu . ill inois . cs . cs 1 2 5 . je ed . core . server . Failed Tasks Ċ import Ġedu . ill inois . cs . cs 1 2 5 . je ed . core . server . Task Ċ Ċ class ĠResponse ( val Ġrequest : ĠRequest ) Ġ{ ĊĠĠĠ Ġval Ġemail Ġ= Ġrequest . email ĊĠĠĠ Ġval Ġaudience Ġ= Ġrequest . audience ĊĊĠĠĠ Ġval Ġstatus Ġ= Ġcurrent Status ĊĊĠĠĠ Ġval Ġcompleted Tasks : ĠMutable Set < Task > Ġ= Ġmutable Set Of () ĊĠĠĠ Ġval Ġcompleted : ĠCompleted Tasks Ġ= ĠCompleted Tasks () ĊĊĠĠĠ Ġval Ġfailed Tasks : ĠMutable Set < Task > Ġ= Ġmutable Set Of () ĊĠĠĠ Ġval Ġfailed : ĠFailed Tasks Ġ= ĠFailed Tasks () ĊĊĠĠĠ Ġlateinit Ġvar Ġinterval : ĠInterval ĊĊĠĠĠ Ġ@ Suppress (" unused ") ĊĠĠĠ Ġval Ġjson : ĠString ĊĠĠĠĠĠĠĠ Ġget () Ġ= ĠRESP ONSE _ ADAPTER . toJson ( this ) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠRESP ONSE _ ADAPTER : ĠJson Adapter < Response > Ġ= Ġm oshi . adapter ( Response :: class . java ) ĊĠĠĠĠĠĠĠ Ġfun Ġfrom ( response : ĠString ?): ĠResponse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcheck ( response Ġ!= Ġnull ) Ġ{ Ġ" can 't Ġdeserialize Ġnull Ġstring " Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠRESP ONSE _ ADAPTER . fromJson ( response ) Ġ?: Ġerror (" failed Ġto Ġdeserialize Ġresult ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ