Change 'whitelist' to 'allowlist' globally.

This commit is contained in:
Kyle H 2023-11-23 14:49:45 +00:00 committed by Christien Rioux
parent 7d1b789d38
commit af27b5aa85
21 changed files with 1546 additions and 1462 deletions

View File

@ -46,7 +46,7 @@ core:
max_connections_per_ip6_prefix: 32
max_connections_per_ip6_prefix_size: 56
max_connection_frequency_per_min: 128
client_whitelist_timeout_ms: 300000
client_allowlist_timeout_ms: 300000
reverse_connection_receipt_time_ms: 5000
hole_punch_receipt_time_ms: 5000
network_key_password: null

View File

@ -185,7 +185,7 @@ network:
max_connections_per_ip6_prefix: 32
max_connections_per_ip6_prefix_size: 56
max_connection_frequency_per_min: 128
client_whitelist_timeout_ms: 300000
client_allowlist_timeout_ms: 300000
reverse_connection_receipt_time_ms: 5000
hole_punch_receipt_time_ms: 5000
network_key_password: null

View File

@ -85,7 +85,7 @@ struct NetworkComponents {
}
#[derive(Debug)]
struct ClientWhitelistEntry {
struct ClientAllowlistEntry {
last_seen_ts: Timestamp,
}
@ -136,7 +136,7 @@ enum SendDataToExistingFlowResult {
// The mutable state of the network manager
struct NetworkManagerInner {
stats: NetworkManagerStats,
client_whitelist: LruCache<TypedKey, ClientWhitelistEntry>,
client_allowlist: LruCache<TypedKey, ClientAllowlistEntry>,
node_contact_method_cache: LruCache<NodeContactMethodCacheKey, NodeContactMethod>,
public_address_check_cache:
BTreeMap<PublicAddressCheckCacheKey, LruCache<IpAddr, SocketAddress>>,
@ -175,7 +175,7 @@ impl NetworkManager {
fn new_inner() -> NetworkManagerInner {
NetworkManagerInner {
stats: NetworkManagerStats::default(),
client_whitelist: LruCache::new_unbounded(),
client_allowlist: LruCache::new_unbounded(),
node_contact_method_cache: LruCache::new(NODE_CONTACT_METHOD_CACHE_SIZE),
public_address_check_cache: BTreeMap::new(),
public_address_inconsistencies_table: BTreeMap::new(),
@ -453,14 +453,14 @@ impl NetworkManager {
debug!("finished network manager shutdown");
}
pub fn update_client_whitelist(&self, client: TypedKey) {
pub fn update_client_allowlist(&self, client: TypedKey) {
let mut inner = self.inner.lock();
match inner.client_whitelist.entry(client) {
match inner.client_allowlist.entry(client) {
hashlink::lru_cache::Entry::Occupied(mut entry) => {
entry.get_mut().last_seen_ts = get_aligned_timestamp()
}
hashlink::lru_cache::Entry::Vacant(entry) => {
entry.insert(ClientWhitelistEntry {
entry.insert(ClientAllowlistEntry {
last_seen_ts: get_aligned_timestamp(),
});
}
@ -468,10 +468,10 @@ impl NetworkManager {
}
#[instrument(level = "trace", skip(self), ret)]
pub fn check_client_whitelist(&self, client: TypedKey) -> bool {
pub fn check_client_allowlist(&self, client: TypedKey) -> bool {
let mut inner = self.inner.lock();
match inner.client_whitelist.entry(client) {
match inner.client_allowlist.entry(client) {
hashlink::lru_cache::Entry::Occupied(mut entry) => {
entry.get_mut().last_seen_ts = get_aligned_timestamp();
true
@ -480,20 +480,20 @@ impl NetworkManager {
}
}
pub fn purge_client_whitelist(&self) {
let timeout_ms = self.with_config(|c| c.network.client_whitelist_timeout_ms);
pub fn purge_client_allowlist(&self) {
let timeout_ms = self.with_config(|c| c.network.client_allowlist_timeout_ms);
let mut inner = self.inner.lock();
let cutoff_timestamp =
get_aligned_timestamp() - TimestampDuration::new((timeout_ms as u64) * 1000u64);
// Remove clients from the whitelist that haven't been since since our whitelist timeout
// Remove clients from the allowlist that haven't been since since our allowlist timeout
while inner
.client_whitelist
.client_allowlist
.peek_lru()
.map(|v| v.1.last_seen_ts < cutoff_timestamp)
.unwrap_or_default()
{
let (k, v) = inner.client_whitelist.remove_lru().unwrap();
trace!(key=?k, value=?v, "purge_client_whitelist: remove_lru")
let (k, v) = inner.client_allowlist.remove_lru().unwrap();
trace!(key=?k, value=?v, "purge_client_allowlist: remove_lru")
}
}
@ -998,7 +998,7 @@ impl NetworkManager {
// This is a costly operation, so only outbound-relay permitted
// nodes are allowed to do this, for example PWA users
let some_relay_nr = if self.check_client_whitelist(sender_id) {
let some_relay_nr = if self.check_client_allowlist(sender_id) {
// Full relay allowed, do a full resolve_node
match rpc
.resolve_node(recipient_id, SafetySelection::Unsafe(Sequencing::default()))
@ -1011,7 +1011,7 @@ impl NetworkManager {
}
}
} else {
// If this is not a node in the client whitelist, only allow inbound relay
// If this is not a node in the client allowlist, only allow inbound relay
// which only performs a lightweight lookup before passing the packet back out
// See if we have the node in our routing table

View File

@ -551,9 +551,12 @@ impl Network {
.wrap_err("connect failure")?
}
ProtocolType::WS | ProtocolType::WSS => {
WebsocketProtocolHandler::connect(None, &dial_info, connect_timeout_ms)
.await
.wrap_err("connect failure")?
WebsocketProtocolHandler::connect(
None,
&dial_info,
connect_timeout_ms)
.await
.wrap_err("connect failure")?
}
});

View File

@ -78,8 +78,8 @@ impl NetworkManager {
// Run the receipt manager tick
receipt_manager.tick().await?;
// Purge the client whitelist
self.purge_client_whitelist();
// Purge the client allowlist
self.purge_client_allowlist();
Ok(())
}

View File

@ -185,7 +185,7 @@ pub fn config_callback(key: String) -> ConfigCallbackReturn {
"network.max_connections_per_ip6_prefix" => Ok(Box::new(32u32)),
"network.max_connections_per_ip6_prefix_size" => Ok(Box::new(56u32)),
"network.max_connection_frequency_per_min" => Ok(Box::new(128u32)),
"network.client_whitelist_timeout_ms" => Ok(Box::new(300_000u32)),
"network.client_allowlist_timeout_ms" => Ok(Box::new(300_000u32)),
"network.reverse_connection_receipt_time_ms" => Ok(Box::new(5_000u32)),
"network.hole_punch_receipt_time_ms" => Ok(Box::new(5_000u32)),
"network.network_key_password" => Ok(Box::new(Option::<String>::None)),
@ -320,7 +320,7 @@ pub async fn test_config() {
assert_eq!(inner.network.max_connections_per_ip6_prefix, 32u32);
assert_eq!(inner.network.max_connections_per_ip6_prefix_size, 56u32);
assert_eq!(inner.network.max_connection_frequency_per_min, 128u32);
assert_eq!(inner.network.client_whitelist_timeout_ms, 300_000u32);
assert_eq!(inner.network.client_allowlist_timeout_ms, 300_000u32);
assert_eq!(inner.network.reverse_connection_receipt_time_ms, 5_000u32);
assert_eq!(inner.network.hole_punch_receipt_time_ms, 5_000u32);
assert_eq!(inner.network.network_key_password, Option::<String>::None);

View File

@ -101,7 +101,7 @@ pub fn fix_veilidconfiginner() -> VeilidConfigInner {
max_connections_per_ip6_prefix: 4000,
max_connections_per_ip6_prefix_size: 5000,
max_connection_frequency_per_min: 6000,
client_whitelist_timeout_ms: 7000,
client_allowlist_timeout_ms: 7000,
reverse_connection_receipt_time_ms: 8000,
hole_punch_receipt_time_ms: 9000,
network_key_password: None,

View File

@ -249,7 +249,7 @@ pub struct VeilidConfigNetwork {
pub max_connections_per_ip6_prefix: u32,
pub max_connections_per_ip6_prefix_size: u32,
pub max_connection_frequency_per_min: u32,
pub client_whitelist_timeout_ms: u32,
pub client_allowlist_timeout_ms: u32,
pub reverse_connection_receipt_time_ms: u32,
pub hole_punch_receipt_time_ms: u32,
#[cfg_attr(target_arch = "wasm32", tsify(optional))]
@ -486,7 +486,7 @@ impl VeilidConfig {
get_config!(inner.network.max_connections_per_ip6_prefix);
get_config!(inner.network.max_connections_per_ip6_prefix_size);
get_config!(inner.network.max_connection_frequency_per_min);
get_config!(inner.network.client_whitelist_timeout_ms);
get_config!(inner.network.client_allowlist_timeout_ms);
get_config!(inner.network.reverse_connection_receipt_time_ms);
get_config!(inner.network.hole_punch_receipt_time_ms);
get_config!(inner.network.network_key_password);

View File

@ -61,10 +61,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
convert:
dependency: transitive
description:
@ -220,10 +220,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: "direct main"
description:
@ -329,18 +329,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
@ -377,10 +377,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
typed_data:
dependency: transitive
description:
@ -403,15 +403,15 @@ packages:
path: ".."
relative: true
source: path
version: "0.2.4"
version: "0.2.5"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
win32:
dependency: transitive
description:
@ -437,5 +437,5 @@ packages:
source: hosted
version: "3.5.0"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.6"

View File

@ -93,7 +93,7 @@ Future<VeilidConfig> getDefaultVeilidConfig(String programName) async {
maxConnectionsPerIp6Prefix: 32,
maxConnectionsPerIp6PrefixSize: 56,
maxConnectionFrequencyPerMin: 128,
clientWhitelistTimeoutMs: 300000,
clientAllowlistTimeoutMs: 300000,
reverseConnectionReceiptTimeMs: 5000,
holePunchReceiptTimeMs: 5000,
routingTable: VeilidConfigRoutingTable(

View File

@ -107,22 +107,22 @@ class _$DHTSchemaCopyWithImpl<$Res, $Val extends DHTSchema>
}
/// @nodoc
abstract class _$$DHTSchemaDFLTCopyWith<$Res>
abstract class _$$DHTSchemaDFLTImplCopyWith<$Res>
implements $DHTSchemaCopyWith<$Res> {
factory _$$DHTSchemaDFLTCopyWith(
_$DHTSchemaDFLT value, $Res Function(_$DHTSchemaDFLT) then) =
__$$DHTSchemaDFLTCopyWithImpl<$Res>;
factory _$$DHTSchemaDFLTImplCopyWith(
_$DHTSchemaDFLTImpl value, $Res Function(_$DHTSchemaDFLTImpl) then) =
__$$DHTSchemaDFLTImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int oCnt});
}
/// @nodoc
class __$$DHTSchemaDFLTCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLT>
implements _$$DHTSchemaDFLTCopyWith<$Res> {
__$$DHTSchemaDFLTCopyWithImpl(
_$DHTSchemaDFLT _value, $Res Function(_$DHTSchemaDFLT) _then)
class __$$DHTSchemaDFLTImplCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaDFLTImpl>
implements _$$DHTSchemaDFLTImplCopyWith<$Res> {
__$$DHTSchemaDFLTImplCopyWithImpl(
_$DHTSchemaDFLTImpl _value, $Res Function(_$DHTSchemaDFLTImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -130,7 +130,7 @@ class __$$DHTSchemaDFLTCopyWithImpl<$Res>
$Res call({
Object? oCnt = null,
}) {
return _then(_$DHTSchemaDFLT(
return _then(_$DHTSchemaDFLTImpl(
oCnt: null == oCnt
? _value.oCnt
: oCnt // ignore: cast_nullable_to_non_nullable
@ -141,12 +141,12 @@ class __$$DHTSchemaDFLTCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$DHTSchemaDFLT implements DHTSchemaDFLT {
const _$DHTSchemaDFLT({required this.oCnt, final String? $type})
class _$DHTSchemaDFLTImpl implements DHTSchemaDFLT {
const _$DHTSchemaDFLTImpl({required this.oCnt, final String? $type})
: $type = $type ?? 'DFLT';
factory _$DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaDFLTFromJson(json);
factory _$DHTSchemaDFLTImpl.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaDFLTImplFromJson(json);
@override
final int oCnt;
@ -163,7 +163,7 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DHTSchemaDFLT &&
other is _$DHTSchemaDFLTImpl &&
(identical(other.oCnt, oCnt) || other.oCnt == oCnt));
}
@ -174,8 +174,8 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
__$$DHTSchemaDFLTCopyWithImpl<_$DHTSchemaDFLT>(this, _$identity);
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith =>
__$$DHTSchemaDFLTImplCopyWithImpl<_$DHTSchemaDFLTImpl>(this, _$identity);
@override
@optionalTypeArgs
@ -241,43 +241,43 @@ class _$DHTSchemaDFLT implements DHTSchemaDFLT {
@override
Map<String, dynamic> toJson() {
return _$$DHTSchemaDFLTToJson(
return _$$DHTSchemaDFLTImplToJson(
this,
);
}
}
abstract class DHTSchemaDFLT implements DHTSchema {
const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLT;
const factory DHTSchemaDFLT({required final int oCnt}) = _$DHTSchemaDFLTImpl;
factory DHTSchemaDFLT.fromJson(Map<String, dynamic> json) =
_$DHTSchemaDFLT.fromJson;
_$DHTSchemaDFLTImpl.fromJson;
@override
int get oCnt;
@override
@JsonKey(ignore: true)
_$$DHTSchemaDFLTCopyWith<_$DHTSchemaDFLT> get copyWith =>
_$$DHTSchemaDFLTImplCopyWith<_$DHTSchemaDFLTImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class _$$DHTSchemaSMPLCopyWith<$Res>
abstract class _$$DHTSchemaSMPLImplCopyWith<$Res>
implements $DHTSchemaCopyWith<$Res> {
factory _$$DHTSchemaSMPLCopyWith(
_$DHTSchemaSMPL value, $Res Function(_$DHTSchemaSMPL) then) =
__$$DHTSchemaSMPLCopyWithImpl<$Res>;
factory _$$DHTSchemaSMPLImplCopyWith(
_$DHTSchemaSMPLImpl value, $Res Function(_$DHTSchemaSMPLImpl) then) =
__$$DHTSchemaSMPLImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int oCnt, List<DHTSchemaMember> members});
}
/// @nodoc
class __$$DHTSchemaSMPLCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPL>
implements _$$DHTSchemaSMPLCopyWith<$Res> {
__$$DHTSchemaSMPLCopyWithImpl(
_$DHTSchemaSMPL _value, $Res Function(_$DHTSchemaSMPL) _then)
class __$$DHTSchemaSMPLImplCopyWithImpl<$Res>
extends _$DHTSchemaCopyWithImpl<$Res, _$DHTSchemaSMPLImpl>
implements _$$DHTSchemaSMPLImplCopyWith<$Res> {
__$$DHTSchemaSMPLImplCopyWithImpl(
_$DHTSchemaSMPLImpl _value, $Res Function(_$DHTSchemaSMPLImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -286,7 +286,7 @@ class __$$DHTSchemaSMPLCopyWithImpl<$Res>
Object? oCnt = null,
Object? members = null,
}) {
return _then(_$DHTSchemaSMPL(
return _then(_$DHTSchemaSMPLImpl(
oCnt: null == oCnt
? _value.oCnt
: oCnt // ignore: cast_nullable_to_non_nullable
@ -301,16 +301,16 @@ class __$$DHTSchemaSMPLCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$DHTSchemaSMPL implements DHTSchemaSMPL {
const _$DHTSchemaSMPL(
class _$DHTSchemaSMPLImpl implements DHTSchemaSMPL {
const _$DHTSchemaSMPLImpl(
{required this.oCnt,
required final List<DHTSchemaMember> members,
final String? $type})
: _members = members,
$type = $type ?? 'SMPL';
factory _$DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaSMPLFromJson(json);
factory _$DHTSchemaSMPLImpl.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaSMPLImplFromJson(json);
@override
final int oCnt;
@ -334,7 +334,7 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DHTSchemaSMPL &&
other is _$DHTSchemaSMPLImpl &&
(identical(other.oCnt, oCnt) || other.oCnt == oCnt) &&
const DeepCollectionEquality().equals(other._members, _members));
}
@ -347,8 +347,8 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
__$$DHTSchemaSMPLCopyWithImpl<_$DHTSchemaSMPL>(this, _$identity);
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith =>
__$$DHTSchemaSMPLImplCopyWithImpl<_$DHTSchemaSMPLImpl>(this, _$identity);
@override
@optionalTypeArgs
@ -414,7 +414,7 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
@override
Map<String, dynamic> toJson() {
return _$$DHTSchemaSMPLToJson(
return _$$DHTSchemaSMPLImplToJson(
this,
);
}
@ -423,17 +423,17 @@ class _$DHTSchemaSMPL implements DHTSchemaSMPL {
abstract class DHTSchemaSMPL implements DHTSchema {
const factory DHTSchemaSMPL(
{required final int oCnt,
required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPL;
required final List<DHTSchemaMember> members}) = _$DHTSchemaSMPLImpl;
factory DHTSchemaSMPL.fromJson(Map<String, dynamic> json) =
_$DHTSchemaSMPL.fromJson;
_$DHTSchemaSMPLImpl.fromJson;
@override
int get oCnt;
List<DHTSchemaMember> get members;
@override
@JsonKey(ignore: true)
_$$DHTSchemaSMPLCopyWith<_$DHTSchemaSMPL> get copyWith =>
_$$DHTSchemaSMPLImplCopyWith<_$DHTSchemaSMPLImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -491,22 +491,22 @@ class _$DHTSchemaMemberCopyWithImpl<$Res, $Val extends DHTSchemaMember>
}
/// @nodoc
abstract class _$$_DHTSchemaMemberCopyWith<$Res>
abstract class _$$DHTSchemaMemberImplCopyWith<$Res>
implements $DHTSchemaMemberCopyWith<$Res> {
factory _$$_DHTSchemaMemberCopyWith(
_$_DHTSchemaMember value, $Res Function(_$_DHTSchemaMember) then) =
__$$_DHTSchemaMemberCopyWithImpl<$Res>;
factory _$$DHTSchemaMemberImplCopyWith(_$DHTSchemaMemberImpl value,
$Res Function(_$DHTSchemaMemberImpl) then) =
__$$DHTSchemaMemberImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({FixedEncodedString43 mKey, int mCnt});
}
/// @nodoc
class __$$_DHTSchemaMemberCopyWithImpl<$Res>
extends _$DHTSchemaMemberCopyWithImpl<$Res, _$_DHTSchemaMember>
implements _$$_DHTSchemaMemberCopyWith<$Res> {
__$$_DHTSchemaMemberCopyWithImpl(
_$_DHTSchemaMember _value, $Res Function(_$_DHTSchemaMember) _then)
class __$$DHTSchemaMemberImplCopyWithImpl<$Res>
extends _$DHTSchemaMemberCopyWithImpl<$Res, _$DHTSchemaMemberImpl>
implements _$$DHTSchemaMemberImplCopyWith<$Res> {
__$$DHTSchemaMemberImplCopyWithImpl(
_$DHTSchemaMemberImpl _value, $Res Function(_$DHTSchemaMemberImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -515,7 +515,7 @@ class __$$_DHTSchemaMemberCopyWithImpl<$Res>
Object? mKey = null,
Object? mCnt = null,
}) {
return _then(_$_DHTSchemaMember(
return _then(_$DHTSchemaMemberImpl(
mKey: null == mKey
? _value.mKey
: mKey // ignore: cast_nullable_to_non_nullable
@ -530,12 +530,12 @@ class __$$_DHTSchemaMemberCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_DHTSchemaMember implements _DHTSchemaMember {
const _$_DHTSchemaMember({required this.mKey, required this.mCnt})
class _$DHTSchemaMemberImpl implements _DHTSchemaMember {
const _$DHTSchemaMemberImpl({required this.mKey, required this.mCnt})
: assert(mCnt > 0 && mCnt <= 65535, 'value out of range');
factory _$_DHTSchemaMember.fromJson(Map<String, dynamic> json) =>
_$$_DHTSchemaMemberFromJson(json);
factory _$DHTSchemaMemberImpl.fromJson(Map<String, dynamic> json) =>
_$$DHTSchemaMemberImplFromJson(json);
@override
final FixedEncodedString43 mKey;
@ -551,7 +551,7 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_DHTSchemaMember &&
other is _$DHTSchemaMemberImpl &&
(identical(other.mKey, mKey) || other.mKey == mKey) &&
(identical(other.mCnt, mCnt) || other.mCnt == mCnt));
}
@ -563,12 +563,13 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
__$$_DHTSchemaMemberCopyWithImpl<_$_DHTSchemaMember>(this, _$identity);
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith =>
__$$DHTSchemaMemberImplCopyWithImpl<_$DHTSchemaMemberImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_DHTSchemaMemberToJson(
return _$$DHTSchemaMemberImplToJson(
this,
);
}
@ -577,10 +578,10 @@ class _$_DHTSchemaMember implements _DHTSchemaMember {
abstract class _DHTSchemaMember implements DHTSchemaMember {
const factory _DHTSchemaMember(
{required final FixedEncodedString43 mKey,
required final int mCnt}) = _$_DHTSchemaMember;
required final int mCnt}) = _$DHTSchemaMemberImpl;
factory _DHTSchemaMember.fromJson(Map<String, dynamic> json) =
_$_DHTSchemaMember.fromJson;
_$DHTSchemaMemberImpl.fromJson;
@override
FixedEncodedString43 get mKey;
@ -588,7 +589,7 @@ abstract class _DHTSchemaMember implements DHTSchemaMember {
int get mCnt;
@override
@JsonKey(ignore: true)
_$$_DHTSchemaMemberCopyWith<_$_DHTSchemaMember> get copyWith =>
_$$DHTSchemaMemberImplCopyWith<_$DHTSchemaMemberImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -672,11 +673,11 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res, $Val extends DHTRecordDescriptor>
}
/// @nodoc
abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
abstract class _$$DHTRecordDescriptorImplCopyWith<$Res>
implements $DHTRecordDescriptorCopyWith<$Res> {
factory _$$_DHTRecordDescriptorCopyWith(_$_DHTRecordDescriptor value,
$Res Function(_$_DHTRecordDescriptor) then) =
__$$_DHTRecordDescriptorCopyWithImpl<$Res>;
factory _$$DHTRecordDescriptorImplCopyWith(_$DHTRecordDescriptorImpl value,
$Res Function(_$DHTRecordDescriptorImpl) then) =
__$$DHTRecordDescriptorImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@ -690,11 +691,11 @@ abstract class _$$_DHTRecordDescriptorCopyWith<$Res>
}
/// @nodoc
class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$_DHTRecordDescriptor>
implements _$$_DHTRecordDescriptorCopyWith<$Res> {
__$$_DHTRecordDescriptorCopyWithImpl(_$_DHTRecordDescriptor _value,
$Res Function(_$_DHTRecordDescriptor) _then)
class __$$DHTRecordDescriptorImplCopyWithImpl<$Res>
extends _$DHTRecordDescriptorCopyWithImpl<$Res, _$DHTRecordDescriptorImpl>
implements _$$DHTRecordDescriptorImplCopyWith<$Res> {
__$$DHTRecordDescriptorImplCopyWithImpl(_$DHTRecordDescriptorImpl _value,
$Res Function(_$DHTRecordDescriptorImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -705,7 +706,7 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
Object? schema = null,
Object? ownerSecret = freezed,
}) {
return _then(_$_DHTRecordDescriptor(
return _then(_$DHTRecordDescriptorImpl(
key: null == key
? _value.key
: key // ignore: cast_nullable_to_non_nullable
@ -728,15 +729,15 @@ class __$$_DHTRecordDescriptorCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
const _$_DHTRecordDescriptor(
class _$DHTRecordDescriptorImpl implements _DHTRecordDescriptor {
const _$DHTRecordDescriptorImpl(
{required this.key,
required this.owner,
required this.schema,
this.ownerSecret});
factory _$_DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =>
_$$_DHTRecordDescriptorFromJson(json);
factory _$DHTRecordDescriptorImpl.fromJson(Map<String, dynamic> json) =>
_$$DHTRecordDescriptorImplFromJson(json);
@override
final Typed<FixedEncodedString43> key;
@ -756,7 +757,7 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_DHTRecordDescriptor &&
other is _$DHTRecordDescriptorImpl &&
(identical(other.key, key) || other.key == key) &&
(identical(other.owner, owner) || other.owner == owner) &&
(identical(other.schema, schema) || other.schema == schema) &&
@ -771,13 +772,13 @@ class _$_DHTRecordDescriptor implements _DHTRecordDescriptor {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
__$$_DHTRecordDescriptorCopyWithImpl<_$_DHTRecordDescriptor>(
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith =>
__$$DHTRecordDescriptorImplCopyWithImpl<_$DHTRecordDescriptorImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_DHTRecordDescriptorToJson(
return _$$DHTRecordDescriptorImplToJson(
this,
);
}
@ -788,10 +789,10 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
{required final Typed<FixedEncodedString43> key,
required final FixedEncodedString43 owner,
required final DHTSchema schema,
final FixedEncodedString43? ownerSecret}) = _$_DHTRecordDescriptor;
final FixedEncodedString43? ownerSecret}) = _$DHTRecordDescriptorImpl;
factory _DHTRecordDescriptor.fromJson(Map<String, dynamic> json) =
_$_DHTRecordDescriptor.fromJson;
_$DHTRecordDescriptorImpl.fromJson;
@override
Typed<FixedEncodedString43> get key;
@ -803,7 +804,7 @@ abstract class _DHTRecordDescriptor implements DHTRecordDescriptor {
FixedEncodedString43? get ownerSecret;
@override
@JsonKey(ignore: true)
_$$_DHTRecordDescriptorCopyWith<_$_DHTRecordDescriptor> get copyWith =>
_$$DHTRecordDescriptorImplCopyWith<_$DHTRecordDescriptorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -861,22 +862,22 @@ class _$ValueSubkeyRangeCopyWithImpl<$Res, $Val extends ValueSubkeyRange>
}
/// @nodoc
abstract class _$$_ValueSubkeyRangeCopyWith<$Res>
abstract class _$$ValueSubkeyRangeImplCopyWith<$Res>
implements $ValueSubkeyRangeCopyWith<$Res> {
factory _$$_ValueSubkeyRangeCopyWith(
_$_ValueSubkeyRange value, $Res Function(_$_ValueSubkeyRange) then) =
__$$_ValueSubkeyRangeCopyWithImpl<$Res>;
factory _$$ValueSubkeyRangeImplCopyWith(_$ValueSubkeyRangeImpl value,
$Res Function(_$ValueSubkeyRangeImpl) then) =
__$$ValueSubkeyRangeImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({int low, int high});
}
/// @nodoc
class __$$_ValueSubkeyRangeCopyWithImpl<$Res>
extends _$ValueSubkeyRangeCopyWithImpl<$Res, _$_ValueSubkeyRange>
implements _$$_ValueSubkeyRangeCopyWith<$Res> {
__$$_ValueSubkeyRangeCopyWithImpl(
_$_ValueSubkeyRange _value, $Res Function(_$_ValueSubkeyRange) _then)
class __$$ValueSubkeyRangeImplCopyWithImpl<$Res>
extends _$ValueSubkeyRangeCopyWithImpl<$Res, _$ValueSubkeyRangeImpl>
implements _$$ValueSubkeyRangeImplCopyWith<$Res> {
__$$ValueSubkeyRangeImplCopyWithImpl(_$ValueSubkeyRangeImpl _value,
$Res Function(_$ValueSubkeyRangeImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -885,7 +886,7 @@ class __$$_ValueSubkeyRangeCopyWithImpl<$Res>
Object? low = null,
Object? high = null,
}) {
return _then(_$_ValueSubkeyRange(
return _then(_$ValueSubkeyRangeImpl(
low: null == low
? _value.low
: low // ignore: cast_nullable_to_non_nullable
@ -900,13 +901,13 @@ class __$$_ValueSubkeyRangeCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_ValueSubkeyRange implements _ValueSubkeyRange {
const _$_ValueSubkeyRange({required this.low, required this.high})
class _$ValueSubkeyRangeImpl implements _ValueSubkeyRange {
const _$ValueSubkeyRangeImpl({required this.low, required this.high})
: assert(low < 0 || low > high, 'low out of range'),
assert(high < 0, 'high out of range');
factory _$_ValueSubkeyRange.fromJson(Map<String, dynamic> json) =>
_$$_ValueSubkeyRangeFromJson(json);
factory _$ValueSubkeyRangeImpl.fromJson(Map<String, dynamic> json) =>
_$$ValueSubkeyRangeImplFromJson(json);
@override
final int low;
@ -922,7 +923,7 @@ class _$_ValueSubkeyRange implements _ValueSubkeyRange {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_ValueSubkeyRange &&
other is _$ValueSubkeyRangeImpl &&
(identical(other.low, low) || other.low == low) &&
(identical(other.high, high) || other.high == high));
}
@ -934,12 +935,13 @@ class _$_ValueSubkeyRange implements _ValueSubkeyRange {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_ValueSubkeyRangeCopyWith<_$_ValueSubkeyRange> get copyWith =>
__$$_ValueSubkeyRangeCopyWithImpl<_$_ValueSubkeyRange>(this, _$identity);
_$$ValueSubkeyRangeImplCopyWith<_$ValueSubkeyRangeImpl> get copyWith =>
__$$ValueSubkeyRangeImplCopyWithImpl<_$ValueSubkeyRangeImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_ValueSubkeyRangeToJson(
return _$$ValueSubkeyRangeImplToJson(
this,
);
}
@ -947,10 +949,11 @@ class _$_ValueSubkeyRange implements _ValueSubkeyRange {
abstract class _ValueSubkeyRange implements ValueSubkeyRange {
const factory _ValueSubkeyRange(
{required final int low, required final int high}) = _$_ValueSubkeyRange;
{required final int low,
required final int high}) = _$ValueSubkeyRangeImpl;
factory _ValueSubkeyRange.fromJson(Map<String, dynamic> json) =
_$_ValueSubkeyRange.fromJson;
_$ValueSubkeyRangeImpl.fromJson;
@override
int get low;
@ -958,7 +961,7 @@ abstract class _ValueSubkeyRange implements ValueSubkeyRange {
int get high;
@override
@JsonKey(ignore: true)
_$$_ValueSubkeyRangeCopyWith<_$_ValueSubkeyRange> get copyWith =>
_$$ValueSubkeyRangeImplCopyWith<_$ValueSubkeyRangeImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -1025,10 +1028,11 @@ class _$ValueDataCopyWithImpl<$Res, $Val extends ValueData>
}
/// @nodoc
abstract class _$$_ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> {
factory _$$_ValueDataCopyWith(
_$_ValueData value, $Res Function(_$_ValueData) then) =
__$$_ValueDataCopyWithImpl<$Res>;
abstract class _$$ValueDataImplCopyWith<$Res>
implements $ValueDataCopyWith<$Res> {
factory _$$ValueDataImplCopyWith(
_$ValueDataImpl value, $Res Function(_$ValueDataImpl) then) =
__$$ValueDataImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@ -1038,11 +1042,11 @@ abstract class _$$_ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> {
}
/// @nodoc
class __$$_ValueDataCopyWithImpl<$Res>
extends _$ValueDataCopyWithImpl<$Res, _$_ValueData>
implements _$$_ValueDataCopyWith<$Res> {
__$$_ValueDataCopyWithImpl(
_$_ValueData _value, $Res Function(_$_ValueData) _then)
class __$$ValueDataImplCopyWithImpl<$Res>
extends _$ValueDataCopyWithImpl<$Res, _$ValueDataImpl>
implements _$$ValueDataImplCopyWith<$Res> {
__$$ValueDataImplCopyWithImpl(
_$ValueDataImpl _value, $Res Function(_$ValueDataImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -1052,7 +1056,7 @@ class __$$_ValueDataCopyWithImpl<$Res>
Object? data = null,
Object? writer = null,
}) {
return _then(_$_ValueData(
return _then(_$ValueDataImpl(
seq: null == seq
? _value.seq
: seq // ignore: cast_nullable_to_non_nullable
@ -1071,15 +1075,15 @@ class __$$_ValueDataCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_ValueData implements _ValueData {
const _$_ValueData(
class _$ValueDataImpl implements _ValueData {
const _$ValueDataImpl(
{required this.seq,
@Uint8ListJsonConverter.jsIsArray() required this.data,
required this.writer})
: assert(seq >= 0, 'seq out of range');
factory _$_ValueData.fromJson(Map<String, dynamic> json) =>
_$$_ValueDataFromJson(json);
factory _$ValueDataImpl.fromJson(Map<String, dynamic> json) =>
_$$ValueDataImplFromJson(json);
@override
final int seq;
@ -1098,7 +1102,7 @@ class _$_ValueData implements _ValueData {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_ValueData &&
other is _$ValueDataImpl &&
(identical(other.seq, seq) || other.seq == seq) &&
const DeepCollectionEquality().equals(other.data, data) &&
(identical(other.writer, writer) || other.writer == writer));
@ -1112,12 +1116,12 @@ class _$_ValueData implements _ValueData {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
__$$_ValueDataCopyWithImpl<_$_ValueData>(this, _$identity);
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith =>
__$$ValueDataImplCopyWithImpl<_$ValueDataImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_ValueDataToJson(
return _$$ValueDataImplToJson(
this,
);
}
@ -1127,10 +1131,10 @@ abstract class _ValueData implements ValueData {
const factory _ValueData(
{required final int seq,
@Uint8ListJsonConverter.jsIsArray() required final Uint8List data,
required final FixedEncodedString43 writer}) = _$_ValueData;
required final FixedEncodedString43 writer}) = _$ValueDataImpl;
factory _ValueData.fromJson(Map<String, dynamic> json) =
_$_ValueData.fromJson;
_$ValueDataImpl.fromJson;
@override
int get seq;
@ -1141,7 +1145,7 @@ abstract class _ValueData implements ValueData {
FixedEncodedString43 get writer;
@override
@JsonKey(ignore: true)
_$$_ValueDataCopyWith<_$_ValueData> get copyWith =>
_$$ValueDataImplCopyWith<_$ValueDataImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -1215,11 +1219,11 @@ class _$SafetySpecCopyWithImpl<$Res, $Val extends SafetySpec>
}
/// @nodoc
abstract class _$$_SafetySpecCopyWith<$Res>
abstract class _$$SafetySpecImplCopyWith<$Res>
implements $SafetySpecCopyWith<$Res> {
factory _$$_SafetySpecCopyWith(
_$_SafetySpec value, $Res Function(_$_SafetySpec) then) =
__$$_SafetySpecCopyWithImpl<$Res>;
factory _$$SafetySpecImplCopyWith(
_$SafetySpecImpl value, $Res Function(_$SafetySpecImpl) then) =
__$$SafetySpecImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
@ -1230,11 +1234,11 @@ abstract class _$$_SafetySpecCopyWith<$Res>
}
/// @nodoc
class __$$_SafetySpecCopyWithImpl<$Res>
extends _$SafetySpecCopyWithImpl<$Res, _$_SafetySpec>
implements _$$_SafetySpecCopyWith<$Res> {
__$$_SafetySpecCopyWithImpl(
_$_SafetySpec _value, $Res Function(_$_SafetySpec) _then)
class __$$SafetySpecImplCopyWithImpl<$Res>
extends _$SafetySpecCopyWithImpl<$Res, _$SafetySpecImpl>
implements _$$SafetySpecImplCopyWith<$Res> {
__$$SafetySpecImplCopyWithImpl(
_$SafetySpecImpl _value, $Res Function(_$SafetySpecImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -1245,7 +1249,7 @@ class __$$_SafetySpecCopyWithImpl<$Res>
Object? sequencing = null,
Object? preferredRoute = freezed,
}) {
return _then(_$_SafetySpec(
return _then(_$SafetySpecImpl(
hopCount: null == hopCount
? _value.hopCount
: hopCount // ignore: cast_nullable_to_non_nullable
@ -1268,15 +1272,15 @@ class __$$_SafetySpecCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_SafetySpec implements _SafetySpec {
const _$_SafetySpec(
class _$SafetySpecImpl implements _SafetySpec {
const _$SafetySpecImpl(
{required this.hopCount,
required this.stability,
required this.sequencing,
this.preferredRoute});
factory _$_SafetySpec.fromJson(Map<String, dynamic> json) =>
_$$_SafetySpecFromJson(json);
factory _$SafetySpecImpl.fromJson(Map<String, dynamic> json) =>
_$$SafetySpecImplFromJson(json);
@override
final int hopCount;
@ -1296,7 +1300,7 @@ class _$_SafetySpec implements _SafetySpec {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_SafetySpec &&
other is _$SafetySpecImpl &&
(identical(other.hopCount, hopCount) ||
other.hopCount == hopCount) &&
(identical(other.stability, stability) ||
@ -1315,12 +1319,12 @@ class _$_SafetySpec implements _SafetySpec {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
__$$_SafetySpecCopyWithImpl<_$_SafetySpec>(this, _$identity);
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith =>
__$$SafetySpecImplCopyWithImpl<_$SafetySpecImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_SafetySpecToJson(
return _$$SafetySpecImplToJson(
this,
);
}
@ -1331,10 +1335,10 @@ abstract class _SafetySpec implements SafetySpec {
{required final int hopCount,
required final Stability stability,
required final Sequencing sequencing,
final String? preferredRoute}) = _$_SafetySpec;
final String? preferredRoute}) = _$SafetySpecImpl;
factory _SafetySpec.fromJson(Map<String, dynamic> json) =
_$_SafetySpec.fromJson;
_$SafetySpecImpl.fromJson;
@override
int get hopCount;
@ -1346,7 +1350,7 @@ abstract class _SafetySpec implements SafetySpec {
String? get preferredRoute;
@override
@JsonKey(ignore: true)
_$$_SafetySpecCopyWith<_$_SafetySpec> get copyWith =>
_$$SafetySpecImplCopyWith<_$SafetySpecImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -1404,21 +1408,22 @@ class _$RouteBlobCopyWithImpl<$Res, $Val extends RouteBlob>
}
/// @nodoc
abstract class _$$_RouteBlobCopyWith<$Res> implements $RouteBlobCopyWith<$Res> {
factory _$$_RouteBlobCopyWith(
_$_RouteBlob value, $Res Function(_$_RouteBlob) then) =
__$$_RouteBlobCopyWithImpl<$Res>;
abstract class _$$RouteBlobImplCopyWith<$Res>
implements $RouteBlobCopyWith<$Res> {
factory _$$RouteBlobImplCopyWith(
_$RouteBlobImpl value, $Res Function(_$RouteBlobImpl) then) =
__$$RouteBlobImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String routeId, @Uint8ListJsonConverter() Uint8List blob});
}
/// @nodoc
class __$$_RouteBlobCopyWithImpl<$Res>
extends _$RouteBlobCopyWithImpl<$Res, _$_RouteBlob>
implements _$$_RouteBlobCopyWith<$Res> {
__$$_RouteBlobCopyWithImpl(
_$_RouteBlob _value, $Res Function(_$_RouteBlob) _then)
class __$$RouteBlobImplCopyWithImpl<$Res>
extends _$RouteBlobCopyWithImpl<$Res, _$RouteBlobImpl>
implements _$$RouteBlobImplCopyWith<$Res> {
__$$RouteBlobImplCopyWithImpl(
_$RouteBlobImpl _value, $Res Function(_$RouteBlobImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@ -1427,7 +1432,7 @@ class __$$_RouteBlobCopyWithImpl<$Res>
Object? routeId = null,
Object? blob = null,
}) {
return _then(_$_RouteBlob(
return _then(_$RouteBlobImpl(
routeId: null == routeId
? _value.routeId
: routeId // ignore: cast_nullable_to_non_nullable
@ -1442,12 +1447,12 @@ class __$$_RouteBlobCopyWithImpl<$Res>
/// @nodoc
@JsonSerializable()
class _$_RouteBlob implements _RouteBlob {
const _$_RouteBlob(
class _$RouteBlobImpl implements _RouteBlob {
const _$RouteBlobImpl(
{required this.routeId, @Uint8ListJsonConverter() required this.blob});
factory _$_RouteBlob.fromJson(Map<String, dynamic> json) =>
_$$_RouteBlobFromJson(json);
factory _$RouteBlobImpl.fromJson(Map<String, dynamic> json) =>
_$$RouteBlobImplFromJson(json);
@override
final String routeId;
@ -1464,7 +1469,7 @@ class _$_RouteBlob implements _RouteBlob {
bool operator ==(dynamic other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$_RouteBlob &&
other is _$RouteBlobImpl &&
(identical(other.routeId, routeId) || other.routeId == routeId) &&
const DeepCollectionEquality().equals(other.blob, blob));
}
@ -1477,12 +1482,12 @@ class _$_RouteBlob implements _RouteBlob {
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
__$$_RouteBlobCopyWithImpl<_$_RouteBlob>(this, _$identity);
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith =>
__$$RouteBlobImplCopyWithImpl<_$RouteBlobImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$_RouteBlobToJson(
return _$$RouteBlobImplToJson(
this,
);
}
@ -1490,11 +1495,12 @@ class _$_RouteBlob implements _RouteBlob {
abstract class _RouteBlob implements RouteBlob {
const factory _RouteBlob(
{required final String routeId,
@Uint8ListJsonConverter() required final Uint8List blob}) = _$_RouteBlob;
{required final String routeId,
@Uint8ListJsonConverter() required final Uint8List blob}) =
_$RouteBlobImpl;
factory _RouteBlob.fromJson(Map<String, dynamic> json) =
_$_RouteBlob.fromJson;
_$RouteBlobImpl.fromJson;
@override
String get routeId;
@ -1503,6 +1509,6 @@ abstract class _RouteBlob implements RouteBlob {
Uint8List get blob;
@override
@JsonKey(ignore: true)
_$$_RouteBlobCopyWith<_$_RouteBlob> get copyWith =>
_$$RouteBlobImplCopyWith<_$RouteBlobImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -6,20 +6,20 @@ part of 'routing_context.dart';
// JsonSerializableGenerator
// **************************************************************************
_$DHTSchemaDFLT _$$DHTSchemaDFLTFromJson(Map<String, dynamic> json) =>
_$DHTSchemaDFLT(
_$DHTSchemaDFLTImpl _$$DHTSchemaDFLTImplFromJson(Map<String, dynamic> json) =>
_$DHTSchemaDFLTImpl(
oCnt: json['o_cnt'] as int,
$type: json['kind'] as String?,
);
Map<String, dynamic> _$$DHTSchemaDFLTToJson(_$DHTSchemaDFLT instance) =>
Map<String, dynamic> _$$DHTSchemaDFLTImplToJson(_$DHTSchemaDFLTImpl instance) =>
<String, dynamic>{
'o_cnt': instance.oCnt,
'kind': instance.$type,
};
_$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
_$DHTSchemaSMPL(
_$DHTSchemaSMPLImpl _$$DHTSchemaSMPLImplFromJson(Map<String, dynamic> json) =>
_$DHTSchemaSMPLImpl(
oCnt: json['o_cnt'] as int,
members: (json['members'] as List<dynamic>)
.map(DHTSchemaMember.fromJson)
@ -27,28 +27,30 @@ _$DHTSchemaSMPL _$$DHTSchemaSMPLFromJson(Map<String, dynamic> json) =>
$type: json['kind'] as String?,
);
Map<String, dynamic> _$$DHTSchemaSMPLToJson(_$DHTSchemaSMPL instance) =>
Map<String, dynamic> _$$DHTSchemaSMPLImplToJson(_$DHTSchemaSMPLImpl instance) =>
<String, dynamic>{
'o_cnt': instance.oCnt,
'members': instance.members.map((e) => e.toJson()).toList(),
'kind': instance.$type,
};
_$_DHTSchemaMember _$$_DHTSchemaMemberFromJson(Map<String, dynamic> json) =>
_$_DHTSchemaMember(
_$DHTSchemaMemberImpl _$$DHTSchemaMemberImplFromJson(
Map<String, dynamic> json) =>
_$DHTSchemaMemberImpl(
mKey: FixedEncodedString43.fromJson(json['m_key']),
mCnt: json['m_cnt'] as int,