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

4435 lines
143 KiB
Dart
Raw Normal View History

2023-07-05 18:48:06 -04:00
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'veilid_state.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
2024-03-01 11:38:03 -05:00
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
2023-07-05 18:48:06 -04:00
LatencyStats _$LatencyStatsFromJson(Map<String, dynamic> json) {
return _LatencyStats.fromJson(json);
}
/// @nodoc
mixin _$LatencyStats {
TimestampDuration get fastest => throw _privateConstructorUsedError;
TimestampDuration get average => throw _privateConstructorUsedError;
TimestampDuration get slowest => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$LatencyStatsCopyWith<LatencyStats> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $LatencyStatsCopyWith<$Res> {
factory $LatencyStatsCopyWith(
LatencyStats value, $Res Function(LatencyStats) then) =
_$LatencyStatsCopyWithImpl<$Res, LatencyStats>;
@useResult
$Res call(
{TimestampDuration fastest,
TimestampDuration average,
TimestampDuration slowest});
}
/// @nodoc
class _$LatencyStatsCopyWithImpl<$Res, $Val extends LatencyStats>
implements $LatencyStatsCopyWith<$Res> {
_$LatencyStatsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? fastest = null,
Object? average = null,
Object? slowest = null,
}) {
return _then(_value.copyWith(
fastest: null == fastest
? _value.fastest
: fastest // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
average: null == average
? _value.average
: average // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
slowest: null == slowest
? _value.slowest
: slowest // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
) as $Val);
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$LatencyStatsImplCopyWith<$Res>
2023-07-05 18:48:06 -04:00
implements $LatencyStatsCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$LatencyStatsImplCopyWith(
_$LatencyStatsImpl value, $Res Function(_$LatencyStatsImpl) then) =
__$$LatencyStatsImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call(
{TimestampDuration fastest,
TimestampDuration average,
TimestampDuration slowest});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$LatencyStatsImplCopyWithImpl<$Res>
extends _$LatencyStatsCopyWithImpl<$Res, _$LatencyStatsImpl>
implements _$$LatencyStatsImplCopyWith<$Res> {
__$$LatencyStatsImplCopyWithImpl(
_$LatencyStatsImpl _value, $Res Function(_$LatencyStatsImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? fastest = null,
Object? average = null,
Object? slowest = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$LatencyStatsImpl(
2023-07-05 18:48:06 -04:00
fastest: null == fastest
? _value.fastest
: fastest // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
average: null == average
? _value.average
: average // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
slowest: null == slowest
? _value.slowest
: slowest // ignore: cast_nullable_to_non_nullable
as TimestampDuration,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$LatencyStatsImpl implements _LatencyStats {
const _$LatencyStatsImpl(
2023-07-05 18:48:06 -04:00
{required this.fastest, required this.average, required this.slowest});
2024-03-01 11:38:03 -05:00
factory _$LatencyStatsImpl.fromJson(Map<String, dynamic> json) =>
_$$LatencyStatsImplFromJson(json);
2023-07-05 18:48:06 -04:00
@override
final TimestampDuration fastest;
@override
final TimestampDuration average;
@override
final TimestampDuration slowest;
@override
String toString() {
return 'LatencyStats(fastest: $fastest, average: $average, slowest: $slowest)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$LatencyStatsImpl &&
2023-07-05 18:48:06 -04:00
(identical(other.fastest, fastest) || other.fastest == fastest) &&
(identical(other.average, average) || other.average == average) &&
(identical(other.slowest, slowest) || other.slowest == slowest));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, fastest, average, slowest);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$LatencyStatsImplCopyWith<_$LatencyStatsImpl> get copyWith =>
__$$LatencyStatsImplCopyWithImpl<_$LatencyStatsImpl>(this, _$identity);
2023-07-05 18:48:06 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$LatencyStatsImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _LatencyStats implements LatencyStats {
const factory _LatencyStats(
{required final TimestampDuration fastest,
required final TimestampDuration average,
2024-03-01 11:38:03 -05:00
required final TimestampDuration slowest}) = _$LatencyStatsImpl;
2023-07-05 18:48:06 -04:00
factory _LatencyStats.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$LatencyStatsImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
TimestampDuration get fastest;
@override
TimestampDuration get average;
@override
TimestampDuration get slowest;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$LatencyStatsImplCopyWith<_$LatencyStatsImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
TransferStats _$TransferStatsFromJson(Map<String, dynamic> json) {
return _TransferStats.fromJson(json);
}
/// @nodoc
mixin _$TransferStats {
BigInt get total => throw _privateConstructorUsedError;
BigInt get maximum => throw _privateConstructorUsedError;
BigInt get average => throw _privateConstructorUsedError;
BigInt get minimum => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$TransferStatsCopyWith<TransferStats> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TransferStatsCopyWith<$Res> {
factory $TransferStatsCopyWith(
TransferStats value, $Res Function(TransferStats) then) =
_$TransferStatsCopyWithImpl<$Res, TransferStats>;
@useResult
$Res call({BigInt total, BigInt maximum, BigInt average, BigInt minimum});
}
/// @nodoc
class _$TransferStatsCopyWithImpl<$Res, $Val extends TransferStats>
implements $TransferStatsCopyWith<$Res> {
_$TransferStatsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? total = null,
Object? maximum = null,
Object? average = null,
Object? minimum = null,
}) {
return _then(_value.copyWith(
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as BigInt,
maximum: null == maximum
? _value.maximum
: maximum // ignore: cast_nullable_to_non_nullable
as BigInt,
average: null == average
? _value.average
: average // ignore: cast_nullable_to_non_nullable
as BigInt,
minimum: null == minimum
? _value.minimum
: minimum // ignore: cast_nullable_to_non_nullable
as BigInt,
) as $Val);
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$TransferStatsImplCopyWith<$Res>
2023-07-05 18:48:06 -04:00
implements $TransferStatsCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$TransferStatsImplCopyWith(
_$TransferStatsImpl value, $Res Function(_$TransferStatsImpl) then) =
__$$TransferStatsImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call({BigInt total, BigInt maximum, BigInt average, BigInt minimum});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$TransferStatsImplCopyWithImpl<$Res>
extends _$TransferStatsCopyWithImpl<$Res, _$TransferStatsImpl>
implements _$$TransferStatsImplCopyWith<$Res> {
__$$TransferStatsImplCopyWithImpl(
_$TransferStatsImpl _value, $Res Function(_$TransferStatsImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? total = null,
Object? maximum = null,
Object? average = null,
Object? minimum = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$TransferStatsImpl(
2023-07-05 18:48:06 -04:00
total: null == total
? _value.total
: total // ignore: cast_nullable_to_non_nullable
as BigInt,
maximum: null == maximum
? _value.maximum
: maximum // ignore: cast_nullable_to_non_nullable
as BigInt,
average: null == average
? _value.average
: average // ignore: cast_nullable_to_non_nullable
as BigInt,
minimum: null == minimum
? _value.minimum
: minimum // ignore: cast_nullable_to_non_nullable
as BigInt,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$TransferStatsImpl implements _TransferStats {
const _$TransferStatsImpl(
2023-07-05 18:48:06 -04:00
{required this.total,
required this.maximum,
required this.average,
required this.minimum});
2024-03-01 11:38:03 -05:00
factory _$TransferStatsImpl.fromJson(Map<String, dynamic> json) =>
_$$TransferStatsImplFromJson(json);
2023-07-05 18:48:06 -04:00
@override
final BigInt total;
@override
final BigInt maximum;
@override
final BigInt average;
@override
final BigInt minimum;
@override
String toString() {
return 'TransferStats(total: $total, maximum: $maximum, average: $average, minimum: $minimum)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$TransferStatsImpl &&
2023-07-05 18:48:06 -04:00
(identical(other.total, total) || other.total == total) &&
(identical(other.maximum, maximum) || other.maximum == maximum) &&
(identical(other.average, average) || other.average == average) &&
(identical(other.minimum, minimum) || other.minimum == minimum));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, total, maximum, average, minimum);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$TransferStatsImplCopyWith<_$TransferStatsImpl> get copyWith =>
__$$TransferStatsImplCopyWithImpl<_$TransferStatsImpl>(this, _$identity);
2023-07-05 18:48:06 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$TransferStatsImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _TransferStats implements TransferStats {
const factory _TransferStats(
{required final BigInt total,
required final BigInt maximum,
required final BigInt average,
2024-03-01 11:38:03 -05:00
required final BigInt minimum}) = _$TransferStatsImpl;
2023-07-05 18:48:06 -04:00
factory _TransferStats.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$TransferStatsImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
BigInt get total;
@override
BigInt get maximum;
@override
BigInt get average;
@override
BigInt get minimum;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$TransferStatsImplCopyWith<_$TransferStatsImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
TransferStatsDownUp _$TransferStatsDownUpFromJson(Map<String, dynamic> json) {
return _TransferStatsDownUp.fromJson(json);
}
/// @nodoc
mixin _$TransferStatsDownUp {
TransferStats get down => throw _privateConstructorUsedError;
TransferStats get up => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$TransferStatsDownUpCopyWith<TransferStatsDownUp> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TransferStatsDownUpCopyWith<$Res> {
factory $TransferStatsDownUpCopyWith(
TransferStatsDownUp value, $Res Function(TransferStatsDownUp) then) =
_$TransferStatsDownUpCopyWithImpl<$Res, TransferStatsDownUp>;
@useResult
$Res call({TransferStats down, TransferStats up});
$TransferStatsCopyWith<$Res> get down;
$TransferStatsCopyWith<$Res> get up;
}
/// @nodoc
class _$TransferStatsDownUpCopyWithImpl<$Res, $Val extends TransferStatsDownUp>
implements $TransferStatsDownUpCopyWith<$Res> {
_$TransferStatsDownUpCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? down = null,
Object? up = null,
}) {
return _then(_value.copyWith(
down: null == down
? _value.down
: down // ignore: cast_nullable_to_non_nullable
as TransferStats,
up: null == up
? _value.up
: up // ignore: cast_nullable_to_non_nullable
as TransferStats,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$TransferStatsCopyWith<$Res> get down {
return $TransferStatsCopyWith<$Res>(_value.down, (value) {
return _then(_value.copyWith(down: value) as $Val);
});
}
@override
@pragma('vm:prefer-inline')
$TransferStatsCopyWith<$Res> get up {
return $TransferStatsCopyWith<$Res>(_value.up, (value) {
return _then(_value.copyWith(up: value) as $Val);
});
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$TransferStatsDownUpImplCopyWith<$Res>
2023-07-05 18:48:06 -04:00
implements $TransferStatsDownUpCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$TransferStatsDownUpImplCopyWith(_$TransferStatsDownUpImpl value,
$Res Function(_$TransferStatsDownUpImpl) then) =
__$$TransferStatsDownUpImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call({TransferStats down, TransferStats up});
@override
$TransferStatsCopyWith<$Res> get down;
@override
$TransferStatsCopyWith<$Res> get up;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$TransferStatsDownUpImplCopyWithImpl<$Res>
extends _$TransferStatsDownUpCopyWithImpl<$Res, _$TransferStatsDownUpImpl>
implements _$$TransferStatsDownUpImplCopyWith<$Res> {
__$$TransferStatsDownUpImplCopyWithImpl(_$TransferStatsDownUpImpl _value,
$Res Function(_$TransferStatsDownUpImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? down = null,
Object? up = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$TransferStatsDownUpImpl(
2023-07-05 18:48:06 -04:00
down: null == down
? _value.down
: down // ignore: cast_nullable_to_non_nullable
as TransferStats,
up: null == up
? _value.up
: up // ignore: cast_nullable_to_non_nullable
as TransferStats,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$TransferStatsDownUpImpl implements _TransferStatsDownUp {
const _$TransferStatsDownUpImpl({required this.down, required this.up});
2023-07-05 18:48:06 -04:00
2024-03-01 11:38:03 -05:00
factory _$TransferStatsDownUpImpl.fromJson(Map<String, dynamic> json) =>
_$$TransferStatsDownUpImplFromJson(json);
2023-07-05 18:48:06 -04:00
@override
final TransferStats down;
@override
final TransferStats up;
@override
String toString() {
return 'TransferStatsDownUp(down: $down, up: $up)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$TransferStatsDownUpImpl &&
2023-07-05 18:48:06 -04:00
(identical(other.down, down) || other.down == down) &&
(identical(other.up, up) || other.up == up));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, down, up);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$TransferStatsDownUpImplCopyWith<_$TransferStatsDownUpImpl> get copyWith =>
__$$TransferStatsDownUpImplCopyWithImpl<_$TransferStatsDownUpImpl>(
2023-07-05 18:48:06 -04:00
this, _$identity);
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$TransferStatsDownUpImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _TransferStatsDownUp implements TransferStatsDownUp {
const factory _TransferStatsDownUp(
{required final TransferStats down,
2024-03-01 11:38:03 -05:00
required final TransferStats up}) = _$TransferStatsDownUpImpl;
2023-07-05 18:48:06 -04:00
factory _TransferStatsDownUp.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$TransferStatsDownUpImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
TransferStats get down;
@override
TransferStats get up;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$TransferStatsDownUpImplCopyWith<_$TransferStatsDownUpImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
RPCStats _$RPCStatsFromJson(Map<String, dynamic> json) {
return _RPCStats.fromJson(json);
}
/// @nodoc
mixin _$RPCStats {
int get messagesSent => throw _privateConstructorUsedError;
int get messagesRcvd => throw _privateConstructorUsedError;
int get questionsInFlight => throw _privateConstructorUsedError;
Timestamp? get lastQuestion => throw _privateConstructorUsedError;
Timestamp? get lastSeenTs => throw _privateConstructorUsedError;
Timestamp? get firstConsecutiveSeenTs => throw _privateConstructorUsedError;
int get recentLostAnswers => throw _privateConstructorUsedError;
int get failedToSend => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$RPCStatsCopyWith<RPCStats> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RPCStatsCopyWith<$Res> {
factory $RPCStatsCopyWith(RPCStats value, $Res Function(RPCStats) then) =
_$RPCStatsCopyWithImpl<$Res, RPCStats>;
@useResult
$Res call(
{int messagesSent,
int messagesRcvd,
int questionsInFlight,
Timestamp? lastQuestion,
Timestamp? lastSeenTs,
Timestamp? firstConsecutiveSeenTs,
int recentLostAnswers,
int failedToSend});
}
/// @nodoc
class _$RPCStatsCopyWithImpl<$Res, $Val extends RPCStats>
implements $RPCStatsCopyWith<$Res> {
_$RPCStatsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? messagesSent = null,
Object? messagesRcvd = null,
Object? questionsInFlight = null,
Object? lastQuestion = freezed,
Object? lastSeenTs = freezed,
Object? firstConsecutiveSeenTs = freezed,
Object? recentLostAnswers = null,
Object? failedToSend = null,
}) {
return _then(_value.copyWith(
messagesSent: null == messagesSent
? _value.messagesSent
: messagesSent // ignore: cast_nullable_to_non_nullable
as int,
messagesRcvd: null == messagesRcvd
? _value.messagesRcvd
: messagesRcvd // ignore: cast_nullable_to_non_nullable
as int,
questionsInFlight: null == questionsInFlight
? _value.questionsInFlight
: questionsInFlight // ignore: cast_nullable_to_non_nullable
as int,
lastQuestion: freezed == lastQuestion
? _value.lastQuestion
: lastQuestion // ignore: cast_nullable_to_non_nullable
as Timestamp?,
lastSeenTs: freezed == lastSeenTs
? _value.lastSeenTs
: lastSeenTs // ignore: cast_nullable_to_non_nullable
as Timestamp?,
firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs
? _value.firstConsecutiveSeenTs
: firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable
as Timestamp?,
recentLostAnswers: null == recentLostAnswers
? _value.recentLostAnswers
: recentLostAnswers // ignore: cast_nullable_to_non_nullable
as int,
failedToSend: null == failedToSend
? _value.failedToSend
: failedToSend // ignore: cast_nullable_to_non_nullable
as int,
) as $Val);
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$RPCStatsImplCopyWith<$Res>
implements $RPCStatsCopyWith<$Res> {
factory _$$RPCStatsImplCopyWith(
_$RPCStatsImpl value, $Res Function(_$RPCStatsImpl) then) =
__$$RPCStatsImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call(
{int messagesSent,
int messagesRcvd,
int questionsInFlight,
Timestamp? lastQuestion,
Timestamp? lastSeenTs,
Timestamp? firstConsecutiveSeenTs,
int recentLostAnswers,
int failedToSend});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$RPCStatsImplCopyWithImpl<$Res>
extends _$RPCStatsCopyWithImpl<$Res, _$RPCStatsImpl>
implements _$$RPCStatsImplCopyWith<$Res> {
__$$RPCStatsImplCopyWithImpl(
_$RPCStatsImpl _value, $Res Function(_$RPCStatsImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? messagesSent = null,
Object? messagesRcvd = null,
Object? questionsInFlight = null,
Object? lastQuestion = freezed,
Object? lastSeenTs = freezed,
Object? firstConsecutiveSeenTs = freezed,
Object? recentLostAnswers = null,
Object? failedToSend = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$RPCStatsImpl(
2023-07-05 18:48:06 -04:00
messagesSent: null == messagesSent
? _value.messagesSent
: messagesSent // ignore: cast_nullable_to_non_nullable
as int,
messagesRcvd: null == messagesRcvd
? _value.messagesRcvd
: messagesRcvd // ignore: cast_nullable_to_non_nullable
as int,
questionsInFlight: null == questionsInFlight
? _value.questionsInFlight
: questionsInFlight // ignore: cast_nullable_to_non_nullable
as int,
lastQuestion: freezed == lastQuestion
? _value.lastQuestion
: lastQuestion // ignore: cast_nullable_to_non_nullable
as Timestamp?,
lastSeenTs: freezed == lastSeenTs
? _value.lastSeenTs
: lastSeenTs // ignore: cast_nullable_to_non_nullable
as Timestamp?,
firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs
? _value.firstConsecutiveSeenTs
: firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable
as Timestamp?,
recentLostAnswers: null == recentLostAnswers
? _value.recentLostAnswers
: recentLostAnswers // ignore: cast_nullable_to_non_nullable
as int,
failedToSend: null == failedToSend
? _value.failedToSend
: failedToSend // ignore: cast_nullable_to_non_nullable
as int,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$RPCStatsImpl implements _RPCStats {
const _$RPCStatsImpl(
2023-07-05 18:48:06 -04:00
{required this.messagesSent,
required this.messagesRcvd,
required this.questionsInFlight,
required this.lastQuestion,
required this.lastSeenTs,
required this.firstConsecutiveSeenTs,
required this.recentLostAnswers,
required this.failedToSend});
2024-03-01 11:38:03 -05:00
factory _$RPCStatsImpl.fromJson(Map<String, dynamic> json) =>
_$$RPCStatsImplFromJson(json);
2023-07-05 18:48:06 -04:00
@override
final int messagesSent;
@override
final int messagesRcvd;
@override
final int questionsInFlight;
@override
final Timestamp? lastQuestion;
@override
final Timestamp? lastSeenTs;
@override
final Timestamp? firstConsecutiveSeenTs;
@override
final int recentLostAnswers;
@override
final int failedToSend;
@override
String toString() {
return 'RPCStats(messagesSent: $messagesSent, messagesRcvd: $messagesRcvd, questionsInFlight: $questionsInFlight, lastQuestion: $lastQuestion, lastSeenTs: $lastSeenTs, firstConsecutiveSeenTs: $firstConsecutiveSeenTs, recentLostAnswers: $recentLostAnswers, failedToSend: $failedToSend)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$RPCStatsImpl &&
2023-07-05 18:48:06 -04:00
(identical(other.messagesSent, messagesSent) ||
other.messagesSent == messagesSent) &&
(identical(other.messagesRcvd, messagesRcvd) ||
other.messagesRcvd == messagesRcvd) &&
(identical(other.questionsInFlight, questionsInFlight) ||
other.questionsInFlight == questionsInFlight) &&
(identical(other.lastQuestion, lastQuestion) ||
other.lastQuestion == lastQuestion) &&
(identical(other.lastSeenTs, lastSeenTs) ||
other.lastSeenTs == lastSeenTs) &&
(identical(other.firstConsecutiveSeenTs, firstConsecutiveSeenTs) ||
other.firstConsecutiveSeenTs == firstConsecutiveSeenTs) &&
(identical(other.recentLostAnswers, recentLostAnswers) ||
other.recentLostAnswers == recentLostAnswers) &&
(identical(other.failedToSend, failedToSend) ||
other.failedToSend == failedToSend));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
messagesSent,
messagesRcvd,
questionsInFlight,
lastQuestion,
lastSeenTs,
firstConsecutiveSeenTs,
recentLostAnswers,
failedToSend);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$RPCStatsImplCopyWith<_$RPCStatsImpl> get copyWith =>
__$$RPCStatsImplCopyWithImpl<_$RPCStatsImpl>(this, _$identity);
2023-07-05 18:48:06 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$RPCStatsImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _RPCStats implements RPCStats {
const factory _RPCStats(
{required final int messagesSent,
required final int messagesRcvd,
required final int questionsInFlight,
required final Timestamp? lastQuestion,
required final Timestamp? lastSeenTs,
required final Timestamp? firstConsecutiveSeenTs,
required final int recentLostAnswers,
2024-03-01 11:38:03 -05:00
required final int failedToSend}) = _$RPCStatsImpl;
2023-07-05 18:48:06 -04:00
2024-03-01 11:38:03 -05:00
factory _RPCStats.fromJson(Map<String, dynamic> json) =
_$RPCStatsImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
int get messagesSent;
@override
int get messagesRcvd;
@override
int get questionsInFlight;
@override
Timestamp? get lastQuestion;
@override
Timestamp? get lastSeenTs;
@override
Timestamp? get firstConsecutiveSeenTs;
@override
int get recentLostAnswers;
@override
int get failedToSend;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$RPCStatsImplCopyWith<_$RPCStatsImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
PeerStats _$PeerStatsFromJson(Map<String, dynamic> json) {
return _PeerStats.fromJson(json);
}
/// @nodoc
mixin _$PeerStats {
Timestamp get timeAdded => throw _privateConstructorUsedError;
RPCStats get rpcStats => throw _privateConstructorUsedError;
TransferStatsDownUp get transfer => throw _privateConstructorUsedError;
2023-08-02 21:09:47 -04:00
LatencyStats? get latency => throw _privateConstructorUsedError;
2023-07-05 18:48:06 -04:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$PeerStatsCopyWith<PeerStats> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PeerStatsCopyWith<$Res> {
factory $PeerStatsCopyWith(PeerStats value, $Res Function(PeerStats) then) =
_$PeerStatsCopyWithImpl<$Res, PeerStats>;
@useResult
$Res call(
{Timestamp timeAdded,
RPCStats rpcStats,
2023-08-02 21:09:47 -04:00
TransferStatsDownUp transfer,
LatencyStats? latency});
2023-07-05 18:48:06 -04:00
$RPCStatsCopyWith<$Res> get rpcStats;
$TransferStatsDownUpCopyWith<$Res> get transfer;
2023-08-02 21:09:47 -04:00
$LatencyStatsCopyWith<$Res>? get latency;
2023-07-05 18:48:06 -04:00
}
/// @nodoc
class _$PeerStatsCopyWithImpl<$Res, $Val extends PeerStats>
implements $PeerStatsCopyWith<$Res> {
_$PeerStatsCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? timeAdded = null,
Object? rpcStats = null,
Object? transfer = null,
2023-08-02 21:09:47 -04:00
Object? latency = freezed,
2023-07-05 18:48:06 -04:00
}) {
return _then(_value.copyWith(
timeAdded: null == timeAdded
? _value.timeAdded
: timeAdded // ignore: cast_nullable_to_non_nullable
as Timestamp,
rpcStats: null == rpcStats
? _value.rpcStats
: rpcStats // ignore: cast_nullable_to_non_nullable
as RPCStats,
transfer: null == transfer
? _value.transfer
: transfer // ignore: cast_nullable_to_non_nullable
as TransferStatsDownUp,
2023-08-02 21:09:47 -04:00
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
2023-07-05 18:48:06 -04:00
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$RPCStatsCopyWith<$Res> get rpcStats {
return $RPCStatsCopyWith<$Res>(_value.rpcStats, (value) {
return _then(_value.copyWith(rpcStats: value) as $Val);
});
}
2023-08-02 21:09:47 -04:00
@override
@pragma('vm:prefer-inline')
$TransferStatsDownUpCopyWith<$Res> get transfer {
return $TransferStatsDownUpCopyWith<$Res>(_value.transfer, (value) {
return _then(_value.copyWith(transfer: value) as $Val);
});
}
2023-07-05 18:48:06 -04:00
@override
@pragma('vm:prefer-inline')
$LatencyStatsCopyWith<$Res>? get latency {
if (_value.latency == null) {
return null;
}
return $LatencyStatsCopyWith<$Res>(_value.latency!, (value) {
return _then(_value.copyWith(latency: value) as $Val);
});
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$PeerStatsImplCopyWith<$Res>
implements $PeerStatsCopyWith<$Res> {
factory _$$PeerStatsImplCopyWith(
_$PeerStatsImpl value, $Res Function(_$PeerStatsImpl) then) =
__$$PeerStatsImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call(
{Timestamp timeAdded,
RPCStats rpcStats,
2023-08-02 21:09:47 -04:00
TransferStatsDownUp transfer,
LatencyStats? latency});
2023-07-05 18:48:06 -04:00
@override
$RPCStatsCopyWith<$Res> get rpcStats;
@override
$TransferStatsDownUpCopyWith<$Res> get transfer;
2023-08-02 21:09:47 -04:00
@override
$LatencyStatsCopyWith<$Res>? get latency;
2023-07-05 18:48:06 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$PeerStatsImplCopyWithImpl<$Res>
extends _$PeerStatsCopyWithImpl<$Res, _$PeerStatsImpl>
implements _$$PeerStatsImplCopyWith<$Res> {
__$$PeerStatsImplCopyWithImpl(
_$PeerStatsImpl _value, $Res Function(_$PeerStatsImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? timeAdded = null,
Object? rpcStats = null,
Object? transfer = null,
2023-08-02 21:09:47 -04:00
Object? latency = freezed,
2023-07-05 18:48:06 -04:00
}) {
2024-03-01 11:38:03 -05:00
return _then(_$PeerStatsImpl(
2023-07-05 18:48:06 -04:00
timeAdded: null == timeAdded
? _value.timeAdded
: timeAdded // ignore: cast_nullable_to_non_nullable
as Timestamp,
rpcStats: null == rpcStats
? _value.rpcStats
: rpcStats // ignore: cast_nullable_to_non_nullable
as RPCStats,
transfer: null == transfer
? _value.transfer
: transfer // ignore: cast_nullable_to_non_nullable
as TransferStatsDownUp,
2023-08-02 21:09:47 -04:00
latency: freezed == latency
? _value.latency
: latency // ignore: cast_nullable_to_non_nullable
as LatencyStats?,
2023-07-05 18:48:06 -04:00
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$PeerStatsImpl implements _PeerStats {
const _$PeerStatsImpl(
2023-07-05 18:48:06 -04:00
{required this.timeAdded,
required this.rpcStats,
2023-08-02 21:09:47 -04:00
required this.transfer,
this.latency});
2023-07-05 18:48:06 -04:00
2024-03-01 11:38:03 -05:00
factory _$PeerStatsImpl.fromJson(Map<String, dynamic> json) =>
_$$PeerStatsImplFromJson(json);
2023-07-05 18:48:06 -04:00
@override
final Timestamp timeAdded;
@override
final RPCStats rpcStats;
@override
final TransferStatsDownUp transfer;
2023-08-02 21:09:47 -04:00
@override
final LatencyStats? latency;
2023-07-05 18:48:06 -04:00
@override
String toString() {
2023-08-02 21:09:47 -04:00
return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, latency: $latency)';
2023-07-05 18:48:06 -04:00
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$PeerStatsImpl &&
2023-07-05 18:48:06 -04:00
(identical(other.timeAdded, timeAdded) ||
other.timeAdded == timeAdded) &&
(identical(other.rpcStats, rpcStats) ||
other.rpcStats == rpcStats) &&
(identical(other.transfer, transfer) ||
2023-08-02 21:09:47 -04:00
other.transfer == transfer) &&
(identical(other.latency, latency) || other.latency == latency));
2023-07-05 18:48:06 -04:00
}
@JsonKey(ignore: true)
@override
int get hashCode =>
2023-08-02 21:09:47 -04:00
Object.hash(runtimeType, timeAdded, rpcStats, transfer, latency);
2023-07-05 18:48:06 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$PeerStatsImplCopyWith<_$PeerStatsImpl> get copyWith =>
__$$PeerStatsImplCopyWithImpl<_$PeerStatsImpl>(this, _$identity);
2023-07-05 18:48:06 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$PeerStatsImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _PeerStats implements PeerStats {
const factory _PeerStats(
{required final Timestamp timeAdded,
required final RPCStats rpcStats,
2023-08-02 21:09:47 -04:00
required final TransferStatsDownUp transfer,
2024-03-01 11:38:03 -05:00
final LatencyStats? latency}) = _$PeerStatsImpl;
2023-07-05 18:48:06 -04:00
factory _PeerStats.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$PeerStatsImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
Timestamp get timeAdded;
@override
RPCStats get rpcStats;
@override
TransferStatsDownUp get transfer;
@override
2023-08-02 21:09:47 -04:00
LatencyStats? get latency;
@override
2023-07-05 18:48:06 -04:00
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$PeerStatsImplCopyWith<_$PeerStatsImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
PeerTableData _$PeerTableDataFromJson(Map<String, dynamic> json) {
return _PeerTableData.fromJson(json);
}
/// @nodoc
mixin _$PeerTableData {
List<Typed<FixedEncodedString43>> get nodeIds =>
throw _privateConstructorUsedError;
String get peerAddress => throw _privateConstructorUsedError;
PeerStats get peerStats => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$PeerTableDataCopyWith<PeerTableData> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PeerTableDataCopyWith<$Res> {
factory $PeerTableDataCopyWith(
PeerTableData value, $Res Function(PeerTableData) then) =
_$PeerTableDataCopyWithImpl<$Res, PeerTableData>;
@useResult
$Res call(
{List<Typed<FixedEncodedString43>> nodeIds,
String peerAddress,
PeerStats peerStats});
$PeerStatsCopyWith<$Res> get peerStats;
}
/// @nodoc
class _$PeerTableDataCopyWithImpl<$Res, $Val extends PeerTableData>
implements $PeerTableDataCopyWith<$Res> {
_$PeerTableDataCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? nodeIds = null,
Object? peerAddress = null,
Object? peerStats = null,
}) {
return _then(_value.copyWith(
nodeIds: null == nodeIds
? _value.nodeIds
: nodeIds // ignore: cast_nullable_to_non_nullable
as List<Typed<FixedEncodedString43>>,
peerAddress: null == peerAddress
? _value.peerAddress
: peerAddress // ignore: cast_nullable_to_non_nullable
as String,
peerStats: null == peerStats
? _value.peerStats
: peerStats // ignore: cast_nullable_to_non_nullable
as PeerStats,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$PeerStatsCopyWith<$Res> get peerStats {
return $PeerStatsCopyWith<$Res>(_value.peerStats, (value) {
return _then(_value.copyWith(peerStats: value) as $Val);
});
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$PeerTableDataImplCopyWith<$Res>
2023-07-05 18:48:06 -04:00
implements $PeerTableDataCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$PeerTableDataImplCopyWith(
_$PeerTableDataImpl value, $Res Function(_$PeerTableDataImpl) then) =
__$$PeerTableDataImplCopyWithImpl<$Res>;
2023-07-05 18:48:06 -04:00
@override
@useResult
$Res call(
{List<Typed<FixedEncodedString43>> nodeIds,
String peerAddress,
PeerStats peerStats});
@override
$PeerStatsCopyWith<$Res> get peerStats;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$PeerTableDataImplCopyWithImpl<$Res>
extends _$PeerTableDataCopyWithImpl<$Res, _$PeerTableDataImpl>
implements _$$PeerTableDataImplCopyWith<$Res> {
__$$PeerTableDataImplCopyWithImpl(
_$PeerTableDataImpl _value, $Res Function(_$PeerTableDataImpl) _then)
2023-07-05 18:48:06 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? nodeIds = null,
Object? peerAddress = null,
Object? peerStats = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$PeerTableDataImpl(
2023-07-05 18:48:06 -04:00
nodeIds: null == nodeIds
? _value._nodeIds
: nodeIds // ignore: cast_nullable_to_non_nullable
as List<Typed<FixedEncodedString43>>,
peerAddress: null == peerAddress
? _value.peerAddress
: peerAddress // ignore: cast_nullable_to_non_nullable
as String,
peerStats: null == peerStats
? _value.peerStats
: peerStats // ignore: cast_nullable_to_non_nullable
as PeerStats,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$PeerTableDataImpl implements _PeerTableData {
const _$PeerTableDataImpl(
2023-07-05 18:48:06 -04:00
{required final List<Typed<FixedEncodedString43>> nodeIds,
required this.peerAddress,
required this.peerStats})
: _nodeIds = nodeIds;
2024-03-01 11:38:03 -05:00
factory _$PeerTableDataImpl.fromJson(Map<String, dynamic> json) =>
_$$PeerTableDataImplFromJson(json);
2023-07-05 18:48:06 -04:00
final List<Typed<FixedEncodedString43>> _nodeIds;
@override
List<Typed<FixedEncodedString43>> get nodeIds {
if (_nodeIds is EqualUnmodifiableListView) return _nodeIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_nodeIds);
}
@override
final String peerAddress;
@override
final PeerStats peerStats;
@override
String toString() {
return 'PeerTableData(nodeIds: $nodeIds, peerAddress: $peerAddress, peerStats: $peerStats)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 18:48:06 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$PeerTableDataImpl &&
2023-07-05 18:48:06 -04:00
const DeepCollectionEquality().equals(other._nodeIds, _nodeIds) &&
(identical(other.peerAddress, peerAddress) ||
other.peerAddress == peerAddress) &&
(identical(other.peerStats, peerStats) ||
other.peerStats == peerStats));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_nodeIds), peerAddress, peerStats);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$PeerTableDataImplCopyWith<_$PeerTableDataImpl> get copyWith =>
__$$PeerTableDataImplCopyWithImpl<_$PeerTableDataImpl>(this, _$identity);
2023-07-05 18:48:06 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$PeerTableDataImplToJson(
2023-07-05 18:48:06 -04:00
this,
);
}
}
abstract class _PeerTableData implements PeerTableData {
const factory _PeerTableData(
{required final List<Typed<FixedEncodedString43>> nodeIds,
required final String peerAddress,
2024-03-01 11:38:03 -05:00
required final PeerStats peerStats}) = _$PeerTableDataImpl;
2023-07-05 18:48:06 -04:00
factory _PeerTableData.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$PeerTableDataImpl.fromJson;
2023-07-05 18:48:06 -04:00
@override
List<Typed<FixedEncodedString43>> get nodeIds;
@override
String get peerAddress;
@override
PeerStats get peerStats;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$PeerTableDataImplCopyWith<_$PeerTableDataImpl> get copyWith =>
2023-07-05 18:48:06 -04:00
throw _privateConstructorUsedError;
}
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
VeilidUpdate _$VeilidUpdateFromJson(Map<String, dynamic> json) {
switch (json['kind']) {
case 'Log':
return VeilidLog.fromJson(json);
case 'AppMessage':
return VeilidAppMessage.fromJson(json);
case 'AppCall':
return VeilidAppCall.fromJson(json);
case 'Attachment':
return VeilidUpdateAttachment.fromJson(json);
case 'Network':
return VeilidUpdateNetwork.fromJson(json);
case 'Config':
return VeilidUpdateConfig.fromJson(json);
case 'RouteChange':
return VeilidUpdateRouteChange.fromJson(json);
case 'ValueChange':
return VeilidUpdateValueChange.fromJson(json);
default:
throw CheckedFromJsonException(json, 'kind', 'VeilidUpdate',
'Invalid union type "${json['kind']}"!');
}
}
2023-07-05 23:53:08 -04:00
/// @nodoc
mixin _$VeilidUpdate {
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
2024-02-16 11:19:26 -05:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
2023-07-05 23:53:08 -04:00
}
/// @nodoc
abstract class $VeilidUpdateCopyWith<$Res> {
factory $VeilidUpdateCopyWith(
VeilidUpdate value, $Res Function(VeilidUpdate) then) =
_$VeilidUpdateCopyWithImpl<$Res, VeilidUpdate>;
}
/// @nodoc
class _$VeilidUpdateCopyWithImpl<$Res, $Val extends VeilidUpdate>
implements $VeilidUpdateCopyWith<$Res> {
_$VeilidUpdateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidLogImplCopyWith<$Res> {
factory _$$VeilidLogImplCopyWith(
_$VeilidLogImpl value, $Res Function(_$VeilidLogImpl) then) =
__$$VeilidLogImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call({VeilidLogLevel logLevel, String message, String? backtrace});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidLogImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidLogImpl>
implements _$$VeilidLogImplCopyWith<$Res> {
__$$VeilidLogImplCopyWithImpl(
_$VeilidLogImpl _value, $Res Function(_$VeilidLogImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? logLevel = null,
Object? message = null,
Object? backtrace = freezed,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidLogImpl(
2023-07-05 23:53:08 -04:00
logLevel: null == logLevel
? _value.logLevel
: logLevel // ignore: cast_nullable_to_non_nullable
as VeilidLogLevel,
message: null == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String,
backtrace: freezed == backtrace
? _value.backtrace
: backtrace // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidLogImpl implements VeilidLog {
const _$VeilidLogImpl(
2024-02-16 11:19:26 -05:00
{required this.logLevel,
required this.message,
this.backtrace,
final String? $type})
: $type = $type ?? 'Log';
2024-03-01 11:38:03 -05:00
factory _$VeilidLogImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidLogImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final VeilidLogLevel logLevel;
@override
final String message;
@override
final String? backtrace;
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
return 'VeilidUpdate.log(logLevel: $logLevel, message: $message, backtrace: $backtrace)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidLogImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.logLevel, logLevel) ||
other.logLevel == logLevel) &&
(identical(other.message, message) || other.message == message) &&
(identical(other.backtrace, backtrace) ||
other.backtrace == backtrace));
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode => Object.hash(runtimeType, logLevel, message, backtrace);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidLogImplCopyWith<_$VeilidLogImpl> get copyWith =>
__$$VeilidLogImplCopyWithImpl<_$VeilidLogImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return log(logLevel, message, backtrace);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return log?.call(logLevel, message, backtrace);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (log != null) {
return log(logLevel, message, backtrace);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return log(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return log?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (log != null) {
return log(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidLogImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidLog implements VeilidUpdate {
const factory VeilidLog(
{required final VeilidLogLevel logLevel,
required final String message,
2024-03-01 11:38:03 -05:00
final String? backtrace}) = _$VeilidLogImpl;
2023-07-05 23:53:08 -04:00
2024-03-01 11:38:03 -05:00
factory VeilidLog.fromJson(Map<String, dynamic> json) =
_$VeilidLogImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
VeilidLogLevel get logLevel;
String get message;
String? get backtrace;
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidLogImplCopyWith<_$VeilidLogImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidAppMessageImplCopyWith<$Res> {
factory _$$VeilidAppMessageImplCopyWith(_$VeilidAppMessageImpl value,
$Res Function(_$VeilidAppMessageImpl) then) =
__$$VeilidAppMessageImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender,
String? routeId});
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidAppMessageImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidAppMessageImpl>
implements _$$VeilidAppMessageImplCopyWith<$Res> {
__$$VeilidAppMessageImplCopyWithImpl(_$VeilidAppMessageImpl _value,
$Res Function(_$VeilidAppMessageImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? message = null,
2023-08-02 21:09:47 -04:00
Object? sender = freezed,
2024-03-08 00:17:38 -05:00
Object? routeId = freezed,
2023-07-05 23:53:08 -04:00
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidAppMessageImpl(
2023-07-05 23:53:08 -04:00
message: null == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as Uint8List,
2023-08-02 21:09:47 -04:00
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
2024-03-08 00:17:38 -05:00
routeId: freezed == routeId
? _value.routeId
: routeId // ignore: cast_nullable_to_non_nullable
as String?,
2023-07-05 23:53:08 -04:00
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidAppMessageImpl implements VeilidAppMessage {
const _$VeilidAppMessageImpl(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() required this.message,
2024-02-16 11:19:26 -05:00
this.sender,
2024-03-08 00:17:38 -05:00
this.routeId,
2024-02-16 11:19:26 -05:00
final String? $type})
: $type = $type ?? 'AppMessage';
2024-03-01 11:38:03 -05:00
factory _$VeilidAppMessageImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidAppMessageImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray()
2023-07-05 23:53:08 -04:00
final Uint8List message;
2023-08-02 21:09:47 -04:00
@override
final Typed<FixedEncodedString43>? sender;
2024-03-08 00:17:38 -05:00
@override
final String? routeId;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
2024-03-08 00:17:38 -05:00
return 'VeilidUpdate.appMessage(message: $message, sender: $sender, routeId: $routeId)';
2023-07-05 23:53:08 -04:00
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidAppMessageImpl &&
2023-08-02 21:09:47 -04:00
const DeepCollectionEquality().equals(other.message, message) &&
2024-03-08 00:17:38 -05:00
(identical(other.sender, sender) || other.sender == sender) &&
(identical(other.routeId, routeId) || other.routeId == routeId));
2023-07-05 23:53:08 -04:00
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
2024-03-08 00:17:38 -05:00
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(message), sender, routeId);
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidAppMessageImplCopyWith<_$VeilidAppMessageImpl> get copyWith =>
__$$VeilidAppMessageImplCopyWithImpl<_$VeilidAppMessageImpl>(
this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-03-08 00:17:38 -05:00
return appMessage(message, sender, routeId);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-03-08 00:17:38 -05:00
return appMessage?.call(message, sender, routeId);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (appMessage != null) {
2024-03-08 00:17:38 -05:00
return appMessage(message, sender, routeId);
2023-07-05 23:53:08 -04:00
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return appMessage(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return appMessage?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (appMessage != null) {
return appMessage(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidAppMessageImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidAppMessage implements VeilidUpdate {
const factory VeilidAppMessage(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() required final Uint8List message,
2024-03-08 00:17:38 -05:00
final Typed<FixedEncodedString43>? sender,
final String? routeId}) = _$VeilidAppMessageImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidAppMessage.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidAppMessageImpl.fromJson;
2024-02-16 11:19:26 -05:00
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray()
2023-07-05 23:53:08 -04:00
Uint8List get message;
2023-08-02 21:09:47 -04:00
Typed<FixedEncodedString43>? get sender;
2024-03-08 00:17:38 -05:00
String? get routeId;
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidAppMessageImplCopyWith<_$VeilidAppMessageImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidAppCallImplCopyWith<$Res> {
factory _$$VeilidAppCallImplCopyWith(
_$VeilidAppCallImpl value, $Res Function(_$VeilidAppCallImpl) then) =
__$$VeilidAppCallImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2023-08-02 21:09:47 -04:00
String callId,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender,
String? routeId});
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidAppCallImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidAppCallImpl>
implements _$$VeilidAppCallImplCopyWith<$Res> {
__$$VeilidAppCallImplCopyWithImpl(
_$VeilidAppCallImpl _value, $Res Function(_$VeilidAppCallImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? message = null,
Object? callId = null,
2023-08-02 21:09:47 -04:00
Object? sender = freezed,
2024-03-08 00:17:38 -05:00
Object? routeId = freezed,
2023-07-05 23:53:08 -04:00
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidAppCallImpl(
2023-07-05 23:53:08 -04:00
message: null == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as Uint8List,
callId: null == callId
? _value.callId
: callId // ignore: cast_nullable_to_non_nullable
as String,
2023-08-02 21:09:47 -04:00
sender: freezed == sender
? _value.sender
: sender // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>?,
2024-03-08 00:17:38 -05:00
routeId: freezed == routeId
? _value.routeId
: routeId // ignore: cast_nullable_to_non_nullable
as String?,
2023-07-05 23:53:08 -04:00
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidAppCallImpl implements VeilidAppCall {
const _$VeilidAppCallImpl(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() required this.message,
2023-07-05 23:53:08 -04:00
required this.callId,
2024-02-16 11:19:26 -05:00
this.sender,
2024-03-08 00:17:38 -05:00
this.routeId,
2024-02-16 11:19:26 -05:00
final String? $type})
: $type = $type ?? 'AppCall';
2024-03-01 11:38:03 -05:00
factory _$VeilidAppCallImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidAppCallImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray()
2023-07-05 23:53:08 -04:00
final Uint8List message;
@override
final String callId;
2023-08-02 21:09:47 -04:00
@override
final Typed<FixedEncodedString43>? sender;
2024-03-08 00:17:38 -05:00
@override
final String? routeId;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
2024-03-08 00:17:38 -05:00
return 'VeilidUpdate.appCall(message: $message, callId: $callId, sender: $sender, routeId: $routeId)';
2023-07-05 23:53:08 -04:00
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidAppCallImpl &&
2023-07-05 23:53:08 -04:00
const DeepCollectionEquality().equals(other.message, message) &&
2023-08-02 21:09:47 -04:00
(identical(other.callId, callId) || other.callId == callId) &&
2024-03-08 00:17:38 -05:00
(identical(other.sender, sender) || other.sender == sender) &&
(identical(other.routeId, routeId) || other.routeId == routeId));
2023-07-05 23:53:08 -04:00
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
2023-08-02 21:09:47 -04:00
int get hashCode => Object.hash(runtimeType,
2024-03-08 00:17:38 -05:00
const DeepCollectionEquality().hash(message), callId, sender, routeId);
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidAppCallImplCopyWith<_$VeilidAppCallImpl> get copyWith =>
__$$VeilidAppCallImplCopyWithImpl<_$VeilidAppCallImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-03-08 00:17:38 -05:00
return appCall(message, callId, sender, routeId);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-03-08 00:17:38 -05:00
return appCall?.call(message, callId, sender, routeId);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (appCall != null) {
2024-03-08 00:17:38 -05:00
return appCall(message, callId, sender, routeId);
2023-07-05 23:53:08 -04:00
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return appCall(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return appCall?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (appCall != null) {
return appCall(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidAppCallImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidAppCall implements VeilidUpdate {
const factory VeilidAppCall(
2024-03-17 10:54:37 -04:00
{@Uint8ListJsonConverter.jsIsArray() required final Uint8List message,
2023-08-02 21:09:47 -04:00
required final String callId,
2024-03-08 00:17:38 -05:00
final Typed<FixedEncodedString43>? sender,
final String? routeId}) = _$VeilidAppCallImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidAppCall.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidAppCallImpl.fromJson;
2024-02-16 11:19:26 -05:00
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray()
2023-07-05 23:53:08 -04:00
Uint8List get message;
String get callId;
2023-08-02 21:09:47 -04:00
Typed<FixedEncodedString43>? get sender;
2024-03-08 00:17:38 -05:00
String? get routeId;
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidAppCallImplCopyWith<_$VeilidAppCallImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidUpdateAttachmentImplCopyWith<$Res> {
factory _$$VeilidUpdateAttachmentImplCopyWith(
_$VeilidUpdateAttachmentImpl value,
$Res Function(_$VeilidUpdateAttachmentImpl) then) =
__$$VeilidUpdateAttachmentImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call(
{AttachmentState state,
bool publicInternetReady,
bool localNetworkReady});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidUpdateAttachmentImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidUpdateAttachmentImpl>
implements _$$VeilidUpdateAttachmentImplCopyWith<$Res> {
__$$VeilidUpdateAttachmentImplCopyWithImpl(
_$VeilidUpdateAttachmentImpl _value,
$Res Function(_$VeilidUpdateAttachmentImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? state = null,
Object? publicInternetReady = null,
Object? localNetworkReady = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidUpdateAttachmentImpl(
2023-07-05 23:53:08 -04:00
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as AttachmentState,
publicInternetReady: null == publicInternetReady
? _value.publicInternetReady
: publicInternetReady // ignore: cast_nullable_to_non_nullable
as bool,
localNetworkReady: null == localNetworkReady
? _value.localNetworkReady
: localNetworkReady // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidUpdateAttachmentImpl implements VeilidUpdateAttachment {
const _$VeilidUpdateAttachmentImpl(
2023-07-05 23:53:08 -04:00
{required this.state,
required this.publicInternetReady,
2024-02-16 11:19:26 -05:00
required this.localNetworkReady,
final String? $type})
: $type = $type ?? 'Attachment';
2024-03-01 11:38:03 -05:00
factory _$VeilidUpdateAttachmentImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidUpdateAttachmentImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final AttachmentState state;
@override
final bool publicInternetReady;
@override
final bool localNetworkReady;
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
return 'VeilidUpdate.attachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidUpdateAttachmentImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.state, state) || other.state == state) &&
(identical(other.publicInternetReady, publicInternetReady) ||
other.publicInternetReady == publicInternetReady) &&
(identical(other.localNetworkReady, localNetworkReady) ||
other.localNetworkReady == localNetworkReady));
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode =>
Object.hash(runtimeType, state, publicInternetReady, localNetworkReady);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateAttachmentImplCopyWith<_$VeilidUpdateAttachmentImpl>
get copyWith => __$$VeilidUpdateAttachmentImplCopyWithImpl<
_$VeilidUpdateAttachmentImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return attachment(state, publicInternetReady, localNetworkReady);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return attachment?.call(state, publicInternetReady, localNetworkReady);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (attachment != null) {
return attachment(state, publicInternetReady, localNetworkReady);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return attachment(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return attachment?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (attachment != null) {
return attachment(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidUpdateAttachmentImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidUpdateAttachment implements VeilidUpdate {
const factory VeilidUpdateAttachment(
{required final AttachmentState state,
required final bool publicInternetReady,
2024-03-01 11:38:03 -05:00
required final bool localNetworkReady}) = _$VeilidUpdateAttachmentImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidUpdateAttachment.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateAttachmentImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
AttachmentState get state;
bool get publicInternetReady;
bool get localNetworkReady;
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateAttachmentImplCopyWith<_$VeilidUpdateAttachmentImpl>
get copyWith => throw _privateConstructorUsedError;
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidUpdateNetworkImplCopyWith<$Res> {
factory _$$VeilidUpdateNetworkImplCopyWith(_$VeilidUpdateNetworkImpl value,
$Res Function(_$VeilidUpdateNetworkImpl) then) =
__$$VeilidUpdateNetworkImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call(
{bool started, BigInt bpsDown, BigInt bpsUp, List<PeerTableData> peers});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidUpdateNetworkImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidUpdateNetworkImpl>
implements _$$VeilidUpdateNetworkImplCopyWith<$Res> {
__$$VeilidUpdateNetworkImplCopyWithImpl(_$VeilidUpdateNetworkImpl _value,
$Res Function(_$VeilidUpdateNetworkImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? started = null,
Object? bpsDown = null,
Object? bpsUp = null,
Object? peers = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidUpdateNetworkImpl(
2023-07-05 23:53:08 -04:00
started: null == started
? _value.started
: started // ignore: cast_nullable_to_non_nullable
as bool,
bpsDown: null == bpsDown
? _value.bpsDown
: bpsDown // ignore: cast_nullable_to_non_nullable
as BigInt,
bpsUp: null == bpsUp
? _value.bpsUp
: bpsUp // ignore: cast_nullable_to_non_nullable
as BigInt,
peers: null == peers
? _value._peers
: peers // ignore: cast_nullable_to_non_nullable
as List<PeerTableData>,
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidUpdateNetworkImpl implements VeilidUpdateNetwork {
const _$VeilidUpdateNetworkImpl(
2023-07-05 23:53:08 -04:00
{required this.started,
required this.bpsDown,
required this.bpsUp,
2024-02-16 11:19:26 -05:00
required final List<PeerTableData> peers,
final String? $type})
: _peers = peers,
$type = $type ?? 'Network';
2024-03-01 11:38:03 -05:00
factory _$VeilidUpdateNetworkImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidUpdateNetworkImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final bool started;
@override
final BigInt bpsDown;
@override
final BigInt bpsUp;
final List<PeerTableData> _peers;
@override
List<PeerTableData> get peers {
if (_peers is EqualUnmodifiableListView) return _peers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_peers);
}
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
return 'VeilidUpdate.network(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidUpdateNetworkImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.started, started) || other.started == started) &&
(identical(other.bpsDown, bpsDown) || other.bpsDown == bpsDown) &&
(identical(other.bpsUp, bpsUp) || other.bpsUp == bpsUp) &&
const DeepCollectionEquality().equals(other._peers, _peers));
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode => Object.hash(runtimeType, started, bpsDown, bpsUp,
const DeepCollectionEquality().hash(_peers));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateNetworkImplCopyWith<_$VeilidUpdateNetworkImpl> get copyWith =>
__$$VeilidUpdateNetworkImplCopyWithImpl<_$VeilidUpdateNetworkImpl>(
2023-07-05 23:53:08 -04:00
this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return network(started, bpsDown, bpsUp, peers);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return network?.call(started, bpsDown, bpsUp, peers);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (network != null) {
return network(started, bpsDown, bpsUp, peers);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return network(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return network?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (network != null) {
return network(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidUpdateNetworkImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidUpdateNetwork implements VeilidUpdate {
const factory VeilidUpdateNetwork(
{required final bool started,
required final BigInt bpsDown,
required final BigInt bpsUp,
2024-03-01 11:38:03 -05:00
required final List<PeerTableData> peers}) = _$VeilidUpdateNetworkImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidUpdateNetwork.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateNetworkImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
bool get started;
BigInt get bpsDown;
BigInt get bpsUp;
List<PeerTableData> get peers;
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateNetworkImplCopyWith<_$VeilidUpdateNetworkImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidUpdateConfigImplCopyWith<$Res> {
factory _$$VeilidUpdateConfigImplCopyWith(_$VeilidUpdateConfigImpl value,
$Res Function(_$VeilidUpdateConfigImpl) then) =
__$$VeilidUpdateConfigImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call({VeilidConfig config});
$VeilidConfigCopyWith<$Res> get config;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidUpdateConfigImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidUpdateConfigImpl>
implements _$$VeilidUpdateConfigImplCopyWith<$Res> {
__$$VeilidUpdateConfigImplCopyWithImpl(_$VeilidUpdateConfigImpl _value,
$Res Function(_$VeilidUpdateConfigImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? config = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidUpdateConfigImpl(
2023-07-05 23:53:08 -04:00
config: null == config
? _value.config
: config // ignore: cast_nullable_to_non_nullable
as VeilidConfig,
));
}
@override
@pragma('vm:prefer-inline')
$VeilidConfigCopyWith<$Res> get config {
return $VeilidConfigCopyWith<$Res>(_value.config, (value) {
return _then(_value.copyWith(config: value));
});
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidUpdateConfigImpl implements VeilidUpdateConfig {
const _$VeilidUpdateConfigImpl({required this.config, final String? $type})
2024-02-16 11:19:26 -05:00
: $type = $type ?? 'Config';
2024-03-01 11:38:03 -05:00
factory _$VeilidUpdateConfigImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidUpdateConfigImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final VeilidConfig config;
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
return 'VeilidUpdate.config(config: $config)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidUpdateConfigImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.config, config) || other.config == config));
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode => Object.hash(runtimeType, config);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateConfigImplCopyWith<_$VeilidUpdateConfigImpl> get copyWith =>
__$$VeilidUpdateConfigImplCopyWithImpl<_$VeilidUpdateConfigImpl>(
2023-07-05 23:53:08 -04:00
this, _$identity);
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return config(this.config);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return config?.call(this.config);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (config != null) {
return config(this.config);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return config(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return config?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (config != null) {
return config(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidUpdateConfigImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidUpdateConfig implements VeilidUpdate {
const factory VeilidUpdateConfig({required final VeilidConfig config}) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateConfigImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidUpdateConfig.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateConfigImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
VeilidConfig get config;
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateConfigImplCopyWith<_$VeilidUpdateConfigImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidUpdateRouteChangeImplCopyWith<$Res> {
factory _$$VeilidUpdateRouteChangeImplCopyWith(
_$VeilidUpdateRouteChangeImpl value,
$Res Function(_$VeilidUpdateRouteChangeImpl) then) =
__$$VeilidUpdateRouteChangeImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call({List<String> deadRoutes, List<String> deadRemoteRoutes});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidUpdateRouteChangeImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidUpdateRouteChangeImpl>
implements _$$VeilidUpdateRouteChangeImplCopyWith<$Res> {
__$$VeilidUpdateRouteChangeImplCopyWithImpl(
_$VeilidUpdateRouteChangeImpl _value,
$Res Function(_$VeilidUpdateRouteChangeImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? deadRoutes = null,
Object? deadRemoteRoutes = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidUpdateRouteChangeImpl(
2023-07-05 23:53:08 -04:00
deadRoutes: null == deadRoutes
? _value._deadRoutes
: deadRoutes // ignore: cast_nullable_to_non_nullable
as List<String>,
deadRemoteRoutes: null == deadRemoteRoutes
? _value._deadRemoteRoutes
: deadRemoteRoutes // ignore: cast_nullable_to_non_nullable
as List<String>,
));
}
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidUpdateRouteChangeImpl implements VeilidUpdateRouteChange {
const _$VeilidUpdateRouteChangeImpl(
2023-07-05 23:53:08 -04:00
{required final List<String> deadRoutes,
2024-02-16 11:19:26 -05:00
required final List<String> deadRemoteRoutes,
final String? $type})
2023-07-05 23:53:08 -04:00
: _deadRoutes = deadRoutes,
2024-02-16 11:19:26 -05:00
_deadRemoteRoutes = deadRemoteRoutes,
$type = $type ?? 'RouteChange';
2024-03-01 11:38:03 -05:00
factory _$VeilidUpdateRouteChangeImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidUpdateRouteChangeImplFromJson(json);
2023-07-05 23:53:08 -04:00
final List<String> _deadRoutes;
@override
List<String> get deadRoutes {
if (_deadRoutes is EqualUnmodifiableListView) return _deadRoutes;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_deadRoutes);
}
final List<String> _deadRemoteRoutes;
@override
List<String> get deadRemoteRoutes {
if (_deadRemoteRoutes is EqualUnmodifiableListView)
return _deadRemoteRoutes;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_deadRemoteRoutes);
}
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
return 'VeilidUpdate.routeChange(deadRoutes: $deadRoutes, deadRemoteRoutes: $deadRemoteRoutes)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidUpdateRouteChangeImpl &&
2023-07-05 23:53:08 -04:00
const DeepCollectionEquality()
.equals(other._deadRoutes, _deadRoutes) &&
const DeepCollectionEquality()
.equals(other._deadRemoteRoutes, _deadRemoteRoutes));
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_deadRoutes),
const DeepCollectionEquality().hash(_deadRemoteRoutes));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateRouteChangeImplCopyWith<_$VeilidUpdateRouteChangeImpl>
get copyWith => __$$VeilidUpdateRouteChangeImplCopyWithImpl<
_$VeilidUpdateRouteChangeImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return routeChange(deadRoutes, deadRemoteRoutes);
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
return routeChange?.call(deadRoutes, deadRemoteRoutes);
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (routeChange != null) {
return routeChange(deadRoutes, deadRemoteRoutes);
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return routeChange(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return routeChange?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (routeChange != null) {
return routeChange(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidUpdateRouteChangeImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidUpdateRouteChange implements VeilidUpdate {
const factory VeilidUpdateRouteChange(
{required final List<String> deadRoutes,
required final List<String> deadRemoteRoutes}) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateRouteChangeImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidUpdateRouteChange.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateRouteChangeImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
List<String> get deadRoutes;
List<String> get deadRemoteRoutes;
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateRouteChangeImplCopyWith<_$VeilidUpdateRouteChangeImpl>
get copyWith => throw _privateConstructorUsedError;
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidUpdateValueChangeImplCopyWith<$Res> {
factory _$$VeilidUpdateValueChangeImplCopyWith(
_$VeilidUpdateValueChangeImpl value,
$Res Function(_$VeilidUpdateValueChangeImpl) then) =
__$$VeilidUpdateValueChangeImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@useResult
$Res call(
{Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys,
int count,
ValueData? value});
2023-07-06 11:41:38 -04:00
$ValueDataCopyWith<$Res>? get value;
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidUpdateValueChangeImplCopyWithImpl<$Res>
extends _$VeilidUpdateCopyWithImpl<$Res, _$VeilidUpdateValueChangeImpl>
implements _$$VeilidUpdateValueChangeImplCopyWith<$Res> {
__$$VeilidUpdateValueChangeImplCopyWithImpl(
_$VeilidUpdateValueChangeImpl _value,
$Res Function(_$VeilidUpdateValueChangeImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? key = null,
Object? subkeys = null,
Object? count = null,
Object? value = freezed,
2023-07-05 23:53:08 -04:00
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidUpdateValueChangeImpl(
2023-07-05 23:53:08 -04:00
key: null == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
as Typed<FixedEncodedString43>,
subkeys: null == subkeys
? _value._subkeys
: subkeys // ignore: cast_nullable_to_non_nullable
as List<ValueSubkeyRange>,
count: null == count
? _value.count
: count // ignore: cast_nullable_to_non_nullable
as int,
value: freezed == value
2024-02-27 20:30:37 -05:00
? _value.value
: value // ignore: cast_nullable_to_non_nullable
as ValueData?,
2023-07-05 23:53:08 -04:00
));
}
2023-07-06 11:41:38 -04:00
@override
@pragma('vm:prefer-inline')
$ValueDataCopyWith<$Res>? get value {
if (_value.value == null) {
return null;
}
return $ValueDataCopyWith<$Res>(_value.value!, (value) {
2024-02-27 20:30:37 -05:00
return _then(_value.copyWith(value: value));
2023-07-06 11:41:38 -04:00
});
}
2023-07-05 23:53:08 -04:00
}
/// @nodoc
2024-02-16 11:19:26 -05:00
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidUpdateValueChangeImpl implements VeilidUpdateValueChange {
const _$VeilidUpdateValueChangeImpl(
2023-07-05 23:53:08 -04:00
{required this.key,
required final List<ValueSubkeyRange> subkeys,
required this.count,
2024-02-27 20:30:37 -05:00
required this.value,
2024-02-16 11:19:26 -05:00
final String? $type})
: _subkeys = subkeys,
$type = $type ?? 'ValueChange';
2024-03-01 11:38:03 -05:00
factory _$VeilidUpdateValueChangeImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidUpdateValueChangeImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final Typed<FixedEncodedString43> key;
final List<ValueSubkeyRange> _subkeys;
@override
List<ValueSubkeyRange> get subkeys {
if (_subkeys is EqualUnmodifiableListView) return _subkeys;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_subkeys);
}
@override
final int count;
@override
final ValueData? value;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
@JsonKey(name: 'kind')
final String $type;
2023-07-05 23:53:08 -04:00
@override
String toString() {
2024-02-27 20:30:37 -05:00
return 'VeilidUpdate.valueChange(key: $key, subkeys: $subkeys, count: $count, value: $value)';
2023-07-05 23:53:08 -04:00
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidUpdateValueChangeImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.key, key) || other.key == key) &&
const DeepCollectionEquality().equals(other._subkeys, _subkeys) &&
(identical(other.count, count) || other.count == count) &&
2024-02-27 20:30:37 -05:00
(identical(other.value, value) || other.value == value));
2023-07-05 23:53:08 -04:00
}
2024-02-16 11:19:26 -05:00
@JsonKey(ignore: true)
2023-07-05 23:53:08 -04:00
@override
int get hashCode => Object.hash(runtimeType, key,
2024-02-27 20:30:37 -05:00
const DeepCollectionEquality().hash(_subkeys), count, value);
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateValueChangeImplCopyWith<_$VeilidUpdateValueChangeImpl>
get copyWith => __$$VeilidUpdateValueChangeImplCopyWithImpl<
_$VeilidUpdateValueChangeImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
@optionalTypeArgs
TResult when<TResult extends Object?>({
required TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)
log,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
required TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)
2023-07-05 23:53:08 -04:00
appCall,
required TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)
attachment,
required TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)
network,
required TResult Function(VeilidConfig config) config,
required TResult Function(
List<String> deadRoutes, List<String> deadRemoteRoutes)
routeChange,
required TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-02-27 20:30:37 -05:00
return valueChange(key, subkeys, count, value);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
TResult? Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-08 00:17:38 -05:00
TResult? Function(
2024-03-17 10:54:37 -04:00
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult? Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult? Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult? Function(VeilidConfig config)? config,
TResult? Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult? Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
}) {
2024-02-27 20:30:37 -05:00
return valueChange?.call(key, subkeys, count, value);
2023-07-05 23:53:08 -04:00
}
@override
@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
TResult Function(
VeilidLogLevel logLevel, String message, String? backtrace)?
log,
2024-03-17 10:54:37 -04:00
TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message,
2024-03-08 00:17:38 -05:00
Typed<FixedEncodedString43>? sender, String? routeId)?
2023-07-05 23:53:08 -04:00
appMessage,
2024-03-17 10:54:37 -04:00
TResult Function(
@Uint8ListJsonConverter.jsIsArray() Uint8List message,
String callId,
Typed<FixedEncodedString43>? sender,
String? routeId)?
2023-07-05 23:53:08 -04:00
appCall,
TResult Function(AttachmentState state, bool publicInternetReady,
bool localNetworkReady)?
attachment,
TResult Function(bool started, BigInt bpsDown, BigInt bpsUp,
List<PeerTableData> peers)?
network,
TResult Function(VeilidConfig config)? config,
TResult Function(List<String> deadRoutes, List<String> deadRemoteRoutes)?
routeChange,
TResult Function(Typed<FixedEncodedString43> key,
List<ValueSubkeyRange> subkeys, int count, ValueData? value)?
2023-07-05 23:53:08 -04:00
valueChange,
required TResult orElse(),
}) {
if (valueChange != null) {
2024-02-27 20:30:37 -05:00
return valueChange(key, subkeys, count, value);
2023-07-05 23:53:08 -04:00
}
return orElse();
}
@override
@optionalTypeArgs
TResult map<TResult extends Object?>({
required TResult Function(VeilidLog value) log,
required TResult Function(VeilidAppMessage value) appMessage,
required TResult Function(VeilidAppCall value) appCall,
required TResult Function(VeilidUpdateAttachment value) attachment,
required TResult Function(VeilidUpdateNetwork value) network,
required TResult Function(VeilidUpdateConfig value) config,
required TResult Function(VeilidUpdateRouteChange value) routeChange,
required TResult Function(VeilidUpdateValueChange value) valueChange,
}) {
return valueChange(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull<TResult extends Object?>({
TResult? Function(VeilidLog value)? log,
TResult? Function(VeilidAppMessage value)? appMessage,
TResult? Function(VeilidAppCall value)? appCall,
TResult? Function(VeilidUpdateAttachment value)? attachment,
TResult? Function(VeilidUpdateNetwork value)? network,
TResult? Function(VeilidUpdateConfig value)? config,
TResult? Function(VeilidUpdateRouteChange value)? routeChange,
TResult? Function(VeilidUpdateValueChange value)? valueChange,
}) {
return valueChange?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap<TResult extends Object?>({
TResult Function(VeilidLog value)? log,
TResult Function(VeilidAppMessage value)? appMessage,
TResult Function(VeilidAppCall value)? appCall,
TResult Function(VeilidUpdateAttachment value)? attachment,
TResult Function(VeilidUpdateNetwork value)? network,
TResult Function(VeilidUpdateConfig value)? config,
TResult Function(VeilidUpdateRouteChange value)? routeChange,
TResult Function(VeilidUpdateValueChange value)? valueChange,
required TResult orElse(),
}) {
if (valueChange != null) {
return valueChange(this);
}
return orElse();
}
2024-02-16 11:19:26 -05:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidUpdateValueChangeImplToJson(
2024-02-16 11:19:26 -05:00
this,
);
}
2023-07-05 23:53:08 -04:00
}
abstract class VeilidUpdateValueChange implements VeilidUpdate {
const factory VeilidUpdateValueChange(
{required final Typed<FixedEncodedString43> key,
required final List<ValueSubkeyRange> subkeys,
required final int count,
required final ValueData? value}) = _$VeilidUpdateValueChangeImpl;
2023-07-05 23:53:08 -04:00
2024-02-16 11:19:26 -05:00
factory VeilidUpdateValueChange.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidUpdateValueChangeImpl.fromJson;
2024-02-16 11:19:26 -05:00
2023-07-05 23:53:08 -04:00
Typed<FixedEncodedString43> get key;
List<ValueSubkeyRange> get subkeys;
int get count;
ValueData? get value;
2023-07-05 23:53:08 -04:00
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidUpdateValueChangeImplCopyWith<_$VeilidUpdateValueChangeImpl>
get copyWith => throw _privateConstructorUsedError;
2023-07-05 23:53:08 -04:00
}
VeilidStateAttachment _$VeilidStateAttachmentFromJson(
Map<String, dynamic> json) {
return _VeilidStateAttachment.fromJson(json);
}
/// @nodoc
mixin _$VeilidStateAttachment {
AttachmentState get state => throw _privateConstructorUsedError;
bool get publicInternetReady => throw _privateConstructorUsedError;
bool get localNetworkReady => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$VeilidStateAttachmentCopyWith<VeilidStateAttachment> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VeilidStateAttachmentCopyWith<$Res> {
factory $VeilidStateAttachmentCopyWith(VeilidStateAttachment value,
$Res Function(VeilidStateAttachment) then) =
_$VeilidStateAttachmentCopyWithImpl<$Res, VeilidStateAttachment>;
@useResult
$Res call(
{AttachmentState state,
bool publicInternetReady,
bool localNetworkReady});
}
/// @nodoc
class _$VeilidStateAttachmentCopyWithImpl<$Res,
$Val extends VeilidStateAttachment>
implements $VeilidStateAttachmentCopyWith<$Res> {
_$VeilidStateAttachmentCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? state = null,
Object? publicInternetReady = null,
Object? localNetworkReady = null,
}) {
return _then(_value.copyWith(
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as AttachmentState,
publicInternetReady: null == publicInternetReady
? _value.publicInternetReady
: publicInternetReady // ignore: cast_nullable_to_non_nullable
as bool,
localNetworkReady: null == localNetworkReady
? _value.localNetworkReady
: localNetworkReady // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidStateAttachmentImplCopyWith<$Res>
2023-07-05 23:53:08 -04:00
implements $VeilidStateAttachmentCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$VeilidStateAttachmentImplCopyWith(
_$VeilidStateAttachmentImpl value,
$Res Function(_$VeilidStateAttachmentImpl) then) =
__$$VeilidStateAttachmentImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@override
@useResult
$Res call(
{AttachmentState state,
bool publicInternetReady,
bool localNetworkReady});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidStateAttachmentImplCopyWithImpl<$Res>
extends _$VeilidStateAttachmentCopyWithImpl<$Res,
_$VeilidStateAttachmentImpl>
implements _$$VeilidStateAttachmentImplCopyWith<$Res> {
__$$VeilidStateAttachmentImplCopyWithImpl(_$VeilidStateAttachmentImpl _value,
$Res Function(_$VeilidStateAttachmentImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? state = null,
Object? publicInternetReady = null,
Object? localNetworkReady = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidStateAttachmentImpl(
2023-07-05 23:53:08 -04:00
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as AttachmentState,
publicInternetReady: null == publicInternetReady
? _value.publicInternetReady
: publicInternetReady // ignore: cast_nullable_to_non_nullable
as bool,
localNetworkReady: null == localNetworkReady
? _value.localNetworkReady
: localNetworkReady // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidStateAttachmentImpl implements _VeilidStateAttachment {
const _$VeilidStateAttachmentImpl(
2023-07-05 23:53:08 -04:00
{required this.state,
required this.publicInternetReady,
required this.localNetworkReady});
2024-03-01 11:38:03 -05:00
factory _$VeilidStateAttachmentImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidStateAttachmentImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final AttachmentState state;
@override
final bool publicInternetReady;
@override
final bool localNetworkReady;
@override
String toString() {
return 'VeilidStateAttachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidStateAttachmentImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.state, state) || other.state == state) &&
(identical(other.publicInternetReady, publicInternetReady) ||
other.publicInternetReady == publicInternetReady) &&
(identical(other.localNetworkReady, localNetworkReady) ||
other.localNetworkReady == localNetworkReady));
}
@JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, state, publicInternetReady, localNetworkReady);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidStateAttachmentImplCopyWith<_$VeilidStateAttachmentImpl>
get copyWith => __$$VeilidStateAttachmentImplCopyWithImpl<
_$VeilidStateAttachmentImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidStateAttachmentImplToJson(
2023-07-05 23:53:08 -04:00
this,
);
}
}
abstract class _VeilidStateAttachment implements VeilidStateAttachment {
const factory _VeilidStateAttachment(
{required final AttachmentState state,
required final bool publicInternetReady,
2024-03-01 11:38:03 -05:00
required final bool localNetworkReady}) = _$VeilidStateAttachmentImpl;
2023-07-05 23:53:08 -04:00
factory _VeilidStateAttachment.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidStateAttachmentImpl.fromJson;
2023-07-05 23:53:08 -04:00
@override
AttachmentState get state;
@override
bool get publicInternetReady;
@override
bool get localNetworkReady;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidStateAttachmentImplCopyWith<_$VeilidStateAttachmentImpl>
get copyWith => throw _privateConstructorUsedError;
2023-07-05 23:53:08 -04:00
}
VeilidStateNetwork _$VeilidStateNetworkFromJson(Map<String, dynamic> json) {
return _VeilidStateNetwork.fromJson(json);
}
/// @nodoc
mixin _$VeilidStateNetwork {
bool get started => throw _privateConstructorUsedError;
BigInt get bpsDown => throw _privateConstructorUsedError;
BigInt get bpsUp => throw _privateConstructorUsedError;
List<PeerTableData> get peers => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$VeilidStateNetworkCopyWith<VeilidStateNetwork> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VeilidStateNetworkCopyWith<$Res> {
factory $VeilidStateNetworkCopyWith(
VeilidStateNetwork value, $Res Function(VeilidStateNetwork) then) =
_$VeilidStateNetworkCopyWithImpl<$Res, VeilidStateNetwork>;
@useResult
$Res call(
{bool started, BigInt bpsDown, BigInt bpsUp, List<PeerTableData> peers});
}
/// @nodoc
class _$VeilidStateNetworkCopyWithImpl<$Res, $Val extends VeilidStateNetwork>
implements $VeilidStateNetworkCopyWith<$Res> {
_$VeilidStateNetworkCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? started = null,
Object? bpsDown = null,
Object? bpsUp = null,
Object? peers = null,
}) {
return _then(_value.copyWith(
started: null == started
? _value.started
: started // ignore: cast_nullable_to_non_nullable
as bool,
bpsDown: null == bpsDown
? _value.bpsDown
: bpsDown // ignore: cast_nullable_to_non_nullable
as BigInt,
bpsUp: null == bpsUp
? _value.bpsUp
: bpsUp // ignore: cast_nullable_to_non_nullable
as BigInt,
peers: null == peers
? _value.peers
: peers // ignore: cast_nullable_to_non_nullable
as List<PeerTableData>,
) as $Val);
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidStateNetworkImplCopyWith<$Res>
2023-07-05 23:53:08 -04:00
implements $VeilidStateNetworkCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$VeilidStateNetworkImplCopyWith(_$VeilidStateNetworkImpl value,
$Res Function(_$VeilidStateNetworkImpl) then) =
__$$VeilidStateNetworkImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@override
@useResult
$Res call(
{bool started, BigInt bpsDown, BigInt bpsUp, List<PeerTableData> peers});
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidStateNetworkImplCopyWithImpl<$Res>
extends _$VeilidStateNetworkCopyWithImpl<$Res, _$VeilidStateNetworkImpl>
implements _$$VeilidStateNetworkImplCopyWith<$Res> {
__$$VeilidStateNetworkImplCopyWithImpl(_$VeilidStateNetworkImpl _value,
$Res Function(_$VeilidStateNetworkImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? started = null,
Object? bpsDown = null,
Object? bpsUp = null,
Object? peers = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidStateNetworkImpl(
2023-07-05 23:53:08 -04:00
started: null == started
? _value.started
: started // ignore: cast_nullable_to_non_nullable
as bool,
bpsDown: null == bpsDown
? _value.bpsDown
: bpsDown // ignore: cast_nullable_to_non_nullable
as BigInt,
bpsUp: null == bpsUp
? _value.bpsUp
: bpsUp // ignore: cast_nullable_to_non_nullable
as BigInt,
peers: null == peers
? _value._peers
: peers // ignore: cast_nullable_to_non_nullable
as List<PeerTableData>,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidStateNetworkImpl implements _VeilidStateNetwork {
const _$VeilidStateNetworkImpl(
2023-07-05 23:53:08 -04:00
{required this.started,
required this.bpsDown,
required this.bpsUp,
required final List<PeerTableData> peers})
: _peers = peers;
2024-03-01 11:38:03 -05:00
factory _$VeilidStateNetworkImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidStateNetworkImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final bool started;
@override
final BigInt bpsDown;
@override
final BigInt bpsUp;
final List<PeerTableData> _peers;
@override
List<PeerTableData> get peers {
if (_peers is EqualUnmodifiableListView) return _peers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_peers);
}
@override
String toString() {
return 'VeilidStateNetwork(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidStateNetworkImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.started, started) || other.started == started) &&
(identical(other.bpsDown, bpsDown) || other.bpsDown == bpsDown) &&
(identical(other.bpsUp, bpsUp) || other.bpsUp == bpsUp) &&
const DeepCollectionEquality().equals(other._peers, _peers));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, started, bpsDown, bpsUp,
const DeepCollectionEquality().hash(_peers));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidStateNetworkImplCopyWith<_$VeilidStateNetworkImpl> get copyWith =>
__$$VeilidStateNetworkImplCopyWithImpl<_$VeilidStateNetworkImpl>(
2023-07-05 23:53:08 -04:00
this, _$identity);
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidStateNetworkImplToJson(
2023-07-05 23:53:08 -04:00
this,
);
}
}
abstract class _VeilidStateNetwork implements VeilidStateNetwork {
const factory _VeilidStateNetwork(
{required final bool started,
required final BigInt bpsDown,
required final BigInt bpsUp,
2024-03-01 11:38:03 -05:00
required final List<PeerTableData> peers}) = _$VeilidStateNetworkImpl;
2023-07-05 23:53:08 -04:00
factory _VeilidStateNetwork.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidStateNetworkImpl.fromJson;
2023-07-05 23:53:08 -04:00
@override
bool get started;
@override
BigInt get bpsDown;
@override
BigInt get bpsUp;
@override
List<PeerTableData> get peers;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidStateNetworkImplCopyWith<_$VeilidStateNetworkImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
VeilidStateConfig _$VeilidStateConfigFromJson(Map<String, dynamic> json) {
return _VeilidStateConfig.fromJson(json);
}
/// @nodoc
mixin _$VeilidStateConfig {
VeilidConfig get config => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$VeilidStateConfigCopyWith<VeilidStateConfig> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VeilidStateConfigCopyWith<$Res> {
factory $VeilidStateConfigCopyWith(
VeilidStateConfig value, $Res Function(VeilidStateConfig) then) =
_$VeilidStateConfigCopyWithImpl<$Res, VeilidStateConfig>;
@useResult
$Res call({VeilidConfig config});
$VeilidConfigCopyWith<$Res> get config;
}
/// @nodoc
class _$VeilidStateConfigCopyWithImpl<$Res, $Val extends VeilidStateConfig>
implements $VeilidStateConfigCopyWith<$Res> {
_$VeilidStateConfigCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? config = null,
}) {
return _then(_value.copyWith(
config: null == config
? _value.config
: config // ignore: cast_nullable_to_non_nullable
as VeilidConfig,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$VeilidConfigCopyWith<$Res> get config {
return $VeilidConfigCopyWith<$Res>(_value.config, (value) {
return _then(_value.copyWith(config: value) as $Val);
});
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidStateConfigImplCopyWith<$Res>
2023-07-05 23:53:08 -04:00
implements $VeilidStateConfigCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$VeilidStateConfigImplCopyWith(_$VeilidStateConfigImpl value,
$Res Function(_$VeilidStateConfigImpl) then) =
__$$VeilidStateConfigImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@override
@useResult
$Res call({VeilidConfig config});
@override
$VeilidConfigCopyWith<$Res> get config;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidStateConfigImplCopyWithImpl<$Res>
extends _$VeilidStateConfigCopyWithImpl<$Res, _$VeilidStateConfigImpl>
implements _$$VeilidStateConfigImplCopyWith<$Res> {
__$$VeilidStateConfigImplCopyWithImpl(_$VeilidStateConfigImpl _value,
$Res Function(_$VeilidStateConfigImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? config = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidStateConfigImpl(
2023-07-05 23:53:08 -04:00
config: null == config
? _value.config
: config // ignore: cast_nullable_to_non_nullable
as VeilidConfig,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidStateConfigImpl implements _VeilidStateConfig {
const _$VeilidStateConfigImpl({required this.config});
2023-07-05 23:53:08 -04:00
2024-03-01 11:38:03 -05:00
factory _$VeilidStateConfigImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidStateConfigImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final VeilidConfig config;
@override
String toString() {
return 'VeilidStateConfig(config: $config)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidStateConfigImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.config, config) || other.config == config));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, config);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidStateConfigImplCopyWith<_$VeilidStateConfigImpl> get copyWith =>
__$$VeilidStateConfigImplCopyWithImpl<_$VeilidStateConfigImpl>(
2023-07-05 23:53:08 -04:00
this, _$identity);
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidStateConfigImplToJson(
2023-07-05 23:53:08 -04:00
this,
);
}
}
abstract class _VeilidStateConfig implements VeilidStateConfig {
const factory _VeilidStateConfig({required final VeilidConfig config}) =
2024-03-01 11:38:03 -05:00
_$VeilidStateConfigImpl;
2023-07-05 23:53:08 -04:00
factory _VeilidStateConfig.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidStateConfigImpl.fromJson;
2023-07-05 23:53:08 -04:00
@override
VeilidConfig get config;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidStateConfigImplCopyWith<_$VeilidStateConfigImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}
VeilidState _$VeilidStateFromJson(Map<String, dynamic> json) {
return _VeilidState.fromJson(json);
}
/// @nodoc
mixin _$VeilidState {
VeilidStateAttachment get attachment => throw _privateConstructorUsedError;
VeilidStateNetwork get network => throw _privateConstructorUsedError;
VeilidStateConfig get config => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$VeilidStateCopyWith<VeilidState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $VeilidStateCopyWith<$Res> {
factory $VeilidStateCopyWith(
VeilidState value, $Res Function(VeilidState) then) =
_$VeilidStateCopyWithImpl<$Res, VeilidState>;
@useResult
$Res call(
{VeilidStateAttachment attachment,
VeilidStateNetwork network,
VeilidStateConfig config});
$VeilidStateAttachmentCopyWith<$Res> get attachment;
$VeilidStateNetworkCopyWith<$Res> get network;
$VeilidStateConfigCopyWith<$Res> get config;
}
/// @nodoc
class _$VeilidStateCopyWithImpl<$Res, $Val extends VeilidState>
implements $VeilidStateCopyWith<$Res> {
_$VeilidStateCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? attachment = null,
Object? network = null,
Object? config = null,
}) {
return _then(_value.copyWith(
attachment: null == attachment
? _value.attachment
: attachment // ignore: cast_nullable_to_non_nullable
as VeilidStateAttachment,
network: null == network
? _value.network
: network // ignore: cast_nullable_to_non_nullable
as VeilidStateNetwork,
config: null == config
? _value.config
: config // ignore: cast_nullable_to_non_nullable
as VeilidStateConfig,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$VeilidStateAttachmentCopyWith<$Res> get attachment {
return $VeilidStateAttachmentCopyWith<$Res>(_value.attachment, (value) {
return _then(_value.copyWith(attachment: value) as $Val);
});
}
@override
@pragma('vm:prefer-inline')
$VeilidStateNetworkCopyWith<$Res> get network {
return $VeilidStateNetworkCopyWith<$Res>(_value.network, (value) {
return _then(_value.copyWith(network: value) as $Val);
});
}
@override
@pragma('vm:prefer-inline')
$VeilidStateConfigCopyWith<$Res> get config {
return $VeilidStateConfigCopyWith<$Res>(_value.config, (value) {
return _then(_value.copyWith(config: value) as $Val);
});
}
}
/// @nodoc
2024-03-01 11:38:03 -05:00
abstract class _$$VeilidStateImplCopyWith<$Res>
2023-07-05 23:53:08 -04:00
implements $VeilidStateCopyWith<$Res> {
2024-03-01 11:38:03 -05:00
factory _$$VeilidStateImplCopyWith(
_$VeilidStateImpl value, $Res Function(_$VeilidStateImpl) then) =
__$$VeilidStateImplCopyWithImpl<$Res>;
2023-07-05 23:53:08 -04:00
@override
@useResult
$Res call(
{VeilidStateAttachment attachment,
VeilidStateNetwork network,
VeilidStateConfig config});
@override
$VeilidStateAttachmentCopyWith<$Res> get attachment;
@override
$VeilidStateNetworkCopyWith<$Res> get network;
@override
$VeilidStateConfigCopyWith<$Res> get config;
}
/// @nodoc
2024-03-01 11:38:03 -05:00
class __$$VeilidStateImplCopyWithImpl<$Res>
extends _$VeilidStateCopyWithImpl<$Res, _$VeilidStateImpl>
implements _$$VeilidStateImplCopyWith<$Res> {
__$$VeilidStateImplCopyWithImpl(
_$VeilidStateImpl _value, $Res Function(_$VeilidStateImpl) _then)
2023-07-05 23:53:08 -04:00
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? attachment = null,
Object? network = null,
Object? config = null,
}) {
2024-03-01 11:38:03 -05:00
return _then(_$VeilidStateImpl(
2023-07-05 23:53:08 -04:00
attachment: null == attachment
? _value.attachment
: attachment // ignore: cast_nullable_to_non_nullable
as VeilidStateAttachment,
network: null == network
? _value.network
: network // ignore: cast_nullable_to_non_nullable
as VeilidStateNetwork,
config: null == config
? _value.config
: config // ignore: cast_nullable_to_non_nullable
as VeilidStateConfig,
));
}
}
/// @nodoc
@JsonSerializable()
2024-03-01 11:38:03 -05:00
class _$VeilidStateImpl implements _VeilidState {
const _$VeilidStateImpl(
2023-07-05 23:53:08 -04:00
{required this.attachment, required this.network, required this.config});
2024-03-01 11:38:03 -05:00
factory _$VeilidStateImpl.fromJson(Map<String, dynamic> json) =>
_$$VeilidStateImplFromJson(json);
2023-07-05 23:53:08 -04:00
@override
final VeilidStateAttachment attachment;
@override
final VeilidStateNetwork network;
@override
final VeilidStateConfig config;
@override
String toString() {
return 'VeilidState(attachment: $attachment, network: $network, config: $config)';
}
@override
2024-03-01 11:38:03 -05:00
bool operator ==(Object other) {
2023-07-05 23:53:08 -04:00
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2024-03-01 11:38:03 -05:00
other is _$VeilidStateImpl &&
2023-07-05 23:53:08 -04:00
(identical(other.attachment, attachment) ||
other.attachment == attachment) &&
(identical(other.network, network) || other.network == network) &&
(identical(other.config, config) || other.config == config));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, attachment, network, config);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
2024-03-01 11:38:03 -05:00
_$$VeilidStateImplCopyWith<_$VeilidStateImpl> get copyWith =>
__$$VeilidStateImplCopyWithImpl<_$VeilidStateImpl>(this, _$identity);
2023-07-05 23:53:08 -04:00
@override
Map<String, dynamic> toJson() {
2024-03-01 11:38:03 -05:00
return _$$VeilidStateImplToJson(
2023-07-05 23:53:08 -04:00
this,
);
}
}
abstract class _VeilidState implements VeilidState {
const factory _VeilidState(
{required final VeilidStateAttachment attachment,
required final VeilidStateNetwork network,
2024-03-01 11:38:03 -05:00
required final VeilidStateConfig config}) = _$VeilidStateImpl;
2023-07-05 23:53:08 -04:00
factory _VeilidState.fromJson(Map<String, dynamic> json) =
2024-03-01 11:38:03 -05:00
_$VeilidStateImpl.fromJson;
2023-07-05 23:53:08 -04:00
@override
VeilidStateAttachment get attachment;
@override
VeilidStateNetwork get network;
@override
VeilidStateConfig get config;
@override
@JsonKey(ignore: true)
2024-03-01 11:38:03 -05:00
_$$VeilidStateImplCopyWith<_$VeilidStateImpl> get copyWith =>
2023-07-05 23:53:08 -04:00
throw _privateConstructorUsedError;
}