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