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