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