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