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