// GENERATED CODE - DO NOT MODIFY BY HAND part of 'myid_config.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** MyIdConfig _$MyIdConfigFromJson(Map json) { return MyIdConfig( clientId: json['clientId'] as String, passportData: json['passportData'] as String, dateOfBirth: json['dateOfBirth'] as String, sdkHash: json['sdkHash'] as String, externalId: json['externalId'] as String, threshold: json['threshold'] as double, buildMode: _$enumDecodeNullable(_$MyIdBuildModeEnumMap, json['buildMode']), entryType: _$enumDecodeNullable(_$MyIdEntryTypeEnumMap, json['entryType']), residency: _$enumDecodeNullable(_$MyIdResidentTypeEnumMap, json['residency']), locale: _$enumDecodeNullable(_$MyIdLocaleEnumMap, json['locale']), cameraShape: _$enumDecodeNullable(_$MyIdCameraShapeEnumMap, json['cameraShape']), resolution: _$enumDecodeNullable(_$MyIdResolutionEnumMap, json['resolution']), imageFormat: _$enumDecodeNullable(_$MyIdImageFormatEnumMap, json['imageFormat']), organizationDetails: MyIdOrganizationDetails.fromJson(json['organizationDetails'] as Map), withPhoto: json['withPhoto'] as bool, ); } Map _$MyIdConfigToJson(MyIdConfig instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('clientId', instance.clientId); writeNotNull('passportData', instance.passportData); writeNotNull('dateOfBirth', instance.dateOfBirth); writeNotNull('sdkHash', instance.sdkHash); writeNotNull('externalId', instance.externalId); writeNotNull('threshold', instance.threshold); writeNotNull('buildMode', _$MyIdBuildModeEnumMap[instance.buildMode]); writeNotNull('entryType', _$MyIdEntryTypeEnumMap[instance.entryType]); writeNotNull('residency', _$MyIdResidentTypeEnumMap[instance.residency]); writeNotNull('locale', _$MyIdLocaleEnumMap[instance.locale]); writeNotNull('cameraShape', _$MyIdCameraShapeEnumMap[instance.cameraShape]); writeNotNull('resolution', _$MyIdResolutionEnumMap[instance.resolution]); writeNotNull('imageFormat', _$MyIdImageFormatEnumMap[instance.imageFormat]); writeNotNull('organizationDetails', instance.organizationDetails?.toJson()); writeNotNull('withPhoto', instance.withPhoto); return val; } MyIdResult _$MyIdResultFromJson(Map json) { return MyIdResult( code: json['code'] as String?, comparison: json['comparison'] as double?, base64: json['base64'] as String? ); } Map _$MyIdOrganizationDetailsToJson(MyIdOrganizationDetails instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('phone', instance.phone); return val; } MyIdOrganizationDetails _$MyIdOrganizationDetailsFromJson(Map json) { return MyIdOrganizationDetails( phone: json['phone'] as String?, ); } Map _$MyIdIOSAppearanceToJson(MyIdIOSAppearance instance) { final val = {}; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('primaryColor', instance.primaryColor); writeNotNull('secondaryColor', instance.secondaryColor); writeNotNull('errorColor', instance.errorColor); writeNotNull('primaryButtonColor', instance.primaryButtonColor); writeNotNull('primaryButtonColorDisabled', instance.primaryButtonColorDisabled); writeNotNull('primaryButtonTextColorDisabled', instance.primaryButtonTextColorDisabled); writeNotNull('buttonCornerRadius', instance.buttonCornerRadius); return val; } MyIdIOSAppearance _$MyIdIOSAppearanceFromJson(Map json) { return MyIdIOSAppearance( primaryColor: json['primaryColor'] as String?, secondaryColor: json['secondaryColor'] as String?, errorColor: json['errorColor'] as String?, primaryButtonColor: json['primaryButtonColor'] as String?, primaryButtonColorDisabled: json['primaryButtonColorDisabled'] as String?, primaryButtonTextColorDisabled: json['primaryButtonTextColorDisabled'] as String?, buttonCornerRadius: json['buttonCornerRadius'] as int?, ); } const _$MyIdBuildModeEnumMap = { MyIdBuildMode.PRODUCTION: 'PRODUCTION', MyIdBuildMode.DEBUG: 'DEBUG', }; const _$MyIdEntryTypeEnumMap = { MyIdEntryType.AUTH: 'AUTH', MyIdEntryType.FACE: 'FACE', }; const _$MyIdResidentTypeEnumMap = { MyIdResidentType.USER_DEFINED: 'USER_DEFINED', MyIdResidentType.RESIDENT: 'RESIDENT', MyIdResidentType.NON_RESIDENT: 'NON_RESIDENT', }; const _$MyIdLocaleEnumMap = { MyIdLocale.UZBEK: 'UZBEK', MyIdLocale.ENGLISH: 'ENGLISH', MyIdLocale.RUSSIAN: 'RUSSIAN', }; const _$MyIdCameraShapeEnumMap = { MyIdCameraShape.CIRCLE: 'CIRCLE', MyIdCameraShape.ELLIPSE: 'ELLIPSE', }; const _$MyIdResolutionEnumMap = { MyIdResolution.RESOLUTION_480: 'RESOLUTION_480', MyIdResolution.RESOLUTION_720: 'RESOLUTION_720', }; const _$MyIdImageFormatEnumMap = { MyIdImageFormat.JPG: 'JPG', MyIdImageFormat.PNG: 'PNG', }; T? _$enumDecodeNullable( Map enumValues, dynamic source, { T? unknownValue, }) { if (source == null) { return null; } return _$enumDecode(enumValues, source, unknownValue: unknownValue); } T? _$enumDecode( Map enumValues, dynamic source, { T? unknownValue, }) { if (source == null) { throw ArgumentError('A value must be provided. Supported values: ' '${enumValues.values.join(', ')}'); } final value = enumValues.entries.singleWhere((e) => e.value == source).key; if (value == null && unknownValue == null) { throw ArgumentError('`$source` is not one of the supported values: ' '${enumValues.values.join(', ')}'); } return value ?? unknownValue; }