// GENERATED CODE - DO NOT MODIFY BY HAND part of 'veilid_state.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** _$LatencyStatsImpl _$$LatencyStatsImplFromJson(Map json) => _$LatencyStatsImpl( fastest: TimestampDuration.fromJson(json['fastest']), average: TimestampDuration.fromJson(json['average']), slowest: TimestampDuration.fromJson(json['slowest']), ); Map _$$LatencyStatsImplToJson(_$LatencyStatsImpl instance) => { 'fastest': instance.fastest.toJson(), 'average': instance.average.toJson(), 'slowest': instance.slowest.toJson(), }; _$TransferStatsImpl _$$TransferStatsImplFromJson(Map json) => _$TransferStatsImpl( 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), ); Map _$$TransferStatsImplToJson(_$TransferStatsImpl instance) => { 'total': instance.total.toString(), 'maximum': instance.maximum.toString(), 'average': instance.average.toString(), 'minimum': instance.minimum.toString(), }; _$TransferStatsDownUpImpl _$$TransferStatsDownUpImplFromJson( Map json) => _$TransferStatsDownUpImpl( down: TransferStats.fromJson(json['down']), up: TransferStats.fromJson(json['up']), ); Map _$$TransferStatsDownUpImplToJson( _$TransferStatsDownUpImpl instance) => { 'down': instance.down.toJson(), 'up': instance.up.toJson(), }; _$StateStatsImpl _$$StateStatsImplFromJson(Map 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 _$$StateStatsImplToJson(_$StateStatsImpl instance) => { '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 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 _$$StateReasonStatsImplToJson( _$StateReasonStatsImpl instance) => { '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 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 _$$AnswerStatsImplToJson(_$AnswerStatsImpl instance) => { '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, }; _$RPCStatsImpl _$$RPCStatsImplFromJson(Map json) => _$RPCStatsImpl( messagesSent: (json['messages_sent'] as num).toInt(), messagesRcvd: (json['messages_rcvd'] as num).toInt(), questionsInFlight: (json['questions_in_flight'] as num).toInt(), lastQuestionTs: json['last_question_ts'] == null ? null : Timestamp.fromJson(json['last_question_ts']), 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 num).toInt(), failedToSend: (json['failed_to_send'] as num).toInt(), answer: AnswerStats.fromJson(json['answer']), ); Map _$$RPCStatsImplToJson(_$RPCStatsImpl instance) => { 'messages_sent': instance.messagesSent, 'messages_rcvd': instance.messagesRcvd, 'questions_in_flight': instance.questionsInFlight, 'last_question_ts': instance.lastQuestionTs?.toJson(), 'last_seen_ts': instance.lastSeenTs?.toJson(), 'first_consecutive_seen_ts': instance.firstConsecutiveSeenTs?.toJson(), 'recent_lost_answers': instance.recentLostAnswers, 'failed_to_send': instance.failedToSend, 'answer': instance.answer.toJson(), }; _$PeerStatsImpl _$$PeerStatsImplFromJson(Map json) => _$PeerStatsImpl( timeAdded: Timestamp.fromJson(json['time_added']), rpcStats: RPCStats.fromJson(json['rpc_stats']), transfer: TransferStatsDownUp.fromJson(json['transfer']), state: StateStats.fromJson(json['state']), latency: json['latency'] == null ? null : LatencyStats.fromJson(json['latency']), ); Map _$$PeerStatsImplToJson(_$PeerStatsImpl instance) => { 'time_added': instance.timeAdded.toJson(), 'rpc_stats': instance.rpcStats.toJson(), 'transfer': instance.transfer.toJson(), 'state': instance.state.toJson(), 'latency': instance.latency?.toJson(), }; _$PeerTableDataImpl _$$PeerTableDataImplFromJson(Map json) => _$PeerTableDataImpl( nodeIds: (json['node_ids'] as List) .map(Typed.fromJson) .toList(), peerAddress: json['peer_address'] as String, peerStats: PeerStats.fromJson(json['peer_stats']), ); Map _$$PeerTableDataImplToJson(_$PeerTableDataImpl instance) => { 'node_ids': instance.nodeIds.map((e) => e.toJson()).toList(), 'peer_address': instance.peerAddress, 'peer_stats': instance.peerStats.toJson(), }; _$VeilidLogImpl _$$VeilidLogImplFromJson(Map json) => _$VeilidLogImpl( logLevel: VeilidLogLevel.fromJson(json['log_level']), message: json['message'] as String, backtrace: json['backtrace'] as String?, $type: json['kind'] as String?, ); Map _$$VeilidLogImplToJson(_$VeilidLogImpl instance) => { 'log_level': instance.logLevel.toJson(), 'message': instance.message, 'backtrace': instance.backtrace, 'kind': instance.$type, }; _$VeilidAppMessageImpl _$$VeilidAppMessageImplFromJson( Map json) => _$VeilidAppMessageImpl( message: const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']), sender: json['sender'] == null ? null : Typed.fromJson(json['sender']), routeId: json['route_id'] as String?, $type: json['kind'] as String?, ); Map _$$VeilidAppMessageImplToJson( _$VeilidAppMessageImpl instance) => { 'message': const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), 'sender': instance.sender?.toJson(), 'route_id': instance.routeId, 'kind': instance.$type, }; _$VeilidAppCallImpl _$$VeilidAppCallImplFromJson(Map json) => _$VeilidAppCallImpl( message: const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']), callId: json['call_id'] as String, sender: json['sender'] == null ? null : Typed.fromJson(json['sender']), routeId: json['route_id'] as String?, $type: json['kind'] as String?, ); Map _$$VeilidAppCallImplToJson(_$VeilidAppCallImpl instance) => { 'message': const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), 'call_id': instance.callId, 'sender': instance.sender?.toJson(), 'route_id': instance.routeId, 'kind': instance.$type, }; _$VeilidUpdateAttachmentImpl _$$VeilidUpdateAttachmentImplFromJson( Map json) => _$VeilidUpdateAttachmentImpl( state: AttachmentState.fromJson(json['state']), publicInternetReady: json['public_internet_ready'] as bool, localNetworkReady: json['local_network_ready'] as bool, uptime: TimestampDuration.fromJson(json['uptime']), attachedUptime: json['attached_uptime'] == null ? null : TimestampDuration.fromJson(json['attached_uptime']), $type: json['kind'] as String?, ); Map _$$VeilidUpdateAttachmentImplToJson( _$VeilidUpdateAttachmentImpl instance) => { 'state': instance.state.toJson(), 'public_internet_ready': instance.publicInternetReady, 'local_network_ready': instance.localNetworkReady, 'uptime': instance.uptime.toJson(), 'attached_uptime': instance.attachedUptime?.toJson(), 'kind': instance.$type, }; _$VeilidUpdateNetworkImpl _$$VeilidUpdateNetworkImplFromJson( Map 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).map(PeerTableData.fromJson).toList(), $type: json['kind'] as String?, ); Map _$$VeilidUpdateNetworkImplToJson( _$VeilidUpdateNetworkImpl instance) => { '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 json) => _$VeilidUpdateConfigImpl( config: VeilidConfig.fromJson(json['config']), $type: json['kind'] as String?, ); Map _$$VeilidUpdateConfigImplToJson( _$VeilidUpdateConfigImpl instance) => { 'config': instance.config.toJson(), 'kind': instance.$type, }; _$VeilidUpdateRouteChangeImpl _$$VeilidUpdateRouteChangeImplFromJson( Map json) => _$VeilidUpdateRouteChangeImpl( deadRoutes: (json['dead_routes'] as List) .map((e) => e as String) .toList(), deadRemoteRoutes: (json['dead_remote_routes'] as List) .map((e) => e as String) .toList(), $type: json['kind'] as String?, ); Map _$$VeilidUpdateRouteChangeImplToJson( _$VeilidUpdateRouteChangeImpl instance) => { 'dead_routes': instance.deadRoutes, 'dead_remote_routes': instance.deadRemoteRoutes, 'kind': instance.$type, }; _$VeilidUpdateValueChangeImpl _$$VeilidUpdateValueChangeImplFromJson( Map json) => _$VeilidUpdateValueChangeImpl( key: Typed.fromJson(json['key']), subkeys: (json['subkeys'] as List) .map(ValueSubkeyRange.fromJson) .toList(), count: (json['count'] as num).toInt(), value: json['value'] == null ? null : ValueData.fromJson(json['value']), $type: json['kind'] as String?, ); Map _$$VeilidUpdateValueChangeImplToJson( _$VeilidUpdateValueChangeImpl instance) => { 'key': instance.key.toJson(), 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), 'count': instance.count, 'value': instance.value?.toJson(), 'kind': instance.$type, }; _$VeilidStateAttachmentImpl _$$VeilidStateAttachmentImplFromJson( Map json) => _$VeilidStateAttachmentImpl( state: AttachmentState.fromJson(json['state']), publicInternetReady: json['public_internet_ready'] as bool, localNetworkReady: json['local_network_ready'] as bool, uptime: TimestampDuration.fromJson(json['uptime']), attachedUptime: json['attached_uptime'] == null ? null : TimestampDuration.fromJson(json['attached_uptime']), ); Map _$$VeilidStateAttachmentImplToJson( _$VeilidStateAttachmentImpl instance) => { 'state': instance.state.toJson(), 'public_internet_ready': instance.publicInternetReady, 'local_network_ready': instance.localNetworkReady, 'uptime': instance.uptime.toJson(), 'attached_uptime': instance.attachedUptime?.toJson(), }; _$VeilidStateNetworkImpl _$$VeilidStateNetworkImplFromJson( Map json) => _$VeilidStateNetworkImpl( 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).map(PeerTableData.fromJson).toList(), ); Map _$$VeilidStateNetworkImplToJson( _$VeilidStateNetworkImpl instance) => { 'started': instance.started, 'bps_down': instance.bpsDown.toString(), 'bps_up': instance.bpsUp.toString(), 'peers': instance.peers.map((e) => e.toJson()).toList(), }; _$VeilidStateConfigImpl _$$VeilidStateConfigImplFromJson( Map json) => _$VeilidStateConfigImpl( config: VeilidConfig.fromJson(json['config']), ); Map _$$VeilidStateConfigImplToJson( _$VeilidStateConfigImpl instance) => { 'config': instance.config.toJson(), }; _$VeilidStateImpl _$$VeilidStateImplFromJson(Map json) => _$VeilidStateImpl( attachment: VeilidStateAttachment.fromJson(json['attachment']), network: VeilidStateNetwork.fromJson(json['network']), config: VeilidStateConfig.fromJson(json['config']), ); Map _$$VeilidStateImplToJson(_$VeilidStateImpl instance) => { 'attachment': instance.attachment.toJson(), 'network': instance.network.toJson(), 'config': instance.config.toJson(), };