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