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