2023-07-05 18:48:06 -04:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'veilid_state.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -05:00
|
|
|
_$TransferStatsDownUpImpl _$$TransferStatsDownUpImplFromJson(
|
2023-07-05 18:48:06 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -05:00
|
|
|
_$RPCStatsImpl _$$RPCStatsImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$RPCStatsImpl(
|
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-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -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-02-16 11:19:26 -05:00
|
|
|
_$VeilidLogImpl _$$VeilidLogImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidLogImpl(
|
|
|
|
logLevel: VeilidLogLevel.fromJson(json['log_level']),
|
|
|
|
message: json['message'] as String,
|
|
|
|
backtrace: json['backtrace'] as String?,
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidLogImplToJson(_$VeilidLogImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'log_level': instance.logLevel.toJson(),
|
|
|
|
'message': instance.message,
|
|
|
|
'backtrace': instance.backtrace,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppMessageImpl(
|
|
|
|
message: const Uint8ListJsonConverter().fromJson(json['message']),
|
|
|
|
sender: json['sender'] == null
|
|
|
|
? null
|
|
|
|
: Typed<FixedEncodedString43>.fromJson(json['sender']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidAppMessageImplToJson(
|
|
|
|
_$VeilidAppMessageImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
|
|
|
'sender': instance.sender?.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map<String, dynamic> json) =>
|
|
|
|
_$VeilidAppCallImpl(
|
|
|
|
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?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'message': const Uint8ListJsonConverter().toJson(instance.message),
|
|
|
|
'call_id': instance.callId,
|
|
|
|
'sender': instance.sender?.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidUpdateAttachmentImpl _$$VeilidUpdateAttachmentImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateAttachmentImpl(
|
|
|
|
state: AttachmentState.fromJson(json['state']),
|
|
|
|
publicInternetReady: json['public_internet_ready'] as bool,
|
|
|
|
localNetworkReady: json['local_network_ready'] as bool,
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidUpdateAttachmentImplToJson(
|
|
|
|
_$VeilidUpdateAttachmentImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'state': instance.state.toJson(),
|
|
|
|
'public_internet_ready': instance.publicInternetReady,
|
|
|
|
'local_network_ready': instance.localNetworkReady,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateNetworkImpl(
|
|
|
|
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?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidUpdateNetworkImplToJson(
|
|
|
|
_$VeilidUpdateNetworkImpl instance) =>
|
|
|
|
<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,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidUpdateConfigImpl _$$VeilidUpdateConfigImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateConfigImpl(
|
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidUpdateConfigImplToJson(
|
|
|
|
_$VeilidUpdateConfigImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateRouteChangeImpl(
|
|
|
|
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?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidUpdateRouteChangeImplToJson(
|
|
|
|
_$VeilidUpdateRouteChangeImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'dead_routes': instance.deadRoutes,
|
|
|
|
'dead_remote_routes': instance.deadRemoteRoutes,
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
|
|
|
_$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson(
|
|
|
|
Map<String, dynamic> json) =>
|
|
|
|
_$VeilidUpdateValueChangeImpl(
|
|
|
|
key: Typed<FixedEncodedString43>.fromJson(json['key']),
|
|
|
|
subkeys: (json['subkeys'] as List<dynamic>)
|
|
|
|
.map(ValueSubkeyRange.fromJson)
|
|
|
|
.toList(),
|
|
|
|
count: json['count'] as int,
|
|
|
|
valueData: ValueData.fromJson(json['value_data']),
|
|
|
|
$type: json['kind'] as String?,
|
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$$VeilidUpdateValueChangeImplToJson(
|
|
|
|
_$VeilidUpdateValueChangeImpl instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'key': instance.key.toJson(),
|
|
|
|
'subkeys': instance.subkeys.map((e) => e.toJson()).toList(),
|
|
|
|
'count': instance.count,
|
|
|
|
'value_data': instance.valueData.toJson(),
|
|
|
|
'kind': instance.$type,
|
|
|
|
};
|
|
|
|
|
2024-02-15 13:05:41 -05:00
|
|
|
_$VeilidStateAttachmentImpl _$$VeilidStateAttachmentImplFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -05:00
|
|
|
_$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-15 13:05:41 -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-02-15 13:05:41 -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-02-15 13:05:41 -05:00
|
|
|
_$VeilidStateConfigImpl _$$VeilidStateConfigImplFromJson(
|
2023-07-05 23:53:08 -04:00
|
|
|
Map<String, dynamic> json) =>
|
2024-02-15 13:05:41 -05:00
|
|
|
_$VeilidStateConfigImpl(
|
2023-08-02 21:09:47 -04:00
|
|
|
config: VeilidConfig.fromJson(json['config']),
|
2023-07-05 23:53:08 -04:00
|
|
|
);
|
|
|
|
|
2024-02-15 13:05:41 -05:00
|
|
|
Map<String, dynamic> _$$VeilidStateConfigImplToJson(
|
|
|
|
_$VeilidStateConfigImpl instance) =>
|
2023-07-05 23:53:08 -04:00
|
|
|
<String, dynamic>{
|
|
|
|
'config': instance.config.toJson(),
|
|
|
|
};
|
|
|
|
|
2024-02-15 13:05:41 -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-02-15 13:05:41 -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(),
|
|
|
|
};
|