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