toJson method

Map<String, dynamic> toJson()

Returns a JSON object representing this AdaIncident.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    ApiFields.dateOutOfService: timeOfInitialReport.toWmataString(),
    ApiFields.dateUpdated: timeOfLastUpdate.toWmataString(),
    ApiFields.estimatedTimeOfFix: estimatedTimeOfFix?.toWmataString(),
    ApiFields.locationDescription: locationDescription,
    ApiFields.stationCode: stationCode,
    ApiFields.stationName: stationName,
    ApiFields.symptomDescription: symptomDescription,
    ApiFields.unitName: unitName,
    ApiFields.unitType: unitType.value,
  };
}