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