2023-07-05 18:48:06 -04:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'veilid_state.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$LatencyStatsImpl _$$LatencyStatsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$LatencyStatsImpl(
|
2023-07-05 18:48:06 -04:00
|
|
|
fastest: TimestampDuration.fromJson(json['fastest']),
|
|
|
|
average: TimestampDuration.fromJson(json['average']),
|
|
|
|
slowest: TimestampDuration.fromJson(json['slowest']),
|
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$LatencyStatsImplToJson(_$LatencyStatsImpl instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'fastest': instance.fastest.toJson(),
|
|
|
|
'average': instance.average.toJson(),
|
|
|
|
'slowest': instance.slowest.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$TransferStatsImpl _$$TransferStatsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$TransferStatsImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$TransferStatsImplToJson(_$TransferStatsImpl 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-03-01 11:38:03 -05:00
|
|
|
_$TransferStatsDownUpImpl _$$TransferStatsDownUpImplFromJson(
|
2023-07-05 18:48:06 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$TransferStatsDownUpImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$TransferStatsDownUpImplToJson(
|
|
|
|
_$TransferStatsDownUpImpl instance) =>
|
2023-07-05 18:48:06 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'down': instance.down.toJson(),
|
|
|
|
'up': instance.up.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$RPCStatsImpl _$$RPCStatsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$RPCStatsImpl(
|
2024-07-03 15:03:49 -04:00
|
|
|
messagesSent: (json['messages_sent'] as num).toInt(),
|
|
|
|
messagesRcvd: (json['messages_rcvd'] as num).toInt(),
|
|
|
|
questionsInFlight: (json['questions_in_flight'] as num).toInt(),
|
2023-07-05 18:48:06 -04:00
|
|
|
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']),
|
2024-07-03 15:03:49 -04:00
|
|
|
recentLostAnswers: (json['recent_lost_answers'] as num).toInt(),
|
|
|
|
failedToSend: (json['failed_to_send'] as num).toInt(),
|
2023-07-05 18:48:06 -04:00
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$RPCStatsImplToJson(_$RPCStatsImpl 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-03-01 11:38:03 -05:00
|
|
|
_$PeerStatsImpl _$$PeerStatsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$PeerStatsImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$PeerStatsImplToJson(_$PeerStatsImpl 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-03-01 11:38:03 -05:00
|
|
|
_$PeerTableDataImpl _$$PeerTableDataImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$PeerTableDataImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$PeerTableDataImplToJson(_$PeerTableDataImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidLogImpl _$$VeilidLogImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidLogImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppMessageImpl(
|
2024-03-17 10:54:37 -04:00
|
|
|
message:
|
|
|
|
const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']),
|
2024-02-16 11:19:26 -05:00
|
|
|
sender: json['sender'] == null
|
|
|
|
? null
|
|
|
|
: Typed<FixedEncodedString43>.fromJson(json['sender']),
|
2024-03-08 00:17:38 -05:00
|
|
|
routeId: json['route_id'] as String?,
|
2024-02-16 11:19:26 -05:00
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidAppMessageImplToJson(
|
|
|
|
_$VeilidAppMessageImpl instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
2024-03-17 10:54:37 -04:00
|
|
|
'message':
|
|
|
|
const Uint8ListJsonConverter.jsIsArray().toJson(instance.message),
|
2024-02-16 11:19:26 -05:00
|
|
|
'sender': instance.sender?.toJson(),
|
2024-03-08 00:17:38 -05:00
|
|
|
'route_id': instance.routeId,
|
2024-02-16 11:19:26 -05:00
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppCallImpl(
|
2024-03-17 10:54:37 -04:00
|
|
|
message:
|
|
|
|
const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']),
|
2024-02-16 11:19:26 -05:00
|
|
|
callId: json['call_id'] as String,
|
|
|
|
sender: json['sender'] == null
|
|
|
|
? null
|
|
|
|
: Typed<FixedEncodedString43>.fromJson(json['sender']),
|
2024-03-08 00:17:38 -05:00
|
|
|
routeId: json['route_id'] as String?,
|
2024-02-16 11:19:26 -05:00
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
2024-03-17 10:54:37 -04:00
|
|
|
'message':
|
|
|
|
const Uint8ListJsonConverter.jsIsArray().toJson(instance.message),
|
2024-02-16 11:19:26 -05:00
|
|
|
'call_id': instance.callId,
|
|
|
|
'sender': instance.sender?.toJson(),
|
2024-03-08 00:17:38 -05:00
|
|
|
'route_id': instance.routeId,
|
2024-02-16 11:19:26 -05:00
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateAttachmentImpl _$$VeilidUpdateAttachmentImplFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateAttachmentImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateAttachmentImplToJson(
|
|
|
|
_$VeilidUpdateAttachmentImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateNetworkImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateNetworkImplToJson(
|
|
|
|
_$VeilidUpdateNetworkImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateConfigImpl _$$VeilidUpdateConfigImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateConfigImpl(
|
2024-02-16 11:19:26 -05:00
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateConfigImplToJson(
|
|
|
|
_$VeilidUpdateConfigImpl instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateRouteChangeImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateRouteChangeImplToJson(
|
|
|
|
_$VeilidUpdateRouteChangeImpl instance) =>
|
2024-02-16 11:19:26 -05:00
|
|
|
<String, dynamic>{
|
|
|
|
'dead_routes': instance.deadRoutes,
|
|
|
|
'dead_remote_routes': instance.deadRemoteRoutes,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson(
|
2024-02-16 11:19:26 -05:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidUpdateValueChangeImpl(
|
2024-02-16 11:19:26 -05:00
|
|
|
key: Typed<FixedEncodedString43>.fromJson(json['key']),
|
|
|
|
subkeys: (json['subkeys'] as List<dynamic>)
|
|
|
|
.map(ValueSubkeyRange.fromJson)
|
|
|
|
.toList(),
|
2024-07-03 15:03:49 -04:00
|
|
|
count: (json['count'] as num).toInt(),
|
2024-03-31 16:34:12 -04:00
|
|
|
value: json['value'] == null ? null : ValueData.fromJson(json['value']),
|
2024-02-16 11:19:26 -05:00
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidUpdateValueChangeImplToJson(
|
|
|
|
_$VeilidUpdateValueChangeImpl 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-03-31 16:34:12 -04:00
|
|
|
'value': instance.value?.toJson(),
|
2024-02-16 11:19:26 -05:00
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateAttachmentImpl _$$VeilidStateAttachmentImplFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateAttachmentImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidStateAttachmentImplToJson(
|
|
|
|
_$VeilidStateAttachmentImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateNetworkImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidStateNetworkImplToJson(
|
|
|
|
_$VeilidStateNetworkImpl 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-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateConfigImpl _$$VeilidStateConfigImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidStateConfigImpl(
|
2023-08-02 21:09:47 -04:00
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
2023-07-05 23:53:08 -04:00
|
|
|
);
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidStateConfigImplToJson(
|
|
|
|
_$VeilidStateConfigImpl instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-03-01 11:38:03 -05:00
|
|
|
_$VeilidStateImpl _$$VeilidStateImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidStateImpl(
|
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-03-01 11:38:03 -05:00
|
|
|
Map<String, dynamic> _$$VeilidStateImplToJson(_$VeilidStateImpl instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'attachment': instance.attachment.toJson(),
|
|
|
|
'network': instance.network.toJson(),
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
};
|