BusVehicleUpdate.fromPBEntity constructor

BusVehicleUpdate.fromPBEntity(
  1. FeedEntity entity
)

Implementation

BusVehicleUpdate.fromPBEntity(FeedEntity entity) {
  id = entity.id;
  isDeleted = entity.isDeleted;

  tripId = entity.vehicle.trip.tripId;
  startTime = entity.vehicle.trip.startTime;
  startDate = entity.vehicle.trip.startDate;
  routeId = entity.vehicle.trip.routeId;

  latitude = entity.vehicle.position.latitude;
  longitude = entity.vehicle.position.longitude;

  currentStopSequence = entity.vehicle.currentStopSequence;
  currentStatus = entity.vehicle.currentStatus;
  timestamp = entity.vehicle.timestamp;

  vehicleId = entity.vehicle.vehicle.id;
}