import {Observable} from 'rxjs';

export interface WSEvents {
  message: Observable<Event>;
  error: Observable<Event>;
  close: Observable<Event>;
}

export interface GeoCoordinates {
  latitude: Number;
  longitude: Number;
}

export interface CarEntity {
  oem: String;
  modelType: String;
  vin: String;
}

export interface CarEvent {
  near_crash_event: Boolean;
  gps_location: GeoCoordinates;
  timestamp: String;
  velocity: Number;
}

export interface Car {
  carEntity: CarEntity;
  carEvent: CarEvent;
}

export interface TrafficLightEntity {
    id: Number;
    location: Number[];
    range: Number;
    switchingTime: Number;
    color: String;
}

export interface TrafficLightEvent {
  last_switch: Number;
  color: String;
  tlid: Number;
}

export interface TrafficLight {
  trafficLightEntity: TrafficLightEntity;
  trafficLightEvent: TrafficLightEvent;
}
