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