2021-11-19 17:05:57 +03:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'models.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$DeviceConfigImpl _$$DeviceConfigImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$DeviceConfigImpl(
|
2021-11-19 17:05:57 +03:00
|
|
|
(json['enabled_capabilities'] as Map<String, dynamic>).map(
|
|
|
|
(k, e) => MapEntry($enumDecode(_$TransportEnumMap, k), e as int),
|
|
|
|
),
|
|
|
|
json['auto_eject_timeout'] as int?,
|
|
|
|
json['challenge_response_timeout'] as int?,
|
|
|
|
json['device_flags'] as int?,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$DeviceConfigImplToJson(_$DeviceConfigImpl instance) =>
|
2021-11-19 17:05:57 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'enabled_capabilities': instance.enabledCapabilities
|
2022-07-21 17:38:45 +03:00
|
|
|
.map((k, e) => MapEntry(_$TransportEnumMap[k]!, e)),
|
2021-11-19 17:05:57 +03:00
|
|
|
'auto_eject_timeout': instance.autoEjectTimeout,
|
|
|
|
'challenge_response_timeout': instance.challengeResponseTimeout,
|
|
|
|
'device_flags': instance.deviceFlags,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$TransportEnumMap = {
|
|
|
|
Transport.usb: 'usb',
|
|
|
|
Transport.nfc: 'nfc',
|
|
|
|
};
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
_$DeviceInfoImpl _$$DeviceInfoImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$DeviceInfoImpl(
|
2021-11-19 17:05:57 +03:00
|
|
|
DeviceConfig.fromJson(json['config'] as Map<String, dynamic>),
|
|
|
|
json['serial'] as int?,
|
|
|
|
Version.fromJson(json['version'] as List<dynamic>),
|
|
|
|
$enumDecode(_$FormFactorEnumMap, json['form_factor']),
|
|
|
|
(json['supported_capabilities'] as Map<String, dynamic>).map(
|
|
|
|
(k, e) => MapEntry($enumDecode(_$TransportEnumMap, k), e as int),
|
|
|
|
),
|
|
|
|
json['is_locked'] as bool,
|
|
|
|
json['is_fips'] as bool,
|
|
|
|
json['is_sky'] as bool,
|
|
|
|
);
|
|
|
|
|
2023-11-15 10:56:52 +03:00
|
|
|
Map<String, dynamic> _$$DeviceInfoImplToJson(_$DeviceInfoImpl instance) =>
|
2021-11-19 17:05:57 +03:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config,
|
|
|
|
'serial': instance.serial,
|
|
|
|
'version': instance.version,
|
2022-07-21 17:38:45 +03:00
|
|
|
'form_factor': _$FormFactorEnumMap[instance.formFactor]!,
|
2021-11-19 17:05:57 +03:00
|
|
|
'supported_capabilities': instance.supportedCapabilities
|
2022-07-21 17:38:45 +03:00
|
|
|
.map((k, e) => MapEntry(_$TransportEnumMap[k]!, e)),
|
2021-11-19 17:05:57 +03:00
|
|
|
'is_locked': instance.isLocked,
|
|
|
|
'is_fips': instance.isFips,
|
|
|
|
'is_sky': instance.isSky,
|
|
|
|
};
|
|
|
|
|
|
|
|
const _$FormFactorEnumMap = {
|
|
|
|
FormFactor.unknown: 0,
|
|
|
|
FormFactor.usbAKeychain: 1,
|
|
|
|
FormFactor.usbANano: 2,
|
|
|
|
FormFactor.usbCKeychain: 3,
|
|
|
|
FormFactor.usbCNano: 4,
|
|
|
|
FormFactor.usbCLightning: 5,
|
|
|
|
FormFactor.usbABio: 6,
|
|
|
|
FormFactor.usbCBio: 7,
|
|
|
|
};
|