veilid/veilid-flutter/lib/veilid_state.g.dart

432 lines
16 KiB
Dart
Raw Normal View History

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-10-10 20:16:39 -04:00
_$StateStatsImpl _$$StateStatsImplFromJson(Map<String, dynamic> json) =>
_$StateStatsImpl(
span: TimestampDuration.fromJson(json['span']),
reliable: TimestampDuration.fromJson(json['reliable']),
unreliable: TimestampDuration.fromJson(json['unreliable']),
dead: TimestampDuration.fromJson(json['dead']),
punished: TimestampDuration.fromJson(json['punished']),
reason: StateReasonStats.fromJson(json['reason']),
);
Map<String, dynamic> _$$StateStatsImplToJson(_$StateStatsImpl instance) =>
<String, dynamic>{
'span': instance.span.toJson(),
'reliable': instance.reliable.toJson(),
'unreliable': instance.unreliable.toJson(),
'dead': instance.dead.toJson(),
'punished': instance.punished.toJson(),
'reason': instance.reason.toJson(),
};
_$StateReasonStatsImpl _$$StateReasonStatsImplFromJson(
Map<String, dynamic> json) =>
_$StateReasonStatsImpl(
canNotSend: TimestampDuration.fromJson(json['can_not_send']),
tooManyLostAnswers:
TimestampDuration.fromJson(json['too_many_lost_answers']),
noPingResponse: TimestampDuration.fromJson(json['no_ping_response']),
failedToSend: TimestampDuration.fromJson(json['failed_to_send']),
lostAnswers: TimestampDuration.fromJson(json['lost_answers']),
notSeenConsecutively:
TimestampDuration.fromJson(json['not_seen_consecutively']),
inUnreliablePingSpan:
TimestampDuration.fromJson(json['in_unreliable_ping_span']),
);
Map<String, dynamic> _$$StateReasonStatsImplToJson(
_$StateReasonStatsImpl instance) =>
<String, dynamic>{
'can_not_send': instance.canNotSend.toJson(),
'too_many_lost_answers': instance.tooManyLostAnswers.toJson(),
'no_ping_response': instance.noPingResponse.toJson(),
'failed_to_send': instance.failedToSend.toJson(),
'lost_answers': instance.lostAnswers.toJson(),
'not_seen_consecutively': instance.notSeenConsecutively.toJson(),
'in_unreliable_ping_span': instance.inUnreliablePingSpan.toJson(),
};
_$AnswerStatsImpl _$$AnswerStatsImplFromJson(Map<String, dynamic> json) =>
_$AnswerStatsImpl(
span: TimestampDuration.fromJson(json['span']),
questions: (json['questions'] as num).toInt(),
answers: (json['answers'] as num).toInt(),
lostAnswers: (json['lost_answers'] as num).toInt(),
consecutiveAnswersMaximum:
(json['consecutive_answers_maximum'] as num).toInt(),
consecutiveAnswersAverage:
(json['consecutive_answers_average'] as num).toInt(),
consecutiveAnswersMinimum:
(json['consecutive_answers_minimum'] as num).toInt(),
consecutiveLostAnswersMaximum:
(json['consecutive_lost_answers_maximum'] as num).toInt(),
consecutiveLostAnswersAverage:
(json['consecutive_lost_answers_average'] as num).toInt(),
consecutiveLostAnswersMinimum:
(json['consecutive_lost_answers_minimum'] as num).toInt(),
);
Map<String, dynamic> _$$AnswerStatsImplToJson(_$AnswerStatsImpl instance) =>
<String, dynamic>{
'span': instance.span.toJson(),
'questions': instance.questions,
'answers': instance.answers,
'lost_answers': instance.lostAnswers,
'consecutive_answers_maximum': instance.consecutiveAnswersMaximum,
'consecutive_answers_average': instance.consecutiveAnswersAverage,
'consecutive_answers_minimum': instance.consecutiveAnswersMinimum,
'consecutive_lost_answers_maximum':
instance.consecutiveLostAnswersMaximum,
'consecutive_lost_answers_average':
instance.consecutiveLostAnswersAverage,
'consecutive_lost_answers_minimum':
instance.consecutiveLostAnswersMinimum,
};
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(),
2024-10-10 20:16:39 -04:00
lastQuestionTs: json['last_question_ts'] == null
2023-07-05 18:48:06 -04:00
? null
2024-10-10 20:16:39 -04:00
: Timestamp.fromJson(json['last_question_ts']),
2023-07-05 18:48:06 -04:00
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(),
2024-10-10 20:16:39 -04:00
answer: AnswerStats.fromJson(json['answer']),
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,
2024-10-10 20:16:39 -04:00
'last_question_ts': instance.lastQuestionTs?.toJson(),
2023-07-05 18:48:06 -04:00
'last_seen_ts': instance.lastSeenTs?.toJson(),
'first_consecutive_seen_ts': instance.firstConsecutiveSeenTs?.toJson(),
'recent_lost_answers': instance.recentLostAnswers,
'failed_to_send': instance.failedToSend,
2024-10-10 20:16:39 -04:00
'answer': instance.answer.toJson(),
2023-07-05 18:48:06 -04:00
};
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']),
2024-10-10 20:16:39 -04:00
state: StateStats.fromJson(json['state']),
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(),
2024-10-10 20:16:39 -04:00
'state': instance.state.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,
2024-10-19 11:18:26 -04:00
uptime: TimestampDuration.fromJson(json['uptime']),
attachedUptime: json['attached_uptime'] == null
? null
: TimestampDuration.fromJson(json['attached_uptime']),
2024-02-16 11:19:26 -05:00
$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,
2024-10-19 11:18:26 -04:00
'uptime': instance.uptime.toJson(),
'attached_uptime': instance.attachedUptime?.toJson(),
2024-02-16 11:19:26 -05:00
'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(),
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,
'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-10-19 11:18:26 -04:00
uptime: TimestampDuration.fromJson(json['uptime']),
attachedUptime: json['attached_uptime'] == null
? null
: TimestampDuration.fromJson(json['attached_uptime']),
2023-07-05 23:53:08 -04:00
);
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-10-19 11:18:26 -04:00
'uptime': instance.uptime.toJson(),
'attached_uptime': instance.attachedUptime?.toJson(),
2023-07-05 23:53:08 -04:00
};
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(),
};