2023-07-05 18:48:06 -04:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'veilid_state.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_LatencyStats _$$_LatencyStatsFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$_LatencyStats(
|
2023-07-05 18:48:06 -04:00
|
|
|
fastest: TimestampDuration.fromJson(json['fastest']),
|
|
|
|
average: TimestampDuration.fromJson(json['average']),
|
|
|
|
slowest: TimestampDuration.fromJson(json['slowest']),
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_LatencyStatsToJson(_$_LatencyStats instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'fastest': instance.fastest.toJson(),
|
|
|
|
'average': instance.average.toJson(),
|
|
|
|
'slowest': instance.slowest.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_TransferStats _$$_TransferStatsFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$_TransferStats(
|
2023-07-05 18:48:06 -04:00
|
|
|
total: BigInt.parse(json['total'] as String),
|
|
|
|
maximum: BigInt.parse(json['maximum'] as String),
|
|
|
|
average: BigInt.parse(json['average'] as String),
|
|
|
|
minimum: BigInt.parse(json['minimum'] as String),
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_TransferStatsToJson(_$_TransferStats instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'total': instance.total.toString(),
|
|
|
|
'maximum': instance.maximum.toString(),
|
|
|
|
'average': instance.average.toString(),
|
|
|
|
'minimum': instance.minimum.toString(),
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_TransferStatsDownUp _$$_TransferStatsDownUpFromJson(
|
2023-07-05 18:48:06 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_TransferStatsDownUp(
|
2023-08-02 21:09:47 -04:00
|
|
|
down: TransferStats.fromJson(json['down']),
|
|
|
|
up: TransferStats.fromJson(json['up']),
|
2023-07-05 18:48:06 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_TransferStatsDownUpToJson(
|
|
|
|
_$_TransferStatsDownUp instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'down': instance.down.toJson(),
|
|
|
|
'up': instance.up.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_RPCStats _$$_RPCStatsFromJson(Map<String, dynamic> json) => _$_RPCStats(
|
2023-07-05 18:48:06 -04:00
|
|
|
messagesSent: json['messages_sent'] as int,
|
|
|
|
messagesRcvd: json['messages_rcvd'] as int,
|
|
|
|
questionsInFlight: json['questions_in_flight'] as int,
|
|
|
|
lastQuestion: json['last_question'] == null
|
|
|
|
? null
|
|
|
|
: Timestamp.fromJson(json['last_question']),
|
|
|
|
lastSeenTs: json['last_seen_ts'] == null
|
|
|
|
? null
|
|
|
|
: Timestamp.fromJson(json['last_seen_ts']),
|
|
|
|
firstConsecutiveSeenTs: json['first_consecutive_seen_ts'] == null
|
|
|
|
? null
|
|
|
|
: Timestamp.fromJson(json['first_consecutive_seen_ts']),
|
|
|
|
recentLostAnswers: json['recent_lost_answers'] as int,
|
|
|
|
failedToSend: json['failed_to_send'] as int,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_RPCStatsToJson(_$_RPCStats instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'messages_sent': instance.messagesSent,
|
|
|
|
'messages_rcvd': instance.messagesRcvd,
|
|
|
|
'questions_in_flight': instance.questionsInFlight,
|
|
|
|
'last_question': instance.lastQuestion?.toJson(),
|
|
|
|
'last_seen_ts': instance.lastSeenTs?.toJson(),
|
|
|
|
'first_consecutive_seen_ts': instance.firstConsecutiveSeenTs?.toJson(),
|
|
|
|
'recent_lost_answers': instance.recentLostAnswers,
|
|
|
|
'failed_to_send': instance.failedToSend,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_PeerStats _$$_PeerStatsFromJson(Map<String, dynamic> json) => _$_PeerStats(
|
2023-07-05 18:48:06 -04:00
|
|
|
timeAdded: Timestamp.fromJson(json['time_added']),
|
2023-08-02 21:09:47 -04:00
|
|
|
rpcStats: RPCStats.fromJson(json['rpc_stats']),
|
|
|
|
transfer: TransferStatsDownUp.fromJson(json['transfer']),
|
2023-07-05 18:48:06 -04:00
|
|
|
latency: json['latency'] == null
|
|
|
|
? null
|
2023-08-02 21:09:47 -04:00
|
|
|
: LatencyStats.fromJson(json['latency']),
|
2023-07-05 18:48:06 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_PeerStatsToJson(_$_PeerStats instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'time_added': instance.timeAdded.toJson(),
|
|
|
|
'rpc_stats': instance.rpcStats.toJson(),
|
|
|
|
'transfer': instance.transfer.toJson(),
|
2023-08-02 21:09:47 -04:00
|
|
|
'latency': instance.latency?.toJson(),
|
2023-07-05 18:48:06 -04:00
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_PeerTableData _$$_PeerTableDataFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$_PeerTableData(
|
2023-07-05 18:48:06 -04:00
|
|
|
nodeIds: (json['node_ids'] as List<dynamic>)
|
|
|
|
.map(Typed<FixedEncodedString43>.fromJson)
|
|
|
|
.toList(),
|
|
|
|
peerAddress: json['peer_address'] as String,
|
2023-08-02 21:09:47 -04:00
|
|
|
peerStats: PeerStats.fromJson(json['peer_stats']),
|
2023-07-05 18:48:06 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_PeerTableDataToJson(_$_PeerTableData instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'node_ids': instance.nodeIds.map((e) => e.toJson()).toList(),
|
|
|
|
'peer_address': instance.peerAddress,
|
|
|
|
'peer_stats': instance.peerStats.toJson(),
|
|
|
|
};
|
2023-07-05 23:53:08 -04:00
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidLog _$$VeilidLogFromJson(Map<String, dynamic> json) => _$VeilidLog(
|
2024-02-16 11:19:26 -05:00
|
|
|
logLevel: VeilidLogLevel.fromJson(json['log_level']),
|
|
|
|
message: json['message'] as String,
|
|
|
|
backtrace: json['backtrace'] as String?,
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidLogToJson(_$VeilidLog instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'log_level': instance.logLevel.toJson(),
|
|
|
|
'message': instance.message,
|
|
|
|
'backtrace': instance.backtrace,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidAppMessage _$$VeilidAppMessageFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppMessage(
|
2024-02-16 11:19:26 -05:00
|
|
|
message: const Uint8ListJsonConverter().fromJson(json['message']),
|
|
|
|
sender: json['sender'] == null
|
|
|
|
? null
|
|
|
|
: Typed<FixedEncodedString43>.fromJson(json['sender']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidAppMessageToJson(_$VeilidAppMessage instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
|
|
|
'sender': instance.sender?.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidAppCall _$$VeilidAppCallFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppCall(
|
2024-02-16 11:19:26 -05:00
|
|
|
message: const Uint8ListJsonConverter().fromJson(json['message']),
|
|
|
|
callId: json['call_id'] as String,
|
|
|
|
sender: json['sender'] == null
|
|
|
|
? null
|
|
|
|
: Typed<FixedEncodedString43>.fromJson(json['sender']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidAppCallToJson(_$VeilidAppCall instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
|
|
|
'call_id': instance.callId,
|
|
|
|
'sender': instance.sender?.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateAttachment _$$VeilidUpdateAttachmentFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateAttachment(
|
2024-02-16 11:19:26 -05:00
|
|
|
state: AttachmentState.fromJson(json['state']),
|
|
|
|
publicInternetReady: json['public_internet_ready'] as bool,
|
|
|
|
localNetworkReady: json['local_network_ready'] as bool,
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateAttachmentToJson(
|
|
|
|
_$VeilidUpdateAttachment instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'state': instance.state.toJson(),
|
|
|
|
'public_internet_ready': instance.publicInternetReady,
|
|
|
|
'local_network_ready': instance.localNetworkReady,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateNetwork _$$VeilidUpdateNetworkFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateNetwork(
|
2024-02-16 11:19:26 -05:00
|
|
|
started: json['started'] as bool,
|
|
|
|
bpsDown: BigInt.parse(json['bps_down'] as String),
|
|
|
|
bpsUp: BigInt.parse(json['bps_up'] as String),
|
|
|
|
peers:
|
|
|
|
(json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateNetworkToJson(
|
|
|
|
_$VeilidUpdateNetwork instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'started': instance.started,
|
|
|
|
'bps_down': instance.bpsDown.toString(),
|
|
|
|
'bps_up': instance.bpsUp.toString(),
|
|
|
|
'peers': instance.peers.map((e) => e.toJson()).toList(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateConfig _$$VeilidUpdateConfigFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateConfig(
|
2024-02-16 11:19:26 -05:00
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateConfigToJson(
|
|
|
|
_$VeilidUpdateConfig instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateRouteChange _$$VeilidUpdateRouteChangeFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateRouteChange(
|
2024-02-16 11:19:26 -05:00
|
|
|
deadRoutes: (json['dead_routes'] as List<dynamic>)
|
|
|
|
.map((e) => e as String)
|
|
|
|
.toList(),
|
|
|
|
deadRemoteRoutes: (json['dead_remote_routes'] as List<dynamic>)
|
|
|
|
.map((e) => e as String)
|
|
|
|
.toList(),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateRouteChangeToJson(
|
|
|
|
_$VeilidUpdateRouteChange instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'dead_routes': instance.deadRoutes,
|
|
|
|
'dead_remote_routes': instance.deadRemoteRoutes,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateValueChange _$$VeilidUpdateValueChangeFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$VeilidUpdateValueChange(
|
2024-02-16 11:19:26 -05:00
|
|
|
key: Typed<FixedEncodedString43>.fromJson(json['key']),
|
|
|
|
subkeys: (json['subkeys'] as List<dynamic>)
|
|
|
|
.map(ValueSubkeyRange.fromJson)
|
|
|
|
.toList(),
|
|
|
|
count: json['count'] as int,
|
2024-02-27 20:30:37 -05:00
|
|
|
value: ValueData.fromJson(json['value']),
|
2024-02-16 11:19:26 -05:00
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateValueChangeToJson(
|
|
|
|
_$VeilidUpdateValueChange instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'key': instance.key.toJson(),
|
|
|
|
'subkeys': instance.subkeys.map((e) => e.toJson()).toList(),
|
|
|
|
'count': instance.count,
|
2024-02-27 20:30:37 -05:00
|
|
|
'value': instance.value.toJson(),
|
2024-02-16 11:19:26 -05:00
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidStateAttachment _$$_VeilidStateAttachmentFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidStateAttachment(
|
2023-08-02 21:09:47 -04:00
|
|
|
state: AttachmentState.fromJson(json['state']),
|
2023-07-05 23:53:08 -04:00
|
|
|
publicInternetReady: json['public_internet_ready'] as bool,
|
|
|
|
localNetworkReady: json['local_network_ready'] as bool,
|
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_VeilidStateAttachmentToJson(
|
|
|
|
_$_VeilidStateAttachment instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'state': instance.state.toJson(),
|
|
|
|
'public_internet_ready': instance.publicInternetReady,
|
|
|
|
'local_network_ready': instance.localNetworkReady,
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidStateNetwork _$$_VeilidStateNetworkFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidStateNetwork(
|
2023-07-05 23:53:08 -04:00
|
|
|
started: json['started'] as bool,
|
|
|
|
bpsDown: BigInt.parse(json['bps_down'] as String),
|
|
|
|
bpsUp: BigInt.parse(json['bps_up'] as String),
|
2023-08-02 21:09:47 -04:00
|
|
|
peers:
|
|
|
|
(json['peers'] as List<dynamic>).map(PeerTableData.fromJson).toList(),
|
2023-07-05 23:53:08 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_VeilidStateNetworkToJson(
|
|
|
|
_$_VeilidStateNetwork instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'started': instance.started,
|
|
|
|
'bps_down': instance.bpsDown.toString(),
|
|
|
|
'bps_up': instance.bpsUp.toString(),
|
|
|
|
'peers': instance.peers.map((e) => e.toJson()).toList(),
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidStateConfig _$$_VeilidStateConfigFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$_VeilidStateConfig(
|
2023-08-02 21:09:47 -04:00
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
2023-07-05 23:53:08 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_VeilidStateConfigToJson(
|
|
|
|
_$_VeilidStateConfig instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
_$_VeilidState _$$_VeilidStateFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$_VeilidState(
|
2023-08-02 21:09:47 -04:00
|
|
|
attachment: VeilidStateAttachment.fromJson(json['attachment']),
|
|
|
|
network: VeilidStateNetwork.fromJson(json['network']),
|
|
|
|
config: VeilidStateConfig.fromJson(json['config']),
|
2023-07-05 23:53:08 -04:00
|
|
|
);
|
|
|
|
|
2024-02-21 18:17:07 -05:00
|
|
|
Map<String, dynamic> _$$_VeilidStateToJson(_$_VeilidState instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'attachment': instance.attachment.toJson(),
|
|
|
|
'network': instance.network.toJson(),
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
};
|