package Ġat . sun il son . vehicle core . data Ċ Ċ import Ġat . sun il son . vehicle core . data . models . Database Vehicle Ċ import Ġat . sun il son . vehicle core . data . models . b atter yst atus . Battery Status Response Ċ import Ġat . sun il son . vehicle core . data . models . cock pit . C ock pit Response Ċ import Ġat . sun il son . vehicle core . data . models . location . Location Response Ċ import Ġat . sun il son . vehicle core . domain . entities . Location Ċ import Ġat . sun il son . vehicle core . domain . entities . Vehicle Ċ import Ġjava . time . Z onedDateTime Ċ Ċ fun ĠB attery Status Response . to Entity () Ġ= ĊĠĠĠ ĠVehicle . Battery Status ( ĊĠĠĠĠĠĠĠ Ġdata . attributes . battery Level , ĊĠĠĠĠĠĠĠ Ġdata . attributes . battery Temperature , ĊĠĠĠĠĠĠĠ Ġdata . attributes . battery Aut onomy , ĊĠĠĠĠĠĠĠ Ġdata . attributes . battery Available Energy , ĊĠĠĠĠĠĠĠ Ġdata . attributes . plug Status Ġ== Ġ 1 , ĊĠĠĠĠĠĠĠ ĠVehicle . Battery Status . Charge State . values () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. first OrNull Ġ{ Ġit . state Code Ġ== Ġdata . attributes . ch arging Status Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ?: ĠVehicle . Battery Status . Charge State . NOT _ CHAR GING , ĊĠĠĠĠĠĠĠ Ġdata . attributes . ch arging Instant aneous Power , ĊĠĠĠĠĠĠĠ Ġdata . attributes . ch arging Remaining Time ĊĠĠĠ Ġ) Ċ Ċ fun ĠVehicle . to Database Entity () Ġ= ĠDatabase Vehicle ( vin , Ġthis ) Ċ Ċ fun ĠC ock pit Response . to Entity () Ġ= Ġdata . attributes . total M ile age Ċ Ċ fun ĠDatabase Vehicle . to Entity () Ġ= Ġvehicle Ċ Ċ fun ĠLocation Response . to Entity () Ġ= ĊĠĠĠ ĠLocation ( ĊĠĠĠĠĠĠĠ Ġdata . attributes . gps Latitude , ĊĠĠĠĠĠĠĠ Ġdata . attributes . gps Longitude , ĊĠĠĠĠĠĠĠ ĠZ onedDateTime ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. parse ( data . attributes . last UpdateTime ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to Instant () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. to Epoch Milli () ĊĠĠĠ Ġ) Ċ