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