incidentUpdateStatusFromJson function
IncidentUpdateStatus
incidentUpdateStatusFromJson(
- Object? incidentUpdateStatus, [
- IncidentUpdateStatus? defaultValue
Implementation
enums.IncidentUpdateStatus incidentUpdateStatusFromJson(
Object? incidentUpdateStatus, [
enums.IncidentUpdateStatus? defaultValue,
]) {
if (incidentUpdateStatus is String) {
return enums.$IncidentUpdateStatusMap.entries
.firstWhere(
(element) =>
element.value.toLowerCase() ==
incidentUpdateStatus.toLowerCase(),
orElse: () => const MapEntry(
enums.IncidentUpdateStatus.swaggerGeneratedUnknown, ''))
.key;
}
final parsedResult = defaultValue == null
? null
: enums.$IncidentUpdateStatusMap.entries
.firstWhereOrNull((element) => element.value == defaultValue)
?.key;
return parsedResult ??
defaultValue ??
enums.IncidentUpdateStatus.swaggerGeneratedUnknown;
}