mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-16 23:04:22 +01:00
69 lines
2.2 KiB
Dart
69 lines
2.2 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'server_private_info.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
_Spi _$SpiFromJson(Map<String, dynamic> json) => _Spi(
|
|
name: json['name'] as String,
|
|
ip: json['ip'] as String,
|
|
port: (json['port'] as num).toInt(),
|
|
user: json['user'] as String,
|
|
pwd: json['pwd'] as String?,
|
|
keyId: json['pubKeyId'] as String?,
|
|
tags: (json['tags'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
|
alterUrl: json['alterUrl'] as String?,
|
|
autoConnect: json['autoConnect'] as bool? ?? true,
|
|
jumpId: json['jumpId'] as String?,
|
|
custom: json['custom'] == null
|
|
? null
|
|
: ServerCustom.fromJson(json['custom'] as Map<String, dynamic>),
|
|
wolCfg: json['wolCfg'] == null
|
|
? null
|
|
: WakeOnLanCfg.fromJson(json['wolCfg'] as Map<String, dynamic>),
|
|
envs: (json['envs'] as Map<String, dynamic>?)?.map(
|
|
(k, e) => MapEntry(k, e as String),
|
|
),
|
|
id: json['id'] == null ? '' : Spi.parseId(json['id']),
|
|
customSystemType: $enumDecodeNullable(
|
|
_$SystemTypeEnumMap,
|
|
json['customSystemType'],
|
|
),
|
|
disabledCmdTypes: (json['disabledCmdTypes'] as List<dynamic>?)
|
|
?.map((e) => e as String)
|
|
.toList(),
|
|
proxyCommand: json['proxyCommand'] == null
|
|
? null
|
|
: ProxyCommandConfig.fromJson(
|
|
json['proxyCommand'] as Map<String, dynamic>,
|
|
),
|
|
);
|
|
|
|
Map<String, dynamic> _$SpiToJson(_Spi instance) => <String, dynamic>{
|
|
'name': instance.name,
|
|
'ip': instance.ip,
|
|
'port': instance.port,
|
|
'user': instance.user,
|
|
'pwd': ?instance.pwd,
|
|
'pubKeyId': ?instance.keyId,
|
|
'tags': ?instance.tags,
|
|
'alterUrl': ?instance.alterUrl,
|
|
'autoConnect': instance.autoConnect,
|
|
'jumpId': ?instance.jumpId,
|
|
'custom': ?instance.custom?.toJson(),
|
|
'wolCfg': ?instance.wolCfg?.toJson(),
|
|
'envs': ?instance.envs,
|
|
'id': instance.id,
|
|
'customSystemType': ?_$SystemTypeEnumMap[instance.customSystemType],
|
|
'disabledCmdTypes': ?instance.disabledCmdTypes,
|
|
'proxyCommand': ?instance.proxyCommand?.toJson(),
|
|
};
|
|
|
|
const _$SystemTypeEnumMap = {
|
|
SystemType.linux: 'linux',
|
|
SystemType.bsd: 'bsd',
|
|
SystemType.windows: 'windows',
|
|
};
|