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