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