// GENERATED CODE - DO NOT MODIFY BY HAND part of 'models.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _$PinMetadataImpl _$$PinMetadataImplFromJson(Map json) => _$PinMetadataImpl( json['default_value'] as bool, json['total_attempts'] as int, json['attempts_remaining'] as int, ); Map _$$PinMetadataImplToJson(_$PinMetadataImpl instance) => { 'default_value': instance.defaultValue, 'total_attempts': instance.totalAttempts, 'attempts_remaining': instance.attemptsRemaining, }; _$ManagementKeyMetadataImpl _$$ManagementKeyMetadataImplFromJson( Map json) => _$ManagementKeyMetadataImpl( $enumDecode(_$ManagementKeyTypeEnumMap, json['key_type']), json['default_value'] as bool, $enumDecode(_$TouchPolicyEnumMap, json['touch_policy']), ); Map _$$ManagementKeyMetadataImplToJson( _$ManagementKeyMetadataImpl instance) => { 'key_type': _$ManagementKeyTypeEnumMap[instance.keyType]!, 'default_value': instance.defaultValue, 'touch_policy': _$TouchPolicyEnumMap[instance.touchPolicy]!, }; const _$ManagementKeyTypeEnumMap = { ManagementKeyType.tdes: 3, ManagementKeyType.aes128: 8, ManagementKeyType.aes192: 10, ManagementKeyType.aes256: 12, }; const _$TouchPolicyEnumMap = { TouchPolicy.dfault: 0, TouchPolicy.never: 1, TouchPolicy.always: 2, TouchPolicy.cached: 3, }; _$SlotMetadataImpl _$$SlotMetadataImplFromJson(Map json) => _$SlotMetadataImpl( $enumDecode(_$KeyTypeEnumMap, json['key_type']), $enumDecode(_$PinPolicyEnumMap, json['pin_policy']), $enumDecode(_$TouchPolicyEnumMap, json['touch_policy']), json['generated'] as bool, json['public_key_encoded'] as String, ); Map _$$SlotMetadataImplToJson(_$SlotMetadataImpl instance) => { 'key_type': _$KeyTypeEnumMap[instance.keyType]!, 'pin_policy': _$PinPolicyEnumMap[instance.pinPolicy]!, 'touch_policy': _$TouchPolicyEnumMap[instance.touchPolicy]!, 'generated': instance.generated, 'public_key_encoded': instance.publicKeyEncoded, }; const _$KeyTypeEnumMap = { KeyType.rsa1024: 6, KeyType.rsa2048: 7, KeyType.eccp256: 17, KeyType.eccp384: 20, }; const _$PinPolicyEnumMap = { PinPolicy.dfault: 0, PinPolicy.never: 1, PinPolicy.once: 2, PinPolicy.always: 3, }; _$PivStateMetadataImpl _$$PivStateMetadataImplFromJson( Map json) => _$PivStateMetadataImpl( managementKeyMetadata: ManagementKeyMetadata.fromJson( json['management_key_metadata'] as Map), pinMetadata: PinMetadata.fromJson(json['pin_metadata'] as Map), pukMetadata: PinMetadata.fromJson(json['puk_metadata'] as Map), ); Map _$$PivStateMetadataImplToJson( _$PivStateMetadataImpl instance) => { 'management_key_metadata': instance.managementKeyMetadata, 'pin_metadata': instance.pinMetadata, 'puk_metadata': instance.pukMetadata, }; _$PivStateImpl _$$PivStateImplFromJson(Map json) => _$PivStateImpl( version: Version.fromJson(json['version'] as List), authenticated: json['authenticated'] as bool, derivedKey: json['derived_key'] as bool, storedKey: json['stored_key'] as bool, pinAttempts: json['pin_attempts'] as int, chuid: json['chuid'] as String?, ccc: json['ccc'] as String?, metadata: json['metadata'] == null ? null : PivStateMetadata.fromJson(json['metadata'] as Map), ); Map _$$PivStateImplToJson(_$PivStateImpl instance) => { 'version': instance.version, 'authenticated': instance.authenticated, 'derived_key': instance.derivedKey, 'stored_key': instance.storedKey, 'pin_attempts': instance.pinAttempts, 'chuid': instance.chuid, 'ccc': instance.ccc, 'metadata': instance.metadata, }; _$CertInfoImpl _$$CertInfoImplFromJson(Map json) => _$CertInfoImpl( subject: json['subject'] as String, issuer: json['issuer'] as String, serial: json['serial'] as String, notValidBefore: json['not_valid_before'] as String, notValidAfter: json['not_valid_after'] as String, fingerprint: json['fingerprint'] as String, ); Map _$$CertInfoImplToJson(_$CertInfoImpl instance) => { 'subject': instance.subject, 'issuer': instance.issuer, 'serial': instance.serial, 'not_valid_before': instance.notValidBefore, 'not_valid_after': instance.notValidAfter, 'fingerprint': instance.fingerprint, }; _$PivSlotImpl _$$PivSlotImplFromJson(Map json) => _$PivSlotImpl( slot: SlotId.fromJson(json['slot'] as int), hasKey: json['has_key'] as bool?, certInfo: json['cert_info'] == null ? null : CertInfo.fromJson(json['cert_info'] as Map), ); Map _$$PivSlotImplToJson(_$PivSlotImpl instance) => { 'slot': _$SlotIdEnumMap[instance.slot]!, 'has_key': instance.hasKey, 'cert_info': instance.certInfo, }; const _$SlotIdEnumMap = { SlotId.authentication: 'authentication', SlotId.signature: 'signature', SlotId.keyManagement: 'keyManagement', SlotId.cardAuth: 'cardAuth', }; _$ExamineResultImpl _$$ExamineResultImplFromJson(Map json) => _$ExamineResultImpl( password: json['password'] as bool, keyType: $enumDecodeNullable(_$KeyTypeEnumMap, json['key_type']), certInfo: json['cert_info'] == null ? null : CertInfo.fromJson(json['cert_info'] as Map), $type: json['runtimeType'] as String?, ); Map _$$ExamineResultImplToJson(_$ExamineResultImpl instance) => { 'password': instance.password, 'key_type': _$KeyTypeEnumMap[instance.keyType], 'cert_info': instance.certInfo, 'runtimeType': instance.$type, }; _$InvalidPasswordImpl _$$InvalidPasswordImplFromJson( Map json) => _$InvalidPasswordImpl( $type: json['runtimeType'] as String?, ); Map _$$InvalidPasswordImplToJson( _$InvalidPasswordImpl instance) => { 'runtimeType': instance.$type, }; _$PivGenerateResultImpl _$$PivGenerateResultImplFromJson( Map json) => _$PivGenerateResultImpl( generateType: $enumDecode(_$GenerateTypeEnumMap, json['generate_type']), publicKey: json['public_key'] as String, result: json['result'] as String, ); Map _$$PivGenerateResultImplToJson( _$PivGenerateResultImpl instance) => { 'generate_type': _$GenerateTypeEnumMap[instance.generateType]!, 'public_key': instance.publicKey, 'result': instance.result, }; const _$GenerateTypeEnumMap = { GenerateType.certificate: 'certificate', GenerateType.csr: 'csr', }; _$PivImportResultImpl _$$PivImportResultImplFromJson( Map json) => _$PivImportResultImpl( metadata: json['metadata'] == null ? null : SlotMetadata.fromJson(json['metadata'] as Map), publicKey: json['public_key'] as String?, certificate: json['certificate'] as String?, ); Map _$$PivImportResultImplToJson( _$PivImportResultImpl instance) => { 'metadata': instance.metadata, 'public_key': instance.publicKey, 'certificate': instance.certificate, };