diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bdd25e9..74930aa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ - Added SequenceOrdering enum to represent ordering mode for protocols rather than a bool - `RecordKey`s are now validated on both server side and client side of DHT RPC operations, closes [#299](https://gitlab.com/veilid/veilid/-/issues/299) - Revert punishment for FailedToVerifySenderPeerInfo, with a better peer info filter, fixes [#470](https://gitlab.com/veilid/veilid/-/issues/470) + - Update keyring-manager to eliminate licensing issue - veilid-python: - Correction of type hints diff --git a/Cargo.lock b/Cargo.lock index b78decb3..262c1497 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -212,9 +212,9 @@ checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "arboard" -version = "3.6.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f533f8e0af236ffe5eb979b99381df3258853f00ba2e44b6e1955292c75227" +checksum = "0348a1c054491f4bfe6ab86a7b6ab1e44e45d899005de92f58b3df180b36ddaf" dependencies = [ "clipboard-win", "log", @@ -223,6 +223,7 @@ dependencies = [ "objc2-foundation", "parking_lot 0.12.4", "percent-encoding", + "windows-sys 0.60.2", "x11rb", ] @@ -291,9 +292,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" +checksum = "497c00e0fd83a72a79a39fcbd8e3e2f055d6f6c7e025f3b3d91f4f8e76527fb8" dependencies = [ "async-task", "concurrent-queue", @@ -746,9 +747,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.2" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bitmaps" @@ -883,28 +884,29 @@ dependencies = [ [[package]] name = "capnp" -version = "0.21.4" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def25bdbbc2758b363d79129c7f277520e3347e8b647c404d4823591f837c4ad" +checksum = "f62fcad97587224e2a1bd12ec1c7c0e95b93cefd285763a174cf1b34048c6437" dependencies = [ "embedded-io 0.6.1", ] [[package]] name = "capnpc" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93a18ec8176d4a87f1852b6a560b4196729365c01ba3cad03b73a376a23c56e" +checksum = "6da96dcb0a0e0c526daf42bac55e1550f18ad973df9ef9ba75204f332c80ad16" dependencies = [ "capnp", ] [[package]] name = "cc" -version = "1.2.33" +version = "1.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" +checksum = "590f9024a68a8c40351881787f1934dc11afd69090f5edb6831464694d836ea3" dependencies = [ + "find-msvc-tools", "shlex", ] @@ -1028,9 +1030,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.45" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc0e74a703892159f5ae7d3aac52c8e6c392f5ae5f359c70b5881d60aaac318" +checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931" dependencies = [ "clap_builder", "clap_derive", @@ -1038,9 +1040,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.44" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e7f4214277f3c7aa526a59dd3fbe306a370daee1f8b7b8c987069cd8e888a8" +checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6" dependencies = [ "anstream", "anstyle", @@ -1051,9 +1053,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.45" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14cb31bb0a7d536caef2639baa7fad459e15c3144efefa6dbd1c84562c4739f6" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" dependencies = [ "heck", "proc-macro2", @@ -1091,7 +1093,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" dependencies = [ - "thiserror 2.0.15", + "thiserror 2.0.16", ] [[package]] @@ -1161,13 +1163,13 @@ dependencies = [ [[package]] name = "config" -version = "0.15.14" +version = "0.15.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4092bf3922a966e2bd74640b80f36c73eaa7251a4fd0fbcda1f8a4de401352" +checksum = "0faa974509d38b33ff89282db9c3295707ccf031727c0de9772038ec526852ba" dependencies = [ "pathdiff", "serde", - "winnow 0.7.12", + "winnow 0.7.13", "yaml-rust2 0.10.3", ] @@ -1263,6 +1265,16 @@ dependencies = [ "libc", ] +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" @@ -1314,7 +1326,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "crossterm_winapi", "libc", "mio 0.8.11", @@ -1330,7 +1342,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "crossterm_winapi", "derive_more", "document-features", @@ -1527,12 +1539,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08440b3dd222c3d0433e63e097463969485f112baff337dfdaca043a0d760570" +checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core 0.21.2", - "darling_macro 0.21.2", + "darling_core 0.21.3", + "darling_macro 0.21.3", ] [[package]] @@ -1565,9 +1577,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25b7912bc28a04ab1b7715a68ea03aaa15662b43a1a4b2c480531fd19f8bf7e" +checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4" dependencies = [ "fnv", "ident_case", @@ -1600,11 +1612,11 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.21.2" +version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce154b9bea7fb0c8e8326e62d00354000c36e79770ff21b8c84e3aa267d9d531" +checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core 0.21.2", + "darling_core 0.21.3", "quote", "syn 2.0.106", ] @@ -1640,9 +1652,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.4.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" +checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc" dependencies = [ "powerfmt", "serde", @@ -1727,7 +1739,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "objc2", ] @@ -1871,9 +1883,9 @@ dependencies = [ [[package]] name = "enumset" -version = "1.1.9" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50acec76c668b4621fe3694e5ddee53c8fae2a03410026f50947d195eb44dc1" +checksum = "25b07a8dfbbbfc0064c0a6bdf9edcf966de6b1c33ce344bdeca3b41615452634" dependencies = [ "enumset_derive", "serde", @@ -1881,11 +1893,11 @@ dependencies = [ [[package]] name = "enumset_derive" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588eaef9dbc5d72c5fa4edf162527e67dab5d14ba61519ef7c8e233d5bdc092c" +checksum = "f43e744e4ea338060faee68ed933e46e722fb7f3617e722a5772d7e856d8b3ce" dependencies = [ - "darling 0.21.2", + "darling 0.21.3", "proc-macro2", "quote", "syn 2.0.106", @@ -2020,16 +2032,22 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.25" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" dependencies = [ "cfg-if 1.0.3", "libc", "libredox", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] +[[package]] +name = "find-msvc-tools" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e178e4fba8a2726903f6ba98a6d221e76f9c12c650d5dc0e6afdc50677b49650" + [[package]] name = "flate2" version = "1.1.2" @@ -2099,9 +2117,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" dependencies = [ "percent-encoding", ] @@ -2273,12 +2291,12 @@ dependencies = [ [[package]] name = "gethostname" -version = "0.4.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +checksum = "fc257fdb4038301ce4b9cd1b3b51704509692bb3ff716a410cbd07925d9dae55" dependencies = [ - "libc", - "windows-targets 0.48.5", + "rustix 1.0.8", + "windows-targets 0.52.6", ] [[package]] @@ -2303,7 +2321,7 @@ dependencies = [ "cfg-if 1.0.3", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.3+wasi-0.2.4", ] [[package]] @@ -2398,7 +2416,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.10.0", + "indexmap 2.11.0", "slab", "tokio", "tokio-util", @@ -2865,9 +2883,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" dependencies = [ "idna_adapter", "smallvec", @@ -2942,9 +2960,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.10.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" +checksum = "f2481980430f9f78649238835720ddccc57e52df14ffce1c6f37391d61b563e9" dependencies = [ "equivalent", "hashbrown 0.15.5", @@ -2982,11 +3000,11 @@ dependencies = [ [[package]] name = "io-uring" -version = "0.7.9" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "cfg-if 1.0.3", "libc", ] @@ -3091,14 +3109,12 @@ checksum = "078e285eafdfb6c4b434e0d31e8cfcb5115b651496faca5749b88fafd4f23bfd" [[package]] name = "keyring-manager" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aed4aad1a5c0ae5cfd990fd8cb7e1e31d1742e04c964a62b6928962838c766d" +checksum = "7118537d59e34bd487248fb745ec6c21625d216a4722712c8fc581f6ec6bd68e" dependencies = [ "byteorder", "cfg-if 1.0.3", - "core-foundation", - "core-foundation-sys", "directories", "fs4", "jni", @@ -3107,11 +3123,11 @@ dependencies = [ "ndk", "ndk-glue", "secret-service", - "security-framework", - "security-framework-sys", + "security-framework 2.11.1", + "security-framework 3.3.0", "serde", "serde_cbor", - "snailquote", + "unicode_categories", "winapi", ] @@ -3216,7 +3232,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "libc", "redox_syscall 0.5.17", ] @@ -3331,11 +3347,11 @@ checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -3447,7 +3463,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "security-framework", + "security-framework 2.11.1", "security-framework-sys", "tempfile", ] @@ -3578,7 +3594,7 @@ dependencies = [ "log", "netlink-packet-core", "netlink-sys", - "thiserror 2.0.15", + "thiserror 2.0.16", ] [[package]] @@ -3625,7 +3641,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "cfg-if 1.0.3", "libc", ] @@ -3636,7 +3652,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "cfg-if 1.0.3", "cfg_aliases", "libc", @@ -3648,7 +3664,7 @@ version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "cfg-if 1.0.3", "cfg_aliases", "libc", @@ -3684,12 +3700,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -3816,7 +3831,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6f29f568bec459b0ddff777cec4fe3fd8666d82d5a40ebd0ff7e66134f89bcc" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "objc2", "objc2-core-graphics", "objc2-foundation", @@ -3828,7 +3843,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "dispatch2", "objc2", ] @@ -3839,7 +3854,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "989c6c68c13021b5c2d6b71456ebb0f9dc78d752e86a98da7c716f4f9470f5a4" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "dispatch2", "objc2", "objc2-core-foundation", @@ -3858,7 +3873,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "900831247d2fe1a09a683278e5384cfb8c80c79fe6b166f9d14bfdde0ea1b03c" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "objc2", "objc2-core-foundation", ] @@ -3869,7 +3884,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7282e9ac92529fa3457ce90ebb15f4ecbc383e8338060960760fa2cf75420c3c" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "objc2", "objc2-core-foundation", ] @@ -3907,7 +3922,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "cfg-if 1.0.3", "foreign-types", "libc", @@ -4148,12 +4163,6 @@ dependencies = [ "log", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owning_ref" version = "0.4.1" @@ -4268,9 +4277,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pharos" @@ -4432,9 +4441,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" dependencies = [ "zerovec", ] @@ -4652,7 +4661,7 @@ version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", ] [[package]] @@ -4688,47 +4697,32 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.1.10" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "reqwest" @@ -4836,7 +4830,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -4885,7 +4879,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys 0.4.15", @@ -4898,7 +4892,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys 0.9.4", @@ -4953,7 +4947,7 @@ dependencies = [ "futures-util", "pin-project 1.1.10", "thingbuf", - "thiserror 2.0.15", + "thiserror 2.0.16", "unicode-segmentation", ] @@ -5091,8 +5085,21 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.2", - "core-foundation", + "bitflags 2.9.4", + "core-foundation 0.9.4", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" +dependencies = [ + "bitflags 2.9.4", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -5262,7 +5269,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.10.0", + "indexmap 2.11.0", "schemars 0.9.0", "schemars 1.0.4", "serde", @@ -5290,7 +5297,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "itoa", "ryu", "serde", @@ -5303,7 +5310,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "itoa", "ryu", "serde", @@ -5491,16 +5498,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "snailquote" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec62a949bda7f15800481a711909f946e1204f2460f89210eaf7f57730f88f86" -dependencies = [ - "thiserror 1.0.69", - "unicode_categories", -] - [[package]] name = "socket2" version = "0.4.10" @@ -5658,7 +5655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", - "core-foundation", + "core-foundation 0.9.4", "system-configuration-sys", ] @@ -5734,11 +5731,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.15" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ - "thiserror-impl 2.0.15", + "thiserror-impl 2.0.16", ] [[package]] @@ -5754,9 +5751,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.15" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", @@ -5784,12 +5781,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.41" +version = "0.3.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +checksum = "83bde6f1ec10e72d583d91623c939f623002284ef622b87de38cfd546cbf2031" dependencies = [ "deranged", - "itoa", "libc", "num-conv", "num_threads", @@ -5801,15 +5797,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" +checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" [[package]] name = "time-macros" -version = "0.2.22" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" dependencies = [ "num-conv", "time-core", @@ -5953,7 +5949,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "toml_datetime", "winnow 0.5.40", ] @@ -5964,12 +5960,12 @@ version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ - "indexmap 2.10.0", + "indexmap 2.11.0", "serde", "serde_spanned", "toml_datetime", "toml_write", - "winnow 0.7.12", + "winnow 0.7.13", ] [[package]] @@ -6232,14 +6228,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -6406,13 +6402,14 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.4" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" dependencies = [ "form_urlencoded", "idna", "percent-encoding", + "serde", ] [[package]] @@ -6511,8 +6508,8 @@ dependencies = [ "async-tungstenite 0.23.0", "cfg-if 1.0.3", "chrono", - "clap 4.5.45", - "config 0.15.14", + "clap 4.5.47", + "config 0.15.15", "console", "crossbeam-channel", "cursive", @@ -6664,7 +6661,7 @@ name = "veilid-core-examples-private-route" version = "0.1.0" dependencies = [ "async-stdin", - "clap 4.5.45", + "clap 4.5.47", "ctrlc", "data-encoding", "tokio", @@ -6753,7 +6750,7 @@ dependencies = [ "backtrace", "cfg-if 1.0.3", "chrono", - "clap 4.5.45", + "clap 4.5.47", "color-eyre", "config 0.14.1", "console-subscriber", @@ -6813,7 +6810,7 @@ dependencies = [ "backtrace", "cfg-if 1.0.3", "chrono", - "clap 4.5.45", + "clap 4.5.47", "console_error_panic_hook", "ctrlc", "eyre", @@ -6954,11 +6951,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.3+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] @@ -7308,7 +7305,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "193cae8e647981c35bc947fdd57ba7928b1fa0d4a79305f6dd2dc55221ac35ac" dependencies = [ - "bitflags 2.9.2", + "bitflags 2.9.4", "widestring", "windows-sys 0.59.0", ] @@ -7621,9 +7618,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.12" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3edebf492c8125044983378ecb5766203ad3b4c2f7a922bd7dd207f6d443e95" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] @@ -7639,13 +7636,10 @@ dependencies = [ ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wit-bindgen" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.2", -] +checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" [[package]] name = "writeable" @@ -7661,7 +7655,7 @@ checksum = "ed39ff9f8b2eda91bf6390f9f49eee93d655489e15708e3bb638c1c4f07cecb4" dependencies = [ "async-tungstenite 0.28.2", "async_io_stream", - "bitflags 2.9.2", + "bitflags 2.9.4", "futures-core", "futures-io", "futures-sink", @@ -7685,7 +7679,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper 0.6.0", - "thiserror 2.0.15", + "thiserror 2.0.16", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7693,20 +7687,20 @@ dependencies = [ [[package]] name = "x11rb" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414" dependencies = [ "gethostname", - "rustix 0.38.44", + "rustix 1.0.8", "x11rb-protocol", ] [[package]] name = "x11rb-protocol" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" +checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" [[package]] name = "x25519-dalek" diff --git a/Cargo.toml b/Cargo.toml index a80b1dba..b94335f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,7 @@ cursive = { git = "https://gitlab.com/veilid/cursive.git" } cursive_core = { git = "https://gitlab.com/veilid/cursive.git" } # For local development +# keyring-manager = { path = "../keyring-manager" } # keyvaluedb = { path = "../keyvaluedb/keyvaluedb" } # keyvaluedb-memorydb = { path = "../keyvaluedb/keyvaluedb-memorydb" } # keyvaluedb-sqlite = { path = "../keyvaluedb/keyvaluedb-sqlite" } diff --git a/veilid-core/Cargo.toml b/veilid-core/Cargo.toml index 9833cdb7..74e6e5de 100644 --- a/veilid-core/Cargo.toml +++ b/veilid-core/Cargo.toml @@ -199,7 +199,7 @@ futures-util = { version = "0.3.31", default-features = false, features = [ ] } # Data structures -keyring-manager = "0.5.1" +keyring-manager = "0.6.0" keyvaluedb-sqlite = "0.1.3" # Network diff --git a/veilid-core/src/crypto/crypto_system/mod.rs b/veilid-core/src/crypto/crypto_system/mod.rs index cf204cb6..cba19c4d 100644 --- a/veilid-core/src/crypto/crypto_system/mod.rs +++ b/veilid-core/src/crypto/crypto_system/mod.rs @@ -141,6 +141,14 @@ pub trait CryptoSystem { } Ok(()) } + fn check_keypair(&self, keypair: &KeyPair) -> VeilidAPIResult<()> { + if keypair.kind() != self.kind() { + apibail_generic!("incorrect keypair kind"); + } + self.check_public_key(&keypair.key())?; + self.check_secret_key(&keypair.secret())?; + Ok(()) + } fn validate_keypair(&self, key: &PublicKey, secret: &SecretKey) -> VeilidAPIResult; fn validate_hash(&self, data: &[u8], hash: &HashDigest) -> VeilidAPIResult; diff --git a/veilid-core/src/crypto/mod.rs b/veilid-core/src/crypto/mod.rs index 34a780b5..4fd50c61 100644 --- a/veilid-core/src/crypto/mod.rs +++ b/veilid-core/src/crypto/mod.rs @@ -240,6 +240,45 @@ impl Crypto { self.get_async(best_crypto_kind()).unwrap() } + // Convenience validators + pub fn check_shared_secret(&self, secret: &SharedSecret) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(secret.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_shared_secret(secret) + } + + pub fn check_hash_digest(&self, hash: &HashDigest) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(hash.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_hash_digest(hash) + } + pub fn check_public_key(&self, key: &PublicKey) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(key.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_public_key(key) + } + pub fn check_secret_key(&self, key: &SecretKey) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(key.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_secret_key(key) + } + pub fn check_signature(&self, signature: &Signature) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(signature.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_signature(signature) + } + pub fn check_keypair(&self, key_pair: &KeyPair) -> VeilidAPIResult<()> { + let Some(vcrypto) = self.get(key_pair.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + vcrypto.check_keypair(key_pair) + } + /// BareSignature set verification /// Returns Some() the set of signature cryptokinds that validate and are supported /// Returns None if any cryptokinds are supported and do not validate diff --git a/veilid-core/src/routing_table/mod.rs b/veilid-core/src/routing_table/mod.rs index d513ef22..ffb33fe6 100644 --- a/veilid-core/src/routing_table/mod.rs +++ b/veilid-core/src/routing_table/mod.rs @@ -373,6 +373,28 @@ impl RoutingTable { false } + // Convenience validators + pub fn check_route_id(&self, route_id: &RouteId) -> VeilidAPIResult<()> { + let crypto = self.crypto(); + let Some(vcrypto) = crypto.get(route_id.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + if route_id.ref_value().len() != vcrypto.hash_digest_length() { + apibail_generic!("invalid route id length"); + } + Ok(()) + } + pub fn check_node_id(&self, node_id: &NodeId) -> VeilidAPIResult<()> { + let crypto = self.crypto(); + let Some(_) = crypto.get(node_id.kind()) else { + apibail_generic!("unsupported crypto kind"); + }; + if node_id.ref_value().len() != HASH_COORDINATE_LENGTH { + apibail_generic!("invalid node id length"); + } + Ok(()) + } + /// Produce node id from public key pub fn generate_node_id(&self, public_key: &PublicKey) -> VeilidAPIResult { if public_key.ref_value().len() == HASH_COORDINATE_LENGTH { diff --git a/veilid-core/src/storage_manager/mod.rs b/veilid-core/src/storage_manager/mod.rs index b4a8ed47..92ff9ff4 100644 --- a/veilid-core/src/storage_manager/mod.rs +++ b/veilid-core/src/storage_manager/mod.rs @@ -559,6 +559,33 @@ impl StorageManager { ) } + /// Validate a record key + pub(crate) fn check_record_key(&self, record_key: &RecordKey) -> VeilidAPIResult<()> { + let crypto = self.crypto(); + let Some(vcrypto) = crypto.get(record_key.kind()) else { + apibail_generic!("unsupported record key kind"); + }; + + if record_key.value().key().len() != HASH_COORDINATE_LENGTH { + apibail_generic!(format!( + "invalid record key length: {} != {}", + record_key.value().key().len(), + HASH_COORDINATE_LENGTH + )); + } + if let Some(encryption_key) = record_key.value().encryption_key() { + if encryption_key.len() != vcrypto.shared_secret_length() { + apibail_generic!(format!( + "invalid encryption key length: {} != {}", + encryption_key.len(), + vcrypto.shared_secret_length() + )); + } + } + + Ok(()) + } + /// Create a local record from scratch with a new owner key, open it, and return the opened descriptor pub async fn create_record( &self, @@ -660,8 +687,7 @@ impl StorageManager { // If we got nothing back, the key wasn't found if result.inspect_result.opt_descriptor().is_none() { // No result - let opaque_record_key = record_key.opaque(); - apibail_key_not_found!(opaque_record_key); + apibail_key_not_found!(record_key.opaque()); }; // Check again to see if we have a local record already or not @@ -1195,10 +1221,10 @@ impl StorageManager { // Obtain the inner state lock let mut inner = self.inner.lock().await; + let opaque_record_key = record_key.opaque(); // Get the safety selection and the writer we opened this record let (safety_selection, opt_watcher) = { - let opaque_record_key = record_key.opaque(); let Some(opened_record) = inner.opened_records.get(&opaque_record_key) else { // Record must be opened already to change watch apibail_generic!("record not open"); @@ -1218,7 +1244,6 @@ impl StorageManager { // Get the schema so we can truncate the watch to the number of subkeys let schema = if let Some(lrs) = inner.local_record_store.as_ref() { - let opaque_record_key = record_key.opaque(); let Some(schema) = lrs.peek_record(&opaque_record_key, |r| r.schema()) else { apibail_generic!("no local record found"); }; @@ -1804,7 +1829,6 @@ impl StorageManager { } // Write open record - let opaque_record_key = record_key.opaque(); inner .opened_records .entry(opaque_record_key) diff --git a/veilid-core/src/veilid_api/api.rs b/veilid-core/src/veilid_api/api.rs index 16d47089..7d9b2893 100644 --- a/veilid-core/src/veilid_api/api.rs +++ b/veilid-core/src/veilid_api/api.rs @@ -227,6 +227,9 @@ impl VeilidAPI { #[instrument(target = "veilid_api", level = "debug", skip(self), fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub fn generate_member_id(&self, writer_key: &PublicKey) -> VeilidAPIResult { veilid_log!(self debug "VeilidAPI::generate_member_id(writer_key: {:?}", writer_key); + + self.crypto()?.check_public_key(writer_key)?; + let storage_manager = self.core_context()?.storage_manager(); storage_manager.generate_member_id(writer_key) } @@ -340,7 +343,10 @@ impl VeilidAPI { pub fn release_private_route(&self, route_id: RouteId) -> VeilidAPIResult<()> { veilid_log!(self debug "VeilidAPI::release_private_route(route_id: {:?})", route_id); + let routing_table = self.core_context()?.routing_table(); + routing_table.check_route_id(&route_id)?; + let rss = routing_table.route_spec_store(); if !rss.release_route(route_id.clone()) { apibail_invalid_argument!("release_private_route", "key", route_id); diff --git a/veilid-core/src/veilid_api/routing_context.rs b/veilid-core/src/veilid_api/routing_context.rs index 916a1e10..b709033d 100644 --- a/veilid-core/src/veilid_api/routing_context.rs +++ b/veilid-core/src/veilid_api/routing_context.rs @@ -108,7 +108,7 @@ impl RoutingContext { veilid_log!(self debug "RoutingContext::with_safety(self: {:?}, safety_selection: {:?})", self, safety_selection); - if let SafetySelection::Unsafe(_) = safety_selection { + if let SafetySelection::Unsafe(_) = &safety_selection { #[cfg(not(feature = "footgun"))] { return Err(VeilidAPIError::generic( @@ -117,6 +117,15 @@ impl RoutingContext { } } + if let SafetySelection::Safe(safe) = &safety_selection { + if let Some(preferred_route) = &safe.preferred_route { + self.api + .core_context()? + .routing_table() + .check_route_id(preferred_route)?; + } + } + Ok(Self { api: self.api.clone(), unlocked_inner: Arc::new(RoutingContextUnlockedInner { safety_selection }), @@ -179,6 +188,24 @@ impl RoutingContext { .map_err(VeilidAPIError::invalid_target) } + fn check_target(&self, target: &Target) -> VeilidAPIResult<()> { + match target { + Target::NodeId(node_id) => { + self.api + .core_context()? + .routing_table() + .check_node_id(node_id)?; + } + Target::RouteId(route_id) => { + self.api + .core_context()? + .routing_table() + .check_route_id(route_id)?; + } + } + Ok(()) + } + #[instrument(target = "veilid_api", level = "debug", skip(message), fields(__VEILID_LOG_KEY = self.log_key(), message_len = message.len()), ret, err)] async fn internal_app_call( &self, @@ -189,6 +216,8 @@ impl RoutingContext { "RoutingContext::app_call(self: {:?}, target: {:?}, message_len: {:?})", self, target, message.len()); veilid_log!(self trace "message: {:?}", message); + self.check_target(&target)?; + let rpc_processor = self.api.core_context()?.rpc_processor(); // Get destination @@ -252,6 +281,8 @@ impl RoutingContext { "RoutingContext::app_message(self: {:?}, target: {:?}, message_len: {})", self, target, message.len()); veilid_log!(self trace "message: {:?}", message); + self.check_target(&target)?; + let rpc_processor = self.api.core_context()?.rpc_processor(); // Get destination @@ -317,6 +348,11 @@ impl RoutingContext { "RoutingContext::get_dht_record_key(self: {:?} schema: {:?}, owner_key: {:?}, encryption_key: {:?}", self, schema, owner_key, encryption_key); schema.validate()?; + self.api.crypto()?.check_public_key(&owner_key)?; + if let Some(encryption_key) = encryption_key.as_ref() { + self.api.crypto()?.check_shared_secret(encryption_key)?; + } + let storage_manager = self.api.core_context()?.storage_manager(); storage_manager.get_record_key(schema, &owner_key, encryption_key) } @@ -339,9 +375,11 @@ impl RoutingContext { ) -> VeilidAPIResult { veilid_log!(self debug "RoutingContext::create_dht_record(self: {:?}, schema: {:?}, owner: {:?}, kind: {:?})", self, schema, owner, kind); - schema.validate()?; - Crypto::validate_crypto_kind(kind)?; + schema.validate()?; + if let Some(owner) = &owner { + self.api.crypto()?.check_keypair(owner)?; + } let storage_manager = self.api.core_context()?.storage_manager(); Box::pin(storage_manager.create_record( @@ -367,18 +405,24 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub async fn open_dht_record( &self, - key: RecordKey, + record_key: RecordKey, default_writer: Option, ) -> VeilidAPIResult { veilid_log!(self debug - "RoutingContext::open_dht_record(self: {:?}, key: {:?}, default_writer: {:?})", self, key, default_writer); + "RoutingContext::open_dht_record(self: {:?}, key: {:?}, default_writer: {:?})", self, record_key, default_writer); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; + if let Some(default_writer) = &default_writer { + self.api.crypto()?.check_keypair(default_writer)?; + } let storage_manager = self.api.core_context()?.storage_manager(); storage_manager .open_record( - key, + record_key, default_writer, self.unlocked_inner.safety_selection.clone(), ) @@ -389,14 +433,17 @@ impl RoutingContext { /// /// Closing a record allows you to re-open it with a different routing context. #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] - pub async fn close_dht_record(&self, key: RecordKey) -> VeilidAPIResult<()> { + pub async fn close_dht_record(&self, record_key: RecordKey) -> VeilidAPIResult<()> { veilid_log!(self debug - "RoutingContext::close_dht_record(self: {:?}, key: {:?})", self, key); + "RoutingContext::close_dht_record(self: {:?}, key: {:?})", self, record_key); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.close_record(key)).await + Box::pin(storage_manager.close_record(record_key)).await } /// Deletes a DHT record at a specific key. @@ -405,14 +452,17 @@ impl RoutingContext { /// Deleting a record does not delete it from the network, but will remove the storage of the record /// locally, and will prevent its value from being refreshed on the network by this node. #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] - pub async fn delete_dht_record(&self, key: RecordKey) -> VeilidAPIResult<()> { + pub async fn delete_dht_record(&self, record_key: RecordKey) -> VeilidAPIResult<()> { veilid_log!(self debug - "RoutingContext::delete_dht_record(self: {:?}, key: {:?})", self, key); + "RoutingContext::delete_dht_record(self: {:?}, key: {:?})", self, record_key); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.delete_record(key)).await + Box::pin(storage_manager.delete_record(record_key)).await } /// Gets the latest value of a subkey. @@ -424,17 +474,20 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub async fn get_dht_value( &self, - key: RecordKey, + record_key: RecordKey, subkey: ValueSubkey, force_refresh: bool, ) -> VeilidAPIResult> { veilid_log!(self debug - "RoutingContext::get_dht_value(self: {:?}, key: {:?}, subkey: {:?}, force_refresh: {:?})", self, key, subkey, force_refresh); + "RoutingContext::get_dht_value(self: {:?}, key: {:?}, subkey: {:?}, force_refresh: {:?})", self, record_key, subkey, force_refresh); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.get_value(key, subkey, force_refresh)).await + Box::pin(storage_manager.get_value(record_key, subkey, force_refresh)).await } /// Pushes a changed subkey value to the network. @@ -447,18 +500,21 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", skip(data), fields(__VEILID_LOG_KEY = self.log_key(), data = print_data(&data, Some(64))), ret, err)] pub async fn set_dht_value( &self, - key: RecordKey, + record_key: RecordKey, subkey: ValueSubkey, data: Vec, options: Option, ) -> VeilidAPIResult> { veilid_log!(self debug - "RoutingContext::set_dht_value(self: {:?}, key: {:?}, subkey: {:?}, data: len={}, options: {:?})", self, key, subkey, data.len(), options); + "RoutingContext::set_dht_value(self: {:?}, key: {:?}, subkey: {:?}, data: len={}, options: {:?})", self, record_key, subkey, data.len(), options); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.set_value(key, subkey, data, options)).await + Box::pin(storage_manager.set_value(record_key, subkey, data, options)).await } /// Add or update a watch to a DHT value that informs the user via an VeilidUpdate::ValueChange callback when the record has subkeys change. @@ -489,21 +545,24 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub async fn watch_dht_values( &self, - key: RecordKey, + record_key: RecordKey, subkeys: Option, expiration: Option, count: Option, ) -> VeilidAPIResult { veilid_log!(self debug - "RoutingContext::watch_dht_values(self: {:?}, key: {:?}, subkeys: {:?}, expiration: {:?}, count: {:?})", self, key, subkeys, expiration, count); + "RoutingContext::watch_dht_values(self: {:?}, key: {:?}, subkeys: {:?}, expiration: {:?}, count: {:?})", self, record_key, subkeys, expiration, count); let subkeys = subkeys.unwrap_or_default(); let expiration = expiration.unwrap_or_default(); let count = count.unwrap_or(u32::MAX); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.watch_values(key, subkeys, expiration, count)).await + Box::pin(storage_manager.watch_values(record_key, subkeys, expiration, count)).await } /// Cancels a watch early. @@ -521,17 +580,20 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub async fn cancel_dht_watch( &self, - key: RecordKey, + record_key: RecordKey, subkeys: Option, ) -> VeilidAPIResult { veilid_log!(self debug - "RoutingContext::cancel_dht_watch(self: {:?}, key: {:?}, subkeys: {:?}", self, key, subkeys); + "RoutingContext::cancel_dht_watch(self: {:?}, key: {:?}, subkeys: {:?}", self, record_key, subkeys); let subkeys = subkeys.unwrap_or_default(); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.cancel_watch_values(key, subkeys)).await + Box::pin(storage_manager.cancel_watch_values(record_key, subkeys)).await } /// Inspects a DHT record for subkey state. @@ -577,18 +639,21 @@ impl RoutingContext { #[instrument(target = "veilid_api", level = "debug", fields(__VEILID_LOG_KEY = self.log_key()), ret, err)] pub async fn inspect_dht_record( &self, - key: RecordKey, + record_key: RecordKey, subkeys: Option, scope: DHTReportScope, ) -> VeilidAPIResult { veilid_log!(self debug - "RoutingContext::inspect_dht_record(self: {:?}, key: {:?}, subkeys: {:?}, scope: {:?})", self, key, subkeys, scope); + "RoutingContext::inspect_dht_record(self: {:?}, key: {:?}, subkeys: {:?}, scope: {:?})", self, record_key, subkeys, scope); let subkeys = subkeys.unwrap_or_default(); - Crypto::validate_crypto_kind(key.kind())?; + self.api + .core_context()? + .storage_manager() + .check_record_key(&record_key)?; let storage_manager = self.api.core_context()?.storage_manager(); - Box::pin(storage_manager.inspect_record(key, subkeys, scope)).await + Box::pin(storage_manager.inspect_record(record_key, subkeys, scope)).await } /////////////////////////////////// diff --git a/veilid-flutter/example/android/settings.gradle b/veilid-flutter/example/android/settings.gradle index b1ae36aa..3113c9a2 100644 --- a/veilid-flutter/example/android/settings.gradle +++ b/veilid-flutter/example/android/settings.gradle @@ -19,7 +19,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "8.8.0" apply false - id "org.jetbrains.kotlin.android" version "1.9.25" apply false + id "org.jetbrains.kotlin.android" version "2.1.0" apply false } include ":app" \ No newline at end of file diff --git a/veilid-flutter/example/integration_test/app_test.dart b/veilid-flutter/example/integration_test/app_test.dart index 619947d1..8251e506 100644 --- a/veilid-flutter/example/integration_test/app_test.dart +++ b/veilid-flutter/example/integration_test/app_test.dart @@ -52,13 +52,13 @@ void main() { group('Routing Contexts', () { test('routing contexts', testRoutingContexts); test('app message loopback', - () async => testAppMessageLoopback(fixture.updateStream)); + () => testAppMessageLoopback(fixture.updateStream)); test('app call loopback', - () async => testAppCallLoopback(fixture.updateStream)); + () => testAppCallLoopback(fixture.updateStream)); test('app message loopback big packets', - () async => testAppMessageLoopbackBigPackets(fixture.updateStream)); + () => testAppMessageLoopbackBigPackets(fixture.updateStream)); test('app call loopback big packets', - () async => testAppCallLoopbackBigPackets(fixture.updateStream)); + () => testAppCallLoopbackBigPackets(fixture.updateStream)); }); group('Veilid DHT', () { diff --git a/veilid-flutter/example/integration_test/test_crypto.dart b/veilid-flutter/example/integration_test/test_crypto.dart index 8bcd44e1..96bf6cd1 100644 --- a/veilid-flutter/example/integration_test/test_crypto.dart +++ b/veilid-flutter/example/integration_test/test_crypto.dart @@ -25,7 +25,7 @@ Future testHashAndVerifyPassword() async { for (final kind in Veilid.instance.validCryptoKinds()) { final cs = await Veilid.instance.getCryptoSystem(kind); final nonce = await cs.randomNonce(); - final salt = nonce.decode(); + final salt = nonce.toBytes(); // Password match final phash = await cs.hashPassword(utf8.encode('abc123'), salt); diff --git a/veilid-flutter/example/ios/Podfile b/veilid-flutter/example/ios/Podfile index 279576f3..e72e0b48 100644 --- a/veilid-flutter/example/ios/Podfile +++ b/veilid-flutter/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '12.0' +# platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/veilid-flutter/example/ios/Podfile.lock b/veilid-flutter/example/ios/Podfile.lock index 1cf5a308..64d78fd3 100644 --- a/veilid-flutter/example/ios/Podfile.lock +++ b/veilid-flutter/example/ios/Podfile.lock @@ -30,12 +30,12 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/veilid/ios" SPEC CHECKSUMS: - Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 integration_test: 4a889634ef21a45d28d50d622cf412dc6d9f586e path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 system_info_plus: 555ce7047fbbf29154726db942ae785c29211740 veilid: 3ce560a4f2b568a77a9fd5e23090f2fa97581019 -PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011 +PODFILE CHECKSUM: 0dbd5a87e0ace00c9610d2037ac22083a01f861d COCOAPODS: 1.16.2 diff --git a/veilid-flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/veilid-flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c53e2b31..9c12df59 100644 --- a/veilid-flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/veilid-flutter/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -26,6 +26,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit" shouldUseLaunchSchemeArgsEnv = "YES"> _history = []; + + var _historyPosition = 0; + + var _historyCurrentEdit = ''; + HistoryTextEditingController( {required this.setState, TextEditingController? controller}) : _controller = controller ?? TextEditingController() { - _historyFocusNode = FocusNode(onKeyEvent: (_node, event) { + _historyFocusNode = FocusNode(onKeyEvent: (node, event) { if (event.runtimeType == KeyDownEvent && event.logicalKey == LogicalKeyboardKey.arrowUp) { if (_historyPosition > 0) { @@ -55,15 +69,6 @@ class HistoryTextEditingController { } FocusNode get focusNode => _historyFocusNode; + TextEditingController get controller => _controller; - - //////////////////////////////////////////////////////////////////////////// - - late void Function(void Function()) setState; - final TextEditingController _controller; - late final FocusNode _historyFocusNode; - - final List _history = []; - int _historyPosition = 0; - String _historyCurrentEdit = ''; } diff --git a/veilid-flutter/example/lib/log.dart b/veilid-flutter/example/lib/log.dart index 625606b8..dadd242e 100644 --- a/veilid-flutter/example/lib/log.dart +++ b/veilid-flutter/example/lib/log.dart @@ -1,4 +1,3 @@ -// ignore_for_file: prefer_single_quotes import 'dart:io' show Platform; import 'package:ansicolor/ansicolor.dart'; @@ -7,7 +6,7 @@ import 'package:loggy/loggy.dart'; import 'package:veilid/veilid.dart'; // Loggy tools -const LogLevel traceLevel = LogLevel('Trace', 1); +const traceLevel = LogLevel('Trace', 1); VeilidConfigLogLevel convertToVeilidConfigLogLevel(LogLevel? level) { if (level == null) { @@ -66,7 +65,7 @@ String wrapWithLogColor(LogLevel? level, String text) { void setRootLogLevel(LogLevel? level) { Loggy('').level = getLogOptions(level); - Veilid.instance.changeLogLevel("all", convertToVeilidConfigLogLevel(level)); + Veilid.instance.changeLogLevel('all', convertToVeilidConfigLogLevel(level)); } extension PrettyPrintLogRecord on LogRecord { @@ -78,10 +77,10 @@ extension PrettyPrintLogRecord on LogRecord { } class CallbackPrinter extends LoggyPrinter { - CallbackPrinter() : super(); - void Function(LogRecord)? callback; + CallbackPrinter() : super(); + @override void onLog(LogRecord record) { final out = record.pretty().replaceAll('\uFFFD', ''); @@ -95,13 +94,14 @@ class CallbackPrinter extends LoggyPrinter { callback?.call(record); } + // Keep this as a function // ignore: use_setters_to_change_properties void setCallback(void Function(LogRecord)? cb) { callback = cb; } } -CallbackPrinter globalTerminalPrinter = CallbackPrinter(); +var globalTerminalPrinter = CallbackPrinter(); extension TraceLoggy on Loggy { void trace(dynamic message, [Object? error, StackTrace? stackTrace]) => diff --git a/veilid-flutter/example/macos/Podfile.lock b/veilid-flutter/example/macos/Podfile.lock index 2e02ad61..7d3a543b 100644 --- a/veilid-flutter/example/macos/Podfile.lock +++ b/veilid-flutter/example/macos/Podfile.lock @@ -25,8 +25,8 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral/.symlinks/plugins/veilid/macos SPEC CHECKSUMS: - FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 - macos_window_utils: 3bca8603c2a1cf2257351dfe6bbccc9accf739fd + FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1 + macos_window_utils: 23f54331a0fd51eea9e0ed347253bf48fd379d1d path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 veilid: 319e2e78836d7b3d08203596d0b4a0e244b68d29 diff --git a/veilid-flutter/example/pubspec.lock b/veilid-flutter/example/pubspec.lock index efa4392a..593c06fc 100644 --- a/veilid-flutter/example/pubspec.lock +++ b/veilid-flutter/example/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: da0d9209ca76bde579f2da330aeb9df62b6319c834fa7baae052021b0462401f + url: "https://pub.dev" + source: hosted + version: "85.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: f4ad0fea5f102201015c9aae9d93bc02f75dd9491529a8c21f88d17a8523d44c + url: "https://pub.dev" + source: hosted + version: "7.6.0" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + sha256: a5ab7590c27b779f3d4de67f31c4109dbe13dd7339f86461a6f2a8ab2594d8ce + url: "https://pub.dev" + source: hosted + version: "0.13.4" ansicolor: dependency: "direct main" description: @@ -9,14 +33,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.3" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" async: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" async_tools: dependency: transitive description: @@ -57,6 +89,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + ci: + dependency: transitive + description: + name: ci + sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13" + url: "https://pub.dev" + source: hosted + version: "0.1.0" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" clock: dependency: transitive description: @@ -81,6 +137,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -89,6 +153,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + custom_lint: + dependency: transitive + description: + name: custom_lint + sha256: "78085fbe842de7c5bef92de811ca81536968dbcbbcdac5c316711add2d15e796" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + custom_lint_builder: + dependency: transitive + description: + name: custom_lint_builder + sha256: cc5532d5733d4eccfccaaec6070a1926e9f21e613d93ad0927fad020b95c9e52 + url: "https://pub.dev" + source: hosted + version: "0.8.0" + custom_lint_core: + dependency: transitive + description: + name: custom_lint_core + sha256: cc4684d22ca05bf0a4a51127e19a8aea576b42079ed2bc9e956f11aaebe35dd1 + url: "https://pub.dev" + source: hosted + version: "0.8.0" + custom_lint_visitor: + dependency: transitive + description: + name: custom_lint_visitor + sha256: "4a86a0d8415a91fbb8298d6ef03e9034dc8e323a599ddc4120a0e36c433983a2" + url: "https://pub.dev" + source: hosted + version: "1.0.0+7.7.0" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "8a0e5fba27e8ee025d2ffb4ee820b4e6e2cf5e4246a6b1a477eb66866947e0bb" + url: "https://pub.dev" + source: hosted + version: "3.1.1" equatable: dependency: transitive description: @@ -101,10 +205,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" ffi: dependency: transitive description: @@ -161,15 +265,23 @@ packages: dependency: transitive description: name: freezed_annotation - sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter source: sdk version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" globbing: dependency: transitive description: @@ -178,6 +290,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + hotreloader: + dependency: transitive + description: + name: hotreloader + sha256: bc167a1163807b03bada490bfe2df25b0d744df359227880220a5cbd04e5734b + url: "https://pub.dev" + source: hosted + version: "4.3.0" integration_test: dependency: "direct dev" description: flutter @@ -195,34 +315,42 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "8dcda04c3fc16c14f48a7bb586d4be1f0d1572731b6d81d51772ef47c02081e0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "11.0.1" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lint_hard: dependency: "direct dev" description: name: lint_hard - sha256: ffe7058cb49e021d244d67e650a63380445b56643c2849c6929e938246b99058 + sha256: "805771ca5131c1e798ec7e94eb557dc61d6dc1220246855196776f4ac7299446" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "6.2.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" loggy: dependency: "direct main" description: @@ -235,10 +363,10 @@ packages: dependency: transitive description: name: macos_window_utils - sha256: "3534f2af024f2f24112ca28789a44e6750083f8c0065414546c6593ee48a5009" + sha256: d4df3501fd32ac0d2d7590cb6a8e4758337d061c8fa0db816fdd636be63a8438 url: "https://pub.dev" source: hosted - version: "1.6.1" + version: "1.9.0" matcher: dependency: transitive description: @@ -263,6 +391,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.16.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" path: dependency: "direct main" description: @@ -283,18 +419,18 @@ packages: dependency: transitive description: name: path_provider_android - sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12" + sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db" url: "https://pub.dev" source: hosted - version: "2.2.16" + version: "2.2.18" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.4.2" path_provider_linux: dependency: transitive description: @@ -339,10 +475,26 @@ packages: dependency: transitive description: name: process - sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + sha256: c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744 url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "5.0.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" + source: hosted + version: "1.5.0" quiver: dependency: transitive description: @@ -351,6 +503,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.2.2" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" sky_engine: dependency: transitive description: flutter @@ -364,6 +524,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.1" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -380,6 +548,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" string_scanner: dependency: transitive description: @@ -424,10 +600,10 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" typed_data: dependency: transitive description: @@ -436,14 +612,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" veilid: dependency: "direct main" description: @@ -462,18 +646,26 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "15.0.2" + watcher: + dependency: transitive + description: + name: watcher + sha256: "5bf046f41320ac97a469d506261797f35254fa61c641741ef32dacda98b7d39c" + url: "https://pub.dev" + source: hosted + version: "1.1.3" webdriver: dependency: transitive description: name: webdriver - sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.1.0" xdg_directories: dependency: transitive description: @@ -490,6 +682,14 @@ packages: url: "https://pub.dev" source: hosted version: "4.0.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" zmodem: dependency: transitive description: @@ -499,5 +699,5 @@ packages: source: hosted version: "0.0.6" sdks: - dart: ">=3.7.0 <4.0.0" - flutter: ">=3.27.0" + dart: ">=3.8.0 <4.0.0" + flutter: ">=3.29.0" diff --git a/veilid-flutter/example/pubspec.yaml b/veilid-flutter/example/pubspec.yaml index 41db29ea..932aa692 100644 --- a/veilid-flutter/example/pubspec.yaml +++ b/veilid-flutter/example/pubspec.yaml @@ -44,7 +44,7 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter - lint_hard: ^6.0.0 + lint_hard: ^6.2.1 veilid_test: path: ../packages/veilid_test diff --git a/veilid-flutter/lib/routing_context.dart b/veilid-flutter/lib/routing_context.dart index fa5b1364..4f39e1b0 100644 --- a/veilid-flutter/lib/routing_context.dart +++ b/veilid-flutter/lib/routing_context.dart @@ -70,9 +70,10 @@ sealed class DHTSchema with _$DHTSchema { const factory DHTSchema.dflt({required int oCnt}) = DHTSchemaDFLT; @FreezedUnionValue('SMPL') - const factory DHTSchema.smpl( - {required int oCnt, - required List members}) = DHTSchemaSMPL; + const factory DHTSchema.smpl({ + required int oCnt, + required List members, + }) = DHTSchemaSMPL; factory DHTSchema.fromJson(dynamic json) => _$DHTSchemaFromJson(json as Map); @@ -84,12 +85,21 @@ const defaultDHTSchema = DHTSchema.dflt(oCnt: 1); sealed class DHTSchemaMember with _$DHTSchemaMember { @Assert('mCnt > 0 && mCnt <= 65535', 'value out of range') const factory DHTSchemaMember({ - required MemberId mKey, + required BareMemberId mKey, required int mCnt, }) = _DHTSchemaMember; factory DHTSchemaMember.fromJson(dynamic json) => _$DHTSchemaMemberFromJson(json as Map); + + static Future fromPublicKey( + Veilid veilid, + PublicKey publicKey, + int mCnt, + ) async => DHTSchemaMember( + mKey: (await veilid.generateMemberId(publicKey)).value, + mCnt: mCnt, + ); } ////////////////////////////////////// @@ -135,7 +145,10 @@ extension DHTRecordDescriptorExt on DHTRecordDescriptor { @freezed sealed class ValueData with _$ValueData { - @Assert('seq >= 0', 'seq out of range') + static const maxLen = 32768; + + @Assert('seq >= 0 && seq <= 4294967295', 'seq out of range') + @Assert('data.length <= ValueData.maxLen', 'data too large') const factory ValueData({ required int seq, @Uint8ListJsonConverter.jsIsArray() required Uint8List data, @@ -180,7 +193,8 @@ abstract class SafetySelection { final json = jsond as Map; if (json.containsKey('Unsafe')) { return SafetySelectionUnsafe( - sequencing: Sequencing.fromJson(json['Unsafe'])); + sequencing: Sequencing.fromJson(json['Unsafe']), + ); } else if (json.containsKey('Safe')) { return SafetySelectionSafe(safetySpec: SafetySpec.fromJson(json['Safe'])); } else { @@ -192,13 +206,14 @@ abstract class SafetySelection { @immutable class SafetySelectionUnsafe extends Equatable implements SafetySelection { - // - const SafetySelectionUnsafe({ - required this.sequencing, - }); final Sequencing sequencing; + + // + const SafetySelectionUnsafe({required this.sequencing}); + @override List get props => [sequencing]; + @override bool? get stringify => null; @@ -208,13 +223,14 @@ class SafetySelectionUnsafe extends Equatable implements SafetySelection { @immutable class SafetySelectionSafe extends Equatable implements SafetySelection { - // - const SafetySelectionSafe({ - required this.safetySpec, - }); final SafetySpec safetySpec; + + // + const SafetySelectionSafe({required this.safetySpec}); + @override List get props => [safetySpec]; + @override bool? get stringify => null; @@ -256,13 +272,14 @@ abstract class Target { @immutable class TargetNodeId extends Equatable implements Target { - // - const TargetNodeId({ - required this.nodeId, - }); final NodeId nodeId; + + // + const TargetNodeId({required this.nodeId}); + @override List get props => [nodeId]; + @override bool? get stringify => null; @@ -272,13 +289,14 @@ class TargetNodeId extends Equatable implements Target { @immutable class TargetRouteId extends Equatable implements Target { - // - const TargetRouteId({ - required this.routeId, - }); final RouteId routeId; + + // + const TargetRouteId({required this.routeId}); + @override List get props => [routeId]; + @override bool? get stringify => null; @@ -290,10 +308,10 @@ class TargetRouteId extends Equatable implements Target { /// RouteBlob @freezed sealed class RouteBlob with _$RouteBlob { - const factory RouteBlob( - {required RouteId routeId, - @Uint8ListJsonConverter.jsIsArray() required Uint8List blob}) = - _RouteBlob; + const factory RouteBlob({ + required RouteId routeId, + @Uint8ListJsonConverter.jsIsArray() required Uint8List blob, + }) = _RouteBlob; factory RouteBlob.fromJson(dynamic json) => _$RouteBlobFromJson(json as Map); } @@ -328,19 +346,17 @@ enum DHTReportScope { @freezed sealed class SetDHTValueOptions with _$SetDHTValueOptions { - const factory SetDHTValueOptions({ - KeyPair? writer, - bool? allowOffline, - }) = _SetDHTValueOptions; + const factory SetDHTValueOptions({KeyPair? writer, bool? allowOffline}) = + _SetDHTValueOptions; factory SetDHTValueOptions.fromJson(dynamic json) => _$SetDHTValueOptionsFromJson(json as Map); @override Map toJson() => { - 'writer': writer, - 'allow_offline': allowOffline, - }; + 'writer': writer, + 'allow_offline': allowOffline, + }; } ////////////////////////////////////// @@ -351,10 +367,14 @@ abstract class VeilidRoutingContext { // Modifiers VeilidRoutingContext withDefaultSafety({bool closeSelf = false}); - VeilidRoutingContext withSafety(SafetySelection safetySelection, - {bool closeSelf = false}); - VeilidRoutingContext withSequencing(Sequencing sequencing, - {bool closeSelf = false}); + VeilidRoutingContext withSafety( + SafetySelection safetySelection, { + bool closeSelf = false, + }); + VeilidRoutingContext withSequencing( + Sequencing sequencing, { + bool closeSelf = false, + }); Future safety(); // App call/message @@ -362,21 +382,40 @@ abstract class VeilidRoutingContext { Future appMessage(Target target, Uint8List message); // DHT Operations - Future createDHTRecord(CryptoKind kind, DHTSchema schema, - {KeyPair? owner}); + Future createDHTRecord( + CryptoKind kind, + DHTSchema schema, { + KeyPair? owner, + }); Future openDHTRecord(RecordKey key, {KeyPair? writer}); Future closeDHTRecord(RecordKey key); Future deleteDHTRecord(RecordKey key); Future getDHTRecordKey( - DHTSchema schema, PublicKey owner, SharedSecret? encryptionKey); - Future getDHTValue(RecordKey key, int subkey, - {bool forceRefresh = false}); - Future setDHTValue(RecordKey key, int subkey, Uint8List data, - {SetDHTValueOptions? options}); - Future watchDHTValues(RecordKey key, - {List? subkeys, Timestamp? expiration, int? count}); + DHTSchema schema, + PublicKey owner, + SharedSecret? encryptionKey, + ); + Future getDHTValue( + RecordKey key, + int subkey, { + bool forceRefresh = false, + }); + Future setDHTValue( + RecordKey key, + int subkey, + Uint8List data, { + SetDHTValueOptions? options, + }); + Future watchDHTValues( + RecordKey key, { + List? subkeys, + Timestamp? expiration, + int? count, + }); Future cancelDHTWatch(RecordKey key, {List? subkeys}); - Future inspectDHTRecord(RecordKey key, - {List? subkeys, - DHTReportScope scope = DHTReportScope.local}); + Future inspectDHTRecord( + RecordKey key, { + List? subkeys, + DHTReportScope scope = DHTReportScope.local, + }); } diff --git a/veilid-flutter/lib/routing_context.freezed.dart b/veilid-flutter/lib/routing_context.freezed.dart index b1c1ba27..a0d4780b 100644 --- a/veilid-flutter/lib/routing_context.freezed.dart +++ b/veilid-flutter/lib/routing_context.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // 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 @@ -12,140 +11,276 @@ part of 'routing_context.dart'; // dart format off T _$identity(T value) => value; -DHTSchema _$DHTSchemaFromJson(Map json) { - switch (json['kind']) { - case 'DFLT': - return DHTSchemaDFLT.fromJson(json); - case 'SMPL': - return DHTSchemaSMPL.fromJson(json); - - default: - throw CheckedFromJsonException( - json, 'kind', 'DHTSchema', 'Invalid union type "${json['kind']}"!'); - } +DHTSchema _$DHTSchemaFromJson( + Map json +) { + switch (json['kind']) { + case 'DFLT': + return DHTSchemaDFLT.fromJson( + json + ); + case 'SMPL': + return DHTSchemaSMPL.fromJson( + json + ); + + default: + throw CheckedFromJsonException( + json, + 'kind', + 'DHTSchema', + 'Invalid union type "${json['kind']}"!' +); + } + } /// @nodoc mixin _$DHTSchema { - int get oCnt; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTSchemaCopyWith get copyWith => - _$DHTSchemaCopyWithImpl(this as DHTSchema, _$identity); + int get oCnt; +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTSchemaCopyWith get copyWith => _$DHTSchemaCopyWithImpl(this as DHTSchema, _$identity); /// Serializes this DHTSchema to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTSchema && - (identical(other.oCnt, oCnt) || other.oCnt == oCnt)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, oCnt); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTSchema&&(identical(other.oCnt, oCnt) || other.oCnt == oCnt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,oCnt); + +@override +String toString() { + return 'DHTSchema(oCnt: $oCnt)'; +} + - @override - String toString() { - return 'DHTSchema(oCnt: $oCnt)'; - } } /// @nodoc -abstract mixin class $DHTSchemaCopyWith<$Res> { - factory $DHTSchemaCopyWith(DHTSchema value, $Res Function(DHTSchema) _then) = - _$DHTSchemaCopyWithImpl; - @useResult - $Res call({int oCnt}); -} +abstract mixin class $DHTSchemaCopyWith<$Res> { + factory $DHTSchemaCopyWith(DHTSchema value, $Res Function(DHTSchema) _then) = _$DHTSchemaCopyWithImpl; +@useResult +$Res call({ + int oCnt +}); + + + +} /// @nodoc -class _$DHTSchemaCopyWithImpl<$Res> implements $DHTSchemaCopyWith<$Res> { +class _$DHTSchemaCopyWithImpl<$Res> + implements $DHTSchemaCopyWith<$Res> { _$DHTSchemaCopyWithImpl(this._self, this._then); final DHTSchema _self; final $Res Function(DHTSchema) _then; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? oCnt = null, - }) { - return _then(_self.copyWith( - oCnt: null == oCnt - ? _self.oCnt - : oCnt // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? oCnt = null,}) { + return _then(_self.copyWith( +oCnt: null == oCnt ? _self.oCnt : oCnt // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DHTSchema]. +extension DHTSchemaPatterns on DHTSchema { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( DHTSchemaDFLT value)? dflt,TResult Function( DHTSchemaSMPL value)? smpl,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case DHTSchemaDFLT() when dflt != null: +return dflt(_that);case DHTSchemaSMPL() when smpl != null: +return smpl(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( DHTSchemaDFLT value) dflt,required TResult Function( DHTSchemaSMPL value) smpl,}){ +final _that = this; +switch (_that) { +case DHTSchemaDFLT(): +return dflt(_that);case DHTSchemaSMPL(): +return smpl(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( DHTSchemaDFLT value)? dflt,TResult? Function( DHTSchemaSMPL value)? smpl,}){ +final _that = this; +switch (_that) { +case DHTSchemaDFLT() when dflt != null: +return dflt(_that);case DHTSchemaSMPL() when smpl != null: +return smpl(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( int oCnt)? dflt,TResult Function( int oCnt, List members)? smpl,required TResult orElse(),}) {final _that = this; +switch (_that) { +case DHTSchemaDFLT() when dflt != null: +return dflt(_that.oCnt);case DHTSchemaSMPL() when smpl != null: +return smpl(_that.oCnt,_that.members);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( int oCnt) dflt,required TResult Function( int oCnt, List members) smpl,}) {final _that = this; +switch (_that) { +case DHTSchemaDFLT(): +return dflt(_that.oCnt);case DHTSchemaSMPL(): +return smpl(_that.oCnt,_that.members);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( int oCnt)? dflt,TResult? Function( int oCnt, List members)? smpl,}) {final _that = this; +switch (_that) { +case DHTSchemaDFLT() when dflt != null: +return dflt(_that.oCnt);case DHTSchemaSMPL() when smpl != null: +return smpl(_that.oCnt,_that.members);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class DHTSchemaDFLT implements DHTSchema { - const DHTSchemaDFLT({required this.oCnt, final String? $type}) - : $type = $type ?? 'DFLT'; - factory DHTSchemaDFLT.fromJson(Map json) => - _$DHTSchemaDFLTFromJson(json); + const DHTSchemaDFLT({required this.oCnt, final String? $type}): $type = $type ?? 'DFLT'; + factory DHTSchemaDFLT.fromJson(Map json) => _$DHTSchemaDFLTFromJson(json); - @override - final int oCnt; +@override final int oCnt; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTSchemaDFLTCopyWith get copyWith => - _$DHTSchemaDFLTCopyWithImpl(this, _$identity); - @override - Map toJson() { - return _$DHTSchemaDFLTToJson( - this, - ); - } +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTSchemaDFLTCopyWith get copyWith => _$DHTSchemaDFLTCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTSchemaDFLT && - (identical(other.oCnt, oCnt) || other.oCnt == oCnt)); - } +@override +Map toJson() { + return _$DHTSchemaDFLTToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTSchemaDFLT&&(identical(other.oCnt, oCnt) || other.oCnt == oCnt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,oCnt); + +@override +String toString() { + return 'DHTSchema.dflt(oCnt: $oCnt)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, oCnt); - @override - String toString() { - return 'DHTSchema.dflt(oCnt: $oCnt)'; - } } /// @nodoc -abstract mixin class $DHTSchemaDFLTCopyWith<$Res> - implements $DHTSchemaCopyWith<$Res> { - factory $DHTSchemaDFLTCopyWith( - DHTSchemaDFLT value, $Res Function(DHTSchemaDFLT) _then) = - _$DHTSchemaDFLTCopyWithImpl; - @override - @useResult - $Res call({int oCnt}); -} +abstract mixin class $DHTSchemaDFLTCopyWith<$Res> implements $DHTSchemaCopyWith<$Res> { + factory $DHTSchemaDFLTCopyWith(DHTSchemaDFLT value, $Res Function(DHTSchemaDFLT) _then) = _$DHTSchemaDFLTCopyWithImpl; +@override @useResult +$Res call({ + int oCnt +}); + + + +} /// @nodoc class _$DHTSchemaDFLTCopyWithImpl<$Res> implements $DHTSchemaDFLTCopyWith<$Res> { @@ -154,92 +289,78 @@ class _$DHTSchemaDFLTCopyWithImpl<$Res> final DHTSchemaDFLT _self; final $Res Function(DHTSchemaDFLT) _then; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? oCnt = null, - }) { - return _then(DHTSchemaDFLT( - oCnt: null == oCnt - ? _self.oCnt - : oCnt // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? oCnt = null,}) { + return _then(DHTSchemaDFLT( +oCnt: null == oCnt ? _self.oCnt : oCnt // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + } /// @nodoc @JsonSerializable() + class DHTSchemaSMPL implements DHTSchema { - const DHTSchemaSMPL( - {required this.oCnt, - required final List members, - final String? $type}) - : _members = members, - $type = $type ?? 'SMPL'; - factory DHTSchemaSMPL.fromJson(Map json) => - _$DHTSchemaSMPLFromJson(json); + const DHTSchemaSMPL({required this.oCnt, required final List members, final String? $type}): _members = members,$type = $type ?? 'SMPL'; + factory DHTSchemaSMPL.fromJson(Map json) => _$DHTSchemaSMPLFromJson(json); - @override - final int oCnt; - final List _members; - List get members { - if (_members is EqualUnmodifiableListView) return _members; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_members); - } +@override final int oCnt; + final List _members; + List get members { + if (_members is EqualUnmodifiableListView) return _members; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_members); +} - @JsonKey(name: 'kind') - final String $type; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTSchemaSMPLCopyWith get copyWith => - _$DHTSchemaSMPLCopyWithImpl(this, _$identity); +@JsonKey(name: 'kind') +final String $type; - @override - Map toJson() { - return _$DHTSchemaSMPLToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTSchemaSMPL && - (identical(other.oCnt, oCnt) || other.oCnt == oCnt) && - const DeepCollectionEquality().equals(other._members, _members)); - } +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTSchemaSMPLCopyWith get copyWith => _$DHTSchemaSMPLCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$DHTSchemaSMPLToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTSchemaSMPL&&(identical(other.oCnt, oCnt) || other.oCnt == oCnt)&&const DeepCollectionEquality().equals(other._members, _members)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,oCnt,const DeepCollectionEquality().hash(_members)); + +@override +String toString() { + return 'DHTSchema.smpl(oCnt: $oCnt, members: $members)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, oCnt, const DeepCollectionEquality().hash(_members)); - @override - String toString() { - return 'DHTSchema.smpl(oCnt: $oCnt, members: $members)'; - } } /// @nodoc -abstract mixin class $DHTSchemaSMPLCopyWith<$Res> - implements $DHTSchemaCopyWith<$Res> { - factory $DHTSchemaSMPLCopyWith( - DHTSchemaSMPL value, $Res Function(DHTSchemaSMPL) _then) = - _$DHTSchemaSMPLCopyWithImpl; - @override - @useResult - $Res call({int oCnt, List members}); -} +abstract mixin class $DHTSchemaSMPLCopyWith<$Res> implements $DHTSchemaCopyWith<$Res> { + factory $DHTSchemaSMPLCopyWith(DHTSchemaSMPL value, $Res Function(DHTSchemaSMPL) _then) = _$DHTSchemaSMPLCopyWithImpl; +@override @useResult +$Res call({ + int oCnt, List members +}); + + + +} /// @nodoc class _$DHTSchemaSMPLCopyWithImpl<$Res> implements $DHTSchemaSMPLCopyWith<$Res> { @@ -248,71 +369,63 @@ class _$DHTSchemaSMPLCopyWithImpl<$Res> final DHTSchemaSMPL _self; final $Res Function(DHTSchemaSMPL) _then; - /// Create a copy of DHTSchema - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? oCnt = null, - Object? members = null, - }) { - return _then(DHTSchemaSMPL( - oCnt: null == oCnt - ? _self.oCnt - : oCnt // ignore: cast_nullable_to_non_nullable - as int, - members: null == members - ? _self._members - : members // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of DHTSchema +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? oCnt = null,Object? members = null,}) { + return _then(DHTSchemaSMPL( +oCnt: null == oCnt ? _self.oCnt : oCnt // ignore: cast_nullable_to_non_nullable +as int,members: null == members ? _self._members : members // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$DHTSchemaMember { - MemberId get mKey; - int get mCnt; - /// Create a copy of DHTSchemaMember - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTSchemaMemberCopyWith get copyWith => - _$DHTSchemaMemberCopyWithImpl( - this as DHTSchemaMember, _$identity); + BareMemberId get mKey; int get mCnt; +/// Create a copy of DHTSchemaMember +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTSchemaMemberCopyWith get copyWith => _$DHTSchemaMemberCopyWithImpl(this as DHTSchemaMember, _$identity); /// Serializes this DHTSchemaMember to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTSchemaMember && - (identical(other.mKey, mKey) || other.mKey == mKey) && - (identical(other.mCnt, mCnt) || other.mCnt == mCnt)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, mKey, mCnt); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTSchemaMember&&(identical(other.mKey, mKey) || other.mKey == mKey)&&(identical(other.mCnt, mCnt) || other.mCnt == mCnt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,mKey,mCnt); + +@override +String toString() { + return 'DHTSchemaMember(mKey: $mKey, mCnt: $mCnt)'; +} + - @override - String toString() { - return 'DHTSchemaMember(mKey: $mKey, mCnt: $mCnt)'; - } } /// @nodoc -abstract mixin class $DHTSchemaMemberCopyWith<$Res> { - factory $DHTSchemaMemberCopyWith( - DHTSchemaMember value, $Res Function(DHTSchemaMember) _then) = - _$DHTSchemaMemberCopyWithImpl; - @useResult - $Res call({MemberId mKey, int mCnt}); -} +abstract mixin class $DHTSchemaMemberCopyWith<$Res> { + factory $DHTSchemaMemberCopyWith(DHTSchemaMember value, $Res Function(DHTSchemaMember) _then) = _$DHTSchemaMemberCopyWithImpl; +@useResult +$Res call({ + BareMemberId mKey, int mCnt +}); + + + +} /// @nodoc class _$DHTSchemaMemberCopyWithImpl<$Res> implements $DHTSchemaMemberCopyWith<$Res> { @@ -321,85 +434,193 @@ class _$DHTSchemaMemberCopyWithImpl<$Res> final DHTSchemaMember _self; final $Res Function(DHTSchemaMember) _then; - /// Create a copy of DHTSchemaMember - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? mKey = null, - Object? mCnt = null, - }) { - return _then(_self.copyWith( - mKey: null == mKey - ? _self.mKey - : mKey // ignore: cast_nullable_to_non_nullable - as MemberId, - mCnt: null == mCnt - ? _self.mCnt - : mCnt // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DHTSchemaMember +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? mKey = null,Object? mCnt = null,}) { + return _then(_self.copyWith( +mKey: null == mKey ? _self.mKey : mKey // ignore: cast_nullable_to_non_nullable +as BareMemberId,mCnt: null == mCnt ? _self.mCnt : mCnt // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DHTSchemaMember]. +extension DHTSchemaMemberPatterns on DHTSchemaMember { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DHTSchemaMember value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DHTSchemaMember() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DHTSchemaMember value) $default,){ +final _that = this; +switch (_that) { +case _DHTSchemaMember(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DHTSchemaMember value)? $default,){ +final _that = this; +switch (_that) { +case _DHTSchemaMember() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BareMemberId mKey, int mCnt)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DHTSchemaMember() when $default != null: +return $default(_that.mKey,_that.mCnt);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BareMemberId mKey, int mCnt) $default,) {final _that = this; +switch (_that) { +case _DHTSchemaMember(): +return $default(_that.mKey,_that.mCnt);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BareMemberId mKey, int mCnt)? $default,) {final _that = this; +switch (_that) { +case _DHTSchemaMember() when $default != null: +return $default(_that.mKey,_that.mCnt);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DHTSchemaMember implements DHTSchemaMember { - const _DHTSchemaMember({required this.mKey, required this.mCnt}) - : assert(mCnt > 0 && mCnt <= 65535, 'value out of range'); - factory _DHTSchemaMember.fromJson(Map json) => - _$DHTSchemaMemberFromJson(json); + const _DHTSchemaMember({required this.mKey, required this.mCnt}): assert(mCnt > 0 && mCnt <= 65535, 'value out of range'); + factory _DHTSchemaMember.fromJson(Map json) => _$DHTSchemaMemberFromJson(json); - @override - final MemberId mKey; - @override - final int mCnt; +@override final BareMemberId mKey; +@override final int mCnt; - /// Create a copy of DHTSchemaMember - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DHTSchemaMemberCopyWith<_DHTSchemaMember> get copyWith => - __$DHTSchemaMemberCopyWithImpl<_DHTSchemaMember>(this, _$identity); +/// Create a copy of DHTSchemaMember +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DHTSchemaMemberCopyWith<_DHTSchemaMember> get copyWith => __$DHTSchemaMemberCopyWithImpl<_DHTSchemaMember>(this, _$identity); - @override - Map toJson() { - return _$DHTSchemaMemberToJson( - this, - ); - } +@override +Map toJson() { + return _$DHTSchemaMemberToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DHTSchemaMember && - (identical(other.mKey, mKey) || other.mKey == mKey) && - (identical(other.mCnt, mCnt) || other.mCnt == mCnt)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DHTSchemaMember&&(identical(other.mKey, mKey) || other.mKey == mKey)&&(identical(other.mCnt, mCnt) || other.mCnt == mCnt)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,mKey,mCnt); + +@override +String toString() { + return 'DHTSchemaMember(mKey: $mKey, mCnt: $mCnt)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, mKey, mCnt); - @override - String toString() { - return 'DHTSchemaMember(mKey: $mKey, mCnt: $mCnt)'; - } } /// @nodoc -abstract mixin class _$DHTSchemaMemberCopyWith<$Res> - implements $DHTSchemaMemberCopyWith<$Res> { - factory _$DHTSchemaMemberCopyWith( - _DHTSchemaMember value, $Res Function(_DHTSchemaMember) _then) = - __$DHTSchemaMemberCopyWithImpl; - @override - @useResult - $Res call({MemberId mKey, int mCnt}); -} +abstract mixin class _$DHTSchemaMemberCopyWith<$Res> implements $DHTSchemaMemberCopyWith<$Res> { + factory _$DHTSchemaMemberCopyWith(_DHTSchemaMember value, $Res Function(_DHTSchemaMember) _then) = __$DHTSchemaMemberCopyWithImpl; +@override @useResult +$Res call({ + BareMemberId mKey, int mCnt +}); + + + +} /// @nodoc class __$DHTSchemaMemberCopyWithImpl<$Res> implements _$DHTSchemaMemberCopyWith<$Res> { @@ -408,82 +629,63 @@ class __$DHTSchemaMemberCopyWithImpl<$Res> final _DHTSchemaMember _self; final $Res Function(_DHTSchemaMember) _then; - /// Create a copy of DHTSchemaMember - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? mKey = null, - Object? mCnt = null, - }) { - return _then(_DHTSchemaMember( - mKey: null == mKey - ? _self.mKey - : mKey // ignore: cast_nullable_to_non_nullable - as MemberId, - mCnt: null == mCnt - ? _self.mCnt - : mCnt // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of DHTSchemaMember +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? mKey = null,Object? mCnt = null,}) { + return _then(_DHTSchemaMember( +mKey: null == mKey ? _self.mKey : mKey // ignore: cast_nullable_to_non_nullable +as BareMemberId,mCnt: null == mCnt ? _self.mCnt : mCnt // ignore: cast_nullable_to_non_nullable +as int, + )); } + +} + + /// @nodoc mixin _$DHTRecordDescriptor { - RecordKey get key; - PublicKey get owner; - DHTSchema get schema; - SecretKey? get ownerSecret; - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTRecordDescriptorCopyWith get copyWith => - _$DHTRecordDescriptorCopyWithImpl( - this as DHTRecordDescriptor, _$identity); + RecordKey get key; PublicKey get owner; DHTSchema get schema; SecretKey? get ownerSecret; +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTRecordDescriptorCopyWith get copyWith => _$DHTRecordDescriptorCopyWithImpl(this as DHTRecordDescriptor, _$identity); /// Serializes this DHTRecordDescriptor to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTRecordDescriptor && - (identical(other.key, key) || other.key == key) && - (identical(other.owner, owner) || other.owner == owner) && - (identical(other.schema, schema) || other.schema == schema) && - (identical(other.ownerSecret, ownerSecret) || - other.ownerSecret == ownerSecret)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, key, owner, schema, ownerSecret); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTRecordDescriptor&&(identical(other.key, key) || other.key == key)&&(identical(other.owner, owner) || other.owner == owner)&&(identical(other.schema, schema) || other.schema == schema)&&(identical(other.ownerSecret, ownerSecret) || other.ownerSecret == ownerSecret)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,owner,schema,ownerSecret); + +@override +String toString() { + return 'DHTRecordDescriptor(key: $key, owner: $owner, schema: $schema, ownerSecret: $ownerSecret)'; +} + - @override - String toString() { - return 'DHTRecordDescriptor(key: $key, owner: $owner, schema: $schema, ownerSecret: $ownerSecret)'; - } } /// @nodoc -abstract mixin class $DHTRecordDescriptorCopyWith<$Res> { - factory $DHTRecordDescriptorCopyWith( - DHTRecordDescriptor value, $Res Function(DHTRecordDescriptor) _then) = - _$DHTRecordDescriptorCopyWithImpl; - @useResult - $Res call( - {RecordKey key, - PublicKey owner, - DHTSchema schema, - SecretKey? ownerSecret}); +abstract mixin class $DHTRecordDescriptorCopyWith<$Res> { + factory $DHTRecordDescriptorCopyWith(DHTRecordDescriptor value, $Res Function(DHTRecordDescriptor) _then) = _$DHTRecordDescriptorCopyWithImpl; +@useResult +$Res call({ + RecordKey key, PublicKey owner, DHTSchema schema, SecretKey? ownerSecret +}); + + +$DHTSchemaCopyWith<$Res> get schema; - $DHTSchemaCopyWith<$Res> get schema; } - /// @nodoc class _$DHTRecordDescriptorCopyWithImpl<$Res> implements $DHTRecordDescriptorCopyWith<$Res> { @@ -492,123 +694,206 @@ class _$DHTRecordDescriptorCopyWithImpl<$Res> final DHTRecordDescriptor _self; final $Res Function(DHTRecordDescriptor) _then; - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? key = null, - Object? owner = null, - Object? schema = null, - Object? ownerSecret = freezed, - }) { - return _then(_self.copyWith( - key: null == key - ? _self.key - : key // ignore: cast_nullable_to_non_nullable - as RecordKey, - owner: null == owner - ? _self.owner - : owner // ignore: cast_nullable_to_non_nullable - as PublicKey, - schema: null == schema - ? _self.schema - : schema // ignore: cast_nullable_to_non_nullable - as DHTSchema, - ownerSecret: freezed == ownerSecret - ? _self.ownerSecret - : ownerSecret // ignore: cast_nullable_to_non_nullable - as SecretKey?, - )); - } +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? key = null,Object? owner = null,Object? schema = null,Object? ownerSecret = freezed,}) { + return _then(_self.copyWith( +key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as RecordKey,owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable +as PublicKey,schema: null == schema ? _self.schema : schema // ignore: cast_nullable_to_non_nullable +as DHTSchema,ownerSecret: freezed == ownerSecret ? _self.ownerSecret : ownerSecret // ignore: cast_nullable_to_non_nullable +as SecretKey?, + )); +} +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DHTSchemaCopyWith<$Res> get schema { + + return $DHTSchemaCopyWith<$Res>(_self.schema, (value) { + return _then(_self.copyWith(schema: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [DHTRecordDescriptor]. +extension DHTRecordDescriptorPatterns on DHTRecordDescriptor { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DHTRecordDescriptor value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DHTRecordDescriptor() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DHTRecordDescriptor value) $default,){ +final _that = this; +switch (_that) { +case _DHTRecordDescriptor(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DHTRecordDescriptor value)? $default,){ +final _that = this; +switch (_that) { +case _DHTRecordDescriptor() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( RecordKey key, PublicKey owner, DHTSchema schema, SecretKey? ownerSecret)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DHTRecordDescriptor() when $default != null: +return $default(_that.key,_that.owner,_that.schema,_that.ownerSecret);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( RecordKey key, PublicKey owner, DHTSchema schema, SecretKey? ownerSecret) $default,) {final _that = this; +switch (_that) { +case _DHTRecordDescriptor(): +return $default(_that.key,_that.owner,_that.schema,_that.ownerSecret);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( RecordKey key, PublicKey owner, DHTSchema schema, SecretKey? ownerSecret)? $default,) {final _that = this; +switch (_that) { +case _DHTRecordDescriptor() when $default != null: +return $default(_that.key,_that.owner,_that.schema,_that.ownerSecret);case _: + return null; + +} +} - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DHTSchemaCopyWith<$Res> get schema { - return $DHTSchemaCopyWith<$Res>(_self.schema, (value) { - return _then(_self.copyWith(schema: value)); - }); - } } /// @nodoc @JsonSerializable() + class _DHTRecordDescriptor implements DHTRecordDescriptor { - const _DHTRecordDescriptor( - {required this.key, - required this.owner, - required this.schema, - this.ownerSecret}); - factory _DHTRecordDescriptor.fromJson(Map json) => - _$DHTRecordDescriptorFromJson(json); + const _DHTRecordDescriptor({required this.key, required this.owner, required this.schema, this.ownerSecret}); + factory _DHTRecordDescriptor.fromJson(Map json) => _$DHTRecordDescriptorFromJson(json); - @override - final RecordKey key; - @override - final PublicKey owner; - @override - final DHTSchema schema; - @override - final SecretKey? ownerSecret; +@override final RecordKey key; +@override final PublicKey owner; +@override final DHTSchema schema; +@override final SecretKey? ownerSecret; - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DHTRecordDescriptorCopyWith<_DHTRecordDescriptor> get copyWith => - __$DHTRecordDescriptorCopyWithImpl<_DHTRecordDescriptor>( - this, _$identity); +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DHTRecordDescriptorCopyWith<_DHTRecordDescriptor> get copyWith => __$DHTRecordDescriptorCopyWithImpl<_DHTRecordDescriptor>(this, _$identity); - @override - Map toJson() { - return _$DHTRecordDescriptorToJson( - this, - ); - } +@override +Map toJson() { + return _$DHTRecordDescriptorToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DHTRecordDescriptor && - (identical(other.key, key) || other.key == key) && - (identical(other.owner, owner) || other.owner == owner) && - (identical(other.schema, schema) || other.schema == schema) && - (identical(other.ownerSecret, ownerSecret) || - other.ownerSecret == ownerSecret)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DHTRecordDescriptor&&(identical(other.key, key) || other.key == key)&&(identical(other.owner, owner) || other.owner == owner)&&(identical(other.schema, schema) || other.schema == schema)&&(identical(other.ownerSecret, ownerSecret) || other.ownerSecret == ownerSecret)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,owner,schema,ownerSecret); + +@override +String toString() { + return 'DHTRecordDescriptor(key: $key, owner: $owner, schema: $schema, ownerSecret: $ownerSecret)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, key, owner, schema, ownerSecret); - @override - String toString() { - return 'DHTRecordDescriptor(key: $key, owner: $owner, schema: $schema, ownerSecret: $ownerSecret)'; - } } /// @nodoc -abstract mixin class _$DHTRecordDescriptorCopyWith<$Res> - implements $DHTRecordDescriptorCopyWith<$Res> { - factory _$DHTRecordDescriptorCopyWith(_DHTRecordDescriptor value, - $Res Function(_DHTRecordDescriptor) _then) = - __$DHTRecordDescriptorCopyWithImpl; - @override - @useResult - $Res call( - {RecordKey key, - PublicKey owner, - DHTSchema schema, - SecretKey? ownerSecret}); +abstract mixin class _$DHTRecordDescriptorCopyWith<$Res> implements $DHTRecordDescriptorCopyWith<$Res> { + factory _$DHTRecordDescriptorCopyWith(_DHTRecordDescriptor value, $Res Function(_DHTRecordDescriptor) _then) = __$DHTRecordDescriptorCopyWithImpl; +@override @useResult +$Res call({ + RecordKey key, PublicKey owner, DHTSchema schema, SecretKey? ownerSecret +}); + + +@override $DHTSchemaCopyWith<$Res> get schema; - @override - $DHTSchemaCopyWith<$Res> get schema; } - /// @nodoc class __$DHTRecordDescriptorCopyWithImpl<$Res> implements _$DHTRecordDescriptorCopyWith<$Res> { @@ -617,661 +902,863 @@ class __$DHTRecordDescriptorCopyWithImpl<$Res> final _DHTRecordDescriptor _self; final $Res Function(_DHTRecordDescriptor) _then; - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? key = null, - Object? owner = null, - Object? schema = null, - Object? ownerSecret = freezed, - }) { - return _then(_DHTRecordDescriptor( - key: null == key - ? _self.key - : key // ignore: cast_nullable_to_non_nullable - as RecordKey, - owner: null == owner - ? _self.owner - : owner // ignore: cast_nullable_to_non_nullable - as PublicKey, - schema: null == schema - ? _self.schema - : schema // ignore: cast_nullable_to_non_nullable - as DHTSchema, - ownerSecret: freezed == ownerSecret - ? _self.ownerSecret - : ownerSecret // ignore: cast_nullable_to_non_nullable - as SecretKey?, - )); - } - - /// Create a copy of DHTRecordDescriptor - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $DHTSchemaCopyWith<$Res> get schema { - return $DHTSchemaCopyWith<$Res>(_self.schema, (value) { - return _then(_self.copyWith(schema: value)); - }); - } +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? key = null,Object? owner = null,Object? schema = null,Object? ownerSecret = freezed,}) { + return _then(_DHTRecordDescriptor( +key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as RecordKey,owner: null == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable +as PublicKey,schema: null == schema ? _self.schema : schema // ignore: cast_nullable_to_non_nullable +as DHTSchema,ownerSecret: freezed == ownerSecret ? _self.ownerSecret : ownerSecret // ignore: cast_nullable_to_non_nullable +as SecretKey?, + )); } +/// Create a copy of DHTRecordDescriptor +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$DHTSchemaCopyWith<$Res> get schema { + + return $DHTSchemaCopyWith<$Res>(_self.schema, (value) { + return _then(_self.copyWith(schema: value)); + }); +} +} + + /// @nodoc mixin _$ValueData { - int get seq; - @Uint8ListJsonConverter.jsIsArray() - Uint8List get data; - PublicKey get writer; - /// Create a copy of ValueData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $ValueDataCopyWith get copyWith => - _$ValueDataCopyWithImpl(this as ValueData, _$identity); + int get seq;@Uint8ListJsonConverter.jsIsArray() Uint8List get data; PublicKey get writer; +/// Create a copy of ValueData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ValueDataCopyWith get copyWith => _$ValueDataCopyWithImpl(this as ValueData, _$identity); /// Serializes this ValueData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is ValueData && - (identical(other.seq, seq) || other.seq == seq) && - const DeepCollectionEquality().equals(other.data, data) && - (identical(other.writer, writer) || other.writer == writer)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, seq, const DeepCollectionEquality().hash(data), writer); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is ValueData&&(identical(other.seq, seq) || other.seq == seq)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.writer, writer) || other.writer == writer)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,seq,const DeepCollectionEquality().hash(data),writer); + +@override +String toString() { + return 'ValueData(seq: $seq, data: $data, writer: $writer)'; +} + - @override - String toString() { - return 'ValueData(seq: $seq, data: $data, writer: $writer)'; - } } /// @nodoc -abstract mixin class $ValueDataCopyWith<$Res> { - factory $ValueDataCopyWith(ValueData value, $Res Function(ValueData) _then) = - _$ValueDataCopyWithImpl; - @useResult - $Res call( - {int seq, - @Uint8ListJsonConverter.jsIsArray() Uint8List data, - PublicKey writer}); -} +abstract mixin class $ValueDataCopyWith<$Res> { + factory $ValueDataCopyWith(ValueData value, $Res Function(ValueData) _then) = _$ValueDataCopyWithImpl; +@useResult +$Res call({ + int seq,@Uint8ListJsonConverter.jsIsArray() Uint8List data, PublicKey writer +}); + + + +} /// @nodoc -class _$ValueDataCopyWithImpl<$Res> implements $ValueDataCopyWith<$Res> { +class _$ValueDataCopyWithImpl<$Res> + implements $ValueDataCopyWith<$Res> { _$ValueDataCopyWithImpl(this._self, this._then); final ValueData _self; final $Res Function(ValueData) _then; - /// Create a copy of ValueData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? seq = null, - Object? data = null, - Object? writer = null, - }) { - return _then(_self.copyWith( - seq: null == seq - ? _self.seq - : seq // ignore: cast_nullable_to_non_nullable - as int, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Uint8List, - writer: null == writer - ? _self.writer - : writer // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } +/// Create a copy of ValueData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? seq = null,Object? data = null,Object? writer = null,}) { + return _then(_self.copyWith( +seq: null == seq ? _self.seq : seq // ignore: cast_nullable_to_non_nullable +as int,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Uint8List,writer: null == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); +} + +} + + +/// Adds pattern-matching-related methods to [ValueData]. +extension ValueDataPatterns on ValueData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _ValueData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _ValueData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _ValueData value) $default,){ +final _that = this; +switch (_that) { +case _ValueData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _ValueData value)? $default,){ +final _that = this; +switch (_that) { +case _ValueData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int seq, @Uint8ListJsonConverter.jsIsArray() Uint8List data, PublicKey writer)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _ValueData() when $default != null: +return $default(_that.seq,_that.data,_that.writer);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int seq, @Uint8ListJsonConverter.jsIsArray() Uint8List data, PublicKey writer) $default,) {final _that = this; +switch (_that) { +case _ValueData(): +return $default(_that.seq,_that.data,_that.writer);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int seq, @Uint8ListJsonConverter.jsIsArray() Uint8List data, PublicKey writer)? $default,) {final _that = this; +switch (_that) { +case _ValueData() when $default != null: +return $default(_that.seq,_that.data,_that.writer);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _ValueData implements ValueData { - const _ValueData( - {required this.seq, - @Uint8ListJsonConverter.jsIsArray() required this.data, - required this.writer}) - : assert(seq >= 0, 'seq out of range'); - factory _ValueData.fromJson(Map json) => - _$ValueDataFromJson(json); + const _ValueData({required this.seq, @Uint8ListJsonConverter.jsIsArray() required this.data, required this.writer}): assert(seq >= 0 && seq <= 4294967295, 'seq out of range'),assert(data.length <= ValueData.maxLen, 'data too large'); + factory _ValueData.fromJson(Map json) => _$ValueDataFromJson(json); - @override - final int seq; - @override - @Uint8ListJsonConverter.jsIsArray() - final Uint8List data; - @override - final PublicKey writer; +@override final int seq; +@override@Uint8ListJsonConverter.jsIsArray() final Uint8List data; +@override final PublicKey writer; - /// Create a copy of ValueData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$ValueDataCopyWith<_ValueData> get copyWith => - __$ValueDataCopyWithImpl<_ValueData>(this, _$identity); +/// Create a copy of ValueData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ValueDataCopyWith<_ValueData> get copyWith => __$ValueDataCopyWithImpl<_ValueData>(this, _$identity); - @override - Map toJson() { - return _$ValueDataToJson( - this, - ); - } +@override +Map toJson() { + return _$ValueDataToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _ValueData && - (identical(other.seq, seq) || other.seq == seq) && - const DeepCollectionEquality().equals(other.data, data) && - (identical(other.writer, writer) || other.writer == writer)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _ValueData&&(identical(other.seq, seq) || other.seq == seq)&&const DeepCollectionEquality().equals(other.data, data)&&(identical(other.writer, writer) || other.writer == writer)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,seq,const DeepCollectionEquality().hash(data),writer); + +@override +String toString() { + return 'ValueData(seq: $seq, data: $data, writer: $writer)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, seq, const DeepCollectionEquality().hash(data), writer); - @override - String toString() { - return 'ValueData(seq: $seq, data: $data, writer: $writer)'; - } } /// @nodoc -abstract mixin class _$ValueDataCopyWith<$Res> - implements $ValueDataCopyWith<$Res> { - factory _$ValueDataCopyWith( - _ValueData value, $Res Function(_ValueData) _then) = - __$ValueDataCopyWithImpl; - @override - @useResult - $Res call( - {int seq, - @Uint8ListJsonConverter.jsIsArray() Uint8List data, - PublicKey writer}); -} +abstract mixin class _$ValueDataCopyWith<$Res> implements $ValueDataCopyWith<$Res> { + factory _$ValueDataCopyWith(_ValueData value, $Res Function(_ValueData) _then) = __$ValueDataCopyWithImpl; +@override @useResult +$Res call({ + int seq,@Uint8ListJsonConverter.jsIsArray() Uint8List data, PublicKey writer +}); + + + +} /// @nodoc -class __$ValueDataCopyWithImpl<$Res> implements _$ValueDataCopyWith<$Res> { +class __$ValueDataCopyWithImpl<$Res> + implements _$ValueDataCopyWith<$Res> { __$ValueDataCopyWithImpl(this._self, this._then); final _ValueData _self; final $Res Function(_ValueData) _then; - /// Create a copy of ValueData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? seq = null, - Object? data = null, - Object? writer = null, - }) { - return _then(_ValueData( - seq: null == seq - ? _self.seq - : seq // ignore: cast_nullable_to_non_nullable - as int, - data: null == data - ? _self.data - : data // ignore: cast_nullable_to_non_nullable - as Uint8List, - writer: null == writer - ? _self.writer - : writer // ignore: cast_nullable_to_non_nullable - as PublicKey, - )); - } +/// Create a copy of ValueData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? seq = null,Object? data = null,Object? writer = null,}) { + return _then(_ValueData( +seq: null == seq ? _self.seq : seq // ignore: cast_nullable_to_non_nullable +as int,data: null == data ? _self.data : data // ignore: cast_nullable_to_non_nullable +as Uint8List,writer: null == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable +as PublicKey, + )); } + +} + + /// @nodoc mixin _$SafetySpec { - int get hopCount; - Stability get stability; - Sequencing get sequencing; - RouteId? get preferredRoute; - /// Create a copy of SafetySpec - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $SafetySpecCopyWith get copyWith => - _$SafetySpecCopyWithImpl(this as SafetySpec, _$identity); + int get hopCount; Stability get stability; Sequencing get sequencing; RouteId? get preferredRoute; +/// Create a copy of SafetySpec +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SafetySpecCopyWith get copyWith => _$SafetySpecCopyWithImpl(this as SafetySpec, _$identity); /// Serializes this SafetySpec to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is SafetySpec && - (identical(other.hopCount, hopCount) || - other.hopCount == hopCount) && - (identical(other.stability, stability) || - other.stability == stability) && - (identical(other.sequencing, sequencing) || - other.sequencing == sequencing) && - (identical(other.preferredRoute, preferredRoute) || - other.preferredRoute == preferredRoute)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, hopCount, stability, sequencing, preferredRoute); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SafetySpec&&(identical(other.hopCount, hopCount) || other.hopCount == hopCount)&&(identical(other.stability, stability) || other.stability == stability)&&(identical(other.sequencing, sequencing) || other.sequencing == sequencing)&&(identical(other.preferredRoute, preferredRoute) || other.preferredRoute == preferredRoute)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hopCount,stability,sequencing,preferredRoute); + +@override +String toString() { + return 'SafetySpec(hopCount: $hopCount, stability: $stability, sequencing: $sequencing, preferredRoute: $preferredRoute)'; +} + - @override - String toString() { - return 'SafetySpec(hopCount: $hopCount, stability: $stability, sequencing: $sequencing, preferredRoute: $preferredRoute)'; - } } /// @nodoc -abstract mixin class $SafetySpecCopyWith<$Res> { - factory $SafetySpecCopyWith( - SafetySpec value, $Res Function(SafetySpec) _then) = - _$SafetySpecCopyWithImpl; - @useResult - $Res call( - {int hopCount, - Stability stability, - Sequencing sequencing, - RouteId? preferredRoute}); -} +abstract mixin class $SafetySpecCopyWith<$Res> { + factory $SafetySpecCopyWith(SafetySpec value, $Res Function(SafetySpec) _then) = _$SafetySpecCopyWithImpl; +@useResult +$Res call({ + int hopCount, Stability stability, Sequencing sequencing, RouteId? preferredRoute +}); + + + +} /// @nodoc -class _$SafetySpecCopyWithImpl<$Res> implements $SafetySpecCopyWith<$Res> { +class _$SafetySpecCopyWithImpl<$Res> + implements $SafetySpecCopyWith<$Res> { _$SafetySpecCopyWithImpl(this._self, this._then); final SafetySpec _self; final $Res Function(SafetySpec) _then; - /// Create a copy of SafetySpec - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? hopCount = null, - Object? stability = null, - Object? sequencing = null, - Object? preferredRoute = freezed, - }) { - return _then(_self.copyWith( - hopCount: null == hopCount - ? _self.hopCount - : hopCount // ignore: cast_nullable_to_non_nullable - as int, - stability: null == stability - ? _self.stability - : stability // ignore: cast_nullable_to_non_nullable - as Stability, - sequencing: null == sequencing - ? _self.sequencing - : sequencing // ignore: cast_nullable_to_non_nullable - as Sequencing, - preferredRoute: freezed == preferredRoute - ? _self.preferredRoute - : preferredRoute // ignore: cast_nullable_to_non_nullable - as RouteId?, - )); - } +/// Create a copy of SafetySpec +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? hopCount = null,Object? stability = null,Object? sequencing = null,Object? preferredRoute = freezed,}) { + return _then(_self.copyWith( +hopCount: null == hopCount ? _self.hopCount : hopCount // ignore: cast_nullable_to_non_nullable +as int,stability: null == stability ? _self.stability : stability // ignore: cast_nullable_to_non_nullable +as Stability,sequencing: null == sequencing ? _self.sequencing : sequencing // ignore: cast_nullable_to_non_nullable +as Sequencing,preferredRoute: freezed == preferredRoute ? _self.preferredRoute : preferredRoute // ignore: cast_nullable_to_non_nullable +as RouteId?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SafetySpec]. +extension SafetySpecPatterns on SafetySpec { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SafetySpec value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SafetySpec() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SafetySpec value) $default,){ +final _that = this; +switch (_that) { +case _SafetySpec(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SafetySpec value)? $default,){ +final _that = this; +switch (_that) { +case _SafetySpec() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int hopCount, Stability stability, Sequencing sequencing, RouteId? preferredRoute)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SafetySpec() when $default != null: +return $default(_that.hopCount,_that.stability,_that.sequencing,_that.preferredRoute);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int hopCount, Stability stability, Sequencing sequencing, RouteId? preferredRoute) $default,) {final _that = this; +switch (_that) { +case _SafetySpec(): +return $default(_that.hopCount,_that.stability,_that.sequencing,_that.preferredRoute);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int hopCount, Stability stability, Sequencing sequencing, RouteId? preferredRoute)? $default,) {final _that = this; +switch (_that) { +case _SafetySpec() when $default != null: +return $default(_that.hopCount,_that.stability,_that.sequencing,_that.preferredRoute);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _SafetySpec implements SafetySpec { - const _SafetySpec( - {required this.hopCount, - required this.stability, - required this.sequencing, - this.preferredRoute}); - factory _SafetySpec.fromJson(Map json) => - _$SafetySpecFromJson(json); + const _SafetySpec({required this.hopCount, required this.stability, required this.sequencing, this.preferredRoute}); + factory _SafetySpec.fromJson(Map json) => _$SafetySpecFromJson(json); - @override - final int hopCount; - @override - final Stability stability; - @override - final Sequencing sequencing; - @override - final RouteId? preferredRoute; +@override final int hopCount; +@override final Stability stability; +@override final Sequencing sequencing; +@override final RouteId? preferredRoute; - /// Create a copy of SafetySpec - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$SafetySpecCopyWith<_SafetySpec> get copyWith => - __$SafetySpecCopyWithImpl<_SafetySpec>(this, _$identity); +/// Create a copy of SafetySpec +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SafetySpecCopyWith<_SafetySpec> get copyWith => __$SafetySpecCopyWithImpl<_SafetySpec>(this, _$identity); - @override - Map toJson() { - return _$SafetySpecToJson( - this, - ); - } +@override +Map toJson() { + return _$SafetySpecToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _SafetySpec && - (identical(other.hopCount, hopCount) || - other.hopCount == hopCount) && - (identical(other.stability, stability) || - other.stability == stability) && - (identical(other.sequencing, sequencing) || - other.sequencing == sequencing) && - (identical(other.preferredRoute, preferredRoute) || - other.preferredRoute == preferredRoute)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SafetySpec&&(identical(other.hopCount, hopCount) || other.hopCount == hopCount)&&(identical(other.stability, stability) || other.stability == stability)&&(identical(other.sequencing, sequencing) || other.sequencing == sequencing)&&(identical(other.preferredRoute, preferredRoute) || other.preferredRoute == preferredRoute)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,hopCount,stability,sequencing,preferredRoute); + +@override +String toString() { + return 'SafetySpec(hopCount: $hopCount, stability: $stability, sequencing: $sequencing, preferredRoute: $preferredRoute)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, hopCount, stability, sequencing, preferredRoute); - @override - String toString() { - return 'SafetySpec(hopCount: $hopCount, stability: $stability, sequencing: $sequencing, preferredRoute: $preferredRoute)'; - } } /// @nodoc -abstract mixin class _$SafetySpecCopyWith<$Res> - implements $SafetySpecCopyWith<$Res> { - factory _$SafetySpecCopyWith( - _SafetySpec value, $Res Function(_SafetySpec) _then) = - __$SafetySpecCopyWithImpl; - @override - @useResult - $Res call( - {int hopCount, - Stability stability, - Sequencing sequencing, - RouteId? preferredRoute}); -} +abstract mixin class _$SafetySpecCopyWith<$Res> implements $SafetySpecCopyWith<$Res> { + factory _$SafetySpecCopyWith(_SafetySpec value, $Res Function(_SafetySpec) _then) = __$SafetySpecCopyWithImpl; +@override @useResult +$Res call({ + int hopCount, Stability stability, Sequencing sequencing, RouteId? preferredRoute +}); + + + +} /// @nodoc -class __$SafetySpecCopyWithImpl<$Res> implements _$SafetySpecCopyWith<$Res> { +class __$SafetySpecCopyWithImpl<$Res> + implements _$SafetySpecCopyWith<$Res> { __$SafetySpecCopyWithImpl(this._self, this._then); final _SafetySpec _self; final $Res Function(_SafetySpec) _then; - /// Create a copy of SafetySpec - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? hopCount = null, - Object? stability = null, - Object? sequencing = null, - Object? preferredRoute = freezed, - }) { - return _then(_SafetySpec( - hopCount: null == hopCount - ? _self.hopCount - : hopCount // ignore: cast_nullable_to_non_nullable - as int, - stability: null == stability - ? _self.stability - : stability // ignore: cast_nullable_to_non_nullable - as Stability, - sequencing: null == sequencing - ? _self.sequencing - : sequencing // ignore: cast_nullable_to_non_nullable - as Sequencing, - preferredRoute: freezed == preferredRoute - ? _self.preferredRoute - : preferredRoute // ignore: cast_nullable_to_non_nullable - as RouteId?, - )); - } +/// Create a copy of SafetySpec +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? hopCount = null,Object? stability = null,Object? sequencing = null,Object? preferredRoute = freezed,}) { + return _then(_SafetySpec( +hopCount: null == hopCount ? _self.hopCount : hopCount // ignore: cast_nullable_to_non_nullable +as int,stability: null == stability ? _self.stability : stability // ignore: cast_nullable_to_non_nullable +as Stability,sequencing: null == sequencing ? _self.sequencing : sequencing // ignore: cast_nullable_to_non_nullable +as Sequencing,preferredRoute: freezed == preferredRoute ? _self.preferredRoute : preferredRoute // ignore: cast_nullable_to_non_nullable +as RouteId?, + )); } + +} + + /// @nodoc mixin _$RouteBlob { - RouteId get routeId; - @Uint8ListJsonConverter.jsIsArray() - Uint8List get blob; - /// Create a copy of RouteBlob - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RouteBlobCopyWith get copyWith => - _$RouteBlobCopyWithImpl(this as RouteBlob, _$identity); + RouteId get routeId;@Uint8ListJsonConverter.jsIsArray() Uint8List get blob; +/// Create a copy of RouteBlob +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RouteBlobCopyWith get copyWith => _$RouteBlobCopyWithImpl(this as RouteBlob, _$identity); /// Serializes this RouteBlob to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RouteBlob && - (identical(other.routeId, routeId) || other.routeId == routeId) && - const DeepCollectionEquality().equals(other.blob, blob)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, routeId, const DeepCollectionEquality().hash(blob)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RouteBlob&&(identical(other.routeId, routeId) || other.routeId == routeId)&&const DeepCollectionEquality().equals(other.blob, blob)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,routeId,const DeepCollectionEquality().hash(blob)); + +@override +String toString() { + return 'RouteBlob(routeId: $routeId, blob: $blob)'; +} + - @override - String toString() { - return 'RouteBlob(routeId: $routeId, blob: $blob)'; - } } /// @nodoc -abstract mixin class $RouteBlobCopyWith<$Res> { - factory $RouteBlobCopyWith(RouteBlob value, $Res Function(RouteBlob) _then) = - _$RouteBlobCopyWithImpl; - @useResult - $Res call( - {RouteId routeId, @Uint8ListJsonConverter.jsIsArray() Uint8List blob}); -} +abstract mixin class $RouteBlobCopyWith<$Res> { + factory $RouteBlobCopyWith(RouteBlob value, $Res Function(RouteBlob) _then) = _$RouteBlobCopyWithImpl; +@useResult +$Res call({ + RouteId routeId,@Uint8ListJsonConverter.jsIsArray() Uint8List blob +}); + + + +} /// @nodoc -class _$RouteBlobCopyWithImpl<$Res> implements $RouteBlobCopyWith<$Res> { +class _$RouteBlobCopyWithImpl<$Res> + implements $RouteBlobCopyWith<$Res> { _$RouteBlobCopyWithImpl(this._self, this._then); final RouteBlob _self; final $Res Function(RouteBlob) _then; - /// Create a copy of RouteBlob - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? routeId = null, - Object? blob = null, - }) { - return _then(_self.copyWith( - routeId: null == routeId - ? _self.routeId - : routeId // ignore: cast_nullable_to_non_nullable - as RouteId, - blob: null == blob - ? _self.blob - : blob // ignore: cast_nullable_to_non_nullable - as Uint8List, - )); - } +/// Create a copy of RouteBlob +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? routeId = null,Object? blob = null,}) { + return _then(_self.copyWith( +routeId: null == routeId ? _self.routeId : routeId // ignore: cast_nullable_to_non_nullable +as RouteId,blob: null == blob ? _self.blob : blob // ignore: cast_nullable_to_non_nullable +as Uint8List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [RouteBlob]. +extension RouteBlobPatterns on RouteBlob { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _RouteBlob value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RouteBlob() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _RouteBlob value) $default,){ +final _that = this; +switch (_that) { +case _RouteBlob(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _RouteBlob value)? $default,){ +final _that = this; +switch (_that) { +case _RouteBlob() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( RouteId routeId, @Uint8ListJsonConverter.jsIsArray() Uint8List blob)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RouteBlob() when $default != null: +return $default(_that.routeId,_that.blob);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( RouteId routeId, @Uint8ListJsonConverter.jsIsArray() Uint8List blob) $default,) {final _that = this; +switch (_that) { +case _RouteBlob(): +return $default(_that.routeId,_that.blob);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( RouteId routeId, @Uint8ListJsonConverter.jsIsArray() Uint8List blob)? $default,) {final _that = this; +switch (_that) { +case _RouteBlob() when $default != null: +return $default(_that.routeId,_that.blob);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _RouteBlob implements RouteBlob { - const _RouteBlob( - {required this.routeId, - @Uint8ListJsonConverter.jsIsArray() required this.blob}); - factory _RouteBlob.fromJson(Map json) => - _$RouteBlobFromJson(json); + const _RouteBlob({required this.routeId, @Uint8ListJsonConverter.jsIsArray() required this.blob}); + factory _RouteBlob.fromJson(Map json) => _$RouteBlobFromJson(json); - @override - final RouteId routeId; - @override - @Uint8ListJsonConverter.jsIsArray() - final Uint8List blob; +@override final RouteId routeId; +@override@Uint8ListJsonConverter.jsIsArray() final Uint8List blob; - /// Create a copy of RouteBlob - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$RouteBlobCopyWith<_RouteBlob> get copyWith => - __$RouteBlobCopyWithImpl<_RouteBlob>(this, _$identity); +/// Create a copy of RouteBlob +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RouteBlobCopyWith<_RouteBlob> get copyWith => __$RouteBlobCopyWithImpl<_RouteBlob>(this, _$identity); - @override - Map toJson() { - return _$RouteBlobToJson( - this, - ); - } +@override +Map toJson() { + return _$RouteBlobToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _RouteBlob && - (identical(other.routeId, routeId) || other.routeId == routeId) && - const DeepCollectionEquality().equals(other.blob, blob)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _RouteBlob&&(identical(other.routeId, routeId) || other.routeId == routeId)&&const DeepCollectionEquality().equals(other.blob, blob)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,routeId,const DeepCollectionEquality().hash(blob)); + +@override +String toString() { + return 'RouteBlob(routeId: $routeId, blob: $blob)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, routeId, const DeepCollectionEquality().hash(blob)); - @override - String toString() { - return 'RouteBlob(routeId: $routeId, blob: $blob)'; - } } /// @nodoc -abstract mixin class _$RouteBlobCopyWith<$Res> - implements $RouteBlobCopyWith<$Res> { - factory _$RouteBlobCopyWith( - _RouteBlob value, $Res Function(_RouteBlob) _then) = - __$RouteBlobCopyWithImpl; - @override - @useResult - $Res call( - {RouteId routeId, @Uint8ListJsonConverter.jsIsArray() Uint8List blob}); -} +abstract mixin class _$RouteBlobCopyWith<$Res> implements $RouteBlobCopyWith<$Res> { + factory _$RouteBlobCopyWith(_RouteBlob value, $Res Function(_RouteBlob) _then) = __$RouteBlobCopyWithImpl; +@override @useResult +$Res call({ + RouteId routeId,@Uint8ListJsonConverter.jsIsArray() Uint8List blob +}); + + + +} /// @nodoc -class __$RouteBlobCopyWithImpl<$Res> implements _$RouteBlobCopyWith<$Res> { +class __$RouteBlobCopyWithImpl<$Res> + implements _$RouteBlobCopyWith<$Res> { __$RouteBlobCopyWithImpl(this._self, this._then); final _RouteBlob _self; final $Res Function(_RouteBlob) _then; - /// Create a copy of RouteBlob - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? routeId = null, - Object? blob = null, - }) { - return _then(_RouteBlob( - routeId: null == routeId - ? _self.routeId - : routeId // ignore: cast_nullable_to_non_nullable - as RouteId, - blob: null == blob - ? _self.blob - : blob // ignore: cast_nullable_to_non_nullable - as Uint8List, - )); - } +/// Create a copy of RouteBlob +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? routeId = null,Object? blob = null,}) { + return _then(_RouteBlob( +routeId: null == routeId ? _self.routeId : routeId // ignore: cast_nullable_to_non_nullable +as RouteId,blob: null == blob ? _self.blob : blob // ignore: cast_nullable_to_non_nullable +as Uint8List, + )); } + +} + + /// @nodoc mixin _$DHTRecordReport { - List get subkeys; - List get offlineSubkeys; - List get localSeqs; - List get networkSeqs; - /// Create a copy of DHTRecordReport - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $DHTRecordReportCopyWith get copyWith => - _$DHTRecordReportCopyWithImpl( - this as DHTRecordReport, _$identity); + List get subkeys; List get offlineSubkeys; List get localSeqs; List get networkSeqs; +/// Create a copy of DHTRecordReport +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$DHTRecordReportCopyWith get copyWith => _$DHTRecordReportCopyWithImpl(this as DHTRecordReport, _$identity); /// Serializes this DHTRecordReport to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is DHTRecordReport && - const DeepCollectionEquality().equals(other.subkeys, subkeys) && - const DeepCollectionEquality() - .equals(other.offlineSubkeys, offlineSubkeys) && - const DeepCollectionEquality().equals(other.localSeqs, localSeqs) && - const DeepCollectionEquality() - .equals(other.networkSeqs, networkSeqs)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(subkeys), - const DeepCollectionEquality().hash(offlineSubkeys), - const DeepCollectionEquality().hash(localSeqs), - const DeepCollectionEquality().hash(networkSeqs)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is DHTRecordReport&&const DeepCollectionEquality().equals(other.subkeys, subkeys)&&const DeepCollectionEquality().equals(other.offlineSubkeys, offlineSubkeys)&&const DeepCollectionEquality().equals(other.localSeqs, localSeqs)&&const DeepCollectionEquality().equals(other.networkSeqs, networkSeqs)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(subkeys),const DeepCollectionEquality().hash(offlineSubkeys),const DeepCollectionEquality().hash(localSeqs),const DeepCollectionEquality().hash(networkSeqs)); + +@override +String toString() { + return 'DHTRecordReport(subkeys: $subkeys, offlineSubkeys: $offlineSubkeys, localSeqs: $localSeqs, networkSeqs: $networkSeqs)'; +} + - @override - String toString() { - return 'DHTRecordReport(subkeys: $subkeys, offlineSubkeys: $offlineSubkeys, localSeqs: $localSeqs, networkSeqs: $networkSeqs)'; - } } /// @nodoc -abstract mixin class $DHTRecordReportCopyWith<$Res> { - factory $DHTRecordReportCopyWith( - DHTRecordReport value, $Res Function(DHTRecordReport) _then) = - _$DHTRecordReportCopyWithImpl; - @useResult - $Res call( - {List subkeys, - List offlineSubkeys, - List localSeqs, - List networkSeqs}); -} +abstract mixin class $DHTRecordReportCopyWith<$Res> { + factory $DHTRecordReportCopyWith(DHTRecordReport value, $Res Function(DHTRecordReport) _then) = _$DHTRecordReportCopyWithImpl; +@useResult +$Res call({ + List subkeys, List offlineSubkeys, List localSeqs, List networkSeqs +}); + + + +} /// @nodoc class _$DHTRecordReportCopyWithImpl<$Res> implements $DHTRecordReportCopyWith<$Res> { @@ -1280,143 +1767,221 @@ class _$DHTRecordReportCopyWithImpl<$Res> final DHTRecordReport _self; final $Res Function(DHTRecordReport) _then; - /// Create a copy of DHTRecordReport - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? subkeys = null, - Object? offlineSubkeys = null, - Object? localSeqs = null, - Object? networkSeqs = null, - }) { - return _then(_self.copyWith( - subkeys: null == subkeys - ? _self.subkeys - : subkeys // ignore: cast_nullable_to_non_nullable - as List, - offlineSubkeys: null == offlineSubkeys - ? _self.offlineSubkeys - : offlineSubkeys // ignore: cast_nullable_to_non_nullable - as List, - localSeqs: null == localSeqs - ? _self.localSeqs - : localSeqs // ignore: cast_nullable_to_non_nullable - as List, - networkSeqs: null == networkSeqs - ? _self.networkSeqs - : networkSeqs // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of DHTRecordReport +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? subkeys = null,Object? offlineSubkeys = null,Object? localSeqs = null,Object? networkSeqs = null,}) { + return _then(_self.copyWith( +subkeys: null == subkeys ? _self.subkeys : subkeys // ignore: cast_nullable_to_non_nullable +as List,offlineSubkeys: null == offlineSubkeys ? _self.offlineSubkeys : offlineSubkeys // ignore: cast_nullable_to_non_nullable +as List,localSeqs: null == localSeqs ? _self.localSeqs : localSeqs // ignore: cast_nullable_to_non_nullable +as List,networkSeqs: null == networkSeqs ? _self.networkSeqs : networkSeqs // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [DHTRecordReport]. +extension DHTRecordReportPatterns on DHTRecordReport { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _DHTRecordReport value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _DHTRecordReport() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _DHTRecordReport value) $default,){ +final _that = this; +switch (_that) { +case _DHTRecordReport(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _DHTRecordReport value)? $default,){ +final _that = this; +switch (_that) { +case _DHTRecordReport() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List subkeys, List offlineSubkeys, List localSeqs, List networkSeqs)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _DHTRecordReport() when $default != null: +return $default(_that.subkeys,_that.offlineSubkeys,_that.localSeqs,_that.networkSeqs);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List subkeys, List offlineSubkeys, List localSeqs, List networkSeqs) $default,) {final _that = this; +switch (_that) { +case _DHTRecordReport(): +return $default(_that.subkeys,_that.offlineSubkeys,_that.localSeqs,_that.networkSeqs);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List subkeys, List offlineSubkeys, List localSeqs, List networkSeqs)? $default,) {final _that = this; +switch (_that) { +case _DHTRecordReport() when $default != null: +return $default(_that.subkeys,_that.offlineSubkeys,_that.localSeqs,_that.networkSeqs);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _DHTRecordReport implements DHTRecordReport { - const _DHTRecordReport( - {required final List subkeys, - required final List offlineSubkeys, - required final List localSeqs, - required final List networkSeqs}) - : _subkeys = subkeys, - _offlineSubkeys = offlineSubkeys, - _localSeqs = localSeqs, - _networkSeqs = networkSeqs; - factory _DHTRecordReport.fromJson(Map json) => - _$DHTRecordReportFromJson(json); + const _DHTRecordReport({required final List subkeys, required final List offlineSubkeys, required final List localSeqs, required final List networkSeqs}): _subkeys = subkeys,_offlineSubkeys = offlineSubkeys,_localSeqs = localSeqs,_networkSeqs = networkSeqs; + factory _DHTRecordReport.fromJson(Map json) => _$DHTRecordReportFromJson(json); - final List _subkeys; - @override - List get subkeys { - if (_subkeys is EqualUnmodifiableListView) return _subkeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_subkeys); - } + final List _subkeys; +@override List get subkeys { + if (_subkeys is EqualUnmodifiableListView) return _subkeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_subkeys); +} - final List _offlineSubkeys; - @override - List get offlineSubkeys { - if (_offlineSubkeys is EqualUnmodifiableListView) return _offlineSubkeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_offlineSubkeys); - } + final List _offlineSubkeys; +@override List get offlineSubkeys { + if (_offlineSubkeys is EqualUnmodifiableListView) return _offlineSubkeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_offlineSubkeys); +} - final List _localSeqs; - @override - List get localSeqs { - if (_localSeqs is EqualUnmodifiableListView) return _localSeqs; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_localSeqs); - } + final List _localSeqs; +@override List get localSeqs { + if (_localSeqs is EqualUnmodifiableListView) return _localSeqs; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_localSeqs); +} - final List _networkSeqs; - @override - List get networkSeqs { - if (_networkSeqs is EqualUnmodifiableListView) return _networkSeqs; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_networkSeqs); - } + final List _networkSeqs; +@override List get networkSeqs { + if (_networkSeqs is EqualUnmodifiableListView) return _networkSeqs; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_networkSeqs); +} - /// Create a copy of DHTRecordReport - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$DHTRecordReportCopyWith<_DHTRecordReport> get copyWith => - __$DHTRecordReportCopyWithImpl<_DHTRecordReport>(this, _$identity); - @override - Map toJson() { - return _$DHTRecordReportToJson( - this, - ); - } +/// Create a copy of DHTRecordReport +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$DHTRecordReportCopyWith<_DHTRecordReport> get copyWith => __$DHTRecordReportCopyWithImpl<_DHTRecordReport>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _DHTRecordReport && - const DeepCollectionEquality().equals(other._subkeys, _subkeys) && - const DeepCollectionEquality() - .equals(other._offlineSubkeys, _offlineSubkeys) && - const DeepCollectionEquality() - .equals(other._localSeqs, _localSeqs) && - const DeepCollectionEquality() - .equals(other._networkSeqs, _networkSeqs)); - } +@override +Map toJson() { + return _$DHTRecordReportToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _DHTRecordReport&&const DeepCollectionEquality().equals(other._subkeys, _subkeys)&&const DeepCollectionEquality().equals(other._offlineSubkeys, _offlineSubkeys)&&const DeepCollectionEquality().equals(other._localSeqs, _localSeqs)&&const DeepCollectionEquality().equals(other._networkSeqs, _networkSeqs)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_subkeys),const DeepCollectionEquality().hash(_offlineSubkeys),const DeepCollectionEquality().hash(_localSeqs),const DeepCollectionEquality().hash(_networkSeqs)); + +@override +String toString() { + return 'DHTRecordReport(subkeys: $subkeys, offlineSubkeys: $offlineSubkeys, localSeqs: $localSeqs, networkSeqs: $networkSeqs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_subkeys), - const DeepCollectionEquality().hash(_offlineSubkeys), - const DeepCollectionEquality().hash(_localSeqs), - const DeepCollectionEquality().hash(_networkSeqs)); - @override - String toString() { - return 'DHTRecordReport(subkeys: $subkeys, offlineSubkeys: $offlineSubkeys, localSeqs: $localSeqs, networkSeqs: $networkSeqs)'; - } } /// @nodoc -abstract mixin class _$DHTRecordReportCopyWith<$Res> - implements $DHTRecordReportCopyWith<$Res> { - factory _$DHTRecordReportCopyWith( - _DHTRecordReport value, $Res Function(_DHTRecordReport) _then) = - __$DHTRecordReportCopyWithImpl; - @override - @useResult - $Res call( - {List subkeys, - List offlineSubkeys, - List localSeqs, - List networkSeqs}); -} +abstract mixin class _$DHTRecordReportCopyWith<$Res> implements $DHTRecordReportCopyWith<$Res> { + factory _$DHTRecordReportCopyWith(_DHTRecordReport value, $Res Function(_DHTRecordReport) _then) = __$DHTRecordReportCopyWithImpl; +@override @useResult +$Res call({ + List subkeys, List offlineSubkeys, List localSeqs, List networkSeqs +}); + + + +} /// @nodoc class __$DHTRecordReportCopyWithImpl<$Res> implements _$DHTRecordReportCopyWith<$Res> { @@ -1425,82 +1990,65 @@ class __$DHTRecordReportCopyWithImpl<$Res> final _DHTRecordReport _self; final $Res Function(_DHTRecordReport) _then; - /// Create a copy of DHTRecordReport - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? subkeys = null, - Object? offlineSubkeys = null, - Object? localSeqs = null, - Object? networkSeqs = null, - }) { - return _then(_DHTRecordReport( - subkeys: null == subkeys - ? _self._subkeys - : subkeys // ignore: cast_nullable_to_non_nullable - as List, - offlineSubkeys: null == offlineSubkeys - ? _self._offlineSubkeys - : offlineSubkeys // ignore: cast_nullable_to_non_nullable - as List, - localSeqs: null == localSeqs - ? _self._localSeqs - : localSeqs // ignore: cast_nullable_to_non_nullable - as List, - networkSeqs: null == networkSeqs - ? _self._networkSeqs - : networkSeqs // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of DHTRecordReport +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? subkeys = null,Object? offlineSubkeys = null,Object? localSeqs = null,Object? networkSeqs = null,}) { + return _then(_DHTRecordReport( +subkeys: null == subkeys ? _self._subkeys : subkeys // ignore: cast_nullable_to_non_nullable +as List,offlineSubkeys: null == offlineSubkeys ? _self._offlineSubkeys : offlineSubkeys // ignore: cast_nullable_to_non_nullable +as List,localSeqs: null == localSeqs ? _self._localSeqs : localSeqs // ignore: cast_nullable_to_non_nullable +as List,networkSeqs: null == networkSeqs ? _self._networkSeqs : networkSeqs // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$SetDHTValueOptions { - KeyPair? get writer; - bool? get allowOffline; - /// Create a copy of SetDHTValueOptions - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $SetDHTValueOptionsCopyWith get copyWith => - _$SetDHTValueOptionsCopyWithImpl( - this as SetDHTValueOptions, _$identity); + KeyPair? get writer; bool? get allowOffline; +/// Create a copy of SetDHTValueOptions +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SetDHTValueOptionsCopyWith get copyWith => _$SetDHTValueOptionsCopyWithImpl(this as SetDHTValueOptions, _$identity); /// Serializes this SetDHTValueOptions to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is SetDHTValueOptions && - (identical(other.writer, writer) || other.writer == writer) && - (identical(other.allowOffline, allowOffline) || - other.allowOffline == allowOffline)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, writer, allowOffline); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SetDHTValueOptions&&(identical(other.writer, writer) || other.writer == writer)&&(identical(other.allowOffline, allowOffline) || other.allowOffline == allowOffline)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,writer,allowOffline); + +@override +String toString() { + return 'SetDHTValueOptions(writer: $writer, allowOffline: $allowOffline)'; +} + - @override - String toString() { - return 'SetDHTValueOptions(writer: $writer, allowOffline: $allowOffline)'; - } } /// @nodoc -abstract mixin class $SetDHTValueOptionsCopyWith<$Res> { - factory $SetDHTValueOptionsCopyWith( - SetDHTValueOptions value, $Res Function(SetDHTValueOptions) _then) = - _$SetDHTValueOptionsCopyWithImpl; - @useResult - $Res call({KeyPair? writer, bool? allowOffline}); -} +abstract mixin class $SetDHTValueOptionsCopyWith<$Res> { + factory $SetDHTValueOptionsCopyWith(SetDHTValueOptions value, $Res Function(SetDHTValueOptions) _then) = _$SetDHTValueOptionsCopyWithImpl; +@useResult +$Res call({ + KeyPair? writer, bool? allowOffline +}); + + + +} /// @nodoc class _$SetDHTValueOptionsCopyWithImpl<$Res> implements $SetDHTValueOptionsCopyWith<$Res> { @@ -1509,85 +2057,193 @@ class _$SetDHTValueOptionsCopyWithImpl<$Res> final SetDHTValueOptions _self; final $Res Function(SetDHTValueOptions) _then; - /// Create a copy of SetDHTValueOptions - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? writer = freezed, - Object? allowOffline = freezed, - }) { - return _then(_self.copyWith( - writer: freezed == writer - ? _self.writer - : writer // ignore: cast_nullable_to_non_nullable - as KeyPair?, - allowOffline: freezed == allowOffline - ? _self.allowOffline - : allowOffline // ignore: cast_nullable_to_non_nullable - as bool?, - )); - } +/// Create a copy of SetDHTValueOptions +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? writer = freezed,Object? allowOffline = freezed,}) { + return _then(_self.copyWith( +writer: freezed == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable +as KeyPair?,allowOffline: freezed == allowOffline ? _self.allowOffline : allowOffline // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SetDHTValueOptions]. +extension SetDHTValueOptionsPatterns on SetDHTValueOptions { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SetDHTValueOptions value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SetDHTValueOptions() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SetDHTValueOptions value) $default,){ +final _that = this; +switch (_that) { +case _SetDHTValueOptions(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SetDHTValueOptions value)? $default,){ +final _that = this; +switch (_that) { +case _SetDHTValueOptions() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( KeyPair? writer, bool? allowOffline)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SetDHTValueOptions() when $default != null: +return $default(_that.writer,_that.allowOffline);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( KeyPair? writer, bool? allowOffline) $default,) {final _that = this; +switch (_that) { +case _SetDHTValueOptions(): +return $default(_that.writer,_that.allowOffline);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( KeyPair? writer, bool? allowOffline)? $default,) {final _that = this; +switch (_that) { +case _SetDHTValueOptions() when $default != null: +return $default(_that.writer,_that.allowOffline);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _SetDHTValueOptions implements SetDHTValueOptions { const _SetDHTValueOptions({this.writer, this.allowOffline}); - factory _SetDHTValueOptions.fromJson(Map json) => - _$SetDHTValueOptionsFromJson(json); + factory _SetDHTValueOptions.fromJson(Map json) => _$SetDHTValueOptionsFromJson(json); - @override - final KeyPair? writer; - @override - final bool? allowOffline; +@override final KeyPair? writer; +@override final bool? allowOffline; - /// Create a copy of SetDHTValueOptions - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$SetDHTValueOptionsCopyWith<_SetDHTValueOptions> get copyWith => - __$SetDHTValueOptionsCopyWithImpl<_SetDHTValueOptions>(this, _$identity); +/// Create a copy of SetDHTValueOptions +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SetDHTValueOptionsCopyWith<_SetDHTValueOptions> get copyWith => __$SetDHTValueOptionsCopyWithImpl<_SetDHTValueOptions>(this, _$identity); - @override - Map toJson() { - return _$SetDHTValueOptionsToJson( - this, - ); - } +@override +Map toJson() { + return _$SetDHTValueOptionsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _SetDHTValueOptions && - (identical(other.writer, writer) || other.writer == writer) && - (identical(other.allowOffline, allowOffline) || - other.allowOffline == allowOffline)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SetDHTValueOptions&&(identical(other.writer, writer) || other.writer == writer)&&(identical(other.allowOffline, allowOffline) || other.allowOffline == allowOffline)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,writer,allowOffline); + +@override +String toString() { + return 'SetDHTValueOptions(writer: $writer, allowOffline: $allowOffline)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, writer, allowOffline); - @override - String toString() { - return 'SetDHTValueOptions(writer: $writer, allowOffline: $allowOffline)'; - } } /// @nodoc -abstract mixin class _$SetDHTValueOptionsCopyWith<$Res> - implements $SetDHTValueOptionsCopyWith<$Res> { - factory _$SetDHTValueOptionsCopyWith( - _SetDHTValueOptions value, $Res Function(_SetDHTValueOptions) _then) = - __$SetDHTValueOptionsCopyWithImpl; - @override - @useResult - $Res call({KeyPair? writer, bool? allowOffline}); -} +abstract mixin class _$SetDHTValueOptionsCopyWith<$Res> implements $SetDHTValueOptionsCopyWith<$Res> { + factory _$SetDHTValueOptionsCopyWith(_SetDHTValueOptions value, $Res Function(_SetDHTValueOptions) _then) = __$SetDHTValueOptionsCopyWithImpl; +@override @useResult +$Res call({ + KeyPair? writer, bool? allowOffline +}); + + + +} /// @nodoc class __$SetDHTValueOptionsCopyWithImpl<$Res> implements _$SetDHTValueOptionsCopyWith<$Res> { @@ -1596,25 +2252,17 @@ class __$SetDHTValueOptionsCopyWithImpl<$Res> final _SetDHTValueOptions _self; final $Res Function(_SetDHTValueOptions) _then; - /// Create a copy of SetDHTValueOptions - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? writer = freezed, - Object? allowOffline = freezed, - }) { - return _then(_SetDHTValueOptions( - writer: freezed == writer - ? _self.writer - : writer // ignore: cast_nullable_to_non_nullable - as KeyPair?, - allowOffline: freezed == allowOffline - ? _self.allowOffline - : allowOffline // ignore: cast_nullable_to_non_nullable - as bool?, - )); - } +/// Create a copy of SetDHTValueOptions +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? writer = freezed,Object? allowOffline = freezed,}) { + return _then(_SetDHTValueOptions( +writer: freezed == writer ? _self.writer : writer // ignore: cast_nullable_to_non_nullable +as KeyPair?,allowOffline: freezed == allowOffline ? _self.allowOffline : allowOffline // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + + } // dart format on diff --git a/veilid-flutter/lib/routing_context.g.dart b/veilid-flutter/lib/routing_context.g.dart index 706041d4..d5a24880 100644 --- a/veilid-flutter/lib/routing_context.g.dart +++ b/veilid-flutter/lib/routing_context.g.dart @@ -13,10 +13,7 @@ DHTSchemaDFLT _$DHTSchemaDFLTFromJson(Map json) => ); Map _$DHTSchemaDFLTToJson(DHTSchemaDFLT instance) => - { - 'o_cnt': instance.oCnt, - 'kind': instance.$type, - }; + {'o_cnt': instance.oCnt, 'kind': instance.$type}; DHTSchemaSMPL _$DHTSchemaSMPLFromJson(Map json) => DHTSchemaSMPL( @@ -36,15 +33,12 @@ Map _$DHTSchemaSMPLToJson(DHTSchemaSMPL instance) => _DHTSchemaMember _$DHTSchemaMemberFromJson(Map json) => _DHTSchemaMember( - mKey: Typed.fromJson(json['m_key']), + mKey: BareMemberId.fromJson(json['m_key']), mCnt: (json['m_cnt'] as num).toInt(), ); Map _$DHTSchemaMemberToJson(_DHTSchemaMember instance) => - { - 'm_key': instance.mKey.toJson(), - 'm_cnt': instance.mCnt, - }; + {'m_key': instance.mKey.toJson(), 'm_cnt': instance.mCnt}; _DHTRecordDescriptor _$DHTRecordDescriptorFromJson(Map json) => _DHTRecordDescriptor( @@ -57,19 +51,19 @@ _DHTRecordDescriptor _$DHTRecordDescriptorFromJson(Map json) => ); Map _$DHTRecordDescriptorToJson( - _DHTRecordDescriptor instance) => - { - 'key': instance.key.toJson(), - 'owner': instance.owner.toJson(), - 'schema': instance.schema.toJson(), - 'owner_secret': instance.ownerSecret?.toJson(), - }; + _DHTRecordDescriptor instance, +) => { + 'key': instance.key.toJson(), + 'owner': instance.owner.toJson(), + 'schema': instance.schema.toJson(), + 'owner_secret': instance.ownerSecret?.toJson(), +}; _ValueData _$ValueDataFromJson(Map json) => _ValueData( - seq: (json['seq'] as num).toInt(), - data: const Uint8ListJsonConverter.jsIsArray().fromJson(json['data']), - writer: Typed.fromJson(json['writer']), - ); + seq: (json['seq'] as num).toInt(), + data: const Uint8ListJsonConverter.jsIsArray().fromJson(json['data']), + writer: Typed.fromJson(json['writer']), +); Map _$ValueDataToJson(_ValueData instance) => { @@ -79,13 +73,13 @@ Map _$ValueDataToJson(_ValueData instance) => }; _SafetySpec _$SafetySpecFromJson(Map json) => _SafetySpec( - hopCount: (json['hop_count'] as num).toInt(), - stability: Stability.fromJson(json['stability']), - sequencing: Sequencing.fromJson(json['sequencing']), - preferredRoute: json['preferred_route'] == null - ? null - : Typed.fromJson(json['preferred_route']), - ); + hopCount: (json['hop_count'] as num).toInt(), + stability: Stability.fromJson(json['stability']), + sequencing: Sequencing.fromJson(json['sequencing']), + preferredRoute: json['preferred_route'] == null + ? null + : Typed.fromJson(json['preferred_route']), +); Map _$SafetySpecToJson(_SafetySpec instance) => { @@ -96,9 +90,9 @@ Map _$SafetySpecToJson(_SafetySpec instance) => }; _RouteBlob _$RouteBlobFromJson(Map json) => _RouteBlob( - routeId: Typed.fromJson(json['route_id']), - blob: const Uint8ListJsonConverter.jsIsArray().fromJson(json['blob']), - ); + routeId: Typed.fromJson(json['route_id']), + blob: const Uint8ListJsonConverter.jsIsArray().fromJson(json['blob']), +); Map _$RouteBlobToJson(_RouteBlob instance) => { @@ -122,14 +116,14 @@ _DHTRecordReport _$DHTRecordReportFromJson(Map json) => .toList(), ); -Map _$DHTRecordReportToJson(_DHTRecordReport instance) => - { - 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), - 'offline_subkeys': - instance.offlineSubkeys.map((e) => e.toJson()).toList(), - 'local_seqs': instance.localSeqs, - 'network_seqs': instance.networkSeqs, - }; +Map _$DHTRecordReportToJson( + _DHTRecordReport instance, +) => { + 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), + 'offline_subkeys': instance.offlineSubkeys.map((e) => e.toJson()).toList(), + 'local_seqs': instance.localSeqs, + 'network_seqs': instance.networkSeqs, +}; _SetDHTValueOptions _$SetDHTValueOptionsFromJson(Map json) => _SetDHTValueOptions( diff --git a/veilid-flutter/lib/value_subkey_range.dart b/veilid-flutter/lib/value_subkey_range.dart index a8ef3b0e..562ccd62 100644 --- a/veilid-flutter/lib/value_subkey_range.dart +++ b/veilid-flutter/lib/value_subkey_range.dart @@ -5,6 +5,10 @@ import 'package:freezed_annotation/freezed_annotation.dart'; @immutable class ValueSubkeyRange extends Equatable { + final int low; + + final int high; + const ValueSubkeyRange({ required this.low, required this.high, @@ -12,14 +16,18 @@ class ValueSubkeyRange extends Equatable { factory ValueSubkeyRange.single(int val) => ValueSubkeyRange(low: val, high: val); + factory ValueSubkeyRange.make(int low, int high) => ValueSubkeyRange(low: low, high: high); + factory ValueSubkeyRange.fromIntPair((int, int) pair) => ValueSubkeyRange(low: pair.$1, high: pair.$2); + factory ValueSubkeyRange.fromIntList(List intlist) { assert(intlist.length == 2, 'range must be a two item list'); return ValueSubkeyRange(low: intlist[0], high: intlist[1]); } + factory ValueSubkeyRange.fromJson(dynamic json) => ValueSubkeyRange.fromIntList((json as List).cast()); @@ -27,9 +35,6 @@ class ValueSubkeyRange extends Equatable { @override List get props => [low, high]; - - final int low; - final int high; } extension ValueSubkeyRangeExt on ValueSubkeyRange { diff --git a/veilid-flutter/lib/veilid.dart b/veilid-flutter/lib/veilid.dart index 56f2f4f2..0c88b9a7 100644 --- a/veilid-flutter/lib/veilid.dart +++ b/veilid-flutter/lib/veilid.dart @@ -43,10 +43,14 @@ List? Function(dynamic) optJsonListConstructor( @immutable class VeilidVersion extends Equatable { - const VeilidVersion(this.major, this.minor, this.patch); final int major; + final int minor; + final int patch; + + const VeilidVersion(this.major, this.minor, this.patch); + @override List get props => [major, minor, patch]; } @@ -55,15 +59,21 @@ class VeilidVersion extends Equatable { /// Timestamp @immutable class Timestamp extends Equatable implements Comparable { + final BigInt value; + const Timestamp({required this.value}); + factory Timestamp.zero() => Timestamp(value: BigInt.zero); + factory Timestamp.fromInt64(Int64 i64) => Timestamp( value: (BigInt.from((i64 >> 32).toUnsigned(32).toInt()) << 32) | BigInt.from(i64.toUnsigned(32).toInt())); + factory Timestamp.fromString(String s) => Timestamp(value: BigInt.parse(s)); + factory Timestamp.fromJson(dynamic json) => Timestamp.fromString(json as String); - final BigInt value; + @override List get props => [value]; @@ -71,13 +81,18 @@ class Timestamp extends Equatable implements Comparable { int compareTo(Timestamp other) => value.compareTo(other.value); bool operator <(Timestamp other) => compareTo(other) < 0; + bool operator <=(Timestamp other) => compareTo(other) <= 0; + bool operator >(Timestamp other) => compareTo(other) > 0; + bool operator >=(Timestamp other) => compareTo(other) >= 0; @override String toString() => value.toString(); + String toJson() => toString(); + Int64 toInt64() => Int64.fromInts( (value >> 32).toUnsigned(32).toInt(), value.toUnsigned(32).toInt()); @@ -91,20 +106,27 @@ class Timestamp extends Equatable implements Comparable { @immutable class TimestampDuration extends Equatable implements Comparable { + final BigInt value; + const TimestampDuration({required this.value}); + factory TimestampDuration.fromInt64(Int64 i64) => TimestampDuration( value: (BigInt.from((i64 >> 32).toUnsigned(32).toInt()) << 32) | BigInt.from(i64.toUnsigned(32).toInt())); + factory TimestampDuration.fromMillis(int millis) => TimestampDuration(value: BigInt.from(millis) * BigInt.from(1000)); + factory TimestampDuration.fromDuration(Duration d) => TimestampDuration( value: BigInt.from(d.inSeconds) * BigInt.from(1000000) + BigInt.from(d.inMicroseconds % 1000000)); + factory TimestampDuration.fromString(String s) => TimestampDuration(value: BigInt.parse(s)); + factory TimestampDuration.fromJson(dynamic json) => TimestampDuration.fromString(json as String); - final BigInt value; + @override List get props => [value]; @@ -112,8 +134,11 @@ class TimestampDuration extends Equatable int compareTo(TimestampDuration other) => value.compareTo(other.value); bool operator <(TimestampDuration other) => compareTo(other) < 0; + bool operator <=(TimestampDuration other) => compareTo(other) <= 0; + bool operator >(TimestampDuration other) => compareTo(other) > 0; + bool operator >=(TimestampDuration other) => compareTo(other) >= 0; @override @@ -153,11 +178,14 @@ class TimestampDuration extends Equatable } String toJson() => value.toString(); + Int64 toInt64() => Int64.fromInts( (value >> 32).toUnsigned(32).toInt(), value.toUnsigned(32).toInt()); double toMillis() => value / BigInt.from(1000); + double toSecs() => value / BigInt.from(1000000); + BigInt toMicros() => value; } diff --git a/veilid-flutter/lib/veilid_api_exception.dart b/veilid-flutter/lib/veilid_api_exception.dart index 6eb30393..6df5dd4d 100644 --- a/veilid-flutter/lib/veilid_api_exception.dart +++ b/veilid-flutter/lib/veilid_api_exception.dart @@ -108,9 +108,11 @@ class VeilidAPIExceptionTimeout implements VeilidAPIException { @immutable class VeilidAPIExceptionTryAgain implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionTryAgain(this.message); - final String message; + @override String toString() => 'VeilidAPIException: TryAgain (message: $message)'; @@ -129,9 +131,10 @@ class VeilidAPIExceptionShutdown implements VeilidAPIException { @immutable class VeilidAPIExceptionInvalidTarget implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionInvalidTarget(this.message); - final String message; @override String toString() => 'VeilidAPIException: InvalidTarget (message: $message)'; @@ -142,9 +145,11 @@ class VeilidAPIExceptionInvalidTarget implements VeilidAPIException { @immutable class VeilidAPIExceptionNoConnection implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionNoConnection(this.message); - final String message; + @override String toString() => 'VeilidAPIException: NoConnection (message: $message)'; @@ -154,9 +159,11 @@ class VeilidAPIExceptionNoConnection implements VeilidAPIException { @immutable class VeilidAPIExceptionKeyNotFound implements VeilidAPIException { + final String key; + // const VeilidAPIExceptionKeyNotFound(this.key); - final String key; + @override String toString() => 'VeilidAPIException: KeyNotFound (key: $key)'; @@ -166,9 +173,10 @@ class VeilidAPIExceptionKeyNotFound implements VeilidAPIException { @immutable class VeilidAPIExceptionInternal implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionInternal(this.message); - final String message; @override String toString() => 'VeilidAPIException: Internal ($message)'; @@ -179,9 +187,10 @@ class VeilidAPIExceptionInternal implements VeilidAPIException { @immutable class VeilidAPIExceptionUnimplemented implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionUnimplemented(this.message); - final String message; @override String toString() => 'VeilidAPIException: Unimplemented ($message)'; @@ -192,10 +201,12 @@ class VeilidAPIExceptionUnimplemented implements VeilidAPIException { @immutable class VeilidAPIExceptionParseError implements VeilidAPIException { + final String message; + + final String value; + // const VeilidAPIExceptionParseError(this.message, this.value); - final String message; - final String value; @override String toString() => @@ -207,12 +218,15 @@ class VeilidAPIExceptionParseError implements VeilidAPIException { @immutable class VeilidAPIExceptionInvalidArgument implements VeilidAPIException { + final String context; + + final String argument; + + final String value; + // const VeilidAPIExceptionInvalidArgument( this.context, this.argument, this.value); - final String context; - final String argument; - final String value; @override String toString() => 'VeilidAPIException: InvalidArgument' @@ -224,10 +238,12 @@ class VeilidAPIExceptionInvalidArgument implements VeilidAPIException { @immutable class VeilidAPIExceptionMissingArgument implements VeilidAPIException { + final String context; + + final String argument; + // const VeilidAPIExceptionMissingArgument(this.context, this.argument); - final String context; - final String argument; @override String toString() => @@ -239,9 +255,10 @@ class VeilidAPIExceptionMissingArgument implements VeilidAPIException { @immutable class VeilidAPIExceptionGeneric implements VeilidAPIException { + final String message; + // const VeilidAPIExceptionGeneric(this.message); - final String message; @override String toString() => 'VeilidAPIException: Generic (message: $message)'; diff --git a/veilid-flutter/lib/veilid_config.freezed.dart b/veilid-flutter/lib/veilid_config.freezed.dart index 7011c503..b0452aaf 100644 --- a/veilid-flutter/lib/veilid_config.freezed.dart +++ b/veilid-flutter/lib/veilid_config.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // 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 @@ -15,66 +14,53 @@ T _$identity(T value) => value; /// @nodoc mixin _$VeilidFFIConfigLoggingTerminal implements DiagnosticableTreeMixin { - bool get enabled; - VeilidConfigLogLevel get level; - List get ignoreLogTargets; - /// Create a copy of VeilidFFIConfigLoggingTerminal - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingTerminalCopyWith - get copyWith => _$VeilidFFIConfigLoggingTerminalCopyWithImpl< - VeilidFFIConfigLoggingTerminal>( - this as VeilidFFIConfigLoggingTerminal, _$identity); + bool get enabled; VeilidConfigLogLevel get level; List get ignoreLogTargets; +/// Create a copy of VeilidFFIConfigLoggingTerminal +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingTerminalCopyWith get copyWith => _$VeilidFFIConfigLoggingTerminalCopyWithImpl(this as VeilidFFIConfigLoggingTerminal, _$identity); /// Serializes this VeilidFFIConfigLoggingTerminal to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingTerminal')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingTerminal')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfigLoggingTerminal && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other.ignoreLogTargets, ignoreLogTargets)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfigLoggingTerminal&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other.ignoreLogTargets, ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingTerminal(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingTerminal(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigLoggingTerminalCopyWith<$Res> { - factory $VeilidFFIConfigLoggingTerminalCopyWith( - VeilidFFIConfigLoggingTerminal value, - $Res Function(VeilidFFIConfigLoggingTerminal) _then) = - _$VeilidFFIConfigLoggingTerminalCopyWithImpl; - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class $VeilidFFIConfigLoggingTerminalCopyWith<$Res> { + factory $VeilidFFIConfigLoggingTerminalCopyWith(VeilidFFIConfigLoggingTerminal value, $Res Function(VeilidFFIConfigLoggingTerminal) _then) = _$VeilidFFIConfigLoggingTerminalCopyWithImpl; +@useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class _$VeilidFFIConfigLoggingTerminalCopyWithImpl<$Res> implements $VeilidFFIConfigLoggingTerminalCopyWith<$Res> { @@ -83,121 +69,207 @@ class _$VeilidFFIConfigLoggingTerminalCopyWithImpl<$Res> final VeilidFFIConfigLoggingTerminal _self; final $Res Function(VeilidFFIConfigLoggingTerminal) _then; - /// Create a copy of VeilidFFIConfigLoggingTerminal - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self.ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingTerminal +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self.ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidFFIConfigLoggingTerminal]. +extension VeilidFFIConfigLoggingTerminalPatterns on VeilidFFIConfigLoggingTerminal { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfigLoggingTerminal value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfigLoggingTerminal value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfigLoggingTerminal value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal(): +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingTerminal() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidFFIConfigLoggingTerminal - with DiagnosticableTreeMixin - implements VeilidFFIConfigLoggingTerminal { - const _VeilidFFIConfigLoggingTerminal( - {required this.enabled, - required this.level, - final List ignoreLogTargets = const []}) - : _ignoreLogTargets = ignoreLogTargets; - factory _VeilidFFIConfigLoggingTerminal.fromJson(Map json) => - _$VeilidFFIConfigLoggingTerminalFromJson(json); - @override - final bool enabled; - @override - final VeilidConfigLogLevel level; - final List _ignoreLogTargets; - @override - @JsonKey() - List get ignoreLogTargets { - if (_ignoreLogTargets is EqualUnmodifiableListView) - return _ignoreLogTargets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_ignoreLogTargets); - } +class _VeilidFFIConfigLoggingTerminal with DiagnosticableTreeMixin implements VeilidFFIConfigLoggingTerminal { + const _VeilidFFIConfigLoggingTerminal({required this.enabled, required this.level, final List ignoreLogTargets = const []}): _ignoreLogTargets = ignoreLogTargets; + factory _VeilidFFIConfigLoggingTerminal.fromJson(Map json) => _$VeilidFFIConfigLoggingTerminalFromJson(json); - /// Create a copy of VeilidFFIConfigLoggingTerminal - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigLoggingTerminalCopyWith<_VeilidFFIConfigLoggingTerminal> - get copyWith => __$VeilidFFIConfigLoggingTerminalCopyWithImpl< - _VeilidFFIConfigLoggingTerminal>(this, _$identity); +@override final bool enabled; +@override final VeilidConfigLogLevel level; + final List _ignoreLogTargets; +@override@JsonKey() List get ignoreLogTargets { + if (_ignoreLogTargets is EqualUnmodifiableListView) return _ignoreLogTargets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_ignoreLogTargets); +} - @override - Map toJson() { - return _$VeilidFFIConfigLoggingTerminalToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingTerminal')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +/// Create a copy of VeilidFFIConfigLoggingTerminal +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigLoggingTerminalCopyWith<_VeilidFFIConfigLoggingTerminal> get copyWith => __$VeilidFFIConfigLoggingTerminalCopyWithImpl<_VeilidFFIConfigLoggingTerminal>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfigLoggingTerminal && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other._ignoreLogTargets, _ignoreLogTargets)); - } +@override +Map toJson() { + return _$VeilidFFIConfigLoggingTerminalToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingTerminal')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfigLoggingTerminal&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other._ignoreLogTargets, _ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(_ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingTerminal(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(_ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingTerminal(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigLoggingTerminalCopyWith<$Res> - implements $VeilidFFIConfigLoggingTerminalCopyWith<$Res> { - factory _$VeilidFFIConfigLoggingTerminalCopyWith( - _VeilidFFIConfigLoggingTerminal value, - $Res Function(_VeilidFFIConfigLoggingTerminal) _then) = - __$VeilidFFIConfigLoggingTerminalCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class _$VeilidFFIConfigLoggingTerminalCopyWith<$Res> implements $VeilidFFIConfigLoggingTerminalCopyWith<$Res> { + factory _$VeilidFFIConfigLoggingTerminalCopyWith(_VeilidFFIConfigLoggingTerminal value, $Res Function(_VeilidFFIConfigLoggingTerminal) _then) = __$VeilidFFIConfigLoggingTerminalCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class __$VeilidFFIConfigLoggingTerminalCopyWithImpl<$Res> implements _$VeilidFFIConfigLoggingTerminalCopyWith<$Res> { @@ -206,103 +278,70 @@ class __$VeilidFFIConfigLoggingTerminalCopyWithImpl<$Res> final _VeilidFFIConfigLoggingTerminal _self; final $Res Function(_VeilidFFIConfigLoggingTerminal) _then; - /// Create a copy of VeilidFFIConfigLoggingTerminal - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_VeilidFFIConfigLoggingTerminal( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self._ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingTerminal +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_VeilidFFIConfigLoggingTerminal( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self._ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidFFIConfigLoggingOtlp implements DiagnosticableTreeMixin { - bool get enabled; - VeilidConfigLogLevel get level; - String get grpcEndpoint; - String get serviceName; - List get ignoreLogTargets; - /// Create a copy of VeilidFFIConfigLoggingOtlp - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingOtlpCopyWith - get copyWith => - _$VeilidFFIConfigLoggingOtlpCopyWithImpl( - this as VeilidFFIConfigLoggingOtlp, _$identity); + bool get enabled; VeilidConfigLogLevel get level; String get grpcEndpoint; String get serviceName; List get ignoreLogTargets; +/// Create a copy of VeilidFFIConfigLoggingOtlp +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingOtlpCopyWith get copyWith => _$VeilidFFIConfigLoggingOtlpCopyWithImpl(this as VeilidFFIConfigLoggingOtlp, _$identity); /// Serializes this VeilidFFIConfigLoggingOtlp to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingOtlp')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('grpcEndpoint', grpcEndpoint)) - ..add(DiagnosticsProperty('serviceName', serviceName)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingOtlp')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('grpcEndpoint', grpcEndpoint))..add(DiagnosticsProperty('serviceName', serviceName))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfigLoggingOtlp && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - (identical(other.grpcEndpoint, grpcEndpoint) || - other.grpcEndpoint == grpcEndpoint) && - (identical(other.serviceName, serviceName) || - other.serviceName == serviceName) && - const DeepCollectionEquality() - .equals(other.ignoreLogTargets, ignoreLogTargets)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfigLoggingOtlp&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&(identical(other.grpcEndpoint, grpcEndpoint) || other.grpcEndpoint == grpcEndpoint)&&(identical(other.serviceName, serviceName) || other.serviceName == serviceName)&&const DeepCollectionEquality().equals(other.ignoreLogTargets, ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,grpcEndpoint,serviceName,const DeepCollectionEquality().hash(ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingOtlp(enabled: $enabled, level: $level, grpcEndpoint: $grpcEndpoint, serviceName: $serviceName, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, grpcEndpoint, - serviceName, const DeepCollectionEquality().hash(ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingOtlp(enabled: $enabled, level: $level, grpcEndpoint: $grpcEndpoint, serviceName: $serviceName, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigLoggingOtlpCopyWith<$Res> { - factory $VeilidFFIConfigLoggingOtlpCopyWith(VeilidFFIConfigLoggingOtlp value, - $Res Function(VeilidFFIConfigLoggingOtlp) _then) = - _$VeilidFFIConfigLoggingOtlpCopyWithImpl; - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - String grpcEndpoint, - String serviceName, - List ignoreLogTargets}); -} +abstract mixin class $VeilidFFIConfigLoggingOtlpCopyWith<$Res> { + factory $VeilidFFIConfigLoggingOtlpCopyWith(VeilidFFIConfigLoggingOtlp value, $Res Function(VeilidFFIConfigLoggingOtlp) _then) = _$VeilidFFIConfigLoggingOtlpCopyWithImpl; +@useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, String grpcEndpoint, String serviceName, List ignoreLogTargets +}); + + + +} /// @nodoc class _$VeilidFFIConfigLoggingOtlpCopyWithImpl<$Res> implements $VeilidFFIConfigLoggingOtlpCopyWith<$Res> { @@ -311,145 +350,211 @@ class _$VeilidFFIConfigLoggingOtlpCopyWithImpl<$Res> final VeilidFFIConfigLoggingOtlp _self; final $Res Function(VeilidFFIConfigLoggingOtlp) _then; - /// Create a copy of VeilidFFIConfigLoggingOtlp - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? level = null, - Object? grpcEndpoint = null, - Object? serviceName = null, - Object? ignoreLogTargets = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - grpcEndpoint: null == grpcEndpoint - ? _self.grpcEndpoint - : grpcEndpoint // ignore: cast_nullable_to_non_nullable - as String, - serviceName: null == serviceName - ? _self.serviceName - : serviceName // ignore: cast_nullable_to_non_nullable - as String, - ignoreLogTargets: null == ignoreLogTargets - ? _self.ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingOtlp +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? level = null,Object? grpcEndpoint = null,Object? serviceName = null,Object? ignoreLogTargets = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,grpcEndpoint: null == grpcEndpoint ? _self.grpcEndpoint : grpcEndpoint // ignore: cast_nullable_to_non_nullable +as String,serviceName: null == serviceName ? _self.serviceName : serviceName // ignore: cast_nullable_to_non_nullable +as String,ignoreLogTargets: null == ignoreLogTargets ? _self.ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidFFIConfigLoggingOtlp]. +extension VeilidFFIConfigLoggingOtlpPatterns on VeilidFFIConfigLoggingOtlp { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfigLoggingOtlp value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfigLoggingOtlp value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfigLoggingOtlp value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, VeilidConfigLogLevel level, String grpcEndpoint, String serviceName, List ignoreLogTargets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp() when $default != null: +return $default(_that.enabled,_that.level,_that.grpcEndpoint,_that.serviceName,_that.ignoreLogTargets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, VeilidConfigLogLevel level, String grpcEndpoint, String serviceName, List ignoreLogTargets) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp(): +return $default(_that.enabled,_that.level,_that.grpcEndpoint,_that.serviceName,_that.ignoreLogTargets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, VeilidConfigLogLevel level, String grpcEndpoint, String serviceName, List ignoreLogTargets)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingOtlp() when $default != null: +return $default(_that.enabled,_that.level,_that.grpcEndpoint,_that.serviceName,_that.ignoreLogTargets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidFFIConfigLoggingOtlp - with DiagnosticableTreeMixin - implements VeilidFFIConfigLoggingOtlp { - const _VeilidFFIConfigLoggingOtlp( - {required this.enabled, - required this.level, - required this.grpcEndpoint, - required this.serviceName, - final List ignoreLogTargets = const []}) - : _ignoreLogTargets = ignoreLogTargets; - factory _VeilidFFIConfigLoggingOtlp.fromJson(Map json) => - _$VeilidFFIConfigLoggingOtlpFromJson(json); - @override - final bool enabled; - @override - final VeilidConfigLogLevel level; - @override - final String grpcEndpoint; - @override - final String serviceName; - final List _ignoreLogTargets; - @override - @JsonKey() - List get ignoreLogTargets { - if (_ignoreLogTargets is EqualUnmodifiableListView) - return _ignoreLogTargets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_ignoreLogTargets); - } +class _VeilidFFIConfigLoggingOtlp with DiagnosticableTreeMixin implements VeilidFFIConfigLoggingOtlp { + const _VeilidFFIConfigLoggingOtlp({required this.enabled, required this.level, required this.grpcEndpoint, required this.serviceName, final List ignoreLogTargets = const []}): _ignoreLogTargets = ignoreLogTargets; + factory _VeilidFFIConfigLoggingOtlp.fromJson(Map json) => _$VeilidFFIConfigLoggingOtlpFromJson(json); - /// Create a copy of VeilidFFIConfigLoggingOtlp - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigLoggingOtlpCopyWith<_VeilidFFIConfigLoggingOtlp> - get copyWith => __$VeilidFFIConfigLoggingOtlpCopyWithImpl< - _VeilidFFIConfigLoggingOtlp>(this, _$identity); +@override final bool enabled; +@override final VeilidConfigLogLevel level; +@override final String grpcEndpoint; +@override final String serviceName; + final List _ignoreLogTargets; +@override@JsonKey() List get ignoreLogTargets { + if (_ignoreLogTargets is EqualUnmodifiableListView) return _ignoreLogTargets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_ignoreLogTargets); +} - @override - Map toJson() { - return _$VeilidFFIConfigLoggingOtlpToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingOtlp')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('grpcEndpoint', grpcEndpoint)) - ..add(DiagnosticsProperty('serviceName', serviceName)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +/// Create a copy of VeilidFFIConfigLoggingOtlp +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigLoggingOtlpCopyWith<_VeilidFFIConfigLoggingOtlp> get copyWith => __$VeilidFFIConfigLoggingOtlpCopyWithImpl<_VeilidFFIConfigLoggingOtlp>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfigLoggingOtlp && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - (identical(other.grpcEndpoint, grpcEndpoint) || - other.grpcEndpoint == grpcEndpoint) && - (identical(other.serviceName, serviceName) || - other.serviceName == serviceName) && - const DeepCollectionEquality() - .equals(other._ignoreLogTargets, _ignoreLogTargets)); - } +@override +Map toJson() { + return _$VeilidFFIConfigLoggingOtlpToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingOtlp')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('grpcEndpoint', grpcEndpoint))..add(DiagnosticsProperty('serviceName', serviceName))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfigLoggingOtlp&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&(identical(other.grpcEndpoint, grpcEndpoint) || other.grpcEndpoint == grpcEndpoint)&&(identical(other.serviceName, serviceName) || other.serviceName == serviceName)&&const DeepCollectionEquality().equals(other._ignoreLogTargets, _ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,grpcEndpoint,serviceName,const DeepCollectionEquality().hash(_ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingOtlp(enabled: $enabled, level: $level, grpcEndpoint: $grpcEndpoint, serviceName: $serviceName, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, grpcEndpoint, - serviceName, const DeepCollectionEquality().hash(_ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingOtlp(enabled: $enabled, level: $level, grpcEndpoint: $grpcEndpoint, serviceName: $serviceName, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigLoggingOtlpCopyWith<$Res> - implements $VeilidFFIConfigLoggingOtlpCopyWith<$Res> { - factory _$VeilidFFIConfigLoggingOtlpCopyWith( - _VeilidFFIConfigLoggingOtlp value, - $Res Function(_VeilidFFIConfigLoggingOtlp) _then) = - __$VeilidFFIConfigLoggingOtlpCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - String grpcEndpoint, - String serviceName, - List ignoreLogTargets}); -} +abstract mixin class _$VeilidFFIConfigLoggingOtlpCopyWith<$Res> implements $VeilidFFIConfigLoggingOtlpCopyWith<$Res> { + factory _$VeilidFFIConfigLoggingOtlpCopyWith(_VeilidFFIConfigLoggingOtlp value, $Res Function(_VeilidFFIConfigLoggingOtlp) _then) = __$VeilidFFIConfigLoggingOtlpCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, String grpcEndpoint, String serviceName, List ignoreLogTargets +}); + + + +} /// @nodoc class __$VeilidFFIConfigLoggingOtlpCopyWithImpl<$Res> implements _$VeilidFFIConfigLoggingOtlpCopyWith<$Res> { @@ -458,102 +563,72 @@ class __$VeilidFFIConfigLoggingOtlpCopyWithImpl<$Res> final _VeilidFFIConfigLoggingOtlp _self; final $Res Function(_VeilidFFIConfigLoggingOtlp) _then; - /// Create a copy of VeilidFFIConfigLoggingOtlp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? level = null, - Object? grpcEndpoint = null, - Object? serviceName = null, - Object? ignoreLogTargets = null, - }) { - return _then(_VeilidFFIConfigLoggingOtlp( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - grpcEndpoint: null == grpcEndpoint - ? _self.grpcEndpoint - : grpcEndpoint // ignore: cast_nullable_to_non_nullable - as String, - serviceName: null == serviceName - ? _self.serviceName - : serviceName // ignore: cast_nullable_to_non_nullable - as String, - ignoreLogTargets: null == ignoreLogTargets - ? _self._ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingOtlp +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? level = null,Object? grpcEndpoint = null,Object? serviceName = null,Object? ignoreLogTargets = null,}) { + return _then(_VeilidFFIConfigLoggingOtlp( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,grpcEndpoint: null == grpcEndpoint ? _self.grpcEndpoint : grpcEndpoint // ignore: cast_nullable_to_non_nullable +as String,serviceName: null == serviceName ? _self.serviceName : serviceName // ignore: cast_nullable_to_non_nullable +as String,ignoreLogTargets: null == ignoreLogTargets ? _self._ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidFFIConfigLoggingApi implements DiagnosticableTreeMixin { - bool get enabled; - VeilidConfigLogLevel get level; - List get ignoreLogTargets; - /// Create a copy of VeilidFFIConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingApiCopyWith get copyWith => - _$VeilidFFIConfigLoggingApiCopyWithImpl( - this as VeilidFFIConfigLoggingApi, _$identity); + bool get enabled; VeilidConfigLogLevel get level; List get ignoreLogTargets; +/// Create a copy of VeilidFFIConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingApiCopyWith get copyWith => _$VeilidFFIConfigLoggingApiCopyWithImpl(this as VeilidFFIConfigLoggingApi, _$identity); /// Serializes this VeilidFFIConfigLoggingApi to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingApi')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingApi')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfigLoggingApi && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other.ignoreLogTargets, ignoreLogTargets)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfigLoggingApi&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other.ignoreLogTargets, ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigLoggingApiCopyWith<$Res> { - factory $VeilidFFIConfigLoggingApiCopyWith(VeilidFFIConfigLoggingApi value, - $Res Function(VeilidFFIConfigLoggingApi) _then) = - _$VeilidFFIConfigLoggingApiCopyWithImpl; - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class $VeilidFFIConfigLoggingApiCopyWith<$Res> { + factory $VeilidFFIConfigLoggingApiCopyWith(VeilidFFIConfigLoggingApi value, $Res Function(VeilidFFIConfigLoggingApi) _then) = _$VeilidFFIConfigLoggingApiCopyWithImpl; +@useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class _$VeilidFFIConfigLoggingApiCopyWithImpl<$Res> implements $VeilidFFIConfigLoggingApiCopyWith<$Res> { @@ -562,121 +637,207 @@ class _$VeilidFFIConfigLoggingApiCopyWithImpl<$Res> final VeilidFFIConfigLoggingApi _self; final $Res Function(VeilidFFIConfigLoggingApi) _then; - /// Create a copy of VeilidFFIConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self.ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self.ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidFFIConfigLoggingApi]. +extension VeilidFFIConfigLoggingApiPatterns on VeilidFFIConfigLoggingApi { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfigLoggingApi value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfigLoggingApi value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfigLoggingApi value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi(): +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingApi() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidFFIConfigLoggingApi - with DiagnosticableTreeMixin - implements VeilidFFIConfigLoggingApi { - const _VeilidFFIConfigLoggingApi( - {required this.enabled, - required this.level, - final List ignoreLogTargets = const []}) - : _ignoreLogTargets = ignoreLogTargets; - factory _VeilidFFIConfigLoggingApi.fromJson(Map json) => - _$VeilidFFIConfigLoggingApiFromJson(json); - @override - final bool enabled; - @override - final VeilidConfigLogLevel level; - final List _ignoreLogTargets; - @override - @JsonKey() - List get ignoreLogTargets { - if (_ignoreLogTargets is EqualUnmodifiableListView) - return _ignoreLogTargets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_ignoreLogTargets); - } +class _VeilidFFIConfigLoggingApi with DiagnosticableTreeMixin implements VeilidFFIConfigLoggingApi { + const _VeilidFFIConfigLoggingApi({required this.enabled, required this.level, final List ignoreLogTargets = const []}): _ignoreLogTargets = ignoreLogTargets; + factory _VeilidFFIConfigLoggingApi.fromJson(Map json) => _$VeilidFFIConfigLoggingApiFromJson(json); - /// Create a copy of VeilidFFIConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigLoggingApiCopyWith<_VeilidFFIConfigLoggingApi> - get copyWith => - __$VeilidFFIConfigLoggingApiCopyWithImpl<_VeilidFFIConfigLoggingApi>( - this, _$identity); +@override final bool enabled; +@override final VeilidConfigLogLevel level; + final List _ignoreLogTargets; +@override@JsonKey() List get ignoreLogTargets { + if (_ignoreLogTargets is EqualUnmodifiableListView) return _ignoreLogTargets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_ignoreLogTargets); +} - @override - Map toJson() { - return _$VeilidFFIConfigLoggingApiToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingApi')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +/// Create a copy of VeilidFFIConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigLoggingApiCopyWith<_VeilidFFIConfigLoggingApi> get copyWith => __$VeilidFFIConfigLoggingApiCopyWithImpl<_VeilidFFIConfigLoggingApi>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfigLoggingApi && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other._ignoreLogTargets, _ignoreLogTargets)); - } +@override +Map toJson() { + return _$VeilidFFIConfigLoggingApiToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingApi')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfigLoggingApi&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other._ignoreLogTargets, _ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(_ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(_ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigLoggingApiCopyWith<$Res> - implements $VeilidFFIConfigLoggingApiCopyWith<$Res> { - factory _$VeilidFFIConfigLoggingApiCopyWith(_VeilidFFIConfigLoggingApi value, - $Res Function(_VeilidFFIConfigLoggingApi) _then) = - __$VeilidFFIConfigLoggingApiCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class _$VeilidFFIConfigLoggingApiCopyWith<$Res> implements $VeilidFFIConfigLoggingApiCopyWith<$Res> { + factory _$VeilidFFIConfigLoggingApiCopyWith(_VeilidFFIConfigLoggingApi value, $Res Function(_VeilidFFIConfigLoggingApi) _then) = __$VeilidFFIConfigLoggingApiCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class __$VeilidFFIConfigLoggingApiCopyWithImpl<$Res> implements _$VeilidFFIConfigLoggingApiCopyWith<$Res> { @@ -685,86 +846,70 @@ class __$VeilidFFIConfigLoggingApiCopyWithImpl<$Res> final _VeilidFFIConfigLoggingApi _self; final $Res Function(_VeilidFFIConfigLoggingApi) _then; - /// Create a copy of VeilidFFIConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_VeilidFFIConfigLoggingApi( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self._ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidFFIConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_VeilidFFIConfigLoggingApi( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self._ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidFFIConfigLoggingFlame implements DiagnosticableTreeMixin { - bool get enabled; - String get path; - /// Create a copy of VeilidFFIConfigLoggingFlame - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingFlameCopyWith - get copyWith => _$VeilidFFIConfigLoggingFlameCopyWithImpl< - VeilidFFIConfigLoggingFlame>( - this as VeilidFFIConfigLoggingFlame, _$identity); + bool get enabled; String get path; +/// Create a copy of VeilidFFIConfigLoggingFlame +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingFlameCopyWith get copyWith => _$VeilidFFIConfigLoggingFlameCopyWithImpl(this as VeilidFFIConfigLoggingFlame, _$identity); /// Serializes this VeilidFFIConfigLoggingFlame to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingFlame')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('path', path)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingFlame')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('path', path)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfigLoggingFlame && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.path, path) || other.path == path)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfigLoggingFlame&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.path, path) || other.path == path)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,path); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingFlame(enabled: $enabled, path: $path)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, path); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingFlame(enabled: $enabled, path: $path)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigLoggingFlameCopyWith<$Res> { - factory $VeilidFFIConfigLoggingFlameCopyWith( - VeilidFFIConfigLoggingFlame value, - $Res Function(VeilidFFIConfigLoggingFlame) _then) = - _$VeilidFFIConfigLoggingFlameCopyWithImpl; - @useResult - $Res call({bool enabled, String path}); -} +abstract mixin class $VeilidFFIConfigLoggingFlameCopyWith<$Res> { + factory $VeilidFFIConfigLoggingFlameCopyWith(VeilidFFIConfigLoggingFlame value, $Res Function(VeilidFFIConfigLoggingFlame) _then) = _$VeilidFFIConfigLoggingFlameCopyWithImpl; +@useResult +$Res call({ + bool enabled, String path +}); + + + +} /// @nodoc class _$VeilidFFIConfigLoggingFlameCopyWithImpl<$Res> implements $VeilidFFIConfigLoggingFlameCopyWith<$Res> { @@ -773,97 +918,199 @@ class _$VeilidFFIConfigLoggingFlameCopyWithImpl<$Res> final VeilidFFIConfigLoggingFlame _self; final $Res Function(VeilidFFIConfigLoggingFlame) _then; - /// Create a copy of VeilidFFIConfigLoggingFlame - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? path = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of VeilidFFIConfigLoggingFlame +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? path = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidFFIConfigLoggingFlame]. +extension VeilidFFIConfigLoggingFlamePatterns on VeilidFFIConfigLoggingFlame { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfigLoggingFlame value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfigLoggingFlame value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfigLoggingFlame value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, String path)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame() when $default != null: +return $default(_that.enabled,_that.path);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, String path) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame(): +return $default(_that.enabled,_that.path);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, String path)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLoggingFlame() when $default != null: +return $default(_that.enabled,_that.path);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidFFIConfigLoggingFlame - with DiagnosticableTreeMixin - implements VeilidFFIConfigLoggingFlame { - const _VeilidFFIConfigLoggingFlame( - {required this.enabled, required this.path}); - factory _VeilidFFIConfigLoggingFlame.fromJson(Map json) => - _$VeilidFFIConfigLoggingFlameFromJson(json); - @override - final bool enabled; - @override - final String path; +class _VeilidFFIConfigLoggingFlame with DiagnosticableTreeMixin implements VeilidFFIConfigLoggingFlame { + const _VeilidFFIConfigLoggingFlame({required this.enabled, required this.path}); + factory _VeilidFFIConfigLoggingFlame.fromJson(Map json) => _$VeilidFFIConfigLoggingFlameFromJson(json); - /// Create a copy of VeilidFFIConfigLoggingFlame - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigLoggingFlameCopyWith<_VeilidFFIConfigLoggingFlame> - get copyWith => __$VeilidFFIConfigLoggingFlameCopyWithImpl< - _VeilidFFIConfigLoggingFlame>(this, _$identity); +@override final bool enabled; +@override final String path; - @override - Map toJson() { - return _$VeilidFFIConfigLoggingFlameToJson( - this, - ); - } +/// Create a copy of VeilidFFIConfigLoggingFlame +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigLoggingFlameCopyWith<_VeilidFFIConfigLoggingFlame> get copyWith => __$VeilidFFIConfigLoggingFlameCopyWithImpl<_VeilidFFIConfigLoggingFlame>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingFlame')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('path', path)); - } +@override +Map toJson() { + return _$VeilidFFIConfigLoggingFlameToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLoggingFlame')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('path', path)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfigLoggingFlame && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.path, path) || other.path == path)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfigLoggingFlame&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.path, path) || other.path == path)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,path); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLoggingFlame(enabled: $enabled, path: $path)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, path); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLoggingFlame(enabled: $enabled, path: $path)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigLoggingFlameCopyWith<$Res> - implements $VeilidFFIConfigLoggingFlameCopyWith<$Res> { - factory _$VeilidFFIConfigLoggingFlameCopyWith( - _VeilidFFIConfigLoggingFlame value, - $Res Function(_VeilidFFIConfigLoggingFlame) _then) = - __$VeilidFFIConfigLoggingFlameCopyWithImpl; - @override - @useResult - $Res call({bool enabled, String path}); -} +abstract mixin class _$VeilidFFIConfigLoggingFlameCopyWith<$Res> implements $VeilidFFIConfigLoggingFlameCopyWith<$Res> { + factory _$VeilidFFIConfigLoggingFlameCopyWith(_VeilidFFIConfigLoggingFlame value, $Res Function(_VeilidFFIConfigLoggingFlame) _then) = __$VeilidFFIConfigLoggingFlameCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, String path +}); + + + +} /// @nodoc class __$VeilidFFIConfigLoggingFlameCopyWithImpl<$Res> implements _$VeilidFFIConfigLoggingFlameCopyWith<$Res> { @@ -872,95 +1119,69 @@ class __$VeilidFFIConfigLoggingFlameCopyWithImpl<$Res> final _VeilidFFIConfigLoggingFlame _self; final $Res Function(_VeilidFFIConfigLoggingFlame) _then; - /// Create a copy of VeilidFFIConfigLoggingFlame - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? path = null, - }) { - return _then(_VeilidFFIConfigLoggingFlame( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - )); - } +/// Create a copy of VeilidFFIConfigLoggingFlame +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? path = null,}) { + return _then(_VeilidFFIConfigLoggingFlame( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String, + )); } + +} + + /// @nodoc mixin _$VeilidFFIConfigLogging implements DiagnosticableTreeMixin { - VeilidFFIConfigLoggingTerminal get terminal; - VeilidFFIConfigLoggingOtlp get otlp; - VeilidFFIConfigLoggingApi get api; - VeilidFFIConfigLoggingFlame get flame; - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingCopyWith get copyWith => - _$VeilidFFIConfigLoggingCopyWithImpl( - this as VeilidFFIConfigLogging, _$identity); + VeilidFFIConfigLoggingTerminal get terminal; VeilidFFIConfigLoggingOtlp get otlp; VeilidFFIConfigLoggingApi get api; VeilidFFIConfigLoggingFlame get flame; +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingCopyWith get copyWith => _$VeilidFFIConfigLoggingCopyWithImpl(this as VeilidFFIConfigLogging, _$identity); /// Serializes this VeilidFFIConfigLogging to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLogging')) - ..add(DiagnosticsProperty('terminal', terminal)) - ..add(DiagnosticsProperty('otlp', otlp)) - ..add(DiagnosticsProperty('api', api)) - ..add(DiagnosticsProperty('flame', flame)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLogging')) + ..add(DiagnosticsProperty('terminal', terminal))..add(DiagnosticsProperty('otlp', otlp))..add(DiagnosticsProperty('api', api))..add(DiagnosticsProperty('flame', flame)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfigLogging && - (identical(other.terminal, terminal) || - other.terminal == terminal) && - (identical(other.otlp, otlp) || other.otlp == otlp) && - (identical(other.api, api) || other.api == api) && - (identical(other.flame, flame) || other.flame == flame)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfigLogging&&(identical(other.terminal, terminal) || other.terminal == terminal)&&(identical(other.otlp, otlp) || other.otlp == otlp)&&(identical(other.api, api) || other.api == api)&&(identical(other.flame, flame) || other.flame == flame)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,terminal,otlp,api,flame); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLogging(terminal: $terminal, otlp: $otlp, api: $api, flame: $flame)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, terminal, otlp, api, flame); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLogging(terminal: $terminal, otlp: $otlp, api: $api, flame: $flame)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigLoggingCopyWith<$Res> { - factory $VeilidFFIConfigLoggingCopyWith(VeilidFFIConfigLogging value, - $Res Function(VeilidFFIConfigLogging) _then) = - _$VeilidFFIConfigLoggingCopyWithImpl; - @useResult - $Res call( - {VeilidFFIConfigLoggingTerminal terminal, - VeilidFFIConfigLoggingOtlp otlp, - VeilidFFIConfigLoggingApi api, - VeilidFFIConfigLoggingFlame flame}); +abstract mixin class $VeilidFFIConfigLoggingCopyWith<$Res> { + factory $VeilidFFIConfigLoggingCopyWith(VeilidFFIConfigLogging value, $Res Function(VeilidFFIConfigLogging) _then) = _$VeilidFFIConfigLoggingCopyWithImpl; +@useResult +$Res call({ + VeilidFFIConfigLoggingTerminal terminal, VeilidFFIConfigLoggingOtlp otlp, VeilidFFIConfigLoggingApi api, VeilidFFIConfigLoggingFlame flame +}); + + +$VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal;$VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp;$VeilidFFIConfigLoggingApiCopyWith<$Res> get api;$VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame; - $VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal; - $VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp; - $VeilidFFIConfigLoggingApiCopyWith<$Res> get api; - $VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame; } - /// @nodoc class _$VeilidFFIConfigLoggingCopyWithImpl<$Res> implements $VeilidFFIConfigLoggingCopyWith<$Res> { @@ -969,172 +1190,239 @@ class _$VeilidFFIConfigLoggingCopyWithImpl<$Res> final VeilidFFIConfigLogging _self; final $Res Function(VeilidFFIConfigLogging) _then; - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? terminal = null, - Object? otlp = null, - Object? api = null, - Object? flame = null, - }) { - return _then(_self.copyWith( - terminal: null == terminal - ? _self.terminal - : terminal // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingTerminal, - otlp: null == otlp - ? _self.otlp - : otlp // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingOtlp, - api: null == api - ? _self.api - : api // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingApi, - flame: null == flame - ? _self.flame - : flame // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingFlame, - )); - } +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? terminal = null,Object? otlp = null,Object? api = null,Object? flame = null,}) { + return _then(_self.copyWith( +terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingTerminal,otlp: null == otlp ? _self.otlp : otlp // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingOtlp,api: null == api ? _self.api : api // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingApi,flame: null == flame ? _self.flame : flame // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingFlame, + )); +} +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal { + + return $VeilidFFIConfigLoggingTerminalCopyWith<$Res>(_self.terminal, (value) { + return _then(_self.copyWith(terminal: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp { + + return $VeilidFFIConfigLoggingOtlpCopyWith<$Res>(_self.otlp, (value) { + return _then(_self.copyWith(otlp: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingApiCopyWith<$Res> get api { + + return $VeilidFFIConfigLoggingApiCopyWith<$Res>(_self.api, (value) { + return _then(_self.copyWith(api: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame { + + return $VeilidFFIConfigLoggingFlameCopyWith<$Res>(_self.flame, (value) { + return _then(_self.copyWith(flame: value)); + }); +} +} - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal { - return $VeilidFFIConfigLoggingTerminalCopyWith<$Res>(_self.terminal, - (value) { - return _then(_self.copyWith(terminal: value)); - }); - } - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp { - return $VeilidFFIConfigLoggingOtlpCopyWith<$Res>(_self.otlp, (value) { - return _then(_self.copyWith(otlp: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidFFIConfigLogging]. +extension VeilidFFIConfigLoggingPatterns on VeilidFFIConfigLogging { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingApiCopyWith<$Res> get api { - return $VeilidFFIConfigLoggingApiCopyWith<$Res>(_self.api, (value) { - return _then(_self.copyWith(api: value)); - }); - } +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfigLogging value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfigLogging value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfigLogging value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidFFIConfigLoggingTerminal terminal, VeilidFFIConfigLoggingOtlp otlp, VeilidFFIConfigLoggingApi api, VeilidFFIConfigLoggingFlame flame)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging() when $default != null: +return $default(_that.terminal,_that.otlp,_that.api,_that.flame);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidFFIConfigLoggingTerminal terminal, VeilidFFIConfigLoggingOtlp otlp, VeilidFFIConfigLoggingApi api, VeilidFFIConfigLoggingFlame flame) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging(): +return $default(_that.terminal,_that.otlp,_that.api,_that.flame);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidFFIConfigLoggingTerminal terminal, VeilidFFIConfigLoggingOtlp otlp, VeilidFFIConfigLoggingApi api, VeilidFFIConfigLoggingFlame flame)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfigLogging() when $default != null: +return $default(_that.terminal,_that.otlp,_that.api,_that.flame);case _: + return null; + +} +} - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame { - return $VeilidFFIConfigLoggingFlameCopyWith<$Res>(_self.flame, (value) { - return _then(_self.copyWith(flame: value)); - }); - } } /// @nodoc @JsonSerializable() -class _VeilidFFIConfigLogging - with DiagnosticableTreeMixin - implements VeilidFFIConfigLogging { - const _VeilidFFIConfigLogging( - {required this.terminal, - required this.otlp, - required this.api, - required this.flame}); - factory _VeilidFFIConfigLogging.fromJson(Map json) => - _$VeilidFFIConfigLoggingFromJson(json); - @override - final VeilidFFIConfigLoggingTerminal terminal; - @override - final VeilidFFIConfigLoggingOtlp otlp; - @override - final VeilidFFIConfigLoggingApi api; - @override - final VeilidFFIConfigLoggingFlame flame; +class _VeilidFFIConfigLogging with DiagnosticableTreeMixin implements VeilidFFIConfigLogging { + const _VeilidFFIConfigLogging({required this.terminal, required this.otlp, required this.api, required this.flame}); + factory _VeilidFFIConfigLogging.fromJson(Map json) => _$VeilidFFIConfigLoggingFromJson(json); - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigLoggingCopyWith<_VeilidFFIConfigLogging> get copyWith => - __$VeilidFFIConfigLoggingCopyWithImpl<_VeilidFFIConfigLogging>( - this, _$identity); +@override final VeilidFFIConfigLoggingTerminal terminal; +@override final VeilidFFIConfigLoggingOtlp otlp; +@override final VeilidFFIConfigLoggingApi api; +@override final VeilidFFIConfigLoggingFlame flame; - @override - Map toJson() { - return _$VeilidFFIConfigLoggingToJson( - this, - ); - } +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigLoggingCopyWith<_VeilidFFIConfigLogging> get copyWith => __$VeilidFFIConfigLoggingCopyWithImpl<_VeilidFFIConfigLogging>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLogging')) - ..add(DiagnosticsProperty('terminal', terminal)) - ..add(DiagnosticsProperty('otlp', otlp)) - ..add(DiagnosticsProperty('api', api)) - ..add(DiagnosticsProperty('flame', flame)); - } +@override +Map toJson() { + return _$VeilidFFIConfigLoggingToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfigLogging')) + ..add(DiagnosticsProperty('terminal', terminal))..add(DiagnosticsProperty('otlp', otlp))..add(DiagnosticsProperty('api', api))..add(DiagnosticsProperty('flame', flame)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfigLogging && - (identical(other.terminal, terminal) || - other.terminal == terminal) && - (identical(other.otlp, otlp) || other.otlp == otlp) && - (identical(other.api, api) || other.api == api) && - (identical(other.flame, flame) || other.flame == flame)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfigLogging&&(identical(other.terminal, terminal) || other.terminal == terminal)&&(identical(other.otlp, otlp) || other.otlp == otlp)&&(identical(other.api, api) || other.api == api)&&(identical(other.flame, flame) || other.flame == flame)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,terminal,otlp,api,flame); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfigLogging(terminal: $terminal, otlp: $otlp, api: $api, flame: $flame)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, terminal, otlp, api, flame); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfigLogging(terminal: $terminal, otlp: $otlp, api: $api, flame: $flame)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigLoggingCopyWith<$Res> - implements $VeilidFFIConfigLoggingCopyWith<$Res> { - factory _$VeilidFFIConfigLoggingCopyWith(_VeilidFFIConfigLogging value, - $Res Function(_VeilidFFIConfigLogging) _then) = - __$VeilidFFIConfigLoggingCopyWithImpl; - @override - @useResult - $Res call( - {VeilidFFIConfigLoggingTerminal terminal, - VeilidFFIConfigLoggingOtlp otlp, - VeilidFFIConfigLoggingApi api, - VeilidFFIConfigLoggingFlame flame}); +abstract mixin class _$VeilidFFIConfigLoggingCopyWith<$Res> implements $VeilidFFIConfigLoggingCopyWith<$Res> { + factory _$VeilidFFIConfigLoggingCopyWith(_VeilidFFIConfigLogging value, $Res Function(_VeilidFFIConfigLogging) _then) = __$VeilidFFIConfigLoggingCopyWithImpl; +@override @useResult +$Res call({ + VeilidFFIConfigLoggingTerminal terminal, VeilidFFIConfigLoggingOtlp otlp, VeilidFFIConfigLoggingApi api, VeilidFFIConfigLoggingFlame flame +}); + + +@override $VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal;@override $VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp;@override $VeilidFFIConfigLoggingApiCopyWith<$Res> get api;@override $VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame; - @override - $VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal; - @override - $VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp; - @override - $VeilidFFIConfigLoggingApiCopyWith<$Res> get api; - @override - $VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame; } - /// @nodoc class __$VeilidFFIConfigLoggingCopyWithImpl<$Res> implements _$VeilidFFIConfigLoggingCopyWith<$Res> { @@ -1143,129 +1431,107 @@ class __$VeilidFFIConfigLoggingCopyWithImpl<$Res> final _VeilidFFIConfigLogging _self; final $Res Function(_VeilidFFIConfigLogging) _then; - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? terminal = null, - Object? otlp = null, - Object? api = null, - Object? flame = null, - }) { - return _then(_VeilidFFIConfigLogging( - terminal: null == terminal - ? _self.terminal - : terminal // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingTerminal, - otlp: null == otlp - ? _self.otlp - : otlp // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingOtlp, - api: null == api - ? _self.api - : api // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingApi, - flame: null == flame - ? _self.flame - : flame // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLoggingFlame, - )); - } - - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal { - return $VeilidFFIConfigLoggingTerminalCopyWith<$Res>(_self.terminal, - (value) { - return _then(_self.copyWith(terminal: value)); - }); - } - - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp { - return $VeilidFFIConfigLoggingOtlpCopyWith<$Res>(_self.otlp, (value) { - return _then(_self.copyWith(otlp: value)); - }); - } - - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingApiCopyWith<$Res> get api { - return $VeilidFFIConfigLoggingApiCopyWith<$Res>(_self.api, (value) { - return _then(_self.copyWith(api: value)); - }); - } - - /// Create a copy of VeilidFFIConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame { - return $VeilidFFIConfigLoggingFlameCopyWith<$Res>(_self.flame, (value) { - return _then(_self.copyWith(flame: value)); - }); - } +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? terminal = null,Object? otlp = null,Object? api = null,Object? flame = null,}) { + return _then(_VeilidFFIConfigLogging( +terminal: null == terminal ? _self.terminal : terminal // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingTerminal,otlp: null == otlp ? _self.otlp : otlp // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingOtlp,api: null == api ? _self.api : api // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingApi,flame: null == flame ? _self.flame : flame // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLoggingFlame, + )); } +/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingTerminalCopyWith<$Res> get terminal { + + return $VeilidFFIConfigLoggingTerminalCopyWith<$Res>(_self.terminal, (value) { + return _then(_self.copyWith(terminal: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingOtlpCopyWith<$Res> get otlp { + + return $VeilidFFIConfigLoggingOtlpCopyWith<$Res>(_self.otlp, (value) { + return _then(_self.copyWith(otlp: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingApiCopyWith<$Res> get api { + + return $VeilidFFIConfigLoggingApiCopyWith<$Res>(_self.api, (value) { + return _then(_self.copyWith(api: value)); + }); +}/// Create a copy of VeilidFFIConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingFlameCopyWith<$Res> get flame { + + return $VeilidFFIConfigLoggingFlameCopyWith<$Res>(_self.flame, (value) { + return _then(_self.copyWith(flame: value)); + }); +} +} + + /// @nodoc mixin _$VeilidFFIConfig implements DiagnosticableTreeMixin { - VeilidFFIConfigLogging get logging; - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidFFIConfigCopyWith get copyWith => - _$VeilidFFIConfigCopyWithImpl( - this as VeilidFFIConfig, _$identity); + VeilidFFIConfigLogging get logging; +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidFFIConfigCopyWith get copyWith => _$VeilidFFIConfigCopyWithImpl(this as VeilidFFIConfig, _$identity); /// Serializes this VeilidFFIConfig to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfig')) - ..add(DiagnosticsProperty('logging', logging)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfig')) + ..add(DiagnosticsProperty('logging', logging)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidFFIConfig && - (identical(other.logging, logging) || other.logging == logging)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidFFIConfig&&(identical(other.logging, logging) || other.logging == logging)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,logging); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfig(logging: $logging)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, logging); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfig(logging: $logging)'; - } } /// @nodoc -abstract mixin class $VeilidFFIConfigCopyWith<$Res> { - factory $VeilidFFIConfigCopyWith( - VeilidFFIConfig value, $Res Function(VeilidFFIConfig) _then) = - _$VeilidFFIConfigCopyWithImpl; - @useResult - $Res call({VeilidFFIConfigLogging logging}); +abstract mixin class $VeilidFFIConfigCopyWith<$Res> { + factory $VeilidFFIConfigCopyWith(VeilidFFIConfig value, $Res Function(VeilidFFIConfig) _then) = _$VeilidFFIConfigCopyWithImpl; +@useResult +$Res call({ + VeilidFFIConfigLogging logging +}); + + +$VeilidFFIConfigLoggingCopyWith<$Res> get logging; - $VeilidFFIConfigLoggingCopyWith<$Res> get logging; } - /// @nodoc class _$VeilidFFIConfigCopyWithImpl<$Res> implements $VeilidFFIConfigCopyWith<$Res> { @@ -1274,96 +1540,206 @@ class _$VeilidFFIConfigCopyWithImpl<$Res> final VeilidFFIConfig _self; final $Res Function(VeilidFFIConfig) _then; - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? logging = null, - }) { - return _then(_self.copyWith( - logging: null == logging - ? _self.logging - : logging // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLogging, - )); - } +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? logging = null,}) { + return _then(_self.copyWith( +logging: null == logging ? _self.logging : logging // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLogging, + )); +} +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingCopyWith<$Res> get logging { + + return $VeilidFFIConfigLoggingCopyWith<$Res>(_self.logging, (value) { + return _then(_self.copyWith(logging: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [VeilidFFIConfig]. +extension VeilidFFIConfigPatterns on VeilidFFIConfig { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidFFIConfig value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidFFIConfig() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidFFIConfig value) $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfig(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidFFIConfig value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidFFIConfig() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidFFIConfigLogging logging)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidFFIConfig() when $default != null: +return $default(_that.logging);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidFFIConfigLogging logging) $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfig(): +return $default(_that.logging);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidFFIConfigLogging logging)? $default,) {final _that = this; +switch (_that) { +case _VeilidFFIConfig() when $default != null: +return $default(_that.logging);case _: + return null; + +} +} - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingCopyWith<$Res> get logging { - return $VeilidFFIConfigLoggingCopyWith<$Res>(_self.logging, (value) { - return _then(_self.copyWith(logging: value)); - }); - } } /// @nodoc @JsonSerializable() + class _VeilidFFIConfig with DiagnosticableTreeMixin implements VeilidFFIConfig { const _VeilidFFIConfig({required this.logging}); - factory _VeilidFFIConfig.fromJson(Map json) => - _$VeilidFFIConfigFromJson(json); + factory _VeilidFFIConfig.fromJson(Map json) => _$VeilidFFIConfigFromJson(json); - @override - final VeilidFFIConfigLogging logging; +@override final VeilidFFIConfigLogging logging; - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidFFIConfigCopyWith<_VeilidFFIConfig> get copyWith => - __$VeilidFFIConfigCopyWithImpl<_VeilidFFIConfig>(this, _$identity); +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidFFIConfigCopyWith<_VeilidFFIConfig> get copyWith => __$VeilidFFIConfigCopyWithImpl<_VeilidFFIConfig>(this, _$identity); - @override - Map toJson() { - return _$VeilidFFIConfigToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidFFIConfigToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidFFIConfig')) + ..add(DiagnosticsProperty('logging', logging)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidFFIConfig')) - ..add(DiagnosticsProperty('logging', logging)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidFFIConfig&&(identical(other.logging, logging) || other.logging == logging)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidFFIConfig && - (identical(other.logging, logging) || other.logging == logging)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,logging); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidFFIConfig(logging: $logging)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, logging); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidFFIConfig(logging: $logging)'; - } } /// @nodoc -abstract mixin class _$VeilidFFIConfigCopyWith<$Res> - implements $VeilidFFIConfigCopyWith<$Res> { - factory _$VeilidFFIConfigCopyWith( - _VeilidFFIConfig value, $Res Function(_VeilidFFIConfig) _then) = - __$VeilidFFIConfigCopyWithImpl; - @override - @useResult - $Res call({VeilidFFIConfigLogging logging}); +abstract mixin class _$VeilidFFIConfigCopyWith<$Res> implements $VeilidFFIConfigCopyWith<$Res> { + factory _$VeilidFFIConfigCopyWith(_VeilidFFIConfig value, $Res Function(_VeilidFFIConfig) _then) = __$VeilidFFIConfigCopyWithImpl; +@override @useResult +$Res call({ + VeilidFFIConfigLogging logging +}); + + +@override $VeilidFFIConfigLoggingCopyWith<$Res> get logging; - @override - $VeilidFFIConfigLoggingCopyWith<$Res> get logging; } - /// @nodoc class __$VeilidFFIConfigCopyWithImpl<$Res> implements _$VeilidFFIConfigCopyWith<$Res> { @@ -1372,105 +1748,77 @@ class __$VeilidFFIConfigCopyWithImpl<$Res> final _VeilidFFIConfig _self; final $Res Function(_VeilidFFIConfig) _then; - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? logging = null, - }) { - return _then(_VeilidFFIConfig( - logging: null == logging - ? _self.logging - : logging // ignore: cast_nullable_to_non_nullable - as VeilidFFIConfigLogging, - )); - } - - /// Create a copy of VeilidFFIConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidFFIConfigLoggingCopyWith<$Res> get logging { - return $VeilidFFIConfigLoggingCopyWith<$Res>(_self.logging, (value) { - return _then(_self.copyWith(logging: value)); - }); - } +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? logging = null,}) { + return _then(_VeilidFFIConfig( +logging: null == logging ? _self.logging : logging // ignore: cast_nullable_to_non_nullable +as VeilidFFIConfigLogging, + )); } +/// Create a copy of VeilidFFIConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidFFIConfigLoggingCopyWith<$Res> get logging { + + return $VeilidFFIConfigLoggingCopyWith<$Res>(_self.logging, (value) { + return _then(_self.copyWith(logging: value)); + }); +} +} + + /// @nodoc mixin _$VeilidWASMConfigLoggingPerformance implements DiagnosticableTreeMixin { - bool get enabled; - VeilidConfigLogLevel get level; - bool get logsInTimings; - bool get logsInConsole; - List get ignoreLogTargets; - /// Create a copy of VeilidWASMConfigLoggingPerformance - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingPerformanceCopyWith< - VeilidWASMConfigLoggingPerformance> - get copyWith => _$VeilidWASMConfigLoggingPerformanceCopyWithImpl< - VeilidWASMConfigLoggingPerformance>( - this as VeilidWASMConfigLoggingPerformance, _$identity); + bool get enabled; VeilidConfigLogLevel get level; bool get logsInTimings; bool get logsInConsole; List get ignoreLogTargets; +/// Create a copy of VeilidWASMConfigLoggingPerformance +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingPerformanceCopyWith get copyWith => _$VeilidWASMConfigLoggingPerformanceCopyWithImpl(this as VeilidWASMConfigLoggingPerformance, _$identity); /// Serializes this VeilidWASMConfigLoggingPerformance to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingPerformance')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('logsInTimings', logsInTimings)) - ..add(DiagnosticsProperty('logsInConsole', logsInConsole)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingPerformance')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('logsInTimings', logsInTimings))..add(DiagnosticsProperty('logsInConsole', logsInConsole))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidWASMConfigLoggingPerformance && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - (identical(other.logsInTimings, logsInTimings) || - other.logsInTimings == logsInTimings) && - (identical(other.logsInConsole, logsInConsole) || - other.logsInConsole == logsInConsole) && - const DeepCollectionEquality() - .equals(other.ignoreLogTargets, ignoreLogTargets)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidWASMConfigLoggingPerformance&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&(identical(other.logsInTimings, logsInTimings) || other.logsInTimings == logsInTimings)&&(identical(other.logsInConsole, logsInConsole) || other.logsInConsole == logsInConsole)&&const DeepCollectionEquality().equals(other.ignoreLogTargets, ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,logsInTimings,logsInConsole,const DeepCollectionEquality().hash(ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLoggingPerformance(enabled: $enabled, level: $level, logsInTimings: $logsInTimings, logsInConsole: $logsInConsole, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, logsInTimings, - logsInConsole, const DeepCollectionEquality().hash(ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLoggingPerformance(enabled: $enabled, level: $level, logsInTimings: $logsInTimings, logsInConsole: $logsInConsole, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { - factory $VeilidWASMConfigLoggingPerformanceCopyWith( - VeilidWASMConfigLoggingPerformance value, - $Res Function(VeilidWASMConfigLoggingPerformance) _then) = - _$VeilidWASMConfigLoggingPerformanceCopyWithImpl; - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - bool logsInTimings, - bool logsInConsole, - List ignoreLogTargets}); -} +abstract mixin class $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { + factory $VeilidWASMConfigLoggingPerformanceCopyWith(VeilidWASMConfigLoggingPerformance value, $Res Function(VeilidWASMConfigLoggingPerformance) _then) = _$VeilidWASMConfigLoggingPerformanceCopyWithImpl; +@useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, bool logsInTimings, bool logsInConsole, List ignoreLogTargets +}); + + + +} /// @nodoc class _$VeilidWASMConfigLoggingPerformanceCopyWithImpl<$Res> implements $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { @@ -1479,147 +1827,211 @@ class _$VeilidWASMConfigLoggingPerformanceCopyWithImpl<$Res> final VeilidWASMConfigLoggingPerformance _self; final $Res Function(VeilidWASMConfigLoggingPerformance) _then; - /// Create a copy of VeilidWASMConfigLoggingPerformance - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? level = null, - Object? logsInTimings = null, - Object? logsInConsole = null, - Object? ignoreLogTargets = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - logsInTimings: null == logsInTimings - ? _self.logsInTimings - : logsInTimings // ignore: cast_nullable_to_non_nullable - as bool, - logsInConsole: null == logsInConsole - ? _self.logsInConsole - : logsInConsole // ignore: cast_nullable_to_non_nullable - as bool, - ignoreLogTargets: null == ignoreLogTargets - ? _self.ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidWASMConfigLoggingPerformance +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? level = null,Object? logsInTimings = null,Object? logsInConsole = null,Object? ignoreLogTargets = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,logsInTimings: null == logsInTimings ? _self.logsInTimings : logsInTimings // ignore: cast_nullable_to_non_nullable +as bool,logsInConsole: null == logsInConsole ? _self.logsInConsole : logsInConsole // ignore: cast_nullable_to_non_nullable +as bool,ignoreLogTargets: null == ignoreLogTargets ? _self.ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidWASMConfigLoggingPerformance]. +extension VeilidWASMConfigLoggingPerformancePatterns on VeilidWASMConfigLoggingPerformance { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidWASMConfigLoggingPerformance value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidWASMConfigLoggingPerformance value) $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidWASMConfigLoggingPerformance value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, VeilidConfigLogLevel level, bool logsInTimings, bool logsInConsole, List ignoreLogTargets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance() when $default != null: +return $default(_that.enabled,_that.level,_that.logsInTimings,_that.logsInConsole,_that.ignoreLogTargets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, VeilidConfigLogLevel level, bool logsInTimings, bool logsInConsole, List ignoreLogTargets) $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance(): +return $default(_that.enabled,_that.level,_that.logsInTimings,_that.logsInConsole,_that.ignoreLogTargets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, VeilidConfigLogLevel level, bool logsInTimings, bool logsInConsole, List ignoreLogTargets)? $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingPerformance() when $default != null: +return $default(_that.enabled,_that.level,_that.logsInTimings,_that.logsInConsole,_that.ignoreLogTargets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidWASMConfigLoggingPerformance - with DiagnosticableTreeMixin - implements VeilidWASMConfigLoggingPerformance { - const _VeilidWASMConfigLoggingPerformance( - {required this.enabled, - required this.level, - required this.logsInTimings, - required this.logsInConsole, - final List ignoreLogTargets = const []}) - : _ignoreLogTargets = ignoreLogTargets; - factory _VeilidWASMConfigLoggingPerformance.fromJson( - Map json) => - _$VeilidWASMConfigLoggingPerformanceFromJson(json); - @override - final bool enabled; - @override - final VeilidConfigLogLevel level; - @override - final bool logsInTimings; - @override - final bool logsInConsole; - final List _ignoreLogTargets; - @override - @JsonKey() - List get ignoreLogTargets { - if (_ignoreLogTargets is EqualUnmodifiableListView) - return _ignoreLogTargets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_ignoreLogTargets); - } +class _VeilidWASMConfigLoggingPerformance with DiagnosticableTreeMixin implements VeilidWASMConfigLoggingPerformance { + const _VeilidWASMConfigLoggingPerformance({required this.enabled, required this.level, required this.logsInTimings, required this.logsInConsole, final List ignoreLogTargets = const []}): _ignoreLogTargets = ignoreLogTargets; + factory _VeilidWASMConfigLoggingPerformance.fromJson(Map json) => _$VeilidWASMConfigLoggingPerformanceFromJson(json); - /// Create a copy of VeilidWASMConfigLoggingPerformance - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidWASMConfigLoggingPerformanceCopyWith< - _VeilidWASMConfigLoggingPerformance> - get copyWith => __$VeilidWASMConfigLoggingPerformanceCopyWithImpl< - _VeilidWASMConfigLoggingPerformance>(this, _$identity); +@override final bool enabled; +@override final VeilidConfigLogLevel level; +@override final bool logsInTimings; +@override final bool logsInConsole; + final List _ignoreLogTargets; +@override@JsonKey() List get ignoreLogTargets { + if (_ignoreLogTargets is EqualUnmodifiableListView) return _ignoreLogTargets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_ignoreLogTargets); +} - @override - Map toJson() { - return _$VeilidWASMConfigLoggingPerformanceToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingPerformance')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('logsInTimings', logsInTimings)) - ..add(DiagnosticsProperty('logsInConsole', logsInConsole)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +/// Create a copy of VeilidWASMConfigLoggingPerformance +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidWASMConfigLoggingPerformanceCopyWith<_VeilidWASMConfigLoggingPerformance> get copyWith => __$VeilidWASMConfigLoggingPerformanceCopyWithImpl<_VeilidWASMConfigLoggingPerformance>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidWASMConfigLoggingPerformance && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - (identical(other.logsInTimings, logsInTimings) || - other.logsInTimings == logsInTimings) && - (identical(other.logsInConsole, logsInConsole) || - other.logsInConsole == logsInConsole) && - const DeepCollectionEquality() - .equals(other._ignoreLogTargets, _ignoreLogTargets)); - } +@override +Map toJson() { + return _$VeilidWASMConfigLoggingPerformanceToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingPerformance')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('logsInTimings', logsInTimings))..add(DiagnosticsProperty('logsInConsole', logsInConsole))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidWASMConfigLoggingPerformance&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&(identical(other.logsInTimings, logsInTimings) || other.logsInTimings == logsInTimings)&&(identical(other.logsInConsole, logsInConsole) || other.logsInConsole == logsInConsole)&&const DeepCollectionEquality().equals(other._ignoreLogTargets, _ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,logsInTimings,logsInConsole,const DeepCollectionEquality().hash(_ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLoggingPerformance(enabled: $enabled, level: $level, logsInTimings: $logsInTimings, logsInConsole: $logsInConsole, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, logsInTimings, - logsInConsole, const DeepCollectionEquality().hash(_ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLoggingPerformance(enabled: $enabled, level: $level, logsInTimings: $logsInTimings, logsInConsole: $logsInConsole, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class _$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> - implements $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { - factory _$VeilidWASMConfigLoggingPerformanceCopyWith( - _VeilidWASMConfigLoggingPerformance value, - $Res Function(_VeilidWASMConfigLoggingPerformance) _then) = - __$VeilidWASMConfigLoggingPerformanceCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - bool logsInTimings, - bool logsInConsole, - List ignoreLogTargets}); -} +abstract mixin class _$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> implements $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { + factory _$VeilidWASMConfigLoggingPerformanceCopyWith(_VeilidWASMConfigLoggingPerformance value, $Res Function(_VeilidWASMConfigLoggingPerformance) _then) = __$VeilidWASMConfigLoggingPerformanceCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, bool logsInTimings, bool logsInConsole, List ignoreLogTargets +}); + + + +} /// @nodoc class __$VeilidWASMConfigLoggingPerformanceCopyWithImpl<$Res> implements _$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> { @@ -1628,103 +2040,72 @@ class __$VeilidWASMConfigLoggingPerformanceCopyWithImpl<$Res> final _VeilidWASMConfigLoggingPerformance _self; final $Res Function(_VeilidWASMConfigLoggingPerformance) _then; - /// Create a copy of VeilidWASMConfigLoggingPerformance - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? level = null, - Object? logsInTimings = null, - Object? logsInConsole = null, - Object? ignoreLogTargets = null, - }) { - return _then(_VeilidWASMConfigLoggingPerformance( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - logsInTimings: null == logsInTimings - ? _self.logsInTimings - : logsInTimings // ignore: cast_nullable_to_non_nullable - as bool, - logsInConsole: null == logsInConsole - ? _self.logsInConsole - : logsInConsole // ignore: cast_nullable_to_non_nullable - as bool, - ignoreLogTargets: null == ignoreLogTargets - ? _self._ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidWASMConfigLoggingPerformance +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? level = null,Object? logsInTimings = null,Object? logsInConsole = null,Object? ignoreLogTargets = null,}) { + return _then(_VeilidWASMConfigLoggingPerformance( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,logsInTimings: null == logsInTimings ? _self.logsInTimings : logsInTimings // ignore: cast_nullable_to_non_nullable +as bool,logsInConsole: null == logsInConsole ? _self.logsInConsole : logsInConsole // ignore: cast_nullable_to_non_nullable +as bool,ignoreLogTargets: null == ignoreLogTargets ? _self._ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidWASMConfigLoggingApi implements DiagnosticableTreeMixin { - bool get enabled; - VeilidConfigLogLevel get level; - List get ignoreLogTargets; - /// Create a copy of VeilidWASMConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingApiCopyWith - get copyWith => - _$VeilidWASMConfigLoggingApiCopyWithImpl( - this as VeilidWASMConfigLoggingApi, _$identity); + bool get enabled; VeilidConfigLogLevel get level; List get ignoreLogTargets; +/// Create a copy of VeilidWASMConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingApiCopyWith get copyWith => _$VeilidWASMConfigLoggingApiCopyWithImpl(this as VeilidWASMConfigLoggingApi, _$identity); /// Serializes this VeilidWASMConfigLoggingApi to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingApi')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingApi')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidWASMConfigLoggingApi && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other.ignoreLogTargets, ignoreLogTargets)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidWASMConfigLoggingApi&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other.ignoreLogTargets, ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class $VeilidWASMConfigLoggingApiCopyWith<$Res> { - factory $VeilidWASMConfigLoggingApiCopyWith(VeilidWASMConfigLoggingApi value, - $Res Function(VeilidWASMConfigLoggingApi) _then) = - _$VeilidWASMConfigLoggingApiCopyWithImpl; - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class $VeilidWASMConfigLoggingApiCopyWith<$Res> { + factory $VeilidWASMConfigLoggingApiCopyWith(VeilidWASMConfigLoggingApi value, $Res Function(VeilidWASMConfigLoggingApi) _then) = _$VeilidWASMConfigLoggingApiCopyWithImpl; +@useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class _$VeilidWASMConfigLoggingApiCopyWithImpl<$Res> implements $VeilidWASMConfigLoggingApiCopyWith<$Res> { @@ -1733,121 +2114,207 @@ class _$VeilidWASMConfigLoggingApiCopyWithImpl<$Res> final VeilidWASMConfigLoggingApi _self; final $Res Function(VeilidWASMConfigLoggingApi) _then; - /// Create a copy of VeilidWASMConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self.ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidWASMConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self.ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidWASMConfigLoggingApi]. +extension VeilidWASMConfigLoggingApiPatterns on VeilidWASMConfigLoggingApi { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidWASMConfigLoggingApi value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidWASMConfigLoggingApi value) $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidWASMConfigLoggingApi value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets) $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi(): +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets)? $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLoggingApi() when $default != null: +return $default(_that.enabled,_that.level,_that.ignoreLogTargets);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidWASMConfigLoggingApi - with DiagnosticableTreeMixin - implements VeilidWASMConfigLoggingApi { - const _VeilidWASMConfigLoggingApi( - {required this.enabled, - required this.level, - final List ignoreLogTargets = const []}) - : _ignoreLogTargets = ignoreLogTargets; - factory _VeilidWASMConfigLoggingApi.fromJson(Map json) => - _$VeilidWASMConfigLoggingApiFromJson(json); - @override - final bool enabled; - @override - final VeilidConfigLogLevel level; - final List _ignoreLogTargets; - @override - @JsonKey() - List get ignoreLogTargets { - if (_ignoreLogTargets is EqualUnmodifiableListView) - return _ignoreLogTargets; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_ignoreLogTargets); - } +class _VeilidWASMConfigLoggingApi with DiagnosticableTreeMixin implements VeilidWASMConfigLoggingApi { + const _VeilidWASMConfigLoggingApi({required this.enabled, required this.level, final List ignoreLogTargets = const []}): _ignoreLogTargets = ignoreLogTargets; + factory _VeilidWASMConfigLoggingApi.fromJson(Map json) => _$VeilidWASMConfigLoggingApiFromJson(json); - /// Create a copy of VeilidWASMConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidWASMConfigLoggingApiCopyWith<_VeilidWASMConfigLoggingApi> - get copyWith => __$VeilidWASMConfigLoggingApiCopyWithImpl< - _VeilidWASMConfigLoggingApi>(this, _$identity); +@override final bool enabled; +@override final VeilidConfigLogLevel level; + final List _ignoreLogTargets; +@override@JsonKey() List get ignoreLogTargets { + if (_ignoreLogTargets is EqualUnmodifiableListView) return _ignoreLogTargets; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_ignoreLogTargets); +} - @override - Map toJson() { - return _$VeilidWASMConfigLoggingApiToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingApi')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('level', level)) - ..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); - } +/// Create a copy of VeilidWASMConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidWASMConfigLoggingApiCopyWith<_VeilidWASMConfigLoggingApi> get copyWith => __$VeilidWASMConfigLoggingApiCopyWithImpl<_VeilidWASMConfigLoggingApi>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidWASMConfigLoggingApi && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.level, level) || other.level == level) && - const DeepCollectionEquality() - .equals(other._ignoreLogTargets, _ignoreLogTargets)); - } +@override +Map toJson() { + return _$VeilidWASMConfigLoggingApiToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLoggingApi')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('level', level))..add(DiagnosticsProperty('ignoreLogTargets', ignoreLogTargets)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidWASMConfigLoggingApi&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.level, level) || other.level == level)&&const DeepCollectionEquality().equals(other._ignoreLogTargets, _ignoreLogTargets)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,level,const DeepCollectionEquality().hash(_ignoreLogTargets)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, enabled, level, - const DeepCollectionEquality().hash(_ignoreLogTargets)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLoggingApi(enabled: $enabled, level: $level, ignoreLogTargets: $ignoreLogTargets)'; - } } /// @nodoc -abstract mixin class _$VeilidWASMConfigLoggingApiCopyWith<$Res> - implements $VeilidWASMConfigLoggingApiCopyWith<$Res> { - factory _$VeilidWASMConfigLoggingApiCopyWith( - _VeilidWASMConfigLoggingApi value, - $Res Function(_VeilidWASMConfigLoggingApi) _then) = - __$VeilidWASMConfigLoggingApiCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - VeilidConfigLogLevel level, - List ignoreLogTargets}); -} +abstract mixin class _$VeilidWASMConfigLoggingApiCopyWith<$Res> implements $VeilidWASMConfigLoggingApiCopyWith<$Res> { + factory _$VeilidWASMConfigLoggingApiCopyWith(_VeilidWASMConfigLoggingApi value, $Res Function(_VeilidWASMConfigLoggingApi) _then) = __$VeilidWASMConfigLoggingApiCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, VeilidConfigLogLevel level, List ignoreLogTargets +}); + + + +} /// @nodoc class __$VeilidWASMConfigLoggingApiCopyWithImpl<$Res> implements _$VeilidWASMConfigLoggingApiCopyWith<$Res> { @@ -1856,90 +2323,70 @@ class __$VeilidWASMConfigLoggingApiCopyWithImpl<$Res> final _VeilidWASMConfigLoggingApi _self; final $Res Function(_VeilidWASMConfigLoggingApi) _then; - /// Create a copy of VeilidWASMConfigLoggingApi - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? level = null, - Object? ignoreLogTargets = null, - }) { - return _then(_VeilidWASMConfigLoggingApi( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - level: null == level - ? _self.level - : level // ignore: cast_nullable_to_non_nullable - as VeilidConfigLogLevel, - ignoreLogTargets: null == ignoreLogTargets - ? _self._ignoreLogTargets - : ignoreLogTargets // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidWASMConfigLoggingApi +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? level = null,Object? ignoreLogTargets = null,}) { + return _then(_VeilidWASMConfigLoggingApi( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,level: null == level ? _self.level : level // ignore: cast_nullable_to_non_nullable +as VeilidConfigLogLevel,ignoreLogTargets: null == ignoreLogTargets ? _self._ignoreLogTargets : ignoreLogTargets // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidWASMConfigLogging implements DiagnosticableTreeMixin { - VeilidWASMConfigLoggingPerformance get performance; - VeilidWASMConfigLoggingApi get api; - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingCopyWith get copyWith => - _$VeilidWASMConfigLoggingCopyWithImpl( - this as VeilidWASMConfigLogging, _$identity); + VeilidWASMConfigLoggingPerformance get performance; VeilidWASMConfigLoggingApi get api; +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingCopyWith get copyWith => _$VeilidWASMConfigLoggingCopyWithImpl(this as VeilidWASMConfigLogging, _$identity); /// Serializes this VeilidWASMConfigLogging to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLogging')) - ..add(DiagnosticsProperty('performance', performance)) - ..add(DiagnosticsProperty('api', api)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLogging')) + ..add(DiagnosticsProperty('performance', performance))..add(DiagnosticsProperty('api', api)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidWASMConfigLogging && - (identical(other.performance, performance) || - other.performance == performance) && - (identical(other.api, api) || other.api == api)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidWASMConfigLogging&&(identical(other.performance, performance) || other.performance == performance)&&(identical(other.api, api) || other.api == api)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,performance,api); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLogging(performance: $performance, api: $api)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, performance, api); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLogging(performance: $performance, api: $api)'; - } } /// @nodoc -abstract mixin class $VeilidWASMConfigLoggingCopyWith<$Res> { - factory $VeilidWASMConfigLoggingCopyWith(VeilidWASMConfigLogging value, - $Res Function(VeilidWASMConfigLogging) _then) = - _$VeilidWASMConfigLoggingCopyWithImpl; - @useResult - $Res call( - {VeilidWASMConfigLoggingPerformance performance, - VeilidWASMConfigLoggingApi api}); +abstract mixin class $VeilidWASMConfigLoggingCopyWith<$Res> { + factory $VeilidWASMConfigLoggingCopyWith(VeilidWASMConfigLogging value, $Res Function(VeilidWASMConfigLogging) _then) = _$VeilidWASMConfigLoggingCopyWithImpl; +@useResult +$Res call({ + VeilidWASMConfigLoggingPerformance performance, VeilidWASMConfigLoggingApi api +}); + + +$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance;$VeilidWASMConfigLoggingApiCopyWith<$Res> get api; - $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance; - $VeilidWASMConfigLoggingApiCopyWith<$Res> get api; } - /// @nodoc class _$VeilidWASMConfigLoggingCopyWithImpl<$Res> implements $VeilidWASMConfigLoggingCopyWith<$Res> { @@ -1948,125 +2395,217 @@ class _$VeilidWASMConfigLoggingCopyWithImpl<$Res> final VeilidWASMConfigLogging _self; final $Res Function(VeilidWASMConfigLogging) _then; - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? performance = null, - Object? api = null, - }) { - return _then(_self.copyWith( - performance: null == performance - ? _self.performance - : performance // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLoggingPerformance, - api: null == api - ? _self.api - : api // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLoggingApi, - )); - } +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? performance = null,Object? api = null,}) { + return _then(_self.copyWith( +performance: null == performance ? _self.performance : performance // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLoggingPerformance,api: null == api ? _self.api : api // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLoggingApi, + )); +} +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance { + + return $VeilidWASMConfigLoggingPerformanceCopyWith<$Res>(_self.performance, (value) { + return _then(_self.copyWith(performance: value)); + }); +}/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingApiCopyWith<$Res> get api { + + return $VeilidWASMConfigLoggingApiCopyWith<$Res>(_self.api, (value) { + return _then(_self.copyWith(api: value)); + }); +} +} - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance { - return $VeilidWASMConfigLoggingPerformanceCopyWith<$Res>(_self.performance, - (value) { - return _then(_self.copyWith(performance: value)); - }); - } - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingApiCopyWith<$Res> get api { - return $VeilidWASMConfigLoggingApiCopyWith<$Res>(_self.api, (value) { - return _then(_self.copyWith(api: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidWASMConfigLogging]. +extension VeilidWASMConfigLoggingPatterns on VeilidWASMConfigLogging { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidWASMConfigLogging value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidWASMConfigLogging value) $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidWASMConfigLogging value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidWASMConfigLoggingPerformance performance, VeilidWASMConfigLoggingApi api)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging() when $default != null: +return $default(_that.performance,_that.api);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidWASMConfigLoggingPerformance performance, VeilidWASMConfigLoggingApi api) $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging(): +return $default(_that.performance,_that.api);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidWASMConfigLoggingPerformance performance, VeilidWASMConfigLoggingApi api)? $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfigLogging() when $default != null: +return $default(_that.performance,_that.api);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidWASMConfigLogging - with DiagnosticableTreeMixin - implements VeilidWASMConfigLogging { - const _VeilidWASMConfigLogging( - {required this.performance, required this.api}); - factory _VeilidWASMConfigLogging.fromJson(Map json) => - _$VeilidWASMConfigLoggingFromJson(json); - @override - final VeilidWASMConfigLoggingPerformance performance; - @override - final VeilidWASMConfigLoggingApi api; +class _VeilidWASMConfigLogging with DiagnosticableTreeMixin implements VeilidWASMConfigLogging { + const _VeilidWASMConfigLogging({required this.performance, required this.api}); + factory _VeilidWASMConfigLogging.fromJson(Map json) => _$VeilidWASMConfigLoggingFromJson(json); - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidWASMConfigLoggingCopyWith<_VeilidWASMConfigLogging> get copyWith => - __$VeilidWASMConfigLoggingCopyWithImpl<_VeilidWASMConfigLogging>( - this, _$identity); +@override final VeilidWASMConfigLoggingPerformance performance; +@override final VeilidWASMConfigLoggingApi api; - @override - Map toJson() { - return _$VeilidWASMConfigLoggingToJson( - this, - ); - } +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidWASMConfigLoggingCopyWith<_VeilidWASMConfigLogging> get copyWith => __$VeilidWASMConfigLoggingCopyWithImpl<_VeilidWASMConfigLogging>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLogging')) - ..add(DiagnosticsProperty('performance', performance)) - ..add(DiagnosticsProperty('api', api)); - } +@override +Map toJson() { + return _$VeilidWASMConfigLoggingToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfigLogging')) + ..add(DiagnosticsProperty('performance', performance))..add(DiagnosticsProperty('api', api)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidWASMConfigLogging && - (identical(other.performance, performance) || - other.performance == performance) && - (identical(other.api, api) || other.api == api)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidWASMConfigLogging&&(identical(other.performance, performance) || other.performance == performance)&&(identical(other.api, api) || other.api == api)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,performance,api); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfigLogging(performance: $performance, api: $api)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, performance, api); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfigLogging(performance: $performance, api: $api)'; - } } /// @nodoc -abstract mixin class _$VeilidWASMConfigLoggingCopyWith<$Res> - implements $VeilidWASMConfigLoggingCopyWith<$Res> { - factory _$VeilidWASMConfigLoggingCopyWith(_VeilidWASMConfigLogging value, - $Res Function(_VeilidWASMConfigLogging) _then) = - __$VeilidWASMConfigLoggingCopyWithImpl; - @override - @useResult - $Res call( - {VeilidWASMConfigLoggingPerformance performance, - VeilidWASMConfigLoggingApi api}); +abstract mixin class _$VeilidWASMConfigLoggingCopyWith<$Res> implements $VeilidWASMConfigLoggingCopyWith<$Res> { + factory _$VeilidWASMConfigLoggingCopyWith(_VeilidWASMConfigLogging value, $Res Function(_VeilidWASMConfigLogging) _then) = __$VeilidWASMConfigLoggingCopyWithImpl; +@override @useResult +$Res call({ + VeilidWASMConfigLoggingPerformance performance, VeilidWASMConfigLoggingApi api +}); + + +@override $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance;@override $VeilidWASMConfigLoggingApiCopyWith<$Res> get api; - @override - $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance; - @override - $VeilidWASMConfigLoggingApiCopyWith<$Res> get api; } - /// @nodoc class __$VeilidWASMConfigLoggingCopyWithImpl<$Res> implements _$VeilidWASMConfigLoggingCopyWith<$Res> { @@ -2075,99 +2614,87 @@ class __$VeilidWASMConfigLoggingCopyWithImpl<$Res> final _VeilidWASMConfigLogging _self; final $Res Function(_VeilidWASMConfigLogging) _then; - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? performance = null, - Object? api = null, - }) { - return _then(_VeilidWASMConfigLogging( - performance: null == performance - ? _self.performance - : performance // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLoggingPerformance, - api: null == api - ? _self.api - : api // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLoggingApi, - )); - } - - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance { - return $VeilidWASMConfigLoggingPerformanceCopyWith<$Res>(_self.performance, - (value) { - return _then(_self.copyWith(performance: value)); - }); - } - - /// Create a copy of VeilidWASMConfigLogging - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingApiCopyWith<$Res> get api { - return $VeilidWASMConfigLoggingApiCopyWith<$Res>(_self.api, (value) { - return _then(_self.copyWith(api: value)); - }); - } +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? performance = null,Object? api = null,}) { + return _then(_VeilidWASMConfigLogging( +performance: null == performance ? _self.performance : performance // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLoggingPerformance,api: null == api ? _self.api : api // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLoggingApi, + )); } +/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingPerformanceCopyWith<$Res> get performance { + + return $VeilidWASMConfigLoggingPerformanceCopyWith<$Res>(_self.performance, (value) { + return _then(_self.copyWith(performance: value)); + }); +}/// Create a copy of VeilidWASMConfigLogging +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingApiCopyWith<$Res> get api { + + return $VeilidWASMConfigLoggingApiCopyWith<$Res>(_self.api, (value) { + return _then(_self.copyWith(api: value)); + }); +} +} + + /// @nodoc mixin _$VeilidWASMConfig implements DiagnosticableTreeMixin { - VeilidWASMConfigLogging get logging; - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidWASMConfigCopyWith get copyWith => - _$VeilidWASMConfigCopyWithImpl( - this as VeilidWASMConfig, _$identity); + VeilidWASMConfigLogging get logging; +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidWASMConfigCopyWith get copyWith => _$VeilidWASMConfigCopyWithImpl(this as VeilidWASMConfig, _$identity); /// Serializes this VeilidWASMConfig to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfig')) - ..add(DiagnosticsProperty('logging', logging)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfig')) + ..add(DiagnosticsProperty('logging', logging)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidWASMConfig && - (identical(other.logging, logging) || other.logging == logging)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidWASMConfig&&(identical(other.logging, logging) || other.logging == logging)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,logging); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfig(logging: $logging)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, logging); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfig(logging: $logging)'; - } } /// @nodoc -abstract mixin class $VeilidWASMConfigCopyWith<$Res> { - factory $VeilidWASMConfigCopyWith( - VeilidWASMConfig value, $Res Function(VeilidWASMConfig) _then) = - _$VeilidWASMConfigCopyWithImpl; - @useResult - $Res call({VeilidWASMConfigLogging logging}); +abstract mixin class $VeilidWASMConfigCopyWith<$Res> { + factory $VeilidWASMConfigCopyWith(VeilidWASMConfig value, $Res Function(VeilidWASMConfig) _then) = _$VeilidWASMConfigCopyWithImpl; +@useResult +$Res call({ + VeilidWASMConfigLogging logging +}); + + +$VeilidWASMConfigLoggingCopyWith<$Res> get logging; - $VeilidWASMConfigLoggingCopyWith<$Res> get logging; } - /// @nodoc class _$VeilidWASMConfigCopyWithImpl<$Res> implements $VeilidWASMConfigCopyWith<$Res> { @@ -2176,98 +2703,206 @@ class _$VeilidWASMConfigCopyWithImpl<$Res> final VeilidWASMConfig _self; final $Res Function(VeilidWASMConfig) _then; - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? logging = null, - }) { - return _then(_self.copyWith( - logging: null == logging - ? _self.logging - : logging // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLogging, - )); - } +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? logging = null,}) { + return _then(_self.copyWith( +logging: null == logging ? _self.logging : logging // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLogging, + )); +} +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingCopyWith<$Res> get logging { + + return $VeilidWASMConfigLoggingCopyWith<$Res>(_self.logging, (value) { + return _then(_self.copyWith(logging: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [VeilidWASMConfig]. +extension VeilidWASMConfigPatterns on VeilidWASMConfig { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidWASMConfig value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidWASMConfig() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidWASMConfig value) $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfig(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidWASMConfig value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidWASMConfig() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidWASMConfigLogging logging)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidWASMConfig() when $default != null: +return $default(_that.logging);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidWASMConfigLogging logging) $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfig(): +return $default(_that.logging);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidWASMConfigLogging logging)? $default,) {final _that = this; +switch (_that) { +case _VeilidWASMConfig() when $default != null: +return $default(_that.logging);case _: + return null; + +} +} - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingCopyWith<$Res> get logging { - return $VeilidWASMConfigLoggingCopyWith<$Res>(_self.logging, (value) { - return _then(_self.copyWith(logging: value)); - }); - } } /// @nodoc @JsonSerializable() -class _VeilidWASMConfig - with DiagnosticableTreeMixin - implements VeilidWASMConfig { + +class _VeilidWASMConfig with DiagnosticableTreeMixin implements VeilidWASMConfig { const _VeilidWASMConfig({required this.logging}); - factory _VeilidWASMConfig.fromJson(Map json) => - _$VeilidWASMConfigFromJson(json); + factory _VeilidWASMConfig.fromJson(Map json) => _$VeilidWASMConfigFromJson(json); - @override - final VeilidWASMConfigLogging logging; +@override final VeilidWASMConfigLogging logging; - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidWASMConfigCopyWith<_VeilidWASMConfig> get copyWith => - __$VeilidWASMConfigCopyWithImpl<_VeilidWASMConfig>(this, _$identity); +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidWASMConfigCopyWith<_VeilidWASMConfig> get copyWith => __$VeilidWASMConfigCopyWithImpl<_VeilidWASMConfig>(this, _$identity); - @override - Map toJson() { - return _$VeilidWASMConfigToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidWASMConfigToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidWASMConfig')) + ..add(DiagnosticsProperty('logging', logging)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidWASMConfig')) - ..add(DiagnosticsProperty('logging', logging)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidWASMConfig&&(identical(other.logging, logging) || other.logging == logging)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidWASMConfig && - (identical(other.logging, logging) || other.logging == logging)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,logging); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidWASMConfig(logging: $logging)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, logging); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidWASMConfig(logging: $logging)'; - } } /// @nodoc -abstract mixin class _$VeilidWASMConfigCopyWith<$Res> - implements $VeilidWASMConfigCopyWith<$Res> { - factory _$VeilidWASMConfigCopyWith( - _VeilidWASMConfig value, $Res Function(_VeilidWASMConfig) _then) = - __$VeilidWASMConfigCopyWithImpl; - @override - @useResult - $Res call({VeilidWASMConfigLogging logging}); +abstract mixin class _$VeilidWASMConfigCopyWith<$Res> implements $VeilidWASMConfigCopyWith<$Res> { + factory _$VeilidWASMConfigCopyWith(_VeilidWASMConfig value, $Res Function(_VeilidWASMConfig) _then) = __$VeilidWASMConfigCopyWithImpl; +@override @useResult +$Res call({ + VeilidWASMConfigLogging logging +}); + + +@override $VeilidWASMConfigLoggingCopyWith<$Res> get logging; - @override - $VeilidWASMConfigLoggingCopyWith<$Res> get logging; } - /// @nodoc class __$VeilidWASMConfigCopyWithImpl<$Res> implements _$VeilidWASMConfigCopyWith<$Res> { @@ -2276,92 +2911,77 @@ class __$VeilidWASMConfigCopyWithImpl<$Res> final _VeilidWASMConfig _self; final $Res Function(_VeilidWASMConfig) _then; - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? logging = null, - }) { - return _then(_VeilidWASMConfig( - logging: null == logging - ? _self.logging - : logging // ignore: cast_nullable_to_non_nullable - as VeilidWASMConfigLogging, - )); - } - - /// Create a copy of VeilidWASMConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidWASMConfigLoggingCopyWith<$Res> get logging { - return $VeilidWASMConfigLoggingCopyWith<$Res>(_self.logging, (value) { - return _then(_self.copyWith(logging: value)); - }); - } +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? logging = null,}) { + return _then(_VeilidWASMConfig( +logging: null == logging ? _self.logging : logging // ignore: cast_nullable_to_non_nullable +as VeilidWASMConfigLogging, + )); } +/// Create a copy of VeilidWASMConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidWASMConfigLoggingCopyWith<$Res> get logging { + + return $VeilidWASMConfigLoggingCopyWith<$Res>(_self.logging, (value) { + return _then(_self.copyWith(logging: value)); + }); +} +} + + /// @nodoc mixin _$VeilidConfigHTTPS implements DiagnosticableTreeMixin { - bool get enabled; - String get listenAddress; - String get path; - String? get url; - /// Create a copy of VeilidConfigHTTPS - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigHTTPSCopyWith get copyWith => - _$VeilidConfigHTTPSCopyWithImpl( - this as VeilidConfigHTTPS, _$identity); + bool get enabled; String get listenAddress; String get path; String? get url; +/// Create a copy of VeilidConfigHTTPS +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigHTTPSCopyWith get copyWith => _$VeilidConfigHTTPSCopyWithImpl(this as VeilidConfigHTTPS, _$identity); /// Serializes this VeilidConfigHTTPS to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigHTTPS')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigHTTPS')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigHTTPS && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigHTTPS&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigHTTPS(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, enabled, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigHTTPS(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class $VeilidConfigHTTPSCopyWith<$Res> { - factory $VeilidConfigHTTPSCopyWith( - VeilidConfigHTTPS value, $Res Function(VeilidConfigHTTPS) _then) = - _$VeilidConfigHTTPSCopyWithImpl; - @useResult - $Res call({bool enabled, String listenAddress, String path, String? url}); -} +abstract mixin class $VeilidConfigHTTPSCopyWith<$Res> { + factory $VeilidConfigHTTPSCopyWith(VeilidConfigHTTPS value, $Res Function(VeilidConfigHTTPS) _then) = _$VeilidConfigHTTPSCopyWithImpl; +@useResult +$Res call({ + bool enabled, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class _$VeilidConfigHTTPSCopyWithImpl<$Res> implements $VeilidConfigHTTPSCopyWith<$Res> { @@ -2370,118 +2990,203 @@ class _$VeilidConfigHTTPSCopyWithImpl<$Res> final VeilidConfigHTTPS _self; final $Res Function(VeilidConfigHTTPS) _then; - /// Create a copy of VeilidConfigHTTPS - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigHTTPS +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigHTTPS]. +extension VeilidConfigHTTPSPatterns on VeilidConfigHTTPS { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigHTTPS value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTPS() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigHTTPS value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTPS(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigHTTPS value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTPS() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, String listenAddress, String path, String? url)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigHTTPS() when $default != null: +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, String listenAddress, String path, String? url) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigHTTPS(): +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, String listenAddress, String path, String? url)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigHTTPS() when $default != null: +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigHTTPS - with DiagnosticableTreeMixin - implements VeilidConfigHTTPS { - const _VeilidConfigHTTPS( - {required this.enabled, - required this.listenAddress, - required this.path, - this.url}); - factory _VeilidConfigHTTPS.fromJson(Map json) => - _$VeilidConfigHTTPSFromJson(json); - @override - final bool enabled; - @override - final String listenAddress; - @override - final String path; - @override - final String? url; +class _VeilidConfigHTTPS with DiagnosticableTreeMixin implements VeilidConfigHTTPS { + const _VeilidConfigHTTPS({required this.enabled, required this.listenAddress, required this.path, this.url}); + factory _VeilidConfigHTTPS.fromJson(Map json) => _$VeilidConfigHTTPSFromJson(json); - /// Create a copy of VeilidConfigHTTPS - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigHTTPSCopyWith<_VeilidConfigHTTPS> get copyWith => - __$VeilidConfigHTTPSCopyWithImpl<_VeilidConfigHTTPS>(this, _$identity); +@override final bool enabled; +@override final String listenAddress; +@override final String path; +@override final String? url; - @override - Map toJson() { - return _$VeilidConfigHTTPSToJson( - this, - ); - } +/// Create a copy of VeilidConfigHTTPS +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigHTTPSCopyWith<_VeilidConfigHTTPS> get copyWith => __$VeilidConfigHTTPSCopyWithImpl<_VeilidConfigHTTPS>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigHTTPS')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +Map toJson() { + return _$VeilidConfigHTTPSToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigHTTPS')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigHTTPS && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigHTTPS&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigHTTPS(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, enabled, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigHTTPS(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigHTTPSCopyWith<$Res> - implements $VeilidConfigHTTPSCopyWith<$Res> { - factory _$VeilidConfigHTTPSCopyWith( - _VeilidConfigHTTPS value, $Res Function(_VeilidConfigHTTPS) _then) = - __$VeilidConfigHTTPSCopyWithImpl; - @override - @useResult - $Res call({bool enabled, String listenAddress, String path, String? url}); -} +abstract mixin class _$VeilidConfigHTTPSCopyWith<$Res> implements $VeilidConfigHTTPSCopyWith<$Res> { + factory _$VeilidConfigHTTPSCopyWith(_VeilidConfigHTTPS value, $Res Function(_VeilidConfigHTTPS) _then) = __$VeilidConfigHTTPSCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class __$VeilidConfigHTTPSCopyWithImpl<$Res> implements _$VeilidConfigHTTPSCopyWith<$Res> { @@ -2490,97 +3195,71 @@ class __$VeilidConfigHTTPSCopyWithImpl<$Res> final _VeilidConfigHTTPS _self; final $Res Function(_VeilidConfigHTTPS) _then; - /// Create a copy of VeilidConfigHTTPS - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_VeilidConfigHTTPS( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigHTTPS +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_VeilidConfigHTTPS( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigHTTP implements DiagnosticableTreeMixin { - bool get enabled; - String get listenAddress; - String get path; - String? get url; - /// Create a copy of VeilidConfigHTTP - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigHTTPCopyWith get copyWith => - _$VeilidConfigHTTPCopyWithImpl( - this as VeilidConfigHTTP, _$identity); + bool get enabled; String get listenAddress; String get path; String? get url; +/// Create a copy of VeilidConfigHTTP +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigHTTPCopyWith get copyWith => _$VeilidConfigHTTPCopyWithImpl(this as VeilidConfigHTTP, _$identity); /// Serializes this VeilidConfigHTTP to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigHTTP')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigHTTP')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigHTTP && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigHTTP&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigHTTP(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, enabled, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigHTTP(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class $VeilidConfigHTTPCopyWith<$Res> { - factory $VeilidConfigHTTPCopyWith( - VeilidConfigHTTP value, $Res Function(VeilidConfigHTTP) _then) = - _$VeilidConfigHTTPCopyWithImpl; - @useResult - $Res call({bool enabled, String listenAddress, String path, String? url}); -} +abstract mixin class $VeilidConfigHTTPCopyWith<$Res> { + factory $VeilidConfigHTTPCopyWith(VeilidConfigHTTP value, $Res Function(VeilidConfigHTTP) _then) = _$VeilidConfigHTTPCopyWithImpl; +@useResult +$Res call({ + bool enabled, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class _$VeilidConfigHTTPCopyWithImpl<$Res> implements $VeilidConfigHTTPCopyWith<$Res> { @@ -2589,118 +3268,203 @@ class _$VeilidConfigHTTPCopyWithImpl<$Res> final VeilidConfigHTTP _self; final $Res Function(VeilidConfigHTTP) _then; - /// Create a copy of VeilidConfigHTTP - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigHTTP +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigHTTP]. +extension VeilidConfigHTTPPatterns on VeilidConfigHTTP { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigHTTP value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTP() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigHTTP value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTP(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigHTTP value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigHTTP() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, String listenAddress, String path, String? url)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigHTTP() when $default != null: +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, String listenAddress, String path, String? url) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigHTTP(): +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, String listenAddress, String path, String? url)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigHTTP() when $default != null: +return $default(_that.enabled,_that.listenAddress,_that.path,_that.url);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigHTTP - with DiagnosticableTreeMixin - implements VeilidConfigHTTP { - const _VeilidConfigHTTP( - {required this.enabled, - required this.listenAddress, - required this.path, - this.url}); - factory _VeilidConfigHTTP.fromJson(Map json) => - _$VeilidConfigHTTPFromJson(json); - @override - final bool enabled; - @override - final String listenAddress; - @override - final String path; - @override - final String? url; +class _VeilidConfigHTTP with DiagnosticableTreeMixin implements VeilidConfigHTTP { + const _VeilidConfigHTTP({required this.enabled, required this.listenAddress, required this.path, this.url}); + factory _VeilidConfigHTTP.fromJson(Map json) => _$VeilidConfigHTTPFromJson(json); - /// Create a copy of VeilidConfigHTTP - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigHTTPCopyWith<_VeilidConfigHTTP> get copyWith => - __$VeilidConfigHTTPCopyWithImpl<_VeilidConfigHTTP>(this, _$identity); +@override final bool enabled; +@override final String listenAddress; +@override final String path; +@override final String? url; - @override - Map toJson() { - return _$VeilidConfigHTTPToJson( - this, - ); - } +/// Create a copy of VeilidConfigHTTP +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigHTTPCopyWith<_VeilidConfigHTTP> get copyWith => __$VeilidConfigHTTPCopyWithImpl<_VeilidConfigHTTP>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigHTTP')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +Map toJson() { + return _$VeilidConfigHTTPToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigHTTP')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigHTTP && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigHTTP&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigHTTP(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, enabled, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigHTTP(enabled: $enabled, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigHTTPCopyWith<$Res> - implements $VeilidConfigHTTPCopyWith<$Res> { - factory _$VeilidConfigHTTPCopyWith( - _VeilidConfigHTTP value, $Res Function(_VeilidConfigHTTP) _then) = - __$VeilidConfigHTTPCopyWithImpl; - @override - @useResult - $Res call({bool enabled, String listenAddress, String path, String? url}); -} +abstract mixin class _$VeilidConfigHTTPCopyWith<$Res> implements $VeilidConfigHTTPCopyWith<$Res> { + factory _$VeilidConfigHTTPCopyWith(_VeilidConfigHTTP value, $Res Function(_VeilidConfigHTTP) _then) = __$VeilidConfigHTTPCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class __$VeilidConfigHTTPCopyWithImpl<$Res> implements _$VeilidConfigHTTPCopyWith<$Res> { @@ -2709,92 +3473,71 @@ class __$VeilidConfigHTTPCopyWithImpl<$Res> final _VeilidConfigHTTP _self; final $Res Function(_VeilidConfigHTTP) _then; - /// Create a copy of VeilidConfigHTTP - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_VeilidConfigHTTP( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigHTTP +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_VeilidConfigHTTP( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigApplication implements DiagnosticableTreeMixin { - VeilidConfigHTTPS get https; - VeilidConfigHTTP get http; - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigApplicationCopyWith get copyWith => - _$VeilidConfigApplicationCopyWithImpl( - this as VeilidConfigApplication, _$identity); + VeilidConfigHTTPS get https; VeilidConfigHTTP get http; +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigApplicationCopyWith get copyWith => _$VeilidConfigApplicationCopyWithImpl(this as VeilidConfigApplication, _$identity); /// Serializes this VeilidConfigApplication to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigApplication')) - ..add(DiagnosticsProperty('https', https)) - ..add(DiagnosticsProperty('http', http)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigApplication')) + ..add(DiagnosticsProperty('https', https))..add(DiagnosticsProperty('http', http)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigApplication && - (identical(other.https, https) || other.https == https) && - (identical(other.http, http) || other.http == http)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigApplication&&(identical(other.https, https) || other.https == https)&&(identical(other.http, http) || other.http == http)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,https,http); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigApplication(https: $https, http: $http)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, https, http); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigApplication(https: $https, http: $http)'; - } } /// @nodoc -abstract mixin class $VeilidConfigApplicationCopyWith<$Res> { - factory $VeilidConfigApplicationCopyWith(VeilidConfigApplication value, - $Res Function(VeilidConfigApplication) _then) = - _$VeilidConfigApplicationCopyWithImpl; - @useResult - $Res call({VeilidConfigHTTPS https, VeilidConfigHTTP http}); +abstract mixin class $VeilidConfigApplicationCopyWith<$Res> { + factory $VeilidConfigApplicationCopyWith(VeilidConfigApplication value, $Res Function(VeilidConfigApplication) _then) = _$VeilidConfigApplicationCopyWithImpl; +@useResult +$Res call({ + VeilidConfigHTTPS https, VeilidConfigHTTP http +}); + + +$VeilidConfigHTTPSCopyWith<$Res> get https;$VeilidConfigHTTPCopyWith<$Res> get http; - $VeilidConfigHTTPSCopyWith<$Res> get https; - $VeilidConfigHTTPCopyWith<$Res> get http; } - /// @nodoc class _$VeilidConfigApplicationCopyWithImpl<$Res> implements $VeilidConfigApplicationCopyWith<$Res> { @@ -2803,120 +3546,217 @@ class _$VeilidConfigApplicationCopyWithImpl<$Res> final VeilidConfigApplication _self; final $Res Function(VeilidConfigApplication) _then; - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? https = null, - Object? http = null, - }) { - return _then(_self.copyWith( - https: null == https - ? _self.https - : https // ignore: cast_nullable_to_non_nullable - as VeilidConfigHTTPS, - http: null == http - ? _self.http - : http // ignore: cast_nullable_to_non_nullable - as VeilidConfigHTTP, - )); - } +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? https = null,Object? http = null,}) { + return _then(_self.copyWith( +https: null == https ? _self.https : https // ignore: cast_nullable_to_non_nullable +as VeilidConfigHTTPS,http: null == http ? _self.http : http // ignore: cast_nullable_to_non_nullable +as VeilidConfigHTTP, + )); +} +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigHTTPSCopyWith<$Res> get https { + + return $VeilidConfigHTTPSCopyWith<$Res>(_self.https, (value) { + return _then(_self.copyWith(https: value)); + }); +}/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigHTTPCopyWith<$Res> get http { + + return $VeilidConfigHTTPCopyWith<$Res>(_self.http, (value) { + return _then(_self.copyWith(http: value)); + }); +} +} - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigHTTPSCopyWith<$Res> get https { - return $VeilidConfigHTTPSCopyWith<$Res>(_self.https, (value) { - return _then(_self.copyWith(https: value)); - }); - } - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigHTTPCopyWith<$Res> get http { - return $VeilidConfigHTTPCopyWith<$Res>(_self.http, (value) { - return _then(_self.copyWith(http: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidConfigApplication]. +extension VeilidConfigApplicationPatterns on VeilidConfigApplication { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigApplication value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigApplication() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigApplication value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigApplication(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigApplication value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigApplication() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidConfigHTTPS https, VeilidConfigHTTP http)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigApplication() when $default != null: +return $default(_that.https,_that.http);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidConfigHTTPS https, VeilidConfigHTTP http) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigApplication(): +return $default(_that.https,_that.http);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidConfigHTTPS https, VeilidConfigHTTP http)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigApplication() when $default != null: +return $default(_that.https,_that.http);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigApplication - with DiagnosticableTreeMixin - implements VeilidConfigApplication { + +class _VeilidConfigApplication with DiagnosticableTreeMixin implements VeilidConfigApplication { const _VeilidConfigApplication({required this.https, required this.http}); - factory _VeilidConfigApplication.fromJson(Map json) => - _$VeilidConfigApplicationFromJson(json); + factory _VeilidConfigApplication.fromJson(Map json) => _$VeilidConfigApplicationFromJson(json); - @override - final VeilidConfigHTTPS https; - @override - final VeilidConfigHTTP http; +@override final VeilidConfigHTTPS https; +@override final VeilidConfigHTTP http; - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigApplicationCopyWith<_VeilidConfigApplication> get copyWith => - __$VeilidConfigApplicationCopyWithImpl<_VeilidConfigApplication>( - this, _$identity); +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigApplicationCopyWith<_VeilidConfigApplication> get copyWith => __$VeilidConfigApplicationCopyWithImpl<_VeilidConfigApplication>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigApplicationToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigApplicationToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigApplication')) + ..add(DiagnosticsProperty('https', https))..add(DiagnosticsProperty('http', http)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigApplication')) - ..add(DiagnosticsProperty('https', https)) - ..add(DiagnosticsProperty('http', http)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigApplication&&(identical(other.https, https) || other.https == https)&&(identical(other.http, http) || other.http == http)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigApplication && - (identical(other.https, https) || other.https == https) && - (identical(other.http, http) || other.http == http)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,https,http); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigApplication(https: $https, http: $http)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, https, http); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigApplication(https: $https, http: $http)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigApplicationCopyWith<$Res> - implements $VeilidConfigApplicationCopyWith<$Res> { - factory _$VeilidConfigApplicationCopyWith(_VeilidConfigApplication value, - $Res Function(_VeilidConfigApplication) _then) = - __$VeilidConfigApplicationCopyWithImpl; - @override - @useResult - $Res call({VeilidConfigHTTPS https, VeilidConfigHTTP http}); +abstract mixin class _$VeilidConfigApplicationCopyWith<$Res> implements $VeilidConfigApplicationCopyWith<$Res> { + factory _$VeilidConfigApplicationCopyWith(_VeilidConfigApplication value, $Res Function(_VeilidConfigApplication) _then) = __$VeilidConfigApplicationCopyWithImpl; +@override @useResult +$Res call({ + VeilidConfigHTTPS https, VeilidConfigHTTP http +}); + + +@override $VeilidConfigHTTPSCopyWith<$Res> get https;@override $VeilidConfigHTTPCopyWith<$Res> get http; - @override - $VeilidConfigHTTPSCopyWith<$Res> get https; - @override - $VeilidConfigHTTPCopyWith<$Res> get http; } - /// @nodoc class __$VeilidConfigApplicationCopyWithImpl<$Res> implements _$VeilidConfigApplicationCopyWith<$Res> { @@ -2925,113 +3765,87 @@ class __$VeilidConfigApplicationCopyWithImpl<$Res> final _VeilidConfigApplication _self; final $Res Function(_VeilidConfigApplication) _then; - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? https = null, - Object? http = null, - }) { - return _then(_VeilidConfigApplication( - https: null == https - ? _self.https - : https // ignore: cast_nullable_to_non_nullable - as VeilidConfigHTTPS, - http: null == http - ? _self.http - : http // ignore: cast_nullable_to_non_nullable - as VeilidConfigHTTP, - )); - } - - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigHTTPSCopyWith<$Res> get https { - return $VeilidConfigHTTPSCopyWith<$Res>(_self.https, (value) { - return _then(_self.copyWith(https: value)); - }); - } - - /// Create a copy of VeilidConfigApplication - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigHTTPCopyWith<$Res> get http { - return $VeilidConfigHTTPCopyWith<$Res>(_self.http, (value) { - return _then(_self.copyWith(http: value)); - }); - } +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? https = null,Object? http = null,}) { + return _then(_VeilidConfigApplication( +https: null == https ? _self.https : https // ignore: cast_nullable_to_non_nullable +as VeilidConfigHTTPS,http: null == http ? _self.http : http // ignore: cast_nullable_to_non_nullable +as VeilidConfigHTTP, + )); } +/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigHTTPSCopyWith<$Res> get https { + + return $VeilidConfigHTTPSCopyWith<$Res>(_self.https, (value) { + return _then(_self.copyWith(https: value)); + }); +}/// Create a copy of VeilidConfigApplication +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigHTTPCopyWith<$Res> get http { + + return $VeilidConfigHTTPCopyWith<$Res>(_self.http, (value) { + return _then(_self.copyWith(http: value)); + }); +} +} + + /// @nodoc mixin _$VeilidConfigUDP implements DiagnosticableTreeMixin { - bool get enabled; - int get socketPoolSize; - String get listenAddress; - String? get publicAddress; - /// Create a copy of VeilidConfigUDP - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigUDPCopyWith get copyWith => - _$VeilidConfigUDPCopyWithImpl( - this as VeilidConfigUDP, _$identity); + bool get enabled; int get socketPoolSize; String get listenAddress; String? get publicAddress; +/// Create a copy of VeilidConfigUDP +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigUDPCopyWith get copyWith => _$VeilidConfigUDPCopyWithImpl(this as VeilidConfigUDP, _$identity); /// Serializes this VeilidConfigUDP to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigUDP')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('socketPoolSize', socketPoolSize)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('publicAddress', publicAddress)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigUDP')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('socketPoolSize', socketPoolSize))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('publicAddress', publicAddress)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigUDP && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.socketPoolSize, socketPoolSize) || - other.socketPoolSize == socketPoolSize) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.publicAddress, publicAddress) || - other.publicAddress == publicAddress)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigUDP&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.socketPoolSize, socketPoolSize) || other.socketPoolSize == socketPoolSize)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.publicAddress, publicAddress) || other.publicAddress == publicAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,socketPoolSize,listenAddress,publicAddress); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigUDP(enabled: $enabled, socketPoolSize: $socketPoolSize, listenAddress: $listenAddress, publicAddress: $publicAddress)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, enabled, socketPoolSize, listenAddress, publicAddress); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigUDP(enabled: $enabled, socketPoolSize: $socketPoolSize, listenAddress: $listenAddress, publicAddress: $publicAddress)'; - } } /// @nodoc -abstract mixin class $VeilidConfigUDPCopyWith<$Res> { - factory $VeilidConfigUDPCopyWith( - VeilidConfigUDP value, $Res Function(VeilidConfigUDP) _then) = - _$VeilidConfigUDPCopyWithImpl; - @useResult - $Res call( - {bool enabled, - int socketPoolSize, - String listenAddress, - String? publicAddress}); -} +abstract mixin class $VeilidConfigUDPCopyWith<$Res> { + factory $VeilidConfigUDPCopyWith(VeilidConfigUDP value, $Res Function(VeilidConfigUDP) _then) = _$VeilidConfigUDPCopyWithImpl; +@useResult +$Res call({ + bool enabled, int socketPoolSize, String listenAddress, String? publicAddress +}); + + + +} /// @nodoc class _$VeilidConfigUDPCopyWithImpl<$Res> implements $VeilidConfigUDPCopyWith<$Res> { @@ -3040,122 +3854,203 @@ class _$VeilidConfigUDPCopyWithImpl<$Res> final VeilidConfigUDP _self; final $Res Function(VeilidConfigUDP) _then; - /// Create a copy of VeilidConfigUDP - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? enabled = null, - Object? socketPoolSize = null, - Object? listenAddress = null, - Object? publicAddress = freezed, - }) { - return _then(_self.copyWith( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - socketPoolSize: null == socketPoolSize - ? _self.socketPoolSize - : socketPoolSize // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - publicAddress: freezed == publicAddress - ? _self.publicAddress - : publicAddress // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigUDP +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? enabled = null,Object? socketPoolSize = null,Object? listenAddress = null,Object? publicAddress = freezed,}) { + return _then(_self.copyWith( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,socketPoolSize: null == socketPoolSize ? _self.socketPoolSize : socketPoolSize // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,publicAddress: freezed == publicAddress ? _self.publicAddress : publicAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigUDP]. +extension VeilidConfigUDPPatterns on VeilidConfigUDP { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigUDP value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigUDP() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigUDP value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigUDP(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigUDP value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigUDP() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool enabled, int socketPoolSize, String listenAddress, String? publicAddress)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigUDP() when $default != null: +return $default(_that.enabled,_that.socketPoolSize,_that.listenAddress,_that.publicAddress);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool enabled, int socketPoolSize, String listenAddress, String? publicAddress) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigUDP(): +return $default(_that.enabled,_that.socketPoolSize,_that.listenAddress,_that.publicAddress);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool enabled, int socketPoolSize, String listenAddress, String? publicAddress)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigUDP() when $default != null: +return $default(_that.enabled,_that.socketPoolSize,_that.listenAddress,_that.publicAddress);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigUDP with DiagnosticableTreeMixin implements VeilidConfigUDP { - const _VeilidConfigUDP( - {required this.enabled, - required this.socketPoolSize, - required this.listenAddress, - this.publicAddress}); - factory _VeilidConfigUDP.fromJson(Map json) => - _$VeilidConfigUDPFromJson(json); + const _VeilidConfigUDP({required this.enabled, required this.socketPoolSize, required this.listenAddress, this.publicAddress}); + factory _VeilidConfigUDP.fromJson(Map json) => _$VeilidConfigUDPFromJson(json); - @override - final bool enabled; - @override - final int socketPoolSize; - @override - final String listenAddress; - @override - final String? publicAddress; +@override final bool enabled; +@override final int socketPoolSize; +@override final String listenAddress; +@override final String? publicAddress; - /// Create a copy of VeilidConfigUDP - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigUDPCopyWith<_VeilidConfigUDP> get copyWith => - __$VeilidConfigUDPCopyWithImpl<_VeilidConfigUDP>(this, _$identity); +/// Create a copy of VeilidConfigUDP +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigUDPCopyWith<_VeilidConfigUDP> get copyWith => __$VeilidConfigUDPCopyWithImpl<_VeilidConfigUDP>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigUDPToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigUDPToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigUDP')) + ..add(DiagnosticsProperty('enabled', enabled))..add(DiagnosticsProperty('socketPoolSize', socketPoolSize))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('publicAddress', publicAddress)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigUDP')) - ..add(DiagnosticsProperty('enabled', enabled)) - ..add(DiagnosticsProperty('socketPoolSize', socketPoolSize)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('publicAddress', publicAddress)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigUDP&&(identical(other.enabled, enabled) || other.enabled == enabled)&&(identical(other.socketPoolSize, socketPoolSize) || other.socketPoolSize == socketPoolSize)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.publicAddress, publicAddress) || other.publicAddress == publicAddress)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigUDP && - (identical(other.enabled, enabled) || other.enabled == enabled) && - (identical(other.socketPoolSize, socketPoolSize) || - other.socketPoolSize == socketPoolSize) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.publicAddress, publicAddress) || - other.publicAddress == publicAddress)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,enabled,socketPoolSize,listenAddress,publicAddress); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigUDP(enabled: $enabled, socketPoolSize: $socketPoolSize, listenAddress: $listenAddress, publicAddress: $publicAddress)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, enabled, socketPoolSize, listenAddress, publicAddress); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigUDP(enabled: $enabled, socketPoolSize: $socketPoolSize, listenAddress: $listenAddress, publicAddress: $publicAddress)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigUDPCopyWith<$Res> - implements $VeilidConfigUDPCopyWith<$Res> { - factory _$VeilidConfigUDPCopyWith( - _VeilidConfigUDP value, $Res Function(_VeilidConfigUDP) _then) = - __$VeilidConfigUDPCopyWithImpl; - @override - @useResult - $Res call( - {bool enabled, - int socketPoolSize, - String listenAddress, - String? publicAddress}); -} +abstract mixin class _$VeilidConfigUDPCopyWith<$Res> implements $VeilidConfigUDPCopyWith<$Res> { + factory _$VeilidConfigUDPCopyWith(_VeilidConfigUDP value, $Res Function(_VeilidConfigUDP) _then) = __$VeilidConfigUDPCopyWithImpl; +@override @useResult +$Res call({ + bool enabled, int socketPoolSize, String listenAddress, String? publicAddress +}); + + + +} /// @nodoc class __$VeilidConfigUDPCopyWithImpl<$Res> implements _$VeilidConfigUDPCopyWith<$Res> { @@ -3164,107 +4059,71 @@ class __$VeilidConfigUDPCopyWithImpl<$Res> final _VeilidConfigUDP _self; final $Res Function(_VeilidConfigUDP) _then; - /// Create a copy of VeilidConfigUDP - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? enabled = null, - Object? socketPoolSize = null, - Object? listenAddress = null, - Object? publicAddress = freezed, - }) { - return _then(_VeilidConfigUDP( - enabled: null == enabled - ? _self.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - socketPoolSize: null == socketPoolSize - ? _self.socketPoolSize - : socketPoolSize // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - publicAddress: freezed == publicAddress - ? _self.publicAddress - : publicAddress // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigUDP +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? enabled = null,Object? socketPoolSize = null,Object? listenAddress = null,Object? publicAddress = freezed,}) { + return _then(_VeilidConfigUDP( +enabled: null == enabled ? _self.enabled : enabled // ignore: cast_nullable_to_non_nullable +as bool,socketPoolSize: null == socketPoolSize ? _self.socketPoolSize : socketPoolSize // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,publicAddress: freezed == publicAddress ? _self.publicAddress : publicAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigTCP implements DiagnosticableTreeMixin { - bool get connect; - bool get listen; - int get maxConnections; - String get listenAddress; - String? get publicAddress; - /// Create a copy of VeilidConfigTCP - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigTCPCopyWith get copyWith => - _$VeilidConfigTCPCopyWithImpl( - this as VeilidConfigTCP, _$identity); + bool get connect; bool get listen; int get maxConnections; String get listenAddress; String? get publicAddress; +/// Create a copy of VeilidConfigTCP +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigTCPCopyWith get copyWith => _$VeilidConfigTCPCopyWithImpl(this as VeilidConfigTCP, _$identity); /// Serializes this VeilidConfigTCP to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTCP')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('publicAddress', publicAddress)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTCP')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('publicAddress', publicAddress)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigTCP && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.publicAddress, publicAddress) || - other.publicAddress == publicAddress)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigTCP&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.publicAddress, publicAddress) || other.publicAddress == publicAddress)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,publicAddress); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTCP(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, publicAddress: $publicAddress)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, connect, listen, maxConnections, - listenAddress, publicAddress); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTCP(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, publicAddress: $publicAddress)'; - } } /// @nodoc -abstract mixin class $VeilidConfigTCPCopyWith<$Res> { - factory $VeilidConfigTCPCopyWith( - VeilidConfigTCP value, $Res Function(VeilidConfigTCP) _then) = - _$VeilidConfigTCPCopyWithImpl; - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String? publicAddress}); -} +abstract mixin class $VeilidConfigTCPCopyWith<$Res> { + factory $VeilidConfigTCPCopyWith(VeilidConfigTCP value, $Res Function(VeilidConfigTCP) _then) = _$VeilidConfigTCPCopyWithImpl; +@useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String? publicAddress +}); + + + +} /// @nodoc class _$VeilidConfigTCPCopyWithImpl<$Res> implements $VeilidConfigTCPCopyWith<$Res> { @@ -3273,133 +4132,205 @@ class _$VeilidConfigTCPCopyWithImpl<$Res> final VeilidConfigTCP _self; final $Res Function(VeilidConfigTCP) _then; - /// Create a copy of VeilidConfigTCP - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? publicAddress = freezed, - }) { - return _then(_self.copyWith( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - publicAddress: freezed == publicAddress - ? _self.publicAddress - : publicAddress // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigTCP +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? publicAddress = freezed,}) { + return _then(_self.copyWith( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,publicAddress: freezed == publicAddress ? _self.publicAddress : publicAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigTCP]. +extension VeilidConfigTCPPatterns on VeilidConfigTCP { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigTCP value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigTCP() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigTCP value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTCP(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigTCP value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTCP() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String? publicAddress)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigTCP() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.publicAddress);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String? publicAddress) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTCP(): +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.publicAddress);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool connect, bool listen, int maxConnections, String listenAddress, String? publicAddress)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTCP() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.publicAddress);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigTCP with DiagnosticableTreeMixin implements VeilidConfigTCP { - const _VeilidConfigTCP( - {required this.connect, - required this.listen, - required this.maxConnections, - required this.listenAddress, - this.publicAddress}); - factory _VeilidConfigTCP.fromJson(Map json) => - _$VeilidConfigTCPFromJson(json); + const _VeilidConfigTCP({required this.connect, required this.listen, required this.maxConnections, required this.listenAddress, this.publicAddress}); + factory _VeilidConfigTCP.fromJson(Map json) => _$VeilidConfigTCPFromJson(json); - @override - final bool connect; - @override - final bool listen; - @override - final int maxConnections; - @override - final String listenAddress; - @override - final String? publicAddress; +@override final bool connect; +@override final bool listen; +@override final int maxConnections; +@override final String listenAddress; +@override final String? publicAddress; - /// Create a copy of VeilidConfigTCP - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigTCPCopyWith<_VeilidConfigTCP> get copyWith => - __$VeilidConfigTCPCopyWithImpl<_VeilidConfigTCP>(this, _$identity); +/// Create a copy of VeilidConfigTCP +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigTCPCopyWith<_VeilidConfigTCP> get copyWith => __$VeilidConfigTCPCopyWithImpl<_VeilidConfigTCP>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigTCPToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigTCPToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTCP')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('publicAddress', publicAddress)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTCP')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('publicAddress', publicAddress)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigTCP&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.publicAddress, publicAddress) || other.publicAddress == publicAddress)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigTCP && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.publicAddress, publicAddress) || - other.publicAddress == publicAddress)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,publicAddress); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTCP(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, publicAddress: $publicAddress)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, connect, listen, maxConnections, - listenAddress, publicAddress); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTCP(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, publicAddress: $publicAddress)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigTCPCopyWith<$Res> - implements $VeilidConfigTCPCopyWith<$Res> { - factory _$VeilidConfigTCPCopyWith( - _VeilidConfigTCP value, $Res Function(_VeilidConfigTCP) _then) = - __$VeilidConfigTCPCopyWithImpl; - @override - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String? publicAddress}); -} +abstract mixin class _$VeilidConfigTCPCopyWith<$Res> implements $VeilidConfigTCPCopyWith<$Res> { + factory _$VeilidConfigTCPCopyWith(_VeilidConfigTCP value, $Res Function(_VeilidConfigTCP) _then) = __$VeilidConfigTCPCopyWithImpl; +@override @useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String? publicAddress +}); + + + +} /// @nodoc class __$VeilidConfigTCPCopyWithImpl<$Res> implements _$VeilidConfigTCPCopyWith<$Res> { @@ -3408,115 +4339,72 @@ class __$VeilidConfigTCPCopyWithImpl<$Res> final _VeilidConfigTCP _self; final $Res Function(_VeilidConfigTCP) _then; - /// Create a copy of VeilidConfigTCP - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? publicAddress = freezed, - }) { - return _then(_VeilidConfigTCP( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - publicAddress: freezed == publicAddress - ? _self.publicAddress - : publicAddress // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigTCP +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? publicAddress = freezed,}) { + return _then(_VeilidConfigTCP( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,publicAddress: freezed == publicAddress ? _self.publicAddress : publicAddress // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigWS implements DiagnosticableTreeMixin { - bool get connect; - bool get listen; - int get maxConnections; - String get listenAddress; - String get path; - String? get url; - /// Create a copy of VeilidConfigWS - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigWSCopyWith get copyWith => - _$VeilidConfigWSCopyWithImpl( - this as VeilidConfigWS, _$identity); + bool get connect; bool get listen; int get maxConnections; String get listenAddress; String get path; String? get url; +/// Create a copy of VeilidConfigWS +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigWSCopyWith get copyWith => _$VeilidConfigWSCopyWithImpl(this as VeilidConfigWS, _$identity); /// Serializes this VeilidConfigWS to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigWS')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigWS')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigWS && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigWS&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigWS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, connect, listen, maxConnections, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigWS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class $VeilidConfigWSCopyWith<$Res> { - factory $VeilidConfigWSCopyWith( - VeilidConfigWS value, $Res Function(VeilidConfigWS) _then) = - _$VeilidConfigWSCopyWithImpl; - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String path, - String? url}); -} +abstract mixin class $VeilidConfigWSCopyWith<$Res> { + factory $VeilidConfigWSCopyWith(VeilidConfigWS value, $Res Function(VeilidConfigWS) _then) = _$VeilidConfigWSCopyWithImpl; +@useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class _$VeilidConfigWSCopyWithImpl<$Res> implements $VeilidConfigWSCopyWith<$Res> { @@ -3525,143 +4413,207 @@ class _$VeilidConfigWSCopyWithImpl<$Res> final VeilidConfigWS _self; final $Res Function(VeilidConfigWS) _then; - /// Create a copy of VeilidConfigWS - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_self.copyWith( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigWS +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_self.copyWith( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigWS]. +extension VeilidConfigWSPatterns on VeilidConfigWS { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigWS value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigWS() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigWS value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigWS(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigWS value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigWS() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigWS() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigWS(): +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigWS() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigWS with DiagnosticableTreeMixin implements VeilidConfigWS { - const _VeilidConfigWS( - {required this.connect, - required this.listen, - required this.maxConnections, - required this.listenAddress, - required this.path, - this.url}); - factory _VeilidConfigWS.fromJson(Map json) => - _$VeilidConfigWSFromJson(json); + const _VeilidConfigWS({required this.connect, required this.listen, required this.maxConnections, required this.listenAddress, required this.path, this.url}); + factory _VeilidConfigWS.fromJson(Map json) => _$VeilidConfigWSFromJson(json); - @override - final bool connect; - @override - final bool listen; - @override - final int maxConnections; - @override - final String listenAddress; - @override - final String path; - @override - final String? url; +@override final bool connect; +@override final bool listen; +@override final int maxConnections; +@override final String listenAddress; +@override final String path; +@override final String? url; - /// Create a copy of VeilidConfigWS - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigWSCopyWith<_VeilidConfigWS> get copyWith => - __$VeilidConfigWSCopyWithImpl<_VeilidConfigWS>(this, _$identity); +/// Create a copy of VeilidConfigWS +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigWSCopyWith<_VeilidConfigWS> get copyWith => __$VeilidConfigWSCopyWithImpl<_VeilidConfigWS>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigWSToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigWSToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigWS')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigWS')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigWS&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigWS && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigWS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, connect, listen, maxConnections, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigWS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigWSCopyWith<$Res> - implements $VeilidConfigWSCopyWith<$Res> { - factory _$VeilidConfigWSCopyWith( - _VeilidConfigWS value, $Res Function(_VeilidConfigWS) _then) = - __$VeilidConfigWSCopyWithImpl; - @override - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String path, - String? url}); -} +abstract mixin class _$VeilidConfigWSCopyWith<$Res> implements $VeilidConfigWSCopyWith<$Res> { + factory _$VeilidConfigWSCopyWith(_VeilidConfigWS value, $Res Function(_VeilidConfigWS) _then) = __$VeilidConfigWSCopyWithImpl; +@override @useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class __$VeilidConfigWSCopyWithImpl<$Res> implements _$VeilidConfigWSCopyWith<$Res> { @@ -3670,120 +4622,73 @@ class __$VeilidConfigWSCopyWithImpl<$Res> final _VeilidConfigWS _self; final $Res Function(_VeilidConfigWS) _then; - /// Create a copy of VeilidConfigWS - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_VeilidConfigWS( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigWS +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_VeilidConfigWS( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigWSS implements DiagnosticableTreeMixin { - bool get connect; - bool get listen; - int get maxConnections; - String get listenAddress; - String get path; - String? get url; - /// Create a copy of VeilidConfigWSS - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigWSSCopyWith get copyWith => - _$VeilidConfigWSSCopyWithImpl( - this as VeilidConfigWSS, _$identity); + bool get connect; bool get listen; int get maxConnections; String get listenAddress; String get path; String? get url; +/// Create a copy of VeilidConfigWSS +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigWSSCopyWith get copyWith => _$VeilidConfigWSSCopyWithImpl(this as VeilidConfigWSS, _$identity); /// Serializes this VeilidConfigWSS to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigWSS')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigWSS')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigWSS && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigWSS&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigWSS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, connect, listen, maxConnections, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigWSS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class $VeilidConfigWSSCopyWith<$Res> { - factory $VeilidConfigWSSCopyWith( - VeilidConfigWSS value, $Res Function(VeilidConfigWSS) _then) = - _$VeilidConfigWSSCopyWithImpl; - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String path, - String? url}); -} +abstract mixin class $VeilidConfigWSSCopyWith<$Res> { + factory $VeilidConfigWSSCopyWith(VeilidConfigWSS value, $Res Function(VeilidConfigWSS) _then) = _$VeilidConfigWSSCopyWithImpl; +@useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class _$VeilidConfigWSSCopyWithImpl<$Res> implements $VeilidConfigWSSCopyWith<$Res> { @@ -3792,143 +4697,207 @@ class _$VeilidConfigWSSCopyWithImpl<$Res> final VeilidConfigWSS _self; final $Res Function(VeilidConfigWSS) _then; - /// Create a copy of VeilidConfigWSS - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_self.copyWith( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigWSS +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_self.copyWith( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigWSS]. +extension VeilidConfigWSSPatterns on VeilidConfigWSS { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigWSS value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigWSS() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigWSS value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigWSS(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigWSS value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigWSS() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigWSS() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigWSS(): +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigWSS() when $default != null: +return $default(_that.connect,_that.listen,_that.maxConnections,_that.listenAddress,_that.path,_that.url);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigWSS with DiagnosticableTreeMixin implements VeilidConfigWSS { - const _VeilidConfigWSS( - {required this.connect, - required this.listen, - required this.maxConnections, - required this.listenAddress, - required this.path, - this.url}); - factory _VeilidConfigWSS.fromJson(Map json) => - _$VeilidConfigWSSFromJson(json); + const _VeilidConfigWSS({required this.connect, required this.listen, required this.maxConnections, required this.listenAddress, required this.path, this.url}); + factory _VeilidConfigWSS.fromJson(Map json) => _$VeilidConfigWSSFromJson(json); - @override - final bool connect; - @override - final bool listen; - @override - final int maxConnections; - @override - final String listenAddress; - @override - final String path; - @override - final String? url; +@override final bool connect; +@override final bool listen; +@override final int maxConnections; +@override final String listenAddress; +@override final String path; +@override final String? url; - /// Create a copy of VeilidConfigWSS - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigWSSCopyWith<_VeilidConfigWSS> get copyWith => - __$VeilidConfigWSSCopyWithImpl<_VeilidConfigWSS>(this, _$identity); +/// Create a copy of VeilidConfigWSS +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigWSSCopyWith<_VeilidConfigWSS> get copyWith => __$VeilidConfigWSSCopyWithImpl<_VeilidConfigWSS>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigWSSToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigWSSToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigWSS')) + ..add(DiagnosticsProperty('connect', connect))..add(DiagnosticsProperty('listen', listen))..add(DiagnosticsProperty('maxConnections', maxConnections))..add(DiagnosticsProperty('listenAddress', listenAddress))..add(DiagnosticsProperty('path', path))..add(DiagnosticsProperty('url', url)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigWSS')) - ..add(DiagnosticsProperty('connect', connect)) - ..add(DiagnosticsProperty('listen', listen)) - ..add(DiagnosticsProperty('maxConnections', maxConnections)) - ..add(DiagnosticsProperty('listenAddress', listenAddress)) - ..add(DiagnosticsProperty('path', path)) - ..add(DiagnosticsProperty('url', url)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigWSS&&(identical(other.connect, connect) || other.connect == connect)&&(identical(other.listen, listen) || other.listen == listen)&&(identical(other.maxConnections, maxConnections) || other.maxConnections == maxConnections)&&(identical(other.listenAddress, listenAddress) || other.listenAddress == listenAddress)&&(identical(other.path, path) || other.path == path)&&(identical(other.url, url) || other.url == url)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigWSS && - (identical(other.connect, connect) || other.connect == connect) && - (identical(other.listen, listen) || other.listen == listen) && - (identical(other.maxConnections, maxConnections) || - other.maxConnections == maxConnections) && - (identical(other.listenAddress, listenAddress) || - other.listenAddress == listenAddress) && - (identical(other.path, path) || other.path == path) && - (identical(other.url, url) || other.url == url)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,connect,listen,maxConnections,listenAddress,path,url); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigWSS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, connect, listen, maxConnections, listenAddress, path, url); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigWSS(connect: $connect, listen: $listen, maxConnections: $maxConnections, listenAddress: $listenAddress, path: $path, url: $url)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigWSSCopyWith<$Res> - implements $VeilidConfigWSSCopyWith<$Res> { - factory _$VeilidConfigWSSCopyWith( - _VeilidConfigWSS value, $Res Function(_VeilidConfigWSS) _then) = - __$VeilidConfigWSSCopyWithImpl; - @override - @useResult - $Res call( - {bool connect, - bool listen, - int maxConnections, - String listenAddress, - String path, - String? url}); -} +abstract mixin class _$VeilidConfigWSSCopyWith<$Res> implements $VeilidConfigWSSCopyWith<$Res> { + factory _$VeilidConfigWSSCopyWith(_VeilidConfigWSS value, $Res Function(_VeilidConfigWSS) _then) = __$VeilidConfigWSSCopyWithImpl; +@override @useResult +$Res call({ + bool connect, bool listen, int maxConnections, String listenAddress, String path, String? url +}); + + + +} /// @nodoc class __$VeilidConfigWSSCopyWithImpl<$Res> implements _$VeilidConfigWSSCopyWith<$Res> { @@ -3937,114 +4906,73 @@ class __$VeilidConfigWSSCopyWithImpl<$Res> final _VeilidConfigWSS _self; final $Res Function(_VeilidConfigWSS) _then; - /// Create a copy of VeilidConfigWSS - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? connect = null, - Object? listen = null, - Object? maxConnections = null, - Object? listenAddress = null, - Object? path = null, - Object? url = freezed, - }) { - return _then(_VeilidConfigWSS( - connect: null == connect - ? _self.connect - : connect // ignore: cast_nullable_to_non_nullable - as bool, - listen: null == listen - ? _self.listen - : listen // ignore: cast_nullable_to_non_nullable - as bool, - maxConnections: null == maxConnections - ? _self.maxConnections - : maxConnections // ignore: cast_nullable_to_non_nullable - as int, - listenAddress: null == listenAddress - ? _self.listenAddress - : listenAddress // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _self.path - : path // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _self.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigWSS +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? connect = null,Object? listen = null,Object? maxConnections = null,Object? listenAddress = null,Object? path = null,Object? url = freezed,}) { + return _then(_VeilidConfigWSS( +connect: null == connect ? _self.connect : connect // ignore: cast_nullable_to_non_nullable +as bool,listen: null == listen ? _self.listen : listen // ignore: cast_nullable_to_non_nullable +as bool,maxConnections: null == maxConnections ? _self.maxConnections : maxConnections // ignore: cast_nullable_to_non_nullable +as int,listenAddress: null == listenAddress ? _self.listenAddress : listenAddress // ignore: cast_nullable_to_non_nullable +as String,path: null == path ? _self.path : path // ignore: cast_nullable_to_non_nullable +as String,url: freezed == url ? _self.url : url // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigProtocol implements DiagnosticableTreeMixin { - VeilidConfigUDP get udp; - VeilidConfigTCP get tcp; - VeilidConfigWS get ws; - VeilidConfigWSS get wss; - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigProtocolCopyWith get copyWith => - _$VeilidConfigProtocolCopyWithImpl( - this as VeilidConfigProtocol, _$identity); + VeilidConfigUDP get udp; VeilidConfigTCP get tcp; VeilidConfigWS get ws; VeilidConfigWSS get wss; +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigProtocolCopyWith get copyWith => _$VeilidConfigProtocolCopyWithImpl(this as VeilidConfigProtocol, _$identity); /// Serializes this VeilidConfigProtocol to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigProtocol')) - ..add(DiagnosticsProperty('udp', udp)) - ..add(DiagnosticsProperty('tcp', tcp)) - ..add(DiagnosticsProperty('ws', ws)) - ..add(DiagnosticsProperty('wss', wss)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigProtocol')) + ..add(DiagnosticsProperty('udp', udp))..add(DiagnosticsProperty('tcp', tcp))..add(DiagnosticsProperty('ws', ws))..add(DiagnosticsProperty('wss', wss)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigProtocol && - (identical(other.udp, udp) || other.udp == udp) && - (identical(other.tcp, tcp) || other.tcp == tcp) && - (identical(other.ws, ws) || other.ws == ws) && - (identical(other.wss, wss) || other.wss == wss)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigProtocol&&(identical(other.udp, udp) || other.udp == udp)&&(identical(other.tcp, tcp) || other.tcp == tcp)&&(identical(other.ws, ws) || other.ws == ws)&&(identical(other.wss, wss) || other.wss == wss)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,udp,tcp,ws,wss); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigProtocol(udp: $udp, tcp: $tcp, ws: $ws, wss: $wss)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, udp, tcp, ws, wss); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigProtocol(udp: $udp, tcp: $tcp, ws: $ws, wss: $wss)'; - } } /// @nodoc -abstract mixin class $VeilidConfigProtocolCopyWith<$Res> { - factory $VeilidConfigProtocolCopyWith(VeilidConfigProtocol value, - $Res Function(VeilidConfigProtocol) _then) = - _$VeilidConfigProtocolCopyWithImpl; - @useResult - $Res call( - {VeilidConfigUDP udp, - VeilidConfigTCP tcp, - VeilidConfigWS ws, - VeilidConfigWSS wss}); +abstract mixin class $VeilidConfigProtocolCopyWith<$Res> { + factory $VeilidConfigProtocolCopyWith(VeilidConfigProtocol value, $Res Function(VeilidConfigProtocol) _then) = _$VeilidConfigProtocolCopyWithImpl; +@useResult +$Res call({ + VeilidConfigUDP udp, VeilidConfigTCP tcp, VeilidConfigWS ws, VeilidConfigWSS wss +}); + + +$VeilidConfigUDPCopyWith<$Res> get udp;$VeilidConfigTCPCopyWith<$Res> get tcp;$VeilidConfigWSCopyWith<$Res> get ws;$VeilidConfigWSSCopyWith<$Res> get wss; - $VeilidConfigUDPCopyWith<$Res> get udp; - $VeilidConfigTCPCopyWith<$Res> get tcp; - $VeilidConfigWSCopyWith<$Res> get ws; - $VeilidConfigWSSCopyWith<$Res> get wss; } - /// @nodoc class _$VeilidConfigProtocolCopyWithImpl<$Res> implements $VeilidConfigProtocolCopyWith<$Res> { @@ -4053,170 +4981,239 @@ class _$VeilidConfigProtocolCopyWithImpl<$Res> final VeilidConfigProtocol _self; final $Res Function(VeilidConfigProtocol) _then; - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? udp = null, - Object? tcp = null, - Object? ws = null, - Object? wss = null, - }) { - return _then(_self.copyWith( - udp: null == udp - ? _self.udp - : udp // ignore: cast_nullable_to_non_nullable - as VeilidConfigUDP, - tcp: null == tcp - ? _self.tcp - : tcp // ignore: cast_nullable_to_non_nullable - as VeilidConfigTCP, - ws: null == ws - ? _self.ws - : ws // ignore: cast_nullable_to_non_nullable - as VeilidConfigWS, - wss: null == wss - ? _self.wss - : wss // ignore: cast_nullable_to_non_nullable - as VeilidConfigWSS, - )); - } +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? udp = null,Object? tcp = null,Object? ws = null,Object? wss = null,}) { + return _then(_self.copyWith( +udp: null == udp ? _self.udp : udp // ignore: cast_nullable_to_non_nullable +as VeilidConfigUDP,tcp: null == tcp ? _self.tcp : tcp // ignore: cast_nullable_to_non_nullable +as VeilidConfigTCP,ws: null == ws ? _self.ws : ws // ignore: cast_nullable_to_non_nullable +as VeilidConfigWS,wss: null == wss ? _self.wss : wss // ignore: cast_nullable_to_non_nullable +as VeilidConfigWSS, + )); +} +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigUDPCopyWith<$Res> get udp { + + return $VeilidConfigUDPCopyWith<$Res>(_self.udp, (value) { + return _then(_self.copyWith(udp: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTCPCopyWith<$Res> get tcp { + + return $VeilidConfigTCPCopyWith<$Res>(_self.tcp, (value) { + return _then(_self.copyWith(tcp: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigWSCopyWith<$Res> get ws { + + return $VeilidConfigWSCopyWith<$Res>(_self.ws, (value) { + return _then(_self.copyWith(ws: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigWSSCopyWith<$Res> get wss { + + return $VeilidConfigWSSCopyWith<$Res>(_self.wss, (value) { + return _then(_self.copyWith(wss: value)); + }); +} +} - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigUDPCopyWith<$Res> get udp { - return $VeilidConfigUDPCopyWith<$Res>(_self.udp, (value) { - return _then(_self.copyWith(udp: value)); - }); - } - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTCPCopyWith<$Res> get tcp { - return $VeilidConfigTCPCopyWith<$Res>(_self.tcp, (value) { - return _then(_self.copyWith(tcp: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidConfigProtocol]. +extension VeilidConfigProtocolPatterns on VeilidConfigProtocol { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigWSCopyWith<$Res> get ws { - return $VeilidConfigWSCopyWith<$Res>(_self.ws, (value) { - return _then(_self.copyWith(ws: value)); - }); - } +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigProtocol value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigProtocol() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigProtocol value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigProtocol(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigProtocol value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigProtocol() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidConfigUDP udp, VeilidConfigTCP tcp, VeilidConfigWS ws, VeilidConfigWSS wss)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigProtocol() when $default != null: +return $default(_that.udp,_that.tcp,_that.ws,_that.wss);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidConfigUDP udp, VeilidConfigTCP tcp, VeilidConfigWS ws, VeilidConfigWSS wss) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigProtocol(): +return $default(_that.udp,_that.tcp,_that.ws,_that.wss);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidConfigUDP udp, VeilidConfigTCP tcp, VeilidConfigWS ws, VeilidConfigWSS wss)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigProtocol() when $default != null: +return $default(_that.udp,_that.tcp,_that.ws,_that.wss);case _: + return null; + +} +} - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigWSSCopyWith<$Res> get wss { - return $VeilidConfigWSSCopyWith<$Res>(_self.wss, (value) { - return _then(_self.copyWith(wss: value)); - }); - } } /// @nodoc @JsonSerializable() -class _VeilidConfigProtocol - with DiagnosticableTreeMixin - implements VeilidConfigProtocol { - const _VeilidConfigProtocol( - {required this.udp, - required this.tcp, - required this.ws, - required this.wss}); - factory _VeilidConfigProtocol.fromJson(Map json) => - _$VeilidConfigProtocolFromJson(json); - @override - final VeilidConfigUDP udp; - @override - final VeilidConfigTCP tcp; - @override - final VeilidConfigWS ws; - @override - final VeilidConfigWSS wss; +class _VeilidConfigProtocol with DiagnosticableTreeMixin implements VeilidConfigProtocol { + const _VeilidConfigProtocol({required this.udp, required this.tcp, required this.ws, required this.wss}); + factory _VeilidConfigProtocol.fromJson(Map json) => _$VeilidConfigProtocolFromJson(json); - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigProtocolCopyWith<_VeilidConfigProtocol> get copyWith => - __$VeilidConfigProtocolCopyWithImpl<_VeilidConfigProtocol>( - this, _$identity); +@override final VeilidConfigUDP udp; +@override final VeilidConfigTCP tcp; +@override final VeilidConfigWS ws; +@override final VeilidConfigWSS wss; - @override - Map toJson() { - return _$VeilidConfigProtocolToJson( - this, - ); - } +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigProtocolCopyWith<_VeilidConfigProtocol> get copyWith => __$VeilidConfigProtocolCopyWithImpl<_VeilidConfigProtocol>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigProtocol')) - ..add(DiagnosticsProperty('udp', udp)) - ..add(DiagnosticsProperty('tcp', tcp)) - ..add(DiagnosticsProperty('ws', ws)) - ..add(DiagnosticsProperty('wss', wss)); - } +@override +Map toJson() { + return _$VeilidConfigProtocolToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigProtocol')) + ..add(DiagnosticsProperty('udp', udp))..add(DiagnosticsProperty('tcp', tcp))..add(DiagnosticsProperty('ws', ws))..add(DiagnosticsProperty('wss', wss)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigProtocol && - (identical(other.udp, udp) || other.udp == udp) && - (identical(other.tcp, tcp) || other.tcp == tcp) && - (identical(other.ws, ws) || other.ws == ws) && - (identical(other.wss, wss) || other.wss == wss)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigProtocol&&(identical(other.udp, udp) || other.udp == udp)&&(identical(other.tcp, tcp) || other.tcp == tcp)&&(identical(other.ws, ws) || other.ws == ws)&&(identical(other.wss, wss) || other.wss == wss)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,udp,tcp,ws,wss); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigProtocol(udp: $udp, tcp: $tcp, ws: $ws, wss: $wss)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, udp, tcp, ws, wss); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigProtocol(udp: $udp, tcp: $tcp, ws: $ws, wss: $wss)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigProtocolCopyWith<$Res> - implements $VeilidConfigProtocolCopyWith<$Res> { - factory _$VeilidConfigProtocolCopyWith(_VeilidConfigProtocol value, - $Res Function(_VeilidConfigProtocol) _then) = - __$VeilidConfigProtocolCopyWithImpl; - @override - @useResult - $Res call( - {VeilidConfigUDP udp, - VeilidConfigTCP tcp, - VeilidConfigWS ws, - VeilidConfigWSS wss}); +abstract mixin class _$VeilidConfigProtocolCopyWith<$Res> implements $VeilidConfigProtocolCopyWith<$Res> { + factory _$VeilidConfigProtocolCopyWith(_VeilidConfigProtocol value, $Res Function(_VeilidConfigProtocol) _then) = __$VeilidConfigProtocolCopyWithImpl; +@override @useResult +$Res call({ + VeilidConfigUDP udp, VeilidConfigTCP tcp, VeilidConfigWS ws, VeilidConfigWSS wss +}); + + +@override $VeilidConfigUDPCopyWith<$Res> get udp;@override $VeilidConfigTCPCopyWith<$Res> get tcp;@override $VeilidConfigWSCopyWith<$Res> get ws;@override $VeilidConfigWSSCopyWith<$Res> get wss; - @override - $VeilidConfigUDPCopyWith<$Res> get udp; - @override - $VeilidConfigTCPCopyWith<$Res> get tcp; - @override - $VeilidConfigWSCopyWith<$Res> get ws; - @override - $VeilidConfigWSSCopyWith<$Res> get wss; } - /// @nodoc class __$VeilidConfigProtocolCopyWithImpl<$Res> implements _$VeilidConfigProtocolCopyWith<$Res> { @@ -4225,127 +5222,107 @@ class __$VeilidConfigProtocolCopyWithImpl<$Res> final _VeilidConfigProtocol _self; final $Res Function(_VeilidConfigProtocol) _then; - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? udp = null, - Object? tcp = null, - Object? ws = null, - Object? wss = null, - }) { - return _then(_VeilidConfigProtocol( - udp: null == udp - ? _self.udp - : udp // ignore: cast_nullable_to_non_nullable - as VeilidConfigUDP, - tcp: null == tcp - ? _self.tcp - : tcp // ignore: cast_nullable_to_non_nullable - as VeilidConfigTCP, - ws: null == ws - ? _self.ws - : ws // ignore: cast_nullable_to_non_nullable - as VeilidConfigWS, - wss: null == wss - ? _self.wss - : wss // ignore: cast_nullable_to_non_nullable - as VeilidConfigWSS, - )); - } - - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigUDPCopyWith<$Res> get udp { - return $VeilidConfigUDPCopyWith<$Res>(_self.udp, (value) { - return _then(_self.copyWith(udp: value)); - }); - } - - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTCPCopyWith<$Res> get tcp { - return $VeilidConfigTCPCopyWith<$Res>(_self.tcp, (value) { - return _then(_self.copyWith(tcp: value)); - }); - } - - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigWSCopyWith<$Res> get ws { - return $VeilidConfigWSCopyWith<$Res>(_self.ws, (value) { - return _then(_self.copyWith(ws: value)); - }); - } - - /// Create a copy of VeilidConfigProtocol - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigWSSCopyWith<$Res> get wss { - return $VeilidConfigWSSCopyWith<$Res>(_self.wss, (value) { - return _then(_self.copyWith(wss: value)); - }); - } +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? udp = null,Object? tcp = null,Object? ws = null,Object? wss = null,}) { + return _then(_VeilidConfigProtocol( +udp: null == udp ? _self.udp : udp // ignore: cast_nullable_to_non_nullable +as VeilidConfigUDP,tcp: null == tcp ? _self.tcp : tcp // ignore: cast_nullable_to_non_nullable +as VeilidConfigTCP,ws: null == ws ? _self.ws : ws // ignore: cast_nullable_to_non_nullable +as VeilidConfigWS,wss: null == wss ? _self.wss : wss // ignore: cast_nullable_to_non_nullable +as VeilidConfigWSS, + )); } +/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigUDPCopyWith<$Res> get udp { + + return $VeilidConfigUDPCopyWith<$Res>(_self.udp, (value) { + return _then(_self.copyWith(udp: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTCPCopyWith<$Res> get tcp { + + return $VeilidConfigTCPCopyWith<$Res>(_self.tcp, (value) { + return _then(_self.copyWith(tcp: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigWSCopyWith<$Res> get ws { + + return $VeilidConfigWSCopyWith<$Res>(_self.ws, (value) { + return _then(_self.copyWith(ws: value)); + }); +}/// Create a copy of VeilidConfigProtocol +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigWSSCopyWith<$Res> get wss { + + return $VeilidConfigWSSCopyWith<$Res>(_self.wss, (value) { + return _then(_self.copyWith(wss: value)); + }); +} +} + + /// @nodoc mixin _$VeilidConfigPrivacy implements DiagnosticableTreeMixin { - bool get requireInboundRelay; - /// Create a copy of VeilidConfigPrivacy - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigPrivacyCopyWith get copyWith => - _$VeilidConfigPrivacyCopyWithImpl( - this as VeilidConfigPrivacy, _$identity); + bool get requireInboundRelay; +/// Create a copy of VeilidConfigPrivacy +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigPrivacyCopyWith get copyWith => _$VeilidConfigPrivacyCopyWithImpl(this as VeilidConfigPrivacy, _$identity); /// Serializes this VeilidConfigPrivacy to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigPrivacy')) - ..add(DiagnosticsProperty('requireInboundRelay', requireInboundRelay)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigPrivacy')) + ..add(DiagnosticsProperty('requireInboundRelay', requireInboundRelay)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigPrivacy && - (identical(other.requireInboundRelay, requireInboundRelay) || - other.requireInboundRelay == requireInboundRelay)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigPrivacy&&(identical(other.requireInboundRelay, requireInboundRelay) || other.requireInboundRelay == requireInboundRelay)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,requireInboundRelay); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigPrivacy(requireInboundRelay: $requireInboundRelay)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, requireInboundRelay); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigPrivacy(requireInboundRelay: $requireInboundRelay)'; - } } /// @nodoc -abstract mixin class $VeilidConfigPrivacyCopyWith<$Res> { - factory $VeilidConfigPrivacyCopyWith( - VeilidConfigPrivacy value, $Res Function(VeilidConfigPrivacy) _then) = - _$VeilidConfigPrivacyCopyWithImpl; - @useResult - $Res call({bool requireInboundRelay}); -} +abstract mixin class $VeilidConfigPrivacyCopyWith<$Res> { + factory $VeilidConfigPrivacyCopyWith(VeilidConfigPrivacy value, $Res Function(VeilidConfigPrivacy) _then) = _$VeilidConfigPrivacyCopyWithImpl; +@useResult +$Res call({ + bool requireInboundRelay +}); + + + +} /// @nodoc class _$VeilidConfigPrivacyCopyWithImpl<$Res> implements $VeilidConfigPrivacyCopyWith<$Res> { @@ -4354,87 +5331,197 @@ class _$VeilidConfigPrivacyCopyWithImpl<$Res> final VeilidConfigPrivacy _self; final $Res Function(VeilidConfigPrivacy) _then; - /// Create a copy of VeilidConfigPrivacy - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? requireInboundRelay = null, - }) { - return _then(_self.copyWith( - requireInboundRelay: null == requireInboundRelay - ? _self.requireInboundRelay - : requireInboundRelay // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigPrivacy +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? requireInboundRelay = null,}) { + return _then(_self.copyWith( +requireInboundRelay: null == requireInboundRelay ? _self.requireInboundRelay : requireInboundRelay // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigPrivacy]. +extension VeilidConfigPrivacyPatterns on VeilidConfigPrivacy { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigPrivacy value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigPrivacy() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigPrivacy value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigPrivacy(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigPrivacy value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigPrivacy() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool requireInboundRelay)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigPrivacy() when $default != null: +return $default(_that.requireInboundRelay);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool requireInboundRelay) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigPrivacy(): +return $default(_that.requireInboundRelay);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool requireInboundRelay)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigPrivacy() when $default != null: +return $default(_that.requireInboundRelay);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigPrivacy - with DiagnosticableTreeMixin - implements VeilidConfigPrivacy { + +class _VeilidConfigPrivacy with DiagnosticableTreeMixin implements VeilidConfigPrivacy { const _VeilidConfigPrivacy({required this.requireInboundRelay}); - factory _VeilidConfigPrivacy.fromJson(Map json) => - _$VeilidConfigPrivacyFromJson(json); + factory _VeilidConfigPrivacy.fromJson(Map json) => _$VeilidConfigPrivacyFromJson(json); - @override - final bool requireInboundRelay; +@override final bool requireInboundRelay; - /// Create a copy of VeilidConfigPrivacy - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigPrivacyCopyWith<_VeilidConfigPrivacy> get copyWith => - __$VeilidConfigPrivacyCopyWithImpl<_VeilidConfigPrivacy>( - this, _$identity); +/// Create a copy of VeilidConfigPrivacy +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigPrivacyCopyWith<_VeilidConfigPrivacy> get copyWith => __$VeilidConfigPrivacyCopyWithImpl<_VeilidConfigPrivacy>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigPrivacyToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigPrivacyToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigPrivacy')) + ..add(DiagnosticsProperty('requireInboundRelay', requireInboundRelay)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigPrivacy')) - ..add(DiagnosticsProperty('requireInboundRelay', requireInboundRelay)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigPrivacy&&(identical(other.requireInboundRelay, requireInboundRelay) || other.requireInboundRelay == requireInboundRelay)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigPrivacy && - (identical(other.requireInboundRelay, requireInboundRelay) || - other.requireInboundRelay == requireInboundRelay)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,requireInboundRelay); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigPrivacy(requireInboundRelay: $requireInboundRelay)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, requireInboundRelay); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigPrivacy(requireInboundRelay: $requireInboundRelay)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigPrivacyCopyWith<$Res> - implements $VeilidConfigPrivacyCopyWith<$Res> { - factory _$VeilidConfigPrivacyCopyWith(_VeilidConfigPrivacy value, - $Res Function(_VeilidConfigPrivacy) _then) = - __$VeilidConfigPrivacyCopyWithImpl; - @override - @useResult - $Res call({bool requireInboundRelay}); -} +abstract mixin class _$VeilidConfigPrivacyCopyWith<$Res> implements $VeilidConfigPrivacyCopyWith<$Res> { + factory _$VeilidConfigPrivacyCopyWith(_VeilidConfigPrivacy value, $Res Function(_VeilidConfigPrivacy) _then) = __$VeilidConfigPrivacyCopyWithImpl; +@override @useResult +$Res call({ + bool requireInboundRelay +}); + + + +} /// @nodoc class __$VeilidConfigPrivacyCopyWithImpl<$Res> implements _$VeilidConfigPrivacyCopyWith<$Res> { @@ -4443,87 +5530,68 @@ class __$VeilidConfigPrivacyCopyWithImpl<$Res> final _VeilidConfigPrivacy _self; final $Res Function(_VeilidConfigPrivacy) _then; - /// Create a copy of VeilidConfigPrivacy - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? requireInboundRelay = null, - }) { - return _then(_VeilidConfigPrivacy( - requireInboundRelay: null == requireInboundRelay - ? _self.requireInboundRelay - : requireInboundRelay // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigPrivacy +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? requireInboundRelay = null,}) { + return _then(_VeilidConfigPrivacy( +requireInboundRelay: null == requireInboundRelay ? _self.requireInboundRelay : requireInboundRelay // ignore: cast_nullable_to_non_nullable +as bool, + )); } + +} + + /// @nodoc mixin _$VeilidConfigTLS implements DiagnosticableTreeMixin { - String get certificatePath; - String get privateKeyPath; - int get connectionInitialTimeoutMs; - /// Create a copy of VeilidConfigTLS - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigTLSCopyWith get copyWith => - _$VeilidConfigTLSCopyWithImpl( - this as VeilidConfigTLS, _$identity); + String get certificatePath; String get privateKeyPath; int get connectionInitialTimeoutMs; +/// Create a copy of VeilidConfigTLS +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigTLSCopyWith get copyWith => _$VeilidConfigTLSCopyWithImpl(this as VeilidConfigTLS, _$identity); /// Serializes this VeilidConfigTLS to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTLS')) - ..add(DiagnosticsProperty('certificatePath', certificatePath)) - ..add(DiagnosticsProperty('privateKeyPath', privateKeyPath)) - ..add(DiagnosticsProperty( - 'connectionInitialTimeoutMs', connectionInitialTimeoutMs)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTLS')) + ..add(DiagnosticsProperty('certificatePath', certificatePath))..add(DiagnosticsProperty('privateKeyPath', privateKeyPath))..add(DiagnosticsProperty('connectionInitialTimeoutMs', connectionInitialTimeoutMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigTLS && - (identical(other.certificatePath, certificatePath) || - other.certificatePath == certificatePath) && - (identical(other.privateKeyPath, privateKeyPath) || - other.privateKeyPath == privateKeyPath) && - (identical(other.connectionInitialTimeoutMs, - connectionInitialTimeoutMs) || - other.connectionInitialTimeoutMs == - connectionInitialTimeoutMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigTLS&&(identical(other.certificatePath, certificatePath) || other.certificatePath == certificatePath)&&(identical(other.privateKeyPath, privateKeyPath) || other.privateKeyPath == privateKeyPath)&&(identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || other.connectionInitialTimeoutMs == connectionInitialTimeoutMs)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,certificatePath,privateKeyPath,connectionInitialTimeoutMs); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTLS(certificatePath: $certificatePath, privateKeyPath: $privateKeyPath, connectionInitialTimeoutMs: $connectionInitialTimeoutMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, certificatePath, privateKeyPath, connectionInitialTimeoutMs); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTLS(certificatePath: $certificatePath, privateKeyPath: $privateKeyPath, connectionInitialTimeoutMs: $connectionInitialTimeoutMs)'; - } } /// @nodoc -abstract mixin class $VeilidConfigTLSCopyWith<$Res> { - factory $VeilidConfigTLSCopyWith( - VeilidConfigTLS value, $Res Function(VeilidConfigTLS) _then) = - _$VeilidConfigTLSCopyWithImpl; - @useResult - $Res call( - {String certificatePath, - String privateKeyPath, - int connectionInitialTimeoutMs}); -} +abstract mixin class $VeilidConfigTLSCopyWith<$Res> { + factory $VeilidConfigTLSCopyWith(VeilidConfigTLS value, $Res Function(VeilidConfigTLS) _then) = _$VeilidConfigTLSCopyWithImpl; +@useResult +$Res call({ + String certificatePath, String privateKeyPath, int connectionInitialTimeoutMs +}); + + + +} /// @nodoc class _$VeilidConfigTLSCopyWithImpl<$Res> implements $VeilidConfigTLSCopyWith<$Res> { @@ -4532,114 +5600,201 @@ class _$VeilidConfigTLSCopyWithImpl<$Res> final VeilidConfigTLS _self; final $Res Function(VeilidConfigTLS) _then; - /// Create a copy of VeilidConfigTLS - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? certificatePath = null, - Object? privateKeyPath = null, - Object? connectionInitialTimeoutMs = null, - }) { - return _then(_self.copyWith( - certificatePath: null == certificatePath - ? _self.certificatePath - : certificatePath // ignore: cast_nullable_to_non_nullable - as String, - privateKeyPath: null == privateKeyPath - ? _self.privateKeyPath - : privateKeyPath // ignore: cast_nullable_to_non_nullable - as String, - connectionInitialTimeoutMs: null == connectionInitialTimeoutMs - ? _self.connectionInitialTimeoutMs - : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigTLS +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? certificatePath = null,Object? privateKeyPath = null,Object? connectionInitialTimeoutMs = null,}) { + return _then(_self.copyWith( +certificatePath: null == certificatePath ? _self.certificatePath : certificatePath // ignore: cast_nullable_to_non_nullable +as String,privateKeyPath: null == privateKeyPath ? _self.privateKeyPath : privateKeyPath // ignore: cast_nullable_to_non_nullable +as String,connectionInitialTimeoutMs: null == connectionInitialTimeoutMs ? _self.connectionInitialTimeoutMs : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigTLS]. +extension VeilidConfigTLSPatterns on VeilidConfigTLS { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigTLS value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigTLS() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigTLS value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTLS(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigTLS value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTLS() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String certificatePath, String privateKeyPath, int connectionInitialTimeoutMs)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigTLS() when $default != null: +return $default(_that.certificatePath,_that.privateKeyPath,_that.connectionInitialTimeoutMs);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String certificatePath, String privateKeyPath, int connectionInitialTimeoutMs) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTLS(): +return $default(_that.certificatePath,_that.privateKeyPath,_that.connectionInitialTimeoutMs);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String certificatePath, String privateKeyPath, int connectionInitialTimeoutMs)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTLS() when $default != null: +return $default(_that.certificatePath,_that.privateKeyPath,_that.connectionInitialTimeoutMs);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigTLS with DiagnosticableTreeMixin implements VeilidConfigTLS { - const _VeilidConfigTLS( - {required this.certificatePath, - required this.privateKeyPath, - required this.connectionInitialTimeoutMs}); - factory _VeilidConfigTLS.fromJson(Map json) => - _$VeilidConfigTLSFromJson(json); + const _VeilidConfigTLS({required this.certificatePath, required this.privateKeyPath, required this.connectionInitialTimeoutMs}); + factory _VeilidConfigTLS.fromJson(Map json) => _$VeilidConfigTLSFromJson(json); - @override - final String certificatePath; - @override - final String privateKeyPath; - @override - final int connectionInitialTimeoutMs; +@override final String certificatePath; +@override final String privateKeyPath; +@override final int connectionInitialTimeoutMs; - /// Create a copy of VeilidConfigTLS - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigTLSCopyWith<_VeilidConfigTLS> get copyWith => - __$VeilidConfigTLSCopyWithImpl<_VeilidConfigTLS>(this, _$identity); +/// Create a copy of VeilidConfigTLS +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigTLSCopyWith<_VeilidConfigTLS> get copyWith => __$VeilidConfigTLSCopyWithImpl<_VeilidConfigTLS>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigTLSToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigTLSToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTLS')) + ..add(DiagnosticsProperty('certificatePath', certificatePath))..add(DiagnosticsProperty('privateKeyPath', privateKeyPath))..add(DiagnosticsProperty('connectionInitialTimeoutMs', connectionInitialTimeoutMs)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTLS')) - ..add(DiagnosticsProperty('certificatePath', certificatePath)) - ..add(DiagnosticsProperty('privateKeyPath', privateKeyPath)) - ..add(DiagnosticsProperty( - 'connectionInitialTimeoutMs', connectionInitialTimeoutMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigTLS&&(identical(other.certificatePath, certificatePath) || other.certificatePath == certificatePath)&&(identical(other.privateKeyPath, privateKeyPath) || other.privateKeyPath == privateKeyPath)&&(identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || other.connectionInitialTimeoutMs == connectionInitialTimeoutMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigTLS && - (identical(other.certificatePath, certificatePath) || - other.certificatePath == certificatePath) && - (identical(other.privateKeyPath, privateKeyPath) || - other.privateKeyPath == privateKeyPath) && - (identical(other.connectionInitialTimeoutMs, - connectionInitialTimeoutMs) || - other.connectionInitialTimeoutMs == - connectionInitialTimeoutMs)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,certificatePath,privateKeyPath,connectionInitialTimeoutMs); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTLS(certificatePath: $certificatePath, privateKeyPath: $privateKeyPath, connectionInitialTimeoutMs: $connectionInitialTimeoutMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, certificatePath, privateKeyPath, connectionInitialTimeoutMs); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTLS(certificatePath: $certificatePath, privateKeyPath: $privateKeyPath, connectionInitialTimeoutMs: $connectionInitialTimeoutMs)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigTLSCopyWith<$Res> - implements $VeilidConfigTLSCopyWith<$Res> { - factory _$VeilidConfigTLSCopyWith( - _VeilidConfigTLS value, $Res Function(_VeilidConfigTLS) _then) = - __$VeilidConfigTLSCopyWithImpl; - @override - @useResult - $Res call( - {String certificatePath, - String privateKeyPath, - int connectionInitialTimeoutMs}); -} +abstract mixin class _$VeilidConfigTLSCopyWith<$Res> implements $VeilidConfigTLSCopyWith<$Res> { + factory _$VeilidConfigTLSCopyWith(_VeilidConfigTLS value, $Res Function(_VeilidConfigTLS) _then) = __$VeilidConfigTLSCopyWithImpl; +@override @useResult +$Res call({ + String certificatePath, String privateKeyPath, int connectionInitialTimeoutMs +}); + + + +} /// @nodoc class __$VeilidConfigTLSCopyWithImpl<$Res> implements _$VeilidConfigTLSCopyWith<$Res> { @@ -4648,222 +5803,70 @@ class __$VeilidConfigTLSCopyWithImpl<$Res> final _VeilidConfigTLS _self; final $Res Function(_VeilidConfigTLS) _then; - /// Create a copy of VeilidConfigTLS - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? certificatePath = null, - Object? privateKeyPath = null, - Object? connectionInitialTimeoutMs = null, - }) { - return _then(_VeilidConfigTLS( - certificatePath: null == certificatePath - ? _self.certificatePath - : certificatePath // ignore: cast_nullable_to_non_nullable - as String, - privateKeyPath: null == privateKeyPath - ? _self.privateKeyPath - : privateKeyPath // ignore: cast_nullable_to_non_nullable - as String, - connectionInitialTimeoutMs: null == connectionInitialTimeoutMs - ? _self.connectionInitialTimeoutMs - : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigTLS +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? certificatePath = null,Object? privateKeyPath = null,Object? connectionInitialTimeoutMs = null,}) { + return _then(_VeilidConfigTLS( +certificatePath: null == certificatePath ? _self.certificatePath : certificatePath // ignore: cast_nullable_to_non_nullable +as String,privateKeyPath: null == privateKeyPath ? _self.privateKeyPath : privateKeyPath // ignore: cast_nullable_to_non_nullable +as String,connectionInitialTimeoutMs: null == connectionInitialTimeoutMs ? _self.connectionInitialTimeoutMs : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable +as int, + )); } + +} + + /// @nodoc mixin _$VeilidConfigDHT implements DiagnosticableTreeMixin { - int get resolveNodeTimeoutMs; - int get resolveNodeCount; - int get resolveNodeFanout; - int get maxFindNodeCount; - int get getValueTimeoutMs; - int get getValueCount; - int get getValueFanout; - int get setValueTimeoutMs; - int get setValueCount; - int get setValueFanout; - int get minPeerCount; - int get minPeerRefreshTimeMs; - int get validateDialInfoReceiptTimeMs; - int get localSubkeyCacheSize; - int get localMaxSubkeyCacheMemoryMb; - int get remoteSubkeyCacheSize; - int get remoteMaxRecords; - int get remoteMaxSubkeyCacheMemoryMb; - int get remoteMaxStorageSpaceMb; - int get publicWatchLimit; - int get memberWatchLimit; - int get maxWatchExpirationMs; - /// Create a copy of VeilidConfigDHT - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigDHTCopyWith get copyWith => - _$VeilidConfigDHTCopyWithImpl( - this as VeilidConfigDHT, _$identity); + int get resolveNodeTimeoutMs; int get resolveNodeCount; int get resolveNodeFanout; int get maxFindNodeCount; int get getValueTimeoutMs; int get getValueCount; int get getValueFanout; int get setValueTimeoutMs; int get setValueCount; int get setValueFanout; int get minPeerCount; int get minPeerRefreshTimeMs; int get validateDialInfoReceiptTimeMs; int get localSubkeyCacheSize; int get localMaxSubkeyCacheMemoryMb; int get remoteSubkeyCacheSize; int get remoteMaxRecords; int get remoteMaxSubkeyCacheMemoryMb; int get remoteMaxStorageSpaceMb; int get publicWatchLimit; int get memberWatchLimit; int get maxWatchExpirationMs; +/// Create a copy of VeilidConfigDHT +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigDHTCopyWith get copyWith => _$VeilidConfigDHTCopyWithImpl(this as VeilidConfigDHT, _$identity); /// Serializes this VeilidConfigDHT to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigDHT')) - ..add(DiagnosticsProperty('resolveNodeTimeoutMs', resolveNodeTimeoutMs)) - ..add(DiagnosticsProperty('resolveNodeCount', resolveNodeCount)) - ..add(DiagnosticsProperty('resolveNodeFanout', resolveNodeFanout)) - ..add(DiagnosticsProperty('maxFindNodeCount', maxFindNodeCount)) - ..add(DiagnosticsProperty('getValueTimeoutMs', getValueTimeoutMs)) - ..add(DiagnosticsProperty('getValueCount', getValueCount)) - ..add(DiagnosticsProperty('getValueFanout', getValueFanout)) - ..add(DiagnosticsProperty('setValueTimeoutMs', setValueTimeoutMs)) - ..add(DiagnosticsProperty('setValueCount', setValueCount)) - ..add(DiagnosticsProperty('setValueFanout', setValueFanout)) - ..add(DiagnosticsProperty('minPeerCount', minPeerCount)) - ..add(DiagnosticsProperty('minPeerRefreshTimeMs', minPeerRefreshTimeMs)) - ..add(DiagnosticsProperty( - 'validateDialInfoReceiptTimeMs', validateDialInfoReceiptTimeMs)) - ..add(DiagnosticsProperty('localSubkeyCacheSize', localSubkeyCacheSize)) - ..add(DiagnosticsProperty( - 'localMaxSubkeyCacheMemoryMb', localMaxSubkeyCacheMemoryMb)) - ..add(DiagnosticsProperty('remoteSubkeyCacheSize', remoteSubkeyCacheSize)) - ..add(DiagnosticsProperty('remoteMaxRecords', remoteMaxRecords)) - ..add(DiagnosticsProperty( - 'remoteMaxSubkeyCacheMemoryMb', remoteMaxSubkeyCacheMemoryMb)) - ..add(DiagnosticsProperty( - 'remoteMaxStorageSpaceMb', remoteMaxStorageSpaceMb)) - ..add(DiagnosticsProperty('publicWatchLimit', publicWatchLimit)) - ..add(DiagnosticsProperty('memberWatchLimit', memberWatchLimit)) - ..add(DiagnosticsProperty('maxWatchExpirationMs', maxWatchExpirationMs)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigDHT')) + ..add(DiagnosticsProperty('resolveNodeTimeoutMs', resolveNodeTimeoutMs))..add(DiagnosticsProperty('resolveNodeCount', resolveNodeCount))..add(DiagnosticsProperty('resolveNodeFanout', resolveNodeFanout))..add(DiagnosticsProperty('maxFindNodeCount', maxFindNodeCount))..add(DiagnosticsProperty('getValueTimeoutMs', getValueTimeoutMs))..add(DiagnosticsProperty('getValueCount', getValueCount))..add(DiagnosticsProperty('getValueFanout', getValueFanout))..add(DiagnosticsProperty('setValueTimeoutMs', setValueTimeoutMs))..add(DiagnosticsProperty('setValueCount', setValueCount))..add(DiagnosticsProperty('setValueFanout', setValueFanout))..add(DiagnosticsProperty('minPeerCount', minPeerCount))..add(DiagnosticsProperty('minPeerRefreshTimeMs', minPeerRefreshTimeMs))..add(DiagnosticsProperty('validateDialInfoReceiptTimeMs', validateDialInfoReceiptTimeMs))..add(DiagnosticsProperty('localSubkeyCacheSize', localSubkeyCacheSize))..add(DiagnosticsProperty('localMaxSubkeyCacheMemoryMb', localMaxSubkeyCacheMemoryMb))..add(DiagnosticsProperty('remoteSubkeyCacheSize', remoteSubkeyCacheSize))..add(DiagnosticsProperty('remoteMaxRecords', remoteMaxRecords))..add(DiagnosticsProperty('remoteMaxSubkeyCacheMemoryMb', remoteMaxSubkeyCacheMemoryMb))..add(DiagnosticsProperty('remoteMaxStorageSpaceMb', remoteMaxStorageSpaceMb))..add(DiagnosticsProperty('publicWatchLimit', publicWatchLimit))..add(DiagnosticsProperty('memberWatchLimit', memberWatchLimit))..add(DiagnosticsProperty('maxWatchExpirationMs', maxWatchExpirationMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigDHT && - (identical(other.resolveNodeTimeoutMs, resolveNodeTimeoutMs) || - other.resolveNodeTimeoutMs == resolveNodeTimeoutMs) && - (identical(other.resolveNodeCount, resolveNodeCount) || - other.resolveNodeCount == resolveNodeCount) && - (identical(other.resolveNodeFanout, resolveNodeFanout) || - other.resolveNodeFanout == resolveNodeFanout) && - (identical(other.maxFindNodeCount, maxFindNodeCount) || - other.maxFindNodeCount == maxFindNodeCount) && - (identical(other.getValueTimeoutMs, getValueTimeoutMs) || - other.getValueTimeoutMs == getValueTimeoutMs) && - (identical(other.getValueCount, getValueCount) || - other.getValueCount == getValueCount) && - (identical(other.getValueFanout, getValueFanout) || - other.getValueFanout == getValueFanout) && - (identical(other.setValueTimeoutMs, setValueTimeoutMs) || - other.setValueTimeoutMs == setValueTimeoutMs) && - (identical(other.setValueCount, setValueCount) || - other.setValueCount == setValueCount) && - (identical(other.setValueFanout, setValueFanout) || - other.setValueFanout == setValueFanout) && - (identical(other.minPeerCount, minPeerCount) || - other.minPeerCount == minPeerCount) && - (identical(other.minPeerRefreshTimeMs, minPeerRefreshTimeMs) || - other.minPeerRefreshTimeMs == minPeerRefreshTimeMs) && - (identical(other.validateDialInfoReceiptTimeMs, - validateDialInfoReceiptTimeMs) || - other.validateDialInfoReceiptTimeMs == - validateDialInfoReceiptTimeMs) && - (identical(other.localSubkeyCacheSize, localSubkeyCacheSize) || - other.localSubkeyCacheSize == localSubkeyCacheSize) && - (identical(other.localMaxSubkeyCacheMemoryMb, - localMaxSubkeyCacheMemoryMb) || - other.localMaxSubkeyCacheMemoryMb == - localMaxSubkeyCacheMemoryMb) && - (identical(other.remoteSubkeyCacheSize, remoteSubkeyCacheSize) || - other.remoteSubkeyCacheSize == remoteSubkeyCacheSize) && - (identical(other.remoteMaxRecords, remoteMaxRecords) || - other.remoteMaxRecords == remoteMaxRecords) && - (identical(other.remoteMaxSubkeyCacheMemoryMb, - remoteMaxSubkeyCacheMemoryMb) || - other.remoteMaxSubkeyCacheMemoryMb == - remoteMaxSubkeyCacheMemoryMb) && - (identical(other.remoteMaxStorageSpaceMb, remoteMaxStorageSpaceMb) || - other.remoteMaxStorageSpaceMb == remoteMaxStorageSpaceMb) && - (identical(other.publicWatchLimit, publicWatchLimit) || - other.publicWatchLimit == publicWatchLimit) && - (identical(other.memberWatchLimit, memberWatchLimit) || - other.memberWatchLimit == memberWatchLimit) && - (identical(other.maxWatchExpirationMs, maxWatchExpirationMs) || - other.maxWatchExpirationMs == maxWatchExpirationMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigDHT&&(identical(other.resolveNodeTimeoutMs, resolveNodeTimeoutMs) || other.resolveNodeTimeoutMs == resolveNodeTimeoutMs)&&(identical(other.resolveNodeCount, resolveNodeCount) || other.resolveNodeCount == resolveNodeCount)&&(identical(other.resolveNodeFanout, resolveNodeFanout) || other.resolveNodeFanout == resolveNodeFanout)&&(identical(other.maxFindNodeCount, maxFindNodeCount) || other.maxFindNodeCount == maxFindNodeCount)&&(identical(other.getValueTimeoutMs, getValueTimeoutMs) || other.getValueTimeoutMs == getValueTimeoutMs)&&(identical(other.getValueCount, getValueCount) || other.getValueCount == getValueCount)&&(identical(other.getValueFanout, getValueFanout) || other.getValueFanout == getValueFanout)&&(identical(other.setValueTimeoutMs, setValueTimeoutMs) || other.setValueTimeoutMs == setValueTimeoutMs)&&(identical(other.setValueCount, setValueCount) || other.setValueCount == setValueCount)&&(identical(other.setValueFanout, setValueFanout) || other.setValueFanout == setValueFanout)&&(identical(other.minPeerCount, minPeerCount) || other.minPeerCount == minPeerCount)&&(identical(other.minPeerRefreshTimeMs, minPeerRefreshTimeMs) || other.minPeerRefreshTimeMs == minPeerRefreshTimeMs)&&(identical(other.validateDialInfoReceiptTimeMs, validateDialInfoReceiptTimeMs) || other.validateDialInfoReceiptTimeMs == validateDialInfoReceiptTimeMs)&&(identical(other.localSubkeyCacheSize, localSubkeyCacheSize) || other.localSubkeyCacheSize == localSubkeyCacheSize)&&(identical(other.localMaxSubkeyCacheMemoryMb, localMaxSubkeyCacheMemoryMb) || other.localMaxSubkeyCacheMemoryMb == localMaxSubkeyCacheMemoryMb)&&(identical(other.remoteSubkeyCacheSize, remoteSubkeyCacheSize) || other.remoteSubkeyCacheSize == remoteSubkeyCacheSize)&&(identical(other.remoteMaxRecords, remoteMaxRecords) || other.remoteMaxRecords == remoteMaxRecords)&&(identical(other.remoteMaxSubkeyCacheMemoryMb, remoteMaxSubkeyCacheMemoryMb) || other.remoteMaxSubkeyCacheMemoryMb == remoteMaxSubkeyCacheMemoryMb)&&(identical(other.remoteMaxStorageSpaceMb, remoteMaxStorageSpaceMb) || other.remoteMaxStorageSpaceMb == remoteMaxStorageSpaceMb)&&(identical(other.publicWatchLimit, publicWatchLimit) || other.publicWatchLimit == publicWatchLimit)&&(identical(other.memberWatchLimit, memberWatchLimit) || other.memberWatchLimit == memberWatchLimit)&&(identical(other.maxWatchExpirationMs, maxWatchExpirationMs) || other.maxWatchExpirationMs == maxWatchExpirationMs)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,resolveNodeTimeoutMs,resolveNodeCount,resolveNodeFanout,maxFindNodeCount,getValueTimeoutMs,getValueCount,getValueFanout,setValueTimeoutMs,setValueCount,setValueFanout,minPeerCount,minPeerRefreshTimeMs,validateDialInfoReceiptTimeMs,localSubkeyCacheSize,localMaxSubkeyCacheMemoryMb,remoteSubkeyCacheSize,remoteMaxRecords,remoteMaxSubkeyCacheMemoryMb,remoteMaxStorageSpaceMb,publicWatchLimit,memberWatchLimit,maxWatchExpirationMs]); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigDHT(resolveNodeTimeoutMs: $resolveNodeTimeoutMs, resolveNodeCount: $resolveNodeCount, resolveNodeFanout: $resolveNodeFanout, maxFindNodeCount: $maxFindNodeCount, getValueTimeoutMs: $getValueTimeoutMs, getValueCount: $getValueCount, getValueFanout: $getValueFanout, setValueTimeoutMs: $setValueTimeoutMs, setValueCount: $setValueCount, setValueFanout: $setValueFanout, minPeerCount: $minPeerCount, minPeerRefreshTimeMs: $minPeerRefreshTimeMs, validateDialInfoReceiptTimeMs: $validateDialInfoReceiptTimeMs, localSubkeyCacheSize: $localSubkeyCacheSize, localMaxSubkeyCacheMemoryMb: $localMaxSubkeyCacheMemoryMb, remoteSubkeyCacheSize: $remoteSubkeyCacheSize, remoteMaxRecords: $remoteMaxRecords, remoteMaxSubkeyCacheMemoryMb: $remoteMaxSubkeyCacheMemoryMb, remoteMaxStorageSpaceMb: $remoteMaxStorageSpaceMb, publicWatchLimit: $publicWatchLimit, memberWatchLimit: $memberWatchLimit, maxWatchExpirationMs: $maxWatchExpirationMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hashAll([ - runtimeType, - resolveNodeTimeoutMs, - resolveNodeCount, - resolveNodeFanout, - maxFindNodeCount, - getValueTimeoutMs, - getValueCount, - getValueFanout, - setValueTimeoutMs, - setValueCount, - setValueFanout, - minPeerCount, - minPeerRefreshTimeMs, - validateDialInfoReceiptTimeMs, - localSubkeyCacheSize, - localMaxSubkeyCacheMemoryMb, - remoteSubkeyCacheSize, - remoteMaxRecords, - remoteMaxSubkeyCacheMemoryMb, - remoteMaxStorageSpaceMb, - publicWatchLimit, - memberWatchLimit, - maxWatchExpirationMs - ]); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigDHT(resolveNodeTimeoutMs: $resolveNodeTimeoutMs, resolveNodeCount: $resolveNodeCount, resolveNodeFanout: $resolveNodeFanout, maxFindNodeCount: $maxFindNodeCount, getValueTimeoutMs: $getValueTimeoutMs, getValueCount: $getValueCount, getValueFanout: $getValueFanout, setValueTimeoutMs: $setValueTimeoutMs, setValueCount: $setValueCount, setValueFanout: $setValueFanout, minPeerCount: $minPeerCount, minPeerRefreshTimeMs: $minPeerRefreshTimeMs, validateDialInfoReceiptTimeMs: $validateDialInfoReceiptTimeMs, localSubkeyCacheSize: $localSubkeyCacheSize, localMaxSubkeyCacheMemoryMb: $localMaxSubkeyCacheMemoryMb, remoteSubkeyCacheSize: $remoteSubkeyCacheSize, remoteMaxRecords: $remoteMaxRecords, remoteMaxSubkeyCacheMemoryMb: $remoteMaxSubkeyCacheMemoryMb, remoteMaxStorageSpaceMb: $remoteMaxStorageSpaceMb, publicWatchLimit: $publicWatchLimit, memberWatchLimit: $memberWatchLimit, maxWatchExpirationMs: $maxWatchExpirationMs)'; - } } /// @nodoc -abstract mixin class $VeilidConfigDHTCopyWith<$Res> { - factory $VeilidConfigDHTCopyWith( - VeilidConfigDHT value, $Res Function(VeilidConfigDHT) _then) = - _$VeilidConfigDHTCopyWithImpl; - @useResult - $Res call( - {int resolveNodeTimeoutMs, - int resolveNodeCount, - int resolveNodeFanout, - int maxFindNodeCount, - int getValueTimeoutMs, - int getValueCount, - int getValueFanout, - int setValueTimeoutMs, - int setValueCount, - int setValueFanout, - int minPeerCount, - int minPeerRefreshTimeMs, - int validateDialInfoReceiptTimeMs, - int localSubkeyCacheSize, - int localMaxSubkeyCacheMemoryMb, - int remoteSubkeyCacheSize, - int remoteMaxRecords, - int remoteMaxSubkeyCacheMemoryMb, - int remoteMaxStorageSpaceMb, - int publicWatchLimit, - int memberWatchLimit, - int maxWatchExpirationMs}); -} +abstract mixin class $VeilidConfigDHTCopyWith<$Res> { + factory $VeilidConfigDHTCopyWith(VeilidConfigDHT value, $Res Function(VeilidConfigDHT) _then) = _$VeilidConfigDHTCopyWithImpl; +@useResult +$Res call({ + int resolveNodeTimeoutMs, int resolveNodeCount, int resolveNodeFanout, int maxFindNodeCount, int getValueTimeoutMs, int getValueCount, int getValueFanout, int setValueTimeoutMs, int setValueCount, int setValueFanout, int minPeerCount, int minPeerRefreshTimeMs, int validateDialInfoReceiptTimeMs, int localSubkeyCacheSize, int localMaxSubkeyCacheMemoryMb, int remoteSubkeyCacheSize, int remoteMaxRecords, int remoteMaxSubkeyCacheMemoryMb, int remoteMaxStorageSpaceMb, int publicWatchLimit, int memberWatchLimit, int maxWatchExpirationMs +}); + + + +} /// @nodoc class _$VeilidConfigDHTCopyWithImpl<$Res> implements $VeilidConfigDHTCopyWith<$Res> { @@ -4872,372 +5875,239 @@ class _$VeilidConfigDHTCopyWithImpl<$Res> final VeilidConfigDHT _self; final $Res Function(VeilidConfigDHT) _then; - /// Create a copy of VeilidConfigDHT - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? resolveNodeTimeoutMs = null, - Object? resolveNodeCount = null, - Object? resolveNodeFanout = null, - Object? maxFindNodeCount = null, - Object? getValueTimeoutMs = null, - Object? getValueCount = null, - Object? getValueFanout = null, - Object? setValueTimeoutMs = null, - Object? setValueCount = null, - Object? setValueFanout = null, - Object? minPeerCount = null, - Object? minPeerRefreshTimeMs = null, - Object? validateDialInfoReceiptTimeMs = null, - Object? localSubkeyCacheSize = null, - Object? localMaxSubkeyCacheMemoryMb = null, - Object? remoteSubkeyCacheSize = null, - Object? remoteMaxRecords = null, - Object? remoteMaxSubkeyCacheMemoryMb = null, - Object? remoteMaxStorageSpaceMb = null, - Object? publicWatchLimit = null, - Object? memberWatchLimit = null, - Object? maxWatchExpirationMs = null, - }) { - return _then(_self.copyWith( - resolveNodeTimeoutMs: null == resolveNodeTimeoutMs - ? _self.resolveNodeTimeoutMs - : resolveNodeTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - resolveNodeCount: null == resolveNodeCount - ? _self.resolveNodeCount - : resolveNodeCount // ignore: cast_nullable_to_non_nullable - as int, - resolveNodeFanout: null == resolveNodeFanout - ? _self.resolveNodeFanout - : resolveNodeFanout // ignore: cast_nullable_to_non_nullable - as int, - maxFindNodeCount: null == maxFindNodeCount - ? _self.maxFindNodeCount - : maxFindNodeCount // ignore: cast_nullable_to_non_nullable - as int, - getValueTimeoutMs: null == getValueTimeoutMs - ? _self.getValueTimeoutMs - : getValueTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - getValueCount: null == getValueCount - ? _self.getValueCount - : getValueCount // ignore: cast_nullable_to_non_nullable - as int, - getValueFanout: null == getValueFanout - ? _self.getValueFanout - : getValueFanout // ignore: cast_nullable_to_non_nullable - as int, - setValueTimeoutMs: null == setValueTimeoutMs - ? _self.setValueTimeoutMs - : setValueTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - setValueCount: null == setValueCount - ? _self.setValueCount - : setValueCount // ignore: cast_nullable_to_non_nullable - as int, - setValueFanout: null == setValueFanout - ? _self.setValueFanout - : setValueFanout // ignore: cast_nullable_to_non_nullable - as int, - minPeerCount: null == minPeerCount - ? _self.minPeerCount - : minPeerCount // ignore: cast_nullable_to_non_nullable - as int, - minPeerRefreshTimeMs: null == minPeerRefreshTimeMs - ? _self.minPeerRefreshTimeMs - : minPeerRefreshTimeMs // ignore: cast_nullable_to_non_nullable - as int, - validateDialInfoReceiptTimeMs: null == validateDialInfoReceiptTimeMs - ? _self.validateDialInfoReceiptTimeMs - : validateDialInfoReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - localSubkeyCacheSize: null == localSubkeyCacheSize - ? _self.localSubkeyCacheSize - : localSubkeyCacheSize // ignore: cast_nullable_to_non_nullable - as int, - localMaxSubkeyCacheMemoryMb: null == localMaxSubkeyCacheMemoryMb - ? _self.localMaxSubkeyCacheMemoryMb - : localMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable - as int, - remoteSubkeyCacheSize: null == remoteSubkeyCacheSize - ? _self.remoteSubkeyCacheSize - : remoteSubkeyCacheSize // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxRecords: null == remoteMaxRecords - ? _self.remoteMaxRecords - : remoteMaxRecords // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxSubkeyCacheMemoryMb: null == remoteMaxSubkeyCacheMemoryMb - ? _self.remoteMaxSubkeyCacheMemoryMb - : remoteMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxStorageSpaceMb: null == remoteMaxStorageSpaceMb - ? _self.remoteMaxStorageSpaceMb - : remoteMaxStorageSpaceMb // ignore: cast_nullable_to_non_nullable - as int, - publicWatchLimit: null == publicWatchLimit - ? _self.publicWatchLimit - : publicWatchLimit // ignore: cast_nullable_to_non_nullable - as int, - memberWatchLimit: null == memberWatchLimit - ? _self.memberWatchLimit - : memberWatchLimit // ignore: cast_nullable_to_non_nullable - as int, - maxWatchExpirationMs: null == maxWatchExpirationMs - ? _self.maxWatchExpirationMs - : maxWatchExpirationMs // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigDHT +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? resolveNodeTimeoutMs = null,Object? resolveNodeCount = null,Object? resolveNodeFanout = null,Object? maxFindNodeCount = null,Object? getValueTimeoutMs = null,Object? getValueCount = null,Object? getValueFanout = null,Object? setValueTimeoutMs = null,Object? setValueCount = null,Object? setValueFanout = null,Object? minPeerCount = null,Object? minPeerRefreshTimeMs = null,Object? validateDialInfoReceiptTimeMs = null,Object? localSubkeyCacheSize = null,Object? localMaxSubkeyCacheMemoryMb = null,Object? remoteSubkeyCacheSize = null,Object? remoteMaxRecords = null,Object? remoteMaxSubkeyCacheMemoryMb = null,Object? remoteMaxStorageSpaceMb = null,Object? publicWatchLimit = null,Object? memberWatchLimit = null,Object? maxWatchExpirationMs = null,}) { + return _then(_self.copyWith( +resolveNodeTimeoutMs: null == resolveNodeTimeoutMs ? _self.resolveNodeTimeoutMs : resolveNodeTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,resolveNodeCount: null == resolveNodeCount ? _self.resolveNodeCount : resolveNodeCount // ignore: cast_nullable_to_non_nullable +as int,resolveNodeFanout: null == resolveNodeFanout ? _self.resolveNodeFanout : resolveNodeFanout // ignore: cast_nullable_to_non_nullable +as int,maxFindNodeCount: null == maxFindNodeCount ? _self.maxFindNodeCount : maxFindNodeCount // ignore: cast_nullable_to_non_nullable +as int,getValueTimeoutMs: null == getValueTimeoutMs ? _self.getValueTimeoutMs : getValueTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,getValueCount: null == getValueCount ? _self.getValueCount : getValueCount // ignore: cast_nullable_to_non_nullable +as int,getValueFanout: null == getValueFanout ? _self.getValueFanout : getValueFanout // ignore: cast_nullable_to_non_nullable +as int,setValueTimeoutMs: null == setValueTimeoutMs ? _self.setValueTimeoutMs : setValueTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,setValueCount: null == setValueCount ? _self.setValueCount : setValueCount // ignore: cast_nullable_to_non_nullable +as int,setValueFanout: null == setValueFanout ? _self.setValueFanout : setValueFanout // ignore: cast_nullable_to_non_nullable +as int,minPeerCount: null == minPeerCount ? _self.minPeerCount : minPeerCount // ignore: cast_nullable_to_non_nullable +as int,minPeerRefreshTimeMs: null == minPeerRefreshTimeMs ? _self.minPeerRefreshTimeMs : minPeerRefreshTimeMs // ignore: cast_nullable_to_non_nullable +as int,validateDialInfoReceiptTimeMs: null == validateDialInfoReceiptTimeMs ? _self.validateDialInfoReceiptTimeMs : validateDialInfoReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,localSubkeyCacheSize: null == localSubkeyCacheSize ? _self.localSubkeyCacheSize : localSubkeyCacheSize // ignore: cast_nullable_to_non_nullable +as int,localMaxSubkeyCacheMemoryMb: null == localMaxSubkeyCacheMemoryMb ? _self.localMaxSubkeyCacheMemoryMb : localMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable +as int,remoteSubkeyCacheSize: null == remoteSubkeyCacheSize ? _self.remoteSubkeyCacheSize : remoteSubkeyCacheSize // ignore: cast_nullable_to_non_nullable +as int,remoteMaxRecords: null == remoteMaxRecords ? _self.remoteMaxRecords : remoteMaxRecords // ignore: cast_nullable_to_non_nullable +as int,remoteMaxSubkeyCacheMemoryMb: null == remoteMaxSubkeyCacheMemoryMb ? _self.remoteMaxSubkeyCacheMemoryMb : remoteMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable +as int,remoteMaxStorageSpaceMb: null == remoteMaxStorageSpaceMb ? _self.remoteMaxStorageSpaceMb : remoteMaxStorageSpaceMb // ignore: cast_nullable_to_non_nullable +as int,publicWatchLimit: null == publicWatchLimit ? _self.publicWatchLimit : publicWatchLimit // ignore: cast_nullable_to_non_nullable +as int,memberWatchLimit: null == memberWatchLimit ? _self.memberWatchLimit : memberWatchLimit // ignore: cast_nullable_to_non_nullable +as int,maxWatchExpirationMs: null == maxWatchExpirationMs ? _self.maxWatchExpirationMs : maxWatchExpirationMs // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigDHT]. +extension VeilidConfigDHTPatterns on VeilidConfigDHT { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigDHT value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigDHT() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigDHT value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigDHT(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigDHT value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigDHT() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int resolveNodeTimeoutMs, int resolveNodeCount, int resolveNodeFanout, int maxFindNodeCount, int getValueTimeoutMs, int getValueCount, int getValueFanout, int setValueTimeoutMs, int setValueCount, int setValueFanout, int minPeerCount, int minPeerRefreshTimeMs, int validateDialInfoReceiptTimeMs, int localSubkeyCacheSize, int localMaxSubkeyCacheMemoryMb, int remoteSubkeyCacheSize, int remoteMaxRecords, int remoteMaxSubkeyCacheMemoryMb, int remoteMaxStorageSpaceMb, int publicWatchLimit, int memberWatchLimit, int maxWatchExpirationMs)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigDHT() when $default != null: +return $default(_that.resolveNodeTimeoutMs,_that.resolveNodeCount,_that.resolveNodeFanout,_that.maxFindNodeCount,_that.getValueTimeoutMs,_that.getValueCount,_that.getValueFanout,_that.setValueTimeoutMs,_that.setValueCount,_that.setValueFanout,_that.minPeerCount,_that.minPeerRefreshTimeMs,_that.validateDialInfoReceiptTimeMs,_that.localSubkeyCacheSize,_that.localMaxSubkeyCacheMemoryMb,_that.remoteSubkeyCacheSize,_that.remoteMaxRecords,_that.remoteMaxSubkeyCacheMemoryMb,_that.remoteMaxStorageSpaceMb,_that.publicWatchLimit,_that.memberWatchLimit,_that.maxWatchExpirationMs);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int resolveNodeTimeoutMs, int resolveNodeCount, int resolveNodeFanout, int maxFindNodeCount, int getValueTimeoutMs, int getValueCount, int getValueFanout, int setValueTimeoutMs, int setValueCount, int setValueFanout, int minPeerCount, int minPeerRefreshTimeMs, int validateDialInfoReceiptTimeMs, int localSubkeyCacheSize, int localMaxSubkeyCacheMemoryMb, int remoteSubkeyCacheSize, int remoteMaxRecords, int remoteMaxSubkeyCacheMemoryMb, int remoteMaxStorageSpaceMb, int publicWatchLimit, int memberWatchLimit, int maxWatchExpirationMs) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigDHT(): +return $default(_that.resolveNodeTimeoutMs,_that.resolveNodeCount,_that.resolveNodeFanout,_that.maxFindNodeCount,_that.getValueTimeoutMs,_that.getValueCount,_that.getValueFanout,_that.setValueTimeoutMs,_that.setValueCount,_that.setValueFanout,_that.minPeerCount,_that.minPeerRefreshTimeMs,_that.validateDialInfoReceiptTimeMs,_that.localSubkeyCacheSize,_that.localMaxSubkeyCacheMemoryMb,_that.remoteSubkeyCacheSize,_that.remoteMaxRecords,_that.remoteMaxSubkeyCacheMemoryMb,_that.remoteMaxStorageSpaceMb,_that.publicWatchLimit,_that.memberWatchLimit,_that.maxWatchExpirationMs);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int resolveNodeTimeoutMs, int resolveNodeCount, int resolveNodeFanout, int maxFindNodeCount, int getValueTimeoutMs, int getValueCount, int getValueFanout, int setValueTimeoutMs, int setValueCount, int setValueFanout, int minPeerCount, int minPeerRefreshTimeMs, int validateDialInfoReceiptTimeMs, int localSubkeyCacheSize, int localMaxSubkeyCacheMemoryMb, int remoteSubkeyCacheSize, int remoteMaxRecords, int remoteMaxSubkeyCacheMemoryMb, int remoteMaxStorageSpaceMb, int publicWatchLimit, int memberWatchLimit, int maxWatchExpirationMs)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigDHT() when $default != null: +return $default(_that.resolveNodeTimeoutMs,_that.resolveNodeCount,_that.resolveNodeFanout,_that.maxFindNodeCount,_that.getValueTimeoutMs,_that.getValueCount,_that.getValueFanout,_that.setValueTimeoutMs,_that.setValueCount,_that.setValueFanout,_that.minPeerCount,_that.minPeerRefreshTimeMs,_that.validateDialInfoReceiptTimeMs,_that.localSubkeyCacheSize,_that.localMaxSubkeyCacheMemoryMb,_that.remoteSubkeyCacheSize,_that.remoteMaxRecords,_that.remoteMaxSubkeyCacheMemoryMb,_that.remoteMaxStorageSpaceMb,_that.publicWatchLimit,_that.memberWatchLimit,_that.maxWatchExpirationMs);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigDHT with DiagnosticableTreeMixin implements VeilidConfigDHT { - const _VeilidConfigDHT( - {required this.resolveNodeTimeoutMs, - required this.resolveNodeCount, - required this.resolveNodeFanout, - required this.maxFindNodeCount, - required this.getValueTimeoutMs, - required this.getValueCount, - required this.getValueFanout, - required this.setValueTimeoutMs, - required this.setValueCount, - required this.setValueFanout, - required this.minPeerCount, - required this.minPeerRefreshTimeMs, - required this.validateDialInfoReceiptTimeMs, - required this.localSubkeyCacheSize, - required this.localMaxSubkeyCacheMemoryMb, - required this.remoteSubkeyCacheSize, - required this.remoteMaxRecords, - required this.remoteMaxSubkeyCacheMemoryMb, - required this.remoteMaxStorageSpaceMb, - required this.publicWatchLimit, - required this.memberWatchLimit, - required this.maxWatchExpirationMs}); - factory _VeilidConfigDHT.fromJson(Map json) => - _$VeilidConfigDHTFromJson(json); + const _VeilidConfigDHT({required this.resolveNodeTimeoutMs, required this.resolveNodeCount, required this.resolveNodeFanout, required this.maxFindNodeCount, required this.getValueTimeoutMs, required this.getValueCount, required this.getValueFanout, required this.setValueTimeoutMs, required this.setValueCount, required this.setValueFanout, required this.minPeerCount, required this.minPeerRefreshTimeMs, required this.validateDialInfoReceiptTimeMs, required this.localSubkeyCacheSize, required this.localMaxSubkeyCacheMemoryMb, required this.remoteSubkeyCacheSize, required this.remoteMaxRecords, required this.remoteMaxSubkeyCacheMemoryMb, required this.remoteMaxStorageSpaceMb, required this.publicWatchLimit, required this.memberWatchLimit, required this.maxWatchExpirationMs}); + factory _VeilidConfigDHT.fromJson(Map json) => _$VeilidConfigDHTFromJson(json); - @override - final int resolveNodeTimeoutMs; - @override - final int resolveNodeCount; - @override - final int resolveNodeFanout; - @override - final int maxFindNodeCount; - @override - final int getValueTimeoutMs; - @override - final int getValueCount; - @override - final int getValueFanout; - @override - final int setValueTimeoutMs; - @override - final int setValueCount; - @override - final int setValueFanout; - @override - final int minPeerCount; - @override - final int minPeerRefreshTimeMs; - @override - final int validateDialInfoReceiptTimeMs; - @override - final int localSubkeyCacheSize; - @override - final int localMaxSubkeyCacheMemoryMb; - @override - final int remoteSubkeyCacheSize; - @override - final int remoteMaxRecords; - @override - final int remoteMaxSubkeyCacheMemoryMb; - @override - final int remoteMaxStorageSpaceMb; - @override - final int publicWatchLimit; - @override - final int memberWatchLimit; - @override - final int maxWatchExpirationMs; +@override final int resolveNodeTimeoutMs; +@override final int resolveNodeCount; +@override final int resolveNodeFanout; +@override final int maxFindNodeCount; +@override final int getValueTimeoutMs; +@override final int getValueCount; +@override final int getValueFanout; +@override final int setValueTimeoutMs; +@override final int setValueCount; +@override final int setValueFanout; +@override final int minPeerCount; +@override final int minPeerRefreshTimeMs; +@override final int validateDialInfoReceiptTimeMs; +@override final int localSubkeyCacheSize; +@override final int localMaxSubkeyCacheMemoryMb; +@override final int remoteSubkeyCacheSize; +@override final int remoteMaxRecords; +@override final int remoteMaxSubkeyCacheMemoryMb; +@override final int remoteMaxStorageSpaceMb; +@override final int publicWatchLimit; +@override final int memberWatchLimit; +@override final int maxWatchExpirationMs; - /// Create a copy of VeilidConfigDHT - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigDHTCopyWith<_VeilidConfigDHT> get copyWith => - __$VeilidConfigDHTCopyWithImpl<_VeilidConfigDHT>(this, _$identity); +/// Create a copy of VeilidConfigDHT +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigDHTCopyWith<_VeilidConfigDHT> get copyWith => __$VeilidConfigDHTCopyWithImpl<_VeilidConfigDHT>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigDHTToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigDHTToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigDHT')) + ..add(DiagnosticsProperty('resolveNodeTimeoutMs', resolveNodeTimeoutMs))..add(DiagnosticsProperty('resolveNodeCount', resolveNodeCount))..add(DiagnosticsProperty('resolveNodeFanout', resolveNodeFanout))..add(DiagnosticsProperty('maxFindNodeCount', maxFindNodeCount))..add(DiagnosticsProperty('getValueTimeoutMs', getValueTimeoutMs))..add(DiagnosticsProperty('getValueCount', getValueCount))..add(DiagnosticsProperty('getValueFanout', getValueFanout))..add(DiagnosticsProperty('setValueTimeoutMs', setValueTimeoutMs))..add(DiagnosticsProperty('setValueCount', setValueCount))..add(DiagnosticsProperty('setValueFanout', setValueFanout))..add(DiagnosticsProperty('minPeerCount', minPeerCount))..add(DiagnosticsProperty('minPeerRefreshTimeMs', minPeerRefreshTimeMs))..add(DiagnosticsProperty('validateDialInfoReceiptTimeMs', validateDialInfoReceiptTimeMs))..add(DiagnosticsProperty('localSubkeyCacheSize', localSubkeyCacheSize))..add(DiagnosticsProperty('localMaxSubkeyCacheMemoryMb', localMaxSubkeyCacheMemoryMb))..add(DiagnosticsProperty('remoteSubkeyCacheSize', remoteSubkeyCacheSize))..add(DiagnosticsProperty('remoteMaxRecords', remoteMaxRecords))..add(DiagnosticsProperty('remoteMaxSubkeyCacheMemoryMb', remoteMaxSubkeyCacheMemoryMb))..add(DiagnosticsProperty('remoteMaxStorageSpaceMb', remoteMaxStorageSpaceMb))..add(DiagnosticsProperty('publicWatchLimit', publicWatchLimit))..add(DiagnosticsProperty('memberWatchLimit', memberWatchLimit))..add(DiagnosticsProperty('maxWatchExpirationMs', maxWatchExpirationMs)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigDHT')) - ..add(DiagnosticsProperty('resolveNodeTimeoutMs', resolveNodeTimeoutMs)) - ..add(DiagnosticsProperty('resolveNodeCount', resolveNodeCount)) - ..add(DiagnosticsProperty('resolveNodeFanout', resolveNodeFanout)) - ..add(DiagnosticsProperty('maxFindNodeCount', maxFindNodeCount)) - ..add(DiagnosticsProperty('getValueTimeoutMs', getValueTimeoutMs)) - ..add(DiagnosticsProperty('getValueCount', getValueCount)) - ..add(DiagnosticsProperty('getValueFanout', getValueFanout)) - ..add(DiagnosticsProperty('setValueTimeoutMs', setValueTimeoutMs)) - ..add(DiagnosticsProperty('setValueCount', setValueCount)) - ..add(DiagnosticsProperty('setValueFanout', setValueFanout)) - ..add(DiagnosticsProperty('minPeerCount', minPeerCount)) - ..add(DiagnosticsProperty('minPeerRefreshTimeMs', minPeerRefreshTimeMs)) - ..add(DiagnosticsProperty( - 'validateDialInfoReceiptTimeMs', validateDialInfoReceiptTimeMs)) - ..add(DiagnosticsProperty('localSubkeyCacheSize', localSubkeyCacheSize)) - ..add(DiagnosticsProperty( - 'localMaxSubkeyCacheMemoryMb', localMaxSubkeyCacheMemoryMb)) - ..add(DiagnosticsProperty('remoteSubkeyCacheSize', remoteSubkeyCacheSize)) - ..add(DiagnosticsProperty('remoteMaxRecords', remoteMaxRecords)) - ..add(DiagnosticsProperty( - 'remoteMaxSubkeyCacheMemoryMb', remoteMaxSubkeyCacheMemoryMb)) - ..add(DiagnosticsProperty( - 'remoteMaxStorageSpaceMb', remoteMaxStorageSpaceMb)) - ..add(DiagnosticsProperty('publicWatchLimit', publicWatchLimit)) - ..add(DiagnosticsProperty('memberWatchLimit', memberWatchLimit)) - ..add(DiagnosticsProperty('maxWatchExpirationMs', maxWatchExpirationMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigDHT&&(identical(other.resolveNodeTimeoutMs, resolveNodeTimeoutMs) || other.resolveNodeTimeoutMs == resolveNodeTimeoutMs)&&(identical(other.resolveNodeCount, resolveNodeCount) || other.resolveNodeCount == resolveNodeCount)&&(identical(other.resolveNodeFanout, resolveNodeFanout) || other.resolveNodeFanout == resolveNodeFanout)&&(identical(other.maxFindNodeCount, maxFindNodeCount) || other.maxFindNodeCount == maxFindNodeCount)&&(identical(other.getValueTimeoutMs, getValueTimeoutMs) || other.getValueTimeoutMs == getValueTimeoutMs)&&(identical(other.getValueCount, getValueCount) || other.getValueCount == getValueCount)&&(identical(other.getValueFanout, getValueFanout) || other.getValueFanout == getValueFanout)&&(identical(other.setValueTimeoutMs, setValueTimeoutMs) || other.setValueTimeoutMs == setValueTimeoutMs)&&(identical(other.setValueCount, setValueCount) || other.setValueCount == setValueCount)&&(identical(other.setValueFanout, setValueFanout) || other.setValueFanout == setValueFanout)&&(identical(other.minPeerCount, minPeerCount) || other.minPeerCount == minPeerCount)&&(identical(other.minPeerRefreshTimeMs, minPeerRefreshTimeMs) || other.minPeerRefreshTimeMs == minPeerRefreshTimeMs)&&(identical(other.validateDialInfoReceiptTimeMs, validateDialInfoReceiptTimeMs) || other.validateDialInfoReceiptTimeMs == validateDialInfoReceiptTimeMs)&&(identical(other.localSubkeyCacheSize, localSubkeyCacheSize) || other.localSubkeyCacheSize == localSubkeyCacheSize)&&(identical(other.localMaxSubkeyCacheMemoryMb, localMaxSubkeyCacheMemoryMb) || other.localMaxSubkeyCacheMemoryMb == localMaxSubkeyCacheMemoryMb)&&(identical(other.remoteSubkeyCacheSize, remoteSubkeyCacheSize) || other.remoteSubkeyCacheSize == remoteSubkeyCacheSize)&&(identical(other.remoteMaxRecords, remoteMaxRecords) || other.remoteMaxRecords == remoteMaxRecords)&&(identical(other.remoteMaxSubkeyCacheMemoryMb, remoteMaxSubkeyCacheMemoryMb) || other.remoteMaxSubkeyCacheMemoryMb == remoteMaxSubkeyCacheMemoryMb)&&(identical(other.remoteMaxStorageSpaceMb, remoteMaxStorageSpaceMb) || other.remoteMaxStorageSpaceMb == remoteMaxStorageSpaceMb)&&(identical(other.publicWatchLimit, publicWatchLimit) || other.publicWatchLimit == publicWatchLimit)&&(identical(other.memberWatchLimit, memberWatchLimit) || other.memberWatchLimit == memberWatchLimit)&&(identical(other.maxWatchExpirationMs, maxWatchExpirationMs) || other.maxWatchExpirationMs == maxWatchExpirationMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigDHT && - (identical(other.resolveNodeTimeoutMs, resolveNodeTimeoutMs) || - other.resolveNodeTimeoutMs == resolveNodeTimeoutMs) && - (identical(other.resolveNodeCount, resolveNodeCount) || - other.resolveNodeCount == resolveNodeCount) && - (identical(other.resolveNodeFanout, resolveNodeFanout) || - other.resolveNodeFanout == resolveNodeFanout) && - (identical(other.maxFindNodeCount, maxFindNodeCount) || - other.maxFindNodeCount == maxFindNodeCount) && - (identical(other.getValueTimeoutMs, getValueTimeoutMs) || - other.getValueTimeoutMs == getValueTimeoutMs) && - (identical(other.getValueCount, getValueCount) || - other.getValueCount == getValueCount) && - (identical(other.getValueFanout, getValueFanout) || - other.getValueFanout == getValueFanout) && - (identical(other.setValueTimeoutMs, setValueTimeoutMs) || - other.setValueTimeoutMs == setValueTimeoutMs) && - (identical(other.setValueCount, setValueCount) || - other.setValueCount == setValueCount) && - (identical(other.setValueFanout, setValueFanout) || - other.setValueFanout == setValueFanout) && - (identical(other.minPeerCount, minPeerCount) || - other.minPeerCount == minPeerCount) && - (identical(other.minPeerRefreshTimeMs, minPeerRefreshTimeMs) || - other.minPeerRefreshTimeMs == minPeerRefreshTimeMs) && - (identical(other.validateDialInfoReceiptTimeMs, - validateDialInfoReceiptTimeMs) || - other.validateDialInfoReceiptTimeMs == - validateDialInfoReceiptTimeMs) && - (identical(other.localSubkeyCacheSize, localSubkeyCacheSize) || - other.localSubkeyCacheSize == localSubkeyCacheSize) && - (identical(other.localMaxSubkeyCacheMemoryMb, - localMaxSubkeyCacheMemoryMb) || - other.localMaxSubkeyCacheMemoryMb == - localMaxSubkeyCacheMemoryMb) && - (identical(other.remoteSubkeyCacheSize, remoteSubkeyCacheSize) || - other.remoteSubkeyCacheSize == remoteSubkeyCacheSize) && - (identical(other.remoteMaxRecords, remoteMaxRecords) || - other.remoteMaxRecords == remoteMaxRecords) && - (identical(other.remoteMaxSubkeyCacheMemoryMb, - remoteMaxSubkeyCacheMemoryMb) || - other.remoteMaxSubkeyCacheMemoryMb == - remoteMaxSubkeyCacheMemoryMb) && - (identical(other.remoteMaxStorageSpaceMb, remoteMaxStorageSpaceMb) || - other.remoteMaxStorageSpaceMb == remoteMaxStorageSpaceMb) && - (identical(other.publicWatchLimit, publicWatchLimit) || - other.publicWatchLimit == publicWatchLimit) && - (identical(other.memberWatchLimit, memberWatchLimit) || - other.memberWatchLimit == memberWatchLimit) && - (identical(other.maxWatchExpirationMs, maxWatchExpirationMs) || - other.maxWatchExpirationMs == maxWatchExpirationMs)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,resolveNodeTimeoutMs,resolveNodeCount,resolveNodeFanout,maxFindNodeCount,getValueTimeoutMs,getValueCount,getValueFanout,setValueTimeoutMs,setValueCount,setValueFanout,minPeerCount,minPeerRefreshTimeMs,validateDialInfoReceiptTimeMs,localSubkeyCacheSize,localMaxSubkeyCacheMemoryMb,remoteSubkeyCacheSize,remoteMaxRecords,remoteMaxSubkeyCacheMemoryMb,remoteMaxStorageSpaceMb,publicWatchLimit,memberWatchLimit,maxWatchExpirationMs]); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigDHT(resolveNodeTimeoutMs: $resolveNodeTimeoutMs, resolveNodeCount: $resolveNodeCount, resolveNodeFanout: $resolveNodeFanout, maxFindNodeCount: $maxFindNodeCount, getValueTimeoutMs: $getValueTimeoutMs, getValueCount: $getValueCount, getValueFanout: $getValueFanout, setValueTimeoutMs: $setValueTimeoutMs, setValueCount: $setValueCount, setValueFanout: $setValueFanout, minPeerCount: $minPeerCount, minPeerRefreshTimeMs: $minPeerRefreshTimeMs, validateDialInfoReceiptTimeMs: $validateDialInfoReceiptTimeMs, localSubkeyCacheSize: $localSubkeyCacheSize, localMaxSubkeyCacheMemoryMb: $localMaxSubkeyCacheMemoryMb, remoteSubkeyCacheSize: $remoteSubkeyCacheSize, remoteMaxRecords: $remoteMaxRecords, remoteMaxSubkeyCacheMemoryMb: $remoteMaxSubkeyCacheMemoryMb, remoteMaxStorageSpaceMb: $remoteMaxStorageSpaceMb, publicWatchLimit: $publicWatchLimit, memberWatchLimit: $memberWatchLimit, maxWatchExpirationMs: $maxWatchExpirationMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hashAll([ - runtimeType, - resolveNodeTimeoutMs, - resolveNodeCount, - resolveNodeFanout, - maxFindNodeCount, - getValueTimeoutMs, - getValueCount, - getValueFanout, - setValueTimeoutMs, - setValueCount, - setValueFanout, - minPeerCount, - minPeerRefreshTimeMs, - validateDialInfoReceiptTimeMs, - localSubkeyCacheSize, - localMaxSubkeyCacheMemoryMb, - remoteSubkeyCacheSize, - remoteMaxRecords, - remoteMaxSubkeyCacheMemoryMb, - remoteMaxStorageSpaceMb, - publicWatchLimit, - memberWatchLimit, - maxWatchExpirationMs - ]); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigDHT(resolveNodeTimeoutMs: $resolveNodeTimeoutMs, resolveNodeCount: $resolveNodeCount, resolveNodeFanout: $resolveNodeFanout, maxFindNodeCount: $maxFindNodeCount, getValueTimeoutMs: $getValueTimeoutMs, getValueCount: $getValueCount, getValueFanout: $getValueFanout, setValueTimeoutMs: $setValueTimeoutMs, setValueCount: $setValueCount, setValueFanout: $setValueFanout, minPeerCount: $minPeerCount, minPeerRefreshTimeMs: $minPeerRefreshTimeMs, validateDialInfoReceiptTimeMs: $validateDialInfoReceiptTimeMs, localSubkeyCacheSize: $localSubkeyCacheSize, localMaxSubkeyCacheMemoryMb: $localMaxSubkeyCacheMemoryMb, remoteSubkeyCacheSize: $remoteSubkeyCacheSize, remoteMaxRecords: $remoteMaxRecords, remoteMaxSubkeyCacheMemoryMb: $remoteMaxSubkeyCacheMemoryMb, remoteMaxStorageSpaceMb: $remoteMaxStorageSpaceMb, publicWatchLimit: $publicWatchLimit, memberWatchLimit: $memberWatchLimit, maxWatchExpirationMs: $maxWatchExpirationMs)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigDHTCopyWith<$Res> - implements $VeilidConfigDHTCopyWith<$Res> { - factory _$VeilidConfigDHTCopyWith( - _VeilidConfigDHT value, $Res Function(_VeilidConfigDHT) _then) = - __$VeilidConfigDHTCopyWithImpl; - @override - @useResult - $Res call( - {int resolveNodeTimeoutMs, - int resolveNodeCount, - int resolveNodeFanout, - int maxFindNodeCount, - int getValueTimeoutMs, - int getValueCount, - int getValueFanout, - int setValueTimeoutMs, - int setValueCount, - int setValueFanout, - int minPeerCount, - int minPeerRefreshTimeMs, - int validateDialInfoReceiptTimeMs, - int localSubkeyCacheSize, - int localMaxSubkeyCacheMemoryMb, - int remoteSubkeyCacheSize, - int remoteMaxRecords, - int remoteMaxSubkeyCacheMemoryMb, - int remoteMaxStorageSpaceMb, - int publicWatchLimit, - int memberWatchLimit, - int maxWatchExpirationMs}); -} +abstract mixin class _$VeilidConfigDHTCopyWith<$Res> implements $VeilidConfigDHTCopyWith<$Res> { + factory _$VeilidConfigDHTCopyWith(_VeilidConfigDHT value, $Res Function(_VeilidConfigDHT) _then) = __$VeilidConfigDHTCopyWithImpl; +@override @useResult +$Res call({ + int resolveNodeTimeoutMs, int resolveNodeCount, int resolveNodeFanout, int maxFindNodeCount, int getValueTimeoutMs, int getValueCount, int getValueFanout, int setValueTimeoutMs, int setValueCount, int setValueFanout, int minPeerCount, int minPeerRefreshTimeMs, int validateDialInfoReceiptTimeMs, int localSubkeyCacheSize, int localMaxSubkeyCacheMemoryMb, int remoteSubkeyCacheSize, int remoteMaxRecords, int remoteMaxSubkeyCacheMemoryMb, int remoteMaxStorageSpaceMb, int publicWatchLimit, int memberWatchLimit, int maxWatchExpirationMs +}); + + + +} /// @nodoc class __$VeilidConfigDHTCopyWithImpl<$Res> implements _$VeilidConfigDHTCopyWith<$Res> { @@ -5246,216 +6116,89 @@ class __$VeilidConfigDHTCopyWithImpl<$Res> final _VeilidConfigDHT _self; final $Res Function(_VeilidConfigDHT) _then; - /// Create a copy of VeilidConfigDHT - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? resolveNodeTimeoutMs = null, - Object? resolveNodeCount = null, - Object? resolveNodeFanout = null, - Object? maxFindNodeCount = null, - Object? getValueTimeoutMs = null, - Object? getValueCount = null, - Object? getValueFanout = null, - Object? setValueTimeoutMs = null, - Object? setValueCount = null, - Object? setValueFanout = null, - Object? minPeerCount = null, - Object? minPeerRefreshTimeMs = null, - Object? validateDialInfoReceiptTimeMs = null, - Object? localSubkeyCacheSize = null, - Object? localMaxSubkeyCacheMemoryMb = null, - Object? remoteSubkeyCacheSize = null, - Object? remoteMaxRecords = null, - Object? remoteMaxSubkeyCacheMemoryMb = null, - Object? remoteMaxStorageSpaceMb = null, - Object? publicWatchLimit = null, - Object? memberWatchLimit = null, - Object? maxWatchExpirationMs = null, - }) { - return _then(_VeilidConfigDHT( - resolveNodeTimeoutMs: null == resolveNodeTimeoutMs - ? _self.resolveNodeTimeoutMs - : resolveNodeTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - resolveNodeCount: null == resolveNodeCount - ? _self.resolveNodeCount - : resolveNodeCount // ignore: cast_nullable_to_non_nullable - as int, - resolveNodeFanout: null == resolveNodeFanout - ? _self.resolveNodeFanout - : resolveNodeFanout // ignore: cast_nullable_to_non_nullable - as int, - maxFindNodeCount: null == maxFindNodeCount - ? _self.maxFindNodeCount - : maxFindNodeCount // ignore: cast_nullable_to_non_nullable - as int, - getValueTimeoutMs: null == getValueTimeoutMs - ? _self.getValueTimeoutMs - : getValueTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - getValueCount: null == getValueCount - ? _self.getValueCount - : getValueCount // ignore: cast_nullable_to_non_nullable - as int, - getValueFanout: null == getValueFanout - ? _self.getValueFanout - : getValueFanout // ignore: cast_nullable_to_non_nullable - as int, - setValueTimeoutMs: null == setValueTimeoutMs - ? _self.setValueTimeoutMs - : setValueTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - setValueCount: null == setValueCount - ? _self.setValueCount - : setValueCount // ignore: cast_nullable_to_non_nullable - as int, - setValueFanout: null == setValueFanout - ? _self.setValueFanout - : setValueFanout // ignore: cast_nullable_to_non_nullable - as int, - minPeerCount: null == minPeerCount - ? _self.minPeerCount - : minPeerCount // ignore: cast_nullable_to_non_nullable - as int, - minPeerRefreshTimeMs: null == minPeerRefreshTimeMs - ? _self.minPeerRefreshTimeMs - : minPeerRefreshTimeMs // ignore: cast_nullable_to_non_nullable - as int, - validateDialInfoReceiptTimeMs: null == validateDialInfoReceiptTimeMs - ? _self.validateDialInfoReceiptTimeMs - : validateDialInfoReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - localSubkeyCacheSize: null == localSubkeyCacheSize - ? _self.localSubkeyCacheSize - : localSubkeyCacheSize // ignore: cast_nullable_to_non_nullable - as int, - localMaxSubkeyCacheMemoryMb: null == localMaxSubkeyCacheMemoryMb - ? _self.localMaxSubkeyCacheMemoryMb - : localMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable - as int, - remoteSubkeyCacheSize: null == remoteSubkeyCacheSize - ? _self.remoteSubkeyCacheSize - : remoteSubkeyCacheSize // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxRecords: null == remoteMaxRecords - ? _self.remoteMaxRecords - : remoteMaxRecords // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxSubkeyCacheMemoryMb: null == remoteMaxSubkeyCacheMemoryMb - ? _self.remoteMaxSubkeyCacheMemoryMb - : remoteMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable - as int, - remoteMaxStorageSpaceMb: null == remoteMaxStorageSpaceMb - ? _self.remoteMaxStorageSpaceMb - : remoteMaxStorageSpaceMb // ignore: cast_nullable_to_non_nullable - as int, - publicWatchLimit: null == publicWatchLimit - ? _self.publicWatchLimit - : publicWatchLimit // ignore: cast_nullable_to_non_nullable - as int, - memberWatchLimit: null == memberWatchLimit - ? _self.memberWatchLimit - : memberWatchLimit // ignore: cast_nullable_to_non_nullable - as int, - maxWatchExpirationMs: null == maxWatchExpirationMs - ? _self.maxWatchExpirationMs - : maxWatchExpirationMs // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigDHT +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? resolveNodeTimeoutMs = null,Object? resolveNodeCount = null,Object? resolveNodeFanout = null,Object? maxFindNodeCount = null,Object? getValueTimeoutMs = null,Object? getValueCount = null,Object? getValueFanout = null,Object? setValueTimeoutMs = null,Object? setValueCount = null,Object? setValueFanout = null,Object? minPeerCount = null,Object? minPeerRefreshTimeMs = null,Object? validateDialInfoReceiptTimeMs = null,Object? localSubkeyCacheSize = null,Object? localMaxSubkeyCacheMemoryMb = null,Object? remoteSubkeyCacheSize = null,Object? remoteMaxRecords = null,Object? remoteMaxSubkeyCacheMemoryMb = null,Object? remoteMaxStorageSpaceMb = null,Object? publicWatchLimit = null,Object? memberWatchLimit = null,Object? maxWatchExpirationMs = null,}) { + return _then(_VeilidConfigDHT( +resolveNodeTimeoutMs: null == resolveNodeTimeoutMs ? _self.resolveNodeTimeoutMs : resolveNodeTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,resolveNodeCount: null == resolveNodeCount ? _self.resolveNodeCount : resolveNodeCount // ignore: cast_nullable_to_non_nullable +as int,resolveNodeFanout: null == resolveNodeFanout ? _self.resolveNodeFanout : resolveNodeFanout // ignore: cast_nullable_to_non_nullable +as int,maxFindNodeCount: null == maxFindNodeCount ? _self.maxFindNodeCount : maxFindNodeCount // ignore: cast_nullable_to_non_nullable +as int,getValueTimeoutMs: null == getValueTimeoutMs ? _self.getValueTimeoutMs : getValueTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,getValueCount: null == getValueCount ? _self.getValueCount : getValueCount // ignore: cast_nullable_to_non_nullable +as int,getValueFanout: null == getValueFanout ? _self.getValueFanout : getValueFanout // ignore: cast_nullable_to_non_nullable +as int,setValueTimeoutMs: null == setValueTimeoutMs ? _self.setValueTimeoutMs : setValueTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,setValueCount: null == setValueCount ? _self.setValueCount : setValueCount // ignore: cast_nullable_to_non_nullable +as int,setValueFanout: null == setValueFanout ? _self.setValueFanout : setValueFanout // ignore: cast_nullable_to_non_nullable +as int,minPeerCount: null == minPeerCount ? _self.minPeerCount : minPeerCount // ignore: cast_nullable_to_non_nullable +as int,minPeerRefreshTimeMs: null == minPeerRefreshTimeMs ? _self.minPeerRefreshTimeMs : minPeerRefreshTimeMs // ignore: cast_nullable_to_non_nullable +as int,validateDialInfoReceiptTimeMs: null == validateDialInfoReceiptTimeMs ? _self.validateDialInfoReceiptTimeMs : validateDialInfoReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,localSubkeyCacheSize: null == localSubkeyCacheSize ? _self.localSubkeyCacheSize : localSubkeyCacheSize // ignore: cast_nullable_to_non_nullable +as int,localMaxSubkeyCacheMemoryMb: null == localMaxSubkeyCacheMemoryMb ? _self.localMaxSubkeyCacheMemoryMb : localMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable +as int,remoteSubkeyCacheSize: null == remoteSubkeyCacheSize ? _self.remoteSubkeyCacheSize : remoteSubkeyCacheSize // ignore: cast_nullable_to_non_nullable +as int,remoteMaxRecords: null == remoteMaxRecords ? _self.remoteMaxRecords : remoteMaxRecords // ignore: cast_nullable_to_non_nullable +as int,remoteMaxSubkeyCacheMemoryMb: null == remoteMaxSubkeyCacheMemoryMb ? _self.remoteMaxSubkeyCacheMemoryMb : remoteMaxSubkeyCacheMemoryMb // ignore: cast_nullable_to_non_nullable +as int,remoteMaxStorageSpaceMb: null == remoteMaxStorageSpaceMb ? _self.remoteMaxStorageSpaceMb : remoteMaxStorageSpaceMb // ignore: cast_nullable_to_non_nullable +as int,publicWatchLimit: null == publicWatchLimit ? _self.publicWatchLimit : publicWatchLimit // ignore: cast_nullable_to_non_nullable +as int,memberWatchLimit: null == memberWatchLimit ? _self.memberWatchLimit : memberWatchLimit // ignore: cast_nullable_to_non_nullable +as int,maxWatchExpirationMs: null == maxWatchExpirationMs ? _self.maxWatchExpirationMs : maxWatchExpirationMs // ignore: cast_nullable_to_non_nullable +as int, + )); } + +} + + /// @nodoc mixin _$VeilidConfigRPC implements DiagnosticableTreeMixin { - int get concurrency; - int get queueSize; - int get timeoutMs; - int get maxRouteHopCount; - int get defaultRouteHopCount; - int? get maxTimestampBehindMs; - int? get maxTimestampAheadMs; - /// Create a copy of VeilidConfigRPC - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigRPCCopyWith get copyWith => - _$VeilidConfigRPCCopyWithImpl( - this as VeilidConfigRPC, _$identity); + int get concurrency; int get queueSize; int get timeoutMs; int get maxRouteHopCount; int get defaultRouteHopCount; int? get maxTimestampBehindMs; int? get maxTimestampAheadMs; +/// Create a copy of VeilidConfigRPC +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigRPCCopyWith get copyWith => _$VeilidConfigRPCCopyWithImpl(this as VeilidConfigRPC, _$identity); /// Serializes this VeilidConfigRPC to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigRPC')) - ..add(DiagnosticsProperty('concurrency', concurrency)) - ..add(DiagnosticsProperty('queueSize', queueSize)) - ..add(DiagnosticsProperty('timeoutMs', timeoutMs)) - ..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount)) - ..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount)) - ..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs)) - ..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigRPC')) + ..add(DiagnosticsProperty('concurrency', concurrency))..add(DiagnosticsProperty('queueSize', queueSize))..add(DiagnosticsProperty('timeoutMs', timeoutMs))..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount))..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount))..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs))..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigRPC && - (identical(other.concurrency, concurrency) || - other.concurrency == concurrency) && - (identical(other.queueSize, queueSize) || - other.queueSize == queueSize) && - (identical(other.timeoutMs, timeoutMs) || - other.timeoutMs == timeoutMs) && - (identical(other.maxRouteHopCount, maxRouteHopCount) || - other.maxRouteHopCount == maxRouteHopCount) && - (identical(other.defaultRouteHopCount, defaultRouteHopCount) || - other.defaultRouteHopCount == defaultRouteHopCount) && - (identical(other.maxTimestampBehindMs, maxTimestampBehindMs) || - other.maxTimestampBehindMs == maxTimestampBehindMs) && - (identical(other.maxTimestampAheadMs, maxTimestampAheadMs) || - other.maxTimestampAheadMs == maxTimestampAheadMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigRPC&&(identical(other.concurrency, concurrency) || other.concurrency == concurrency)&&(identical(other.queueSize, queueSize) || other.queueSize == queueSize)&&(identical(other.timeoutMs, timeoutMs) || other.timeoutMs == timeoutMs)&&(identical(other.maxRouteHopCount, maxRouteHopCount) || other.maxRouteHopCount == maxRouteHopCount)&&(identical(other.defaultRouteHopCount, defaultRouteHopCount) || other.defaultRouteHopCount == defaultRouteHopCount)&&(identical(other.maxTimestampBehindMs, maxTimestampBehindMs) || other.maxTimestampBehindMs == maxTimestampBehindMs)&&(identical(other.maxTimestampAheadMs, maxTimestampAheadMs) || other.maxTimestampAheadMs == maxTimestampAheadMs)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,concurrency,queueSize,timeoutMs,maxRouteHopCount,defaultRouteHopCount,maxTimestampBehindMs,maxTimestampAheadMs); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - concurrency, - queueSize, - timeoutMs, - maxRouteHopCount, - defaultRouteHopCount, - maxTimestampBehindMs, - maxTimestampAheadMs); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs)'; - } } /// @nodoc -abstract mixin class $VeilidConfigRPCCopyWith<$Res> { - factory $VeilidConfigRPCCopyWith( - VeilidConfigRPC value, $Res Function(VeilidConfigRPC) _then) = - _$VeilidConfigRPCCopyWithImpl; - @useResult - $Res call( - {int concurrency, - int queueSize, - int timeoutMs, - int maxRouteHopCount, - int defaultRouteHopCount, - int? maxTimestampBehindMs, - int? maxTimestampAheadMs}); -} +abstract mixin class $VeilidConfigRPCCopyWith<$Res> { + factory $VeilidConfigRPCCopyWith(VeilidConfigRPC value, $Res Function(VeilidConfigRPC) _then) = _$VeilidConfigRPCCopyWithImpl; +@useResult +$Res call({ + int concurrency, int queueSize, int timeoutMs, int maxRouteHopCount, int defaultRouteHopCount, int? maxTimestampBehindMs, int? maxTimestampAheadMs +}); + + + +} /// @nodoc class _$VeilidConfigRPCCopyWithImpl<$Res> implements $VeilidConfigRPCCopyWith<$Res> { @@ -5464,166 +6207,209 @@ class _$VeilidConfigRPCCopyWithImpl<$Res> final VeilidConfigRPC _self; final $Res Function(VeilidConfigRPC) _then; - /// Create a copy of VeilidConfigRPC - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? concurrency = null, - Object? queueSize = null, - Object? timeoutMs = null, - Object? maxRouteHopCount = null, - Object? defaultRouteHopCount = null, - Object? maxTimestampBehindMs = freezed, - Object? maxTimestampAheadMs = freezed, - }) { - return _then(_self.copyWith( - concurrency: null == concurrency - ? _self.concurrency - : concurrency // ignore: cast_nullable_to_non_nullable - as int, - queueSize: null == queueSize - ? _self.queueSize - : queueSize // ignore: cast_nullable_to_non_nullable - as int, - timeoutMs: null == timeoutMs - ? _self.timeoutMs - : timeoutMs // ignore: cast_nullable_to_non_nullable - as int, - maxRouteHopCount: null == maxRouteHopCount - ? _self.maxRouteHopCount - : maxRouteHopCount // ignore: cast_nullable_to_non_nullable - as int, - defaultRouteHopCount: null == defaultRouteHopCount - ? _self.defaultRouteHopCount - : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable - as int, - maxTimestampBehindMs: freezed == maxTimestampBehindMs - ? _self.maxTimestampBehindMs - : maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable - as int?, - maxTimestampAheadMs: freezed == maxTimestampAheadMs - ? _self.maxTimestampAheadMs - : maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of VeilidConfigRPC +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? concurrency = null,Object? queueSize = null,Object? timeoutMs = null,Object? maxRouteHopCount = null,Object? defaultRouteHopCount = null,Object? maxTimestampBehindMs = freezed,Object? maxTimestampAheadMs = freezed,}) { + return _then(_self.copyWith( +concurrency: null == concurrency ? _self.concurrency : concurrency // ignore: cast_nullable_to_non_nullable +as int,queueSize: null == queueSize ? _self.queueSize : queueSize // ignore: cast_nullable_to_non_nullable +as int,timeoutMs: null == timeoutMs ? _self.timeoutMs : timeoutMs // ignore: cast_nullable_to_non_nullable +as int,maxRouteHopCount: null == maxRouteHopCount ? _self.maxRouteHopCount : maxRouteHopCount // ignore: cast_nullable_to_non_nullable +as int,defaultRouteHopCount: null == defaultRouteHopCount ? _self.defaultRouteHopCount : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable +as int,maxTimestampBehindMs: freezed == maxTimestampBehindMs ? _self.maxTimestampBehindMs : maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable +as int?,maxTimestampAheadMs: freezed == maxTimestampAheadMs ? _self.maxTimestampAheadMs : maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable +as int?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigRPC]. +extension VeilidConfigRPCPatterns on VeilidConfigRPC { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigRPC value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigRPC() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigRPC value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigRPC(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigRPC value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigRPC() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int concurrency, int queueSize, int timeoutMs, int maxRouteHopCount, int defaultRouteHopCount, int? maxTimestampBehindMs, int? maxTimestampAheadMs)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigRPC() when $default != null: +return $default(_that.concurrency,_that.queueSize,_that.timeoutMs,_that.maxRouteHopCount,_that.defaultRouteHopCount,_that.maxTimestampBehindMs,_that.maxTimestampAheadMs);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int concurrency, int queueSize, int timeoutMs, int maxRouteHopCount, int defaultRouteHopCount, int? maxTimestampBehindMs, int? maxTimestampAheadMs) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigRPC(): +return $default(_that.concurrency,_that.queueSize,_that.timeoutMs,_that.maxRouteHopCount,_that.defaultRouteHopCount,_that.maxTimestampBehindMs,_that.maxTimestampAheadMs);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int concurrency, int queueSize, int timeoutMs, int maxRouteHopCount, int defaultRouteHopCount, int? maxTimestampBehindMs, int? maxTimestampAheadMs)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigRPC() when $default != null: +return $default(_that.concurrency,_that.queueSize,_that.timeoutMs,_that.maxRouteHopCount,_that.defaultRouteHopCount,_that.maxTimestampBehindMs,_that.maxTimestampAheadMs);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidConfigRPC with DiagnosticableTreeMixin implements VeilidConfigRPC { - const _VeilidConfigRPC( - {required this.concurrency, - required this.queueSize, - required this.timeoutMs, - required this.maxRouteHopCount, - required this.defaultRouteHopCount, - this.maxTimestampBehindMs, - this.maxTimestampAheadMs}); - factory _VeilidConfigRPC.fromJson(Map json) => - _$VeilidConfigRPCFromJson(json); + const _VeilidConfigRPC({required this.concurrency, required this.queueSize, required this.timeoutMs, required this.maxRouteHopCount, required this.defaultRouteHopCount, this.maxTimestampBehindMs, this.maxTimestampAheadMs}); + factory _VeilidConfigRPC.fromJson(Map json) => _$VeilidConfigRPCFromJson(json); - @override - final int concurrency; - @override - final int queueSize; - @override - final int timeoutMs; - @override - final int maxRouteHopCount; - @override - final int defaultRouteHopCount; - @override - final int? maxTimestampBehindMs; - @override - final int? maxTimestampAheadMs; +@override final int concurrency; +@override final int queueSize; +@override final int timeoutMs; +@override final int maxRouteHopCount; +@override final int defaultRouteHopCount; +@override final int? maxTimestampBehindMs; +@override final int? maxTimestampAheadMs; - /// Create a copy of VeilidConfigRPC - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigRPCCopyWith<_VeilidConfigRPC> get copyWith => - __$VeilidConfigRPCCopyWithImpl<_VeilidConfigRPC>(this, _$identity); +/// Create a copy of VeilidConfigRPC +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigRPCCopyWith<_VeilidConfigRPC> get copyWith => __$VeilidConfigRPCCopyWithImpl<_VeilidConfigRPC>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigRPCToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigRPCToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigRPC')) + ..add(DiagnosticsProperty('concurrency', concurrency))..add(DiagnosticsProperty('queueSize', queueSize))..add(DiagnosticsProperty('timeoutMs', timeoutMs))..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount))..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount))..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs))..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigRPC')) - ..add(DiagnosticsProperty('concurrency', concurrency)) - ..add(DiagnosticsProperty('queueSize', queueSize)) - ..add(DiagnosticsProperty('timeoutMs', timeoutMs)) - ..add(DiagnosticsProperty('maxRouteHopCount', maxRouteHopCount)) - ..add(DiagnosticsProperty('defaultRouteHopCount', defaultRouteHopCount)) - ..add(DiagnosticsProperty('maxTimestampBehindMs', maxTimestampBehindMs)) - ..add(DiagnosticsProperty('maxTimestampAheadMs', maxTimestampAheadMs)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigRPC&&(identical(other.concurrency, concurrency) || other.concurrency == concurrency)&&(identical(other.queueSize, queueSize) || other.queueSize == queueSize)&&(identical(other.timeoutMs, timeoutMs) || other.timeoutMs == timeoutMs)&&(identical(other.maxRouteHopCount, maxRouteHopCount) || other.maxRouteHopCount == maxRouteHopCount)&&(identical(other.defaultRouteHopCount, defaultRouteHopCount) || other.defaultRouteHopCount == defaultRouteHopCount)&&(identical(other.maxTimestampBehindMs, maxTimestampBehindMs) || other.maxTimestampBehindMs == maxTimestampBehindMs)&&(identical(other.maxTimestampAheadMs, maxTimestampAheadMs) || other.maxTimestampAheadMs == maxTimestampAheadMs)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigRPC && - (identical(other.concurrency, concurrency) || - other.concurrency == concurrency) && - (identical(other.queueSize, queueSize) || - other.queueSize == queueSize) && - (identical(other.timeoutMs, timeoutMs) || - other.timeoutMs == timeoutMs) && - (identical(other.maxRouteHopCount, maxRouteHopCount) || - other.maxRouteHopCount == maxRouteHopCount) && - (identical(other.defaultRouteHopCount, defaultRouteHopCount) || - other.defaultRouteHopCount == defaultRouteHopCount) && - (identical(other.maxTimestampBehindMs, maxTimestampBehindMs) || - other.maxTimestampBehindMs == maxTimestampBehindMs) && - (identical(other.maxTimestampAheadMs, maxTimestampAheadMs) || - other.maxTimestampAheadMs == maxTimestampAheadMs)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,concurrency,queueSize,timeoutMs,maxRouteHopCount,defaultRouteHopCount,maxTimestampBehindMs,maxTimestampAheadMs); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - concurrency, - queueSize, - timeoutMs, - maxRouteHopCount, - defaultRouteHopCount, - maxTimestampBehindMs, - maxTimestampAheadMs); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigRPC(concurrency: $concurrency, queueSize: $queueSize, timeoutMs: $timeoutMs, maxRouteHopCount: $maxRouteHopCount, defaultRouteHopCount: $defaultRouteHopCount, maxTimestampBehindMs: $maxTimestampBehindMs, maxTimestampAheadMs: $maxTimestampAheadMs)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigRPCCopyWith<$Res> - implements $VeilidConfigRPCCopyWith<$Res> { - factory _$VeilidConfigRPCCopyWith( - _VeilidConfigRPC value, $Res Function(_VeilidConfigRPC) _then) = - __$VeilidConfigRPCCopyWithImpl; - @override - @useResult - $Res call( - {int concurrency, - int queueSize, - int timeoutMs, - int maxRouteHopCount, - int defaultRouteHopCount, - int? maxTimestampBehindMs, - int? maxTimestampAheadMs}); -} +abstract mixin class _$VeilidConfigRPCCopyWith<$Res> implements $VeilidConfigRPCCopyWith<$Res> { + factory _$VeilidConfigRPCCopyWith(_VeilidConfigRPC value, $Res Function(_VeilidConfigRPC) _then) = __$VeilidConfigRPCCopyWithImpl; +@override @useResult +$Res call({ + int concurrency, int queueSize, int timeoutMs, int maxRouteHopCount, int defaultRouteHopCount, int? maxTimestampBehindMs, int? maxTimestampAheadMs +}); + + + +} /// @nodoc class __$VeilidConfigRPCCopyWithImpl<$Res> implements _$VeilidConfigRPCCopyWith<$Res> { @@ -5632,152 +6418,74 @@ class __$VeilidConfigRPCCopyWithImpl<$Res> final _VeilidConfigRPC _self; final $Res Function(_VeilidConfigRPC) _then; - /// Create a copy of VeilidConfigRPC - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? concurrency = null, - Object? queueSize = null, - Object? timeoutMs = null, - Object? maxRouteHopCount = null, - Object? defaultRouteHopCount = null, - Object? maxTimestampBehindMs = freezed, - Object? maxTimestampAheadMs = freezed, - }) { - return _then(_VeilidConfigRPC( - concurrency: null == concurrency - ? _self.concurrency - : concurrency // ignore: cast_nullable_to_non_nullable - as int, - queueSize: null == queueSize - ? _self.queueSize - : queueSize // ignore: cast_nullable_to_non_nullable - as int, - timeoutMs: null == timeoutMs - ? _self.timeoutMs - : timeoutMs // ignore: cast_nullable_to_non_nullable - as int, - maxRouteHopCount: null == maxRouteHopCount - ? _self.maxRouteHopCount - : maxRouteHopCount // ignore: cast_nullable_to_non_nullable - as int, - defaultRouteHopCount: null == defaultRouteHopCount - ? _self.defaultRouteHopCount - : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable - as int, - maxTimestampBehindMs: freezed == maxTimestampBehindMs - ? _self.maxTimestampBehindMs - : maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable - as int?, - maxTimestampAheadMs: freezed == maxTimestampAheadMs - ? _self.maxTimestampAheadMs - : maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable - as int?, - )); - } +/// Create a copy of VeilidConfigRPC +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? concurrency = null,Object? queueSize = null,Object? timeoutMs = null,Object? maxRouteHopCount = null,Object? defaultRouteHopCount = null,Object? maxTimestampBehindMs = freezed,Object? maxTimestampAheadMs = freezed,}) { + return _then(_VeilidConfigRPC( +concurrency: null == concurrency ? _self.concurrency : concurrency // ignore: cast_nullable_to_non_nullable +as int,queueSize: null == queueSize ? _self.queueSize : queueSize // ignore: cast_nullable_to_non_nullable +as int,timeoutMs: null == timeoutMs ? _self.timeoutMs : timeoutMs // ignore: cast_nullable_to_non_nullable +as int,maxRouteHopCount: null == maxRouteHopCount ? _self.maxRouteHopCount : maxRouteHopCount // ignore: cast_nullable_to_non_nullable +as int,defaultRouteHopCount: null == defaultRouteHopCount ? _self.defaultRouteHopCount : defaultRouteHopCount // ignore: cast_nullable_to_non_nullable +as int,maxTimestampBehindMs: freezed == maxTimestampBehindMs ? _self.maxTimestampBehindMs : maxTimestampBehindMs // ignore: cast_nullable_to_non_nullable +as int?,maxTimestampAheadMs: freezed == maxTimestampAheadMs ? _self.maxTimestampAheadMs : maxTimestampAheadMs // ignore: cast_nullable_to_non_nullable +as int?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigRoutingTable implements DiagnosticableTreeMixin { - List get publicKeys; - List get secretKeys; - List get bootstrap; - List get bootstrapKeys; - int get limitOverAttached; - int get limitFullyAttached; - int get limitAttachedStrong; - int get limitAttachedGood; - int get limitAttachedWeak; - /// Create a copy of VeilidConfigRoutingTable - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigRoutingTableCopyWith get copyWith => - _$VeilidConfigRoutingTableCopyWithImpl( - this as VeilidConfigRoutingTable, _$identity); + List get publicKeys; List get secretKeys; List get bootstrap; List get bootstrapKeys; int get limitOverAttached; int get limitFullyAttached; int get limitAttachedStrong; int get limitAttachedGood; int get limitAttachedWeak; +/// Create a copy of VeilidConfigRoutingTable +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigRoutingTableCopyWith get copyWith => _$VeilidConfigRoutingTableCopyWithImpl(this as VeilidConfigRoutingTable, _$identity); /// Serializes this VeilidConfigRoutingTable to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigRoutingTable')) - ..add(DiagnosticsProperty('publicKeys', publicKeys)) - ..add(DiagnosticsProperty('secretKeys', secretKeys)) - ..add(DiagnosticsProperty('bootstrap', bootstrap)) - ..add(DiagnosticsProperty('bootstrapKeys', bootstrapKeys)) - ..add(DiagnosticsProperty('limitOverAttached', limitOverAttached)) - ..add(DiagnosticsProperty('limitFullyAttached', limitFullyAttached)) - ..add(DiagnosticsProperty('limitAttachedStrong', limitAttachedStrong)) - ..add(DiagnosticsProperty('limitAttachedGood', limitAttachedGood)) - ..add(DiagnosticsProperty('limitAttachedWeak', limitAttachedWeak)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigRoutingTable')) + ..add(DiagnosticsProperty('publicKeys', publicKeys))..add(DiagnosticsProperty('secretKeys', secretKeys))..add(DiagnosticsProperty('bootstrap', bootstrap))..add(DiagnosticsProperty('bootstrapKeys', bootstrapKeys))..add(DiagnosticsProperty('limitOverAttached', limitOverAttached))..add(DiagnosticsProperty('limitFullyAttached', limitFullyAttached))..add(DiagnosticsProperty('limitAttachedStrong', limitAttachedStrong))..add(DiagnosticsProperty('limitAttachedGood', limitAttachedGood))..add(DiagnosticsProperty('limitAttachedWeak', limitAttachedWeak)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigRoutingTable && - const DeepCollectionEquality() - .equals(other.publicKeys, publicKeys) && - const DeepCollectionEquality() - .equals(other.secretKeys, secretKeys) && - const DeepCollectionEquality().equals(other.bootstrap, bootstrap) && - const DeepCollectionEquality() - .equals(other.bootstrapKeys, bootstrapKeys) && - (identical(other.limitOverAttached, limitOverAttached) || - other.limitOverAttached == limitOverAttached) && - (identical(other.limitFullyAttached, limitFullyAttached) || - other.limitFullyAttached == limitFullyAttached) && - (identical(other.limitAttachedStrong, limitAttachedStrong) || - other.limitAttachedStrong == limitAttachedStrong) && - (identical(other.limitAttachedGood, limitAttachedGood) || - other.limitAttachedGood == limitAttachedGood) && - (identical(other.limitAttachedWeak, limitAttachedWeak) || - other.limitAttachedWeak == limitAttachedWeak)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigRoutingTable&&const DeepCollectionEquality().equals(other.publicKeys, publicKeys)&&const DeepCollectionEquality().equals(other.secretKeys, secretKeys)&&const DeepCollectionEquality().equals(other.bootstrap, bootstrap)&&const DeepCollectionEquality().equals(other.bootstrapKeys, bootstrapKeys)&&(identical(other.limitOverAttached, limitOverAttached) || other.limitOverAttached == limitOverAttached)&&(identical(other.limitFullyAttached, limitFullyAttached) || other.limitFullyAttached == limitFullyAttached)&&(identical(other.limitAttachedStrong, limitAttachedStrong) || other.limitAttachedStrong == limitAttachedStrong)&&(identical(other.limitAttachedGood, limitAttachedGood) || other.limitAttachedGood == limitAttachedGood)&&(identical(other.limitAttachedWeak, limitAttachedWeak) || other.limitAttachedWeak == limitAttachedWeak)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(publicKeys),const DeepCollectionEquality().hash(secretKeys),const DeepCollectionEquality().hash(bootstrap),const DeepCollectionEquality().hash(bootstrapKeys),limitOverAttached,limitFullyAttached,limitAttachedStrong,limitAttachedGood,limitAttachedWeak); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigRoutingTable(publicKeys: $publicKeys, secretKeys: $secretKeys, bootstrap: $bootstrap, bootstrapKeys: $bootstrapKeys, limitOverAttached: $limitOverAttached, limitFullyAttached: $limitFullyAttached, limitAttachedStrong: $limitAttachedStrong, limitAttachedGood: $limitAttachedGood, limitAttachedWeak: $limitAttachedWeak)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(publicKeys), - const DeepCollectionEquality().hash(secretKeys), - const DeepCollectionEquality().hash(bootstrap), - const DeepCollectionEquality().hash(bootstrapKeys), - limitOverAttached, - limitFullyAttached, - limitAttachedStrong, - limitAttachedGood, - limitAttachedWeak); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigRoutingTable(publicKeys: $publicKeys, secretKeys: $secretKeys, bootstrap: $bootstrap, bootstrapKeys: $bootstrapKeys, limitOverAttached: $limitOverAttached, limitFullyAttached: $limitFullyAttached, limitAttachedStrong: $limitAttachedStrong, limitAttachedGood: $limitAttachedGood, limitAttachedWeak: $limitAttachedWeak)'; - } } /// @nodoc -abstract mixin class $VeilidConfigRoutingTableCopyWith<$Res> { - factory $VeilidConfigRoutingTableCopyWith(VeilidConfigRoutingTable value, - $Res Function(VeilidConfigRoutingTable) _then) = - _$VeilidConfigRoutingTableCopyWithImpl; - @useResult - $Res call( - {List publicKeys, - List secretKeys, - List bootstrap, - List bootstrapKeys, - int limitOverAttached, - int limitFullyAttached, - int limitAttachedStrong, - int limitAttachedGood, - int limitAttachedWeak}); -} +abstract mixin class $VeilidConfigRoutingTableCopyWith<$Res> { + factory $VeilidConfigRoutingTableCopyWith(VeilidConfigRoutingTable value, $Res Function(VeilidConfigRoutingTable) _then) = _$VeilidConfigRoutingTableCopyWithImpl; +@useResult +$Res call({ + List publicKeys, List secretKeys, List bootstrap, List bootstrapKeys, int limitOverAttached, int limitFullyAttached, int limitAttachedStrong, int limitAttachedGood, int limitAttachedWeak +}); + + + +} /// @nodoc class _$VeilidConfigRoutingTableCopyWithImpl<$Res> implements $VeilidConfigRoutingTableCopyWith<$Res> { @@ -5786,223 +6494,237 @@ class _$VeilidConfigRoutingTableCopyWithImpl<$Res> final VeilidConfigRoutingTable _self; final $Res Function(VeilidConfigRoutingTable) _then; - /// Create a copy of VeilidConfigRoutingTable - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? publicKeys = null, - Object? secretKeys = null, - Object? bootstrap = null, - Object? bootstrapKeys = null, - Object? limitOverAttached = null, - Object? limitFullyAttached = null, - Object? limitAttachedStrong = null, - Object? limitAttachedGood = null, - Object? limitAttachedWeak = null, - }) { - return _then(_self.copyWith( - publicKeys: null == publicKeys - ? _self.publicKeys - : publicKeys // ignore: cast_nullable_to_non_nullable - as List, - secretKeys: null == secretKeys - ? _self.secretKeys - : secretKeys // ignore: cast_nullable_to_non_nullable - as List, - bootstrap: null == bootstrap - ? _self.bootstrap - : bootstrap // ignore: cast_nullable_to_non_nullable - as List, - bootstrapKeys: null == bootstrapKeys - ? _self.bootstrapKeys - : bootstrapKeys // ignore: cast_nullable_to_non_nullable - as List, - limitOverAttached: null == limitOverAttached - ? _self.limitOverAttached - : limitOverAttached // ignore: cast_nullable_to_non_nullable - as int, - limitFullyAttached: null == limitFullyAttached - ? _self.limitFullyAttached - : limitFullyAttached // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedStrong: null == limitAttachedStrong - ? _self.limitAttachedStrong - : limitAttachedStrong // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedGood: null == limitAttachedGood - ? _self.limitAttachedGood - : limitAttachedGood // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedWeak: null == limitAttachedWeak - ? _self.limitAttachedWeak - : limitAttachedWeak // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigRoutingTable +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? publicKeys = null,Object? secretKeys = null,Object? bootstrap = null,Object? bootstrapKeys = null,Object? limitOverAttached = null,Object? limitFullyAttached = null,Object? limitAttachedStrong = null,Object? limitAttachedGood = null,Object? limitAttachedWeak = null,}) { + return _then(_self.copyWith( +publicKeys: null == publicKeys ? _self.publicKeys : publicKeys // ignore: cast_nullable_to_non_nullable +as List,secretKeys: null == secretKeys ? _self.secretKeys : secretKeys // ignore: cast_nullable_to_non_nullable +as List,bootstrap: null == bootstrap ? _self.bootstrap : bootstrap // ignore: cast_nullable_to_non_nullable +as List,bootstrapKeys: null == bootstrapKeys ? _self.bootstrapKeys : bootstrapKeys // ignore: cast_nullable_to_non_nullable +as List,limitOverAttached: null == limitOverAttached ? _self.limitOverAttached : limitOverAttached // ignore: cast_nullable_to_non_nullable +as int,limitFullyAttached: null == limitFullyAttached ? _self.limitFullyAttached : limitFullyAttached // ignore: cast_nullable_to_non_nullable +as int,limitAttachedStrong: null == limitAttachedStrong ? _self.limitAttachedStrong : limitAttachedStrong // ignore: cast_nullable_to_non_nullable +as int,limitAttachedGood: null == limitAttachedGood ? _self.limitAttachedGood : limitAttachedGood // ignore: cast_nullable_to_non_nullable +as int,limitAttachedWeak: null == limitAttachedWeak ? _self.limitAttachedWeak : limitAttachedWeak // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigRoutingTable]. +extension VeilidConfigRoutingTablePatterns on VeilidConfigRoutingTable { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigRoutingTable value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigRoutingTable value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigRoutingTable value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List publicKeys, List secretKeys, List bootstrap, List bootstrapKeys, int limitOverAttached, int limitFullyAttached, int limitAttachedStrong, int limitAttachedGood, int limitAttachedWeak)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable() when $default != null: +return $default(_that.publicKeys,_that.secretKeys,_that.bootstrap,_that.bootstrapKeys,_that.limitOverAttached,_that.limitFullyAttached,_that.limitAttachedStrong,_that.limitAttachedGood,_that.limitAttachedWeak);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List publicKeys, List secretKeys, List bootstrap, List bootstrapKeys, int limitOverAttached, int limitFullyAttached, int limitAttachedStrong, int limitAttachedGood, int limitAttachedWeak) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable(): +return $default(_that.publicKeys,_that.secretKeys,_that.bootstrap,_that.bootstrapKeys,_that.limitOverAttached,_that.limitFullyAttached,_that.limitAttachedStrong,_that.limitAttachedGood,_that.limitAttachedWeak);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List publicKeys, List secretKeys, List bootstrap, List bootstrapKeys, int limitOverAttached, int limitFullyAttached, int limitAttachedStrong, int limitAttachedGood, int limitAttachedWeak)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigRoutingTable() when $default != null: +return $default(_that.publicKeys,_that.secretKeys,_that.bootstrap,_that.bootstrapKeys,_that.limitOverAttached,_that.limitFullyAttached,_that.limitAttachedStrong,_that.limitAttachedGood,_that.limitAttachedWeak);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigRoutingTable - with DiagnosticableTreeMixin - implements VeilidConfigRoutingTable { - const _VeilidConfigRoutingTable( - {required final List publicKeys, - required final List secretKeys, - required final List bootstrap, - required final List bootstrapKeys, - required this.limitOverAttached, - required this.limitFullyAttached, - required this.limitAttachedStrong, - required this.limitAttachedGood, - required this.limitAttachedWeak}) - : _publicKeys = publicKeys, - _secretKeys = secretKeys, - _bootstrap = bootstrap, - _bootstrapKeys = bootstrapKeys; - factory _VeilidConfigRoutingTable.fromJson(Map json) => - _$VeilidConfigRoutingTableFromJson(json); - final List _publicKeys; - @override - List get publicKeys { - if (_publicKeys is EqualUnmodifiableListView) return _publicKeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_publicKeys); - } +class _VeilidConfigRoutingTable with DiagnosticableTreeMixin implements VeilidConfigRoutingTable { + const _VeilidConfigRoutingTable({required final List publicKeys, required final List secretKeys, required final List bootstrap, required final List bootstrapKeys, required this.limitOverAttached, required this.limitFullyAttached, required this.limitAttachedStrong, required this.limitAttachedGood, required this.limitAttachedWeak}): _publicKeys = publicKeys,_secretKeys = secretKeys,_bootstrap = bootstrap,_bootstrapKeys = bootstrapKeys; + factory _VeilidConfigRoutingTable.fromJson(Map json) => _$VeilidConfigRoutingTableFromJson(json); - final List _secretKeys; - @override - List get secretKeys { - if (_secretKeys is EqualUnmodifiableListView) return _secretKeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_secretKeys); - } + final List _publicKeys; +@override List get publicKeys { + if (_publicKeys is EqualUnmodifiableListView) return _publicKeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_publicKeys); +} - final List _bootstrap; - @override - List get bootstrap { - if (_bootstrap is EqualUnmodifiableListView) return _bootstrap; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_bootstrap); - } + final List _secretKeys; +@override List get secretKeys { + if (_secretKeys is EqualUnmodifiableListView) return _secretKeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_secretKeys); +} - final List _bootstrapKeys; - @override - List get bootstrapKeys { - if (_bootstrapKeys is EqualUnmodifiableListView) return _bootstrapKeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_bootstrapKeys); - } + final List _bootstrap; +@override List get bootstrap { + if (_bootstrap is EqualUnmodifiableListView) return _bootstrap; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_bootstrap); +} - @override - final int limitOverAttached; - @override - final int limitFullyAttached; - @override - final int limitAttachedStrong; - @override - final int limitAttachedGood; - @override - final int limitAttachedWeak; + final List _bootstrapKeys; +@override List get bootstrapKeys { + if (_bootstrapKeys is EqualUnmodifiableListView) return _bootstrapKeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_bootstrapKeys); +} - /// Create a copy of VeilidConfigRoutingTable - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigRoutingTableCopyWith<_VeilidConfigRoutingTable> get copyWith => - __$VeilidConfigRoutingTableCopyWithImpl<_VeilidConfigRoutingTable>( - this, _$identity); +@override final int limitOverAttached; +@override final int limitFullyAttached; +@override final int limitAttachedStrong; +@override final int limitAttachedGood; +@override final int limitAttachedWeak; - @override - Map toJson() { - return _$VeilidConfigRoutingTableToJson( - this, - ); - } +/// Create a copy of VeilidConfigRoutingTable +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigRoutingTableCopyWith<_VeilidConfigRoutingTable> get copyWith => __$VeilidConfigRoutingTableCopyWithImpl<_VeilidConfigRoutingTable>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigRoutingTable')) - ..add(DiagnosticsProperty('publicKeys', publicKeys)) - ..add(DiagnosticsProperty('secretKeys', secretKeys)) - ..add(DiagnosticsProperty('bootstrap', bootstrap)) - ..add(DiagnosticsProperty('bootstrapKeys', bootstrapKeys)) - ..add(DiagnosticsProperty('limitOverAttached', limitOverAttached)) - ..add(DiagnosticsProperty('limitFullyAttached', limitFullyAttached)) - ..add(DiagnosticsProperty('limitAttachedStrong', limitAttachedStrong)) - ..add(DiagnosticsProperty('limitAttachedGood', limitAttachedGood)) - ..add(DiagnosticsProperty('limitAttachedWeak', limitAttachedWeak)); - } +@override +Map toJson() { + return _$VeilidConfigRoutingTableToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigRoutingTable')) + ..add(DiagnosticsProperty('publicKeys', publicKeys))..add(DiagnosticsProperty('secretKeys', secretKeys))..add(DiagnosticsProperty('bootstrap', bootstrap))..add(DiagnosticsProperty('bootstrapKeys', bootstrapKeys))..add(DiagnosticsProperty('limitOverAttached', limitOverAttached))..add(DiagnosticsProperty('limitFullyAttached', limitFullyAttached))..add(DiagnosticsProperty('limitAttachedStrong', limitAttachedStrong))..add(DiagnosticsProperty('limitAttachedGood', limitAttachedGood))..add(DiagnosticsProperty('limitAttachedWeak', limitAttachedWeak)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigRoutingTable && - const DeepCollectionEquality() - .equals(other._publicKeys, _publicKeys) && - const DeepCollectionEquality() - .equals(other._secretKeys, _secretKeys) && - const DeepCollectionEquality() - .equals(other._bootstrap, _bootstrap) && - const DeepCollectionEquality() - .equals(other._bootstrapKeys, _bootstrapKeys) && - (identical(other.limitOverAttached, limitOverAttached) || - other.limitOverAttached == limitOverAttached) && - (identical(other.limitFullyAttached, limitFullyAttached) || - other.limitFullyAttached == limitFullyAttached) && - (identical(other.limitAttachedStrong, limitAttachedStrong) || - other.limitAttachedStrong == limitAttachedStrong) && - (identical(other.limitAttachedGood, limitAttachedGood) || - other.limitAttachedGood == limitAttachedGood) && - (identical(other.limitAttachedWeak, limitAttachedWeak) || - other.limitAttachedWeak == limitAttachedWeak)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigRoutingTable&&const DeepCollectionEquality().equals(other._publicKeys, _publicKeys)&&const DeepCollectionEquality().equals(other._secretKeys, _secretKeys)&&const DeepCollectionEquality().equals(other._bootstrap, _bootstrap)&&const DeepCollectionEquality().equals(other._bootstrapKeys, _bootstrapKeys)&&(identical(other.limitOverAttached, limitOverAttached) || other.limitOverAttached == limitOverAttached)&&(identical(other.limitFullyAttached, limitFullyAttached) || other.limitFullyAttached == limitFullyAttached)&&(identical(other.limitAttachedStrong, limitAttachedStrong) || other.limitAttachedStrong == limitAttachedStrong)&&(identical(other.limitAttachedGood, limitAttachedGood) || other.limitAttachedGood == limitAttachedGood)&&(identical(other.limitAttachedWeak, limitAttachedWeak) || other.limitAttachedWeak == limitAttachedWeak)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_publicKeys),const DeepCollectionEquality().hash(_secretKeys),const DeepCollectionEquality().hash(_bootstrap),const DeepCollectionEquality().hash(_bootstrapKeys),limitOverAttached,limitFullyAttached,limitAttachedStrong,limitAttachedGood,limitAttachedWeak); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigRoutingTable(publicKeys: $publicKeys, secretKeys: $secretKeys, bootstrap: $bootstrap, bootstrapKeys: $bootstrapKeys, limitOverAttached: $limitOverAttached, limitFullyAttached: $limitFullyAttached, limitAttachedStrong: $limitAttachedStrong, limitAttachedGood: $limitAttachedGood, limitAttachedWeak: $limitAttachedWeak)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_publicKeys), - const DeepCollectionEquality().hash(_secretKeys), - const DeepCollectionEquality().hash(_bootstrap), - const DeepCollectionEquality().hash(_bootstrapKeys), - limitOverAttached, - limitFullyAttached, - limitAttachedStrong, - limitAttachedGood, - limitAttachedWeak); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigRoutingTable(publicKeys: $publicKeys, secretKeys: $secretKeys, bootstrap: $bootstrap, bootstrapKeys: $bootstrapKeys, limitOverAttached: $limitOverAttached, limitFullyAttached: $limitFullyAttached, limitAttachedStrong: $limitAttachedStrong, limitAttachedGood: $limitAttachedGood, limitAttachedWeak: $limitAttachedWeak)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigRoutingTableCopyWith<$Res> - implements $VeilidConfigRoutingTableCopyWith<$Res> { - factory _$VeilidConfigRoutingTableCopyWith(_VeilidConfigRoutingTable value, - $Res Function(_VeilidConfigRoutingTable) _then) = - __$VeilidConfigRoutingTableCopyWithImpl; - @override - @useResult - $Res call( - {List publicKeys, - List secretKeys, - List bootstrap, - List bootstrapKeys, - int limitOverAttached, - int limitFullyAttached, - int limitAttachedStrong, - int limitAttachedGood, - int limitAttachedWeak}); -} +abstract mixin class _$VeilidConfigRoutingTableCopyWith<$Res> implements $VeilidConfigRoutingTableCopyWith<$Res> { + factory _$VeilidConfigRoutingTableCopyWith(_VeilidConfigRoutingTable value, $Res Function(_VeilidConfigRoutingTable) _then) = __$VeilidConfigRoutingTableCopyWithImpl; +@override @useResult +$Res call({ + List publicKeys, List secretKeys, List bootstrap, List bootstrapKeys, int limitOverAttached, int limitFullyAttached, int limitAttachedStrong, int limitAttachedGood, int limitAttachedWeak +}); + + + +} /// @nodoc class __$VeilidConfigRoutingTableCopyWithImpl<$Res> implements _$VeilidConfigRoutingTableCopyWith<$Res> { @@ -6011,248 +6733,76 @@ class __$VeilidConfigRoutingTableCopyWithImpl<$Res> final _VeilidConfigRoutingTable _self; final $Res Function(_VeilidConfigRoutingTable) _then; - /// Create a copy of VeilidConfigRoutingTable - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? publicKeys = null, - Object? secretKeys = null, - Object? bootstrap = null, - Object? bootstrapKeys = null, - Object? limitOverAttached = null, - Object? limitFullyAttached = null, - Object? limitAttachedStrong = null, - Object? limitAttachedGood = null, - Object? limitAttachedWeak = null, - }) { - return _then(_VeilidConfigRoutingTable( - publicKeys: null == publicKeys - ? _self._publicKeys - : publicKeys // ignore: cast_nullable_to_non_nullable - as List, - secretKeys: null == secretKeys - ? _self._secretKeys - : secretKeys // ignore: cast_nullable_to_non_nullable - as List, - bootstrap: null == bootstrap - ? _self._bootstrap - : bootstrap // ignore: cast_nullable_to_non_nullable - as List, - bootstrapKeys: null == bootstrapKeys - ? _self._bootstrapKeys - : bootstrapKeys // ignore: cast_nullable_to_non_nullable - as List, - limitOverAttached: null == limitOverAttached - ? _self.limitOverAttached - : limitOverAttached // ignore: cast_nullable_to_non_nullable - as int, - limitFullyAttached: null == limitFullyAttached - ? _self.limitFullyAttached - : limitFullyAttached // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedStrong: null == limitAttachedStrong - ? _self.limitAttachedStrong - : limitAttachedStrong // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedGood: null == limitAttachedGood - ? _self.limitAttachedGood - : limitAttachedGood // ignore: cast_nullable_to_non_nullable - as int, - limitAttachedWeak: null == limitAttachedWeak - ? _self.limitAttachedWeak - : limitAttachedWeak // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of VeilidConfigRoutingTable +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? publicKeys = null,Object? secretKeys = null,Object? bootstrap = null,Object? bootstrapKeys = null,Object? limitOverAttached = null,Object? limitFullyAttached = null,Object? limitAttachedStrong = null,Object? limitAttachedGood = null,Object? limitAttachedWeak = null,}) { + return _then(_VeilidConfigRoutingTable( +publicKeys: null == publicKeys ? _self._publicKeys : publicKeys // ignore: cast_nullable_to_non_nullable +as List,secretKeys: null == secretKeys ? _self._secretKeys : secretKeys // ignore: cast_nullable_to_non_nullable +as List,bootstrap: null == bootstrap ? _self._bootstrap : bootstrap // ignore: cast_nullable_to_non_nullable +as List,bootstrapKeys: null == bootstrapKeys ? _self._bootstrapKeys : bootstrapKeys // ignore: cast_nullable_to_non_nullable +as List,limitOverAttached: null == limitOverAttached ? _self.limitOverAttached : limitOverAttached // ignore: cast_nullable_to_non_nullable +as int,limitFullyAttached: null == limitFullyAttached ? _self.limitFullyAttached : limitFullyAttached // ignore: cast_nullable_to_non_nullable +as int,limitAttachedStrong: null == limitAttachedStrong ? _self.limitAttachedStrong : limitAttachedStrong // ignore: cast_nullable_to_non_nullable +as int,limitAttachedGood: null == limitAttachedGood ? _self.limitAttachedGood : limitAttachedGood // ignore: cast_nullable_to_non_nullable +as int,limitAttachedWeak: null == limitAttachedWeak ? _self.limitAttachedWeak : limitAttachedWeak // ignore: cast_nullable_to_non_nullable +as int, + )); } + +} + + /// @nodoc mixin _$VeilidConfigNetwork implements DiagnosticableTreeMixin { - int get connectionInitialTimeoutMs; - int get connectionInactivityTimeoutMs; - int get maxConnectionsPerIp4; - int get maxConnectionsPerIp6Prefix; - int get maxConnectionsPerIp6PrefixSize; - int get maxConnectionFrequencyPerMin; - int get clientAllowlistTimeoutMs; - int get reverseConnectionReceiptTimeMs; - int get holePunchReceiptTimeMs; - VeilidConfigRoutingTable get routingTable; - VeilidConfigRPC get rpc; - VeilidConfigDHT get dht; - bool get upnp; - bool? get detectAddressChanges; - int get restrictedNatRetries; - VeilidConfigTLS get tls; - VeilidConfigApplication get application; - VeilidConfigProtocol get protocol; - VeilidConfigPrivacy get privacy; - String? get networkKeyPassword; - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigNetworkCopyWith get copyWith => - _$VeilidConfigNetworkCopyWithImpl( - this as VeilidConfigNetwork, _$identity); + int get connectionInitialTimeoutMs; int get connectionInactivityTimeoutMs; int get maxConnectionsPerIp4; int get maxConnectionsPerIp6Prefix; int get maxConnectionsPerIp6PrefixSize; int get maxConnectionFrequencyPerMin; int get clientAllowlistTimeoutMs; int get reverseConnectionReceiptTimeMs; int get holePunchReceiptTimeMs; VeilidConfigRoutingTable get routingTable; VeilidConfigRPC get rpc; VeilidConfigDHT get dht; bool get upnp; bool? get detectAddressChanges; int get restrictedNatRetries; VeilidConfigTLS get tls; VeilidConfigApplication get application; VeilidConfigProtocol get protocol; VeilidConfigPrivacy get privacy; String? get networkKeyPassword; +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigNetworkCopyWith get copyWith => _$VeilidConfigNetworkCopyWithImpl(this as VeilidConfigNetwork, _$identity); /// Serializes this VeilidConfigNetwork to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigNetwork')) - ..add(DiagnosticsProperty( - 'connectionInitialTimeoutMs', connectionInitialTimeoutMs)) - ..add(DiagnosticsProperty( - 'connectionInactivityTimeoutMs', connectionInactivityTimeoutMs)) - ..add(DiagnosticsProperty('maxConnectionsPerIp4', maxConnectionsPerIp4)) - ..add(DiagnosticsProperty( - 'maxConnectionsPerIp6Prefix', maxConnectionsPerIp6Prefix)) - ..add(DiagnosticsProperty( - 'maxConnectionsPerIp6PrefixSize', maxConnectionsPerIp6PrefixSize)) - ..add(DiagnosticsProperty( - 'maxConnectionFrequencyPerMin', maxConnectionFrequencyPerMin)) - ..add(DiagnosticsProperty( - 'clientAllowlistTimeoutMs', clientAllowlistTimeoutMs)) - ..add(DiagnosticsProperty( - 'reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs)) - ..add( - DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs)) - ..add(DiagnosticsProperty('routingTable', routingTable)) - ..add(DiagnosticsProperty('rpc', rpc)) - ..add(DiagnosticsProperty('dht', dht)) - ..add(DiagnosticsProperty('upnp', upnp)) - ..add(DiagnosticsProperty('detectAddressChanges', detectAddressChanges)) - ..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries)) - ..add(DiagnosticsProperty('tls', tls)) - ..add(DiagnosticsProperty('application', application)) - ..add(DiagnosticsProperty('protocol', protocol)) - ..add(DiagnosticsProperty('privacy', privacy)) - ..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigNetwork')) + ..add(DiagnosticsProperty('connectionInitialTimeoutMs', connectionInitialTimeoutMs))..add(DiagnosticsProperty('connectionInactivityTimeoutMs', connectionInactivityTimeoutMs))..add(DiagnosticsProperty('maxConnectionsPerIp4', maxConnectionsPerIp4))..add(DiagnosticsProperty('maxConnectionsPerIp6Prefix', maxConnectionsPerIp6Prefix))..add(DiagnosticsProperty('maxConnectionsPerIp6PrefixSize', maxConnectionsPerIp6PrefixSize))..add(DiagnosticsProperty('maxConnectionFrequencyPerMin', maxConnectionFrequencyPerMin))..add(DiagnosticsProperty('clientAllowlistTimeoutMs', clientAllowlistTimeoutMs))..add(DiagnosticsProperty('reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs))..add(DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs))..add(DiagnosticsProperty('routingTable', routingTable))..add(DiagnosticsProperty('rpc', rpc))..add(DiagnosticsProperty('dht', dht))..add(DiagnosticsProperty('upnp', upnp))..add(DiagnosticsProperty('detectAddressChanges', detectAddressChanges))..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries))..add(DiagnosticsProperty('tls', tls))..add(DiagnosticsProperty('application', application))..add(DiagnosticsProperty('protocol', protocol))..add(DiagnosticsProperty('privacy', privacy))..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigNetwork && - (identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || - other.connectionInitialTimeoutMs == - connectionInitialTimeoutMs) && - (identical(other.connectionInactivityTimeoutMs, connectionInactivityTimeoutMs) || - other.connectionInactivityTimeoutMs == - connectionInactivityTimeoutMs) && - (identical(other.maxConnectionsPerIp4, maxConnectionsPerIp4) || - other.maxConnectionsPerIp4 == maxConnectionsPerIp4) && - (identical(other.maxConnectionsPerIp6Prefix, maxConnectionsPerIp6Prefix) || - other.maxConnectionsPerIp6Prefix == - maxConnectionsPerIp6Prefix) && - (identical(other.maxConnectionsPerIp6PrefixSize, maxConnectionsPerIp6PrefixSize) || - other.maxConnectionsPerIp6PrefixSize == - maxConnectionsPerIp6PrefixSize) && - (identical(other.maxConnectionFrequencyPerMin, maxConnectionFrequencyPerMin) || - other.maxConnectionFrequencyPerMin == - maxConnectionFrequencyPerMin) && - (identical(other.clientAllowlistTimeoutMs, clientAllowlistTimeoutMs) || - other.clientAllowlistTimeoutMs == clientAllowlistTimeoutMs) && - (identical(other.reverseConnectionReceiptTimeMs, - reverseConnectionReceiptTimeMs) || - other.reverseConnectionReceiptTimeMs == - reverseConnectionReceiptTimeMs) && - (identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) || - other.holePunchReceiptTimeMs == holePunchReceiptTimeMs) && - (identical(other.routingTable, routingTable) || - other.routingTable == routingTable) && - (identical(other.rpc, rpc) || other.rpc == rpc) && - (identical(other.dht, dht) || other.dht == dht) && - (identical(other.upnp, upnp) || other.upnp == upnp) && - (identical(other.detectAddressChanges, detectAddressChanges) || - other.detectAddressChanges == detectAddressChanges) && - (identical(other.restrictedNatRetries, restrictedNatRetries) || - other.restrictedNatRetries == restrictedNatRetries) && - (identical(other.tls, tls) || other.tls == tls) && - (identical(other.application, application) || - other.application == application) && - (identical(other.protocol, protocol) || - other.protocol == protocol) && - (identical(other.privacy, privacy) || other.privacy == privacy) && - (identical(other.networkKeyPassword, networkKeyPassword) || - other.networkKeyPassword == networkKeyPassword)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigNetwork&&(identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || other.connectionInitialTimeoutMs == connectionInitialTimeoutMs)&&(identical(other.connectionInactivityTimeoutMs, connectionInactivityTimeoutMs) || other.connectionInactivityTimeoutMs == connectionInactivityTimeoutMs)&&(identical(other.maxConnectionsPerIp4, maxConnectionsPerIp4) || other.maxConnectionsPerIp4 == maxConnectionsPerIp4)&&(identical(other.maxConnectionsPerIp6Prefix, maxConnectionsPerIp6Prefix) || other.maxConnectionsPerIp6Prefix == maxConnectionsPerIp6Prefix)&&(identical(other.maxConnectionsPerIp6PrefixSize, maxConnectionsPerIp6PrefixSize) || other.maxConnectionsPerIp6PrefixSize == maxConnectionsPerIp6PrefixSize)&&(identical(other.maxConnectionFrequencyPerMin, maxConnectionFrequencyPerMin) || other.maxConnectionFrequencyPerMin == maxConnectionFrequencyPerMin)&&(identical(other.clientAllowlistTimeoutMs, clientAllowlistTimeoutMs) || other.clientAllowlistTimeoutMs == clientAllowlistTimeoutMs)&&(identical(other.reverseConnectionReceiptTimeMs, reverseConnectionReceiptTimeMs) || other.reverseConnectionReceiptTimeMs == reverseConnectionReceiptTimeMs)&&(identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) || other.holePunchReceiptTimeMs == holePunchReceiptTimeMs)&&(identical(other.routingTable, routingTable) || other.routingTable == routingTable)&&(identical(other.rpc, rpc) || other.rpc == rpc)&&(identical(other.dht, dht) || other.dht == dht)&&(identical(other.upnp, upnp) || other.upnp == upnp)&&(identical(other.detectAddressChanges, detectAddressChanges) || other.detectAddressChanges == detectAddressChanges)&&(identical(other.restrictedNatRetries, restrictedNatRetries) || other.restrictedNatRetries == restrictedNatRetries)&&(identical(other.tls, tls) || other.tls == tls)&&(identical(other.application, application) || other.application == application)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.privacy, privacy) || other.privacy == privacy)&&(identical(other.networkKeyPassword, networkKeyPassword) || other.networkKeyPassword == networkKeyPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,connectionInitialTimeoutMs,connectionInactivityTimeoutMs,maxConnectionsPerIp4,maxConnectionsPerIp6Prefix,maxConnectionsPerIp6PrefixSize,maxConnectionFrequencyPerMin,clientAllowlistTimeoutMs,reverseConnectionReceiptTimeMs,holePunchReceiptTimeMs,routingTable,rpc,dht,upnp,detectAddressChanges,restrictedNatRetries,tls,application,protocol,privacy,networkKeyPassword]); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientAllowlistTimeoutMs: $clientAllowlistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol, privacy: $privacy, networkKeyPassword: $networkKeyPassword)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hashAll([ - runtimeType, - connectionInitialTimeoutMs, - connectionInactivityTimeoutMs, - maxConnectionsPerIp4, - maxConnectionsPerIp6Prefix, - maxConnectionsPerIp6PrefixSize, - maxConnectionFrequencyPerMin, - clientAllowlistTimeoutMs, - reverseConnectionReceiptTimeMs, - holePunchReceiptTimeMs, - routingTable, - rpc, - dht, - upnp, - detectAddressChanges, - restrictedNatRetries, - tls, - application, - protocol, - privacy, - networkKeyPassword - ]); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientAllowlistTimeoutMs: $clientAllowlistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol, privacy: $privacy, networkKeyPassword: $networkKeyPassword)'; - } } /// @nodoc -abstract mixin class $VeilidConfigNetworkCopyWith<$Res> { - factory $VeilidConfigNetworkCopyWith( - VeilidConfigNetwork value, $Res Function(VeilidConfigNetwork) _then) = - _$VeilidConfigNetworkCopyWithImpl; - @useResult - $Res call( - {int connectionInitialTimeoutMs, - int connectionInactivityTimeoutMs, - int maxConnectionsPerIp4, - int maxConnectionsPerIp6Prefix, - int maxConnectionsPerIp6PrefixSize, - int maxConnectionFrequencyPerMin, - int clientAllowlistTimeoutMs, - int reverseConnectionReceiptTimeMs, - int holePunchReceiptTimeMs, - VeilidConfigRoutingTable routingTable, - VeilidConfigRPC rpc, - VeilidConfigDHT dht, - bool upnp, - bool? detectAddressChanges, - int restrictedNatRetries, - VeilidConfigTLS tls, - VeilidConfigApplication application, - VeilidConfigProtocol protocol, - VeilidConfigPrivacy privacy, - String? networkKeyPassword}); +abstract mixin class $VeilidConfigNetworkCopyWith<$Res> { + factory $VeilidConfigNetworkCopyWith(VeilidConfigNetwork value, $Res Function(VeilidConfigNetwork) _then) = _$VeilidConfigNetworkCopyWithImpl; +@useResult +$Res call({ + int connectionInitialTimeoutMs, int connectionInactivityTimeoutMs, int maxConnectionsPerIp4, int maxConnectionsPerIp6Prefix, int maxConnectionsPerIp6PrefixSize, int maxConnectionFrequencyPerMin, int clientAllowlistTimeoutMs, int reverseConnectionReceiptTimeMs, int holePunchReceiptTimeMs, VeilidConfigRoutingTable routingTable, VeilidConfigRPC rpc, VeilidConfigDHT dht, bool upnp, bool? detectAddressChanges, int restrictedNatRetries, VeilidConfigTLS tls, VeilidConfigApplication application, VeilidConfigProtocol protocol, VeilidConfigPrivacy privacy, String? networkKeyPassword +}); + + +$VeilidConfigRoutingTableCopyWith<$Res> get routingTable;$VeilidConfigRPCCopyWith<$Res> get rpc;$VeilidConfigDHTCopyWith<$Res> get dht;$VeilidConfigTLSCopyWith<$Res> get tls;$VeilidConfigApplicationCopyWith<$Res> get application;$VeilidConfigProtocolCopyWith<$Res> get protocol;$VeilidConfigPrivacyCopyWith<$Res> get privacy; - $VeilidConfigRoutingTableCopyWith<$Res> get routingTable; - $VeilidConfigRPCCopyWith<$Res> get rpc; - $VeilidConfigDHTCopyWith<$Res> get dht; - $VeilidConfigTLSCopyWith<$Res> get tls; - $VeilidConfigApplicationCopyWith<$Res> get application; - $VeilidConfigProtocolCopyWith<$Res> get protocol; - $VeilidConfigPrivacyCopyWith<$Res> get privacy; } - /// @nodoc class _$VeilidConfigNetworkCopyWithImpl<$Res> implements $VeilidConfigNetworkCopyWith<$Res> { @@ -6261,434 +6811,298 @@ class _$VeilidConfigNetworkCopyWithImpl<$Res> final VeilidConfigNetwork _self; final $Res Function(VeilidConfigNetwork) _then; - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? connectionInitialTimeoutMs = null, - Object? connectionInactivityTimeoutMs = null, - Object? maxConnectionsPerIp4 = null, - Object? maxConnectionsPerIp6Prefix = null, - Object? maxConnectionsPerIp6PrefixSize = null, - Object? maxConnectionFrequencyPerMin = null, - Object? clientAllowlistTimeoutMs = null, - Object? reverseConnectionReceiptTimeMs = null, - Object? holePunchReceiptTimeMs = null, - Object? routingTable = null, - Object? rpc = null, - Object? dht = null, - Object? upnp = null, - Object? detectAddressChanges = freezed, - Object? restrictedNatRetries = null, - Object? tls = null, - Object? application = null, - Object? protocol = null, - Object? privacy = null, - Object? networkKeyPassword = freezed, - }) { - return _then(_self.copyWith( - connectionInitialTimeoutMs: null == connectionInitialTimeoutMs - ? _self.connectionInitialTimeoutMs - : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - connectionInactivityTimeoutMs: null == connectionInactivityTimeoutMs - ? _self.connectionInactivityTimeoutMs - : connectionInactivityTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp4: null == maxConnectionsPerIp4 - ? _self.maxConnectionsPerIp4 - : maxConnectionsPerIp4 // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp6Prefix: null == maxConnectionsPerIp6Prefix - ? _self.maxConnectionsPerIp6Prefix - : maxConnectionsPerIp6Prefix // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp6PrefixSize: null == maxConnectionsPerIp6PrefixSize - ? _self.maxConnectionsPerIp6PrefixSize - : maxConnectionsPerIp6PrefixSize // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionFrequencyPerMin: null == maxConnectionFrequencyPerMin - ? _self.maxConnectionFrequencyPerMin - : maxConnectionFrequencyPerMin // ignore: cast_nullable_to_non_nullable - as int, - clientAllowlistTimeoutMs: null == clientAllowlistTimeoutMs - ? _self.clientAllowlistTimeoutMs - : clientAllowlistTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - reverseConnectionReceiptTimeMs: null == reverseConnectionReceiptTimeMs - ? _self.reverseConnectionReceiptTimeMs - : reverseConnectionReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - holePunchReceiptTimeMs: null == holePunchReceiptTimeMs - ? _self.holePunchReceiptTimeMs - : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - routingTable: null == routingTable - ? _self.routingTable - : routingTable // ignore: cast_nullable_to_non_nullable - as VeilidConfigRoutingTable, - rpc: null == rpc - ? _self.rpc - : rpc // ignore: cast_nullable_to_non_nullable - as VeilidConfigRPC, - dht: null == dht - ? _self.dht - : dht // ignore: cast_nullable_to_non_nullable - as VeilidConfigDHT, - upnp: null == upnp - ? _self.upnp - : upnp // ignore: cast_nullable_to_non_nullable - as bool, - detectAddressChanges: freezed == detectAddressChanges - ? _self.detectAddressChanges - : detectAddressChanges // ignore: cast_nullable_to_non_nullable - as bool?, - restrictedNatRetries: null == restrictedNatRetries - ? _self.restrictedNatRetries - : restrictedNatRetries // ignore: cast_nullable_to_non_nullable - as int, - tls: null == tls - ? _self.tls - : tls // ignore: cast_nullable_to_non_nullable - as VeilidConfigTLS, - application: null == application - ? _self.application - : application // ignore: cast_nullable_to_non_nullable - as VeilidConfigApplication, - protocol: null == protocol - ? _self.protocol - : protocol // ignore: cast_nullable_to_non_nullable - as VeilidConfigProtocol, - privacy: null == privacy - ? _self.privacy - : privacy // ignore: cast_nullable_to_non_nullable - as VeilidConfigPrivacy, - networkKeyPassword: freezed == networkKeyPassword - ? _self.networkKeyPassword - : networkKeyPassword // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? connectionInitialTimeoutMs = null,Object? connectionInactivityTimeoutMs = null,Object? maxConnectionsPerIp4 = null,Object? maxConnectionsPerIp6Prefix = null,Object? maxConnectionsPerIp6PrefixSize = null,Object? maxConnectionFrequencyPerMin = null,Object? clientAllowlistTimeoutMs = null,Object? reverseConnectionReceiptTimeMs = null,Object? holePunchReceiptTimeMs = null,Object? routingTable = null,Object? rpc = null,Object? dht = null,Object? upnp = null,Object? detectAddressChanges = freezed,Object? restrictedNatRetries = null,Object? tls = null,Object? application = null,Object? protocol = null,Object? privacy = null,Object? networkKeyPassword = freezed,}) { + return _then(_self.copyWith( +connectionInitialTimeoutMs: null == connectionInitialTimeoutMs ? _self.connectionInitialTimeoutMs : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,connectionInactivityTimeoutMs: null == connectionInactivityTimeoutMs ? _self.connectionInactivityTimeoutMs : connectionInactivityTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp4: null == maxConnectionsPerIp4 ? _self.maxConnectionsPerIp4 : maxConnectionsPerIp4 // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp6Prefix: null == maxConnectionsPerIp6Prefix ? _self.maxConnectionsPerIp6Prefix : maxConnectionsPerIp6Prefix // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp6PrefixSize: null == maxConnectionsPerIp6PrefixSize ? _self.maxConnectionsPerIp6PrefixSize : maxConnectionsPerIp6PrefixSize // ignore: cast_nullable_to_non_nullable +as int,maxConnectionFrequencyPerMin: null == maxConnectionFrequencyPerMin ? _self.maxConnectionFrequencyPerMin : maxConnectionFrequencyPerMin // ignore: cast_nullable_to_non_nullable +as int,clientAllowlistTimeoutMs: null == clientAllowlistTimeoutMs ? _self.clientAllowlistTimeoutMs : clientAllowlistTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,reverseConnectionReceiptTimeMs: null == reverseConnectionReceiptTimeMs ? _self.reverseConnectionReceiptTimeMs : reverseConnectionReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,holePunchReceiptTimeMs: null == holePunchReceiptTimeMs ? _self.holePunchReceiptTimeMs : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,routingTable: null == routingTable ? _self.routingTable : routingTable // ignore: cast_nullable_to_non_nullable +as VeilidConfigRoutingTable,rpc: null == rpc ? _self.rpc : rpc // ignore: cast_nullable_to_non_nullable +as VeilidConfigRPC,dht: null == dht ? _self.dht : dht // ignore: cast_nullable_to_non_nullable +as VeilidConfigDHT,upnp: null == upnp ? _self.upnp : upnp // ignore: cast_nullable_to_non_nullable +as bool,detectAddressChanges: freezed == detectAddressChanges ? _self.detectAddressChanges : detectAddressChanges // ignore: cast_nullable_to_non_nullable +as bool?,restrictedNatRetries: null == restrictedNatRetries ? _self.restrictedNatRetries : restrictedNatRetries // ignore: cast_nullable_to_non_nullable +as int,tls: null == tls ? _self.tls : tls // ignore: cast_nullable_to_non_nullable +as VeilidConfigTLS,application: null == application ? _self.application : application // ignore: cast_nullable_to_non_nullable +as VeilidConfigApplication,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable +as VeilidConfigProtocol,privacy: null == privacy ? _self.privacy : privacy // ignore: cast_nullable_to_non_nullable +as VeilidConfigPrivacy,networkKeyPassword: freezed == networkKeyPassword ? _self.networkKeyPassword : networkKeyPassword // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigRoutingTableCopyWith<$Res> get routingTable { + + return $VeilidConfigRoutingTableCopyWith<$Res>(_self.routingTable, (value) { + return _then(_self.copyWith(routingTable: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigRPCCopyWith<$Res> get rpc { + + return $VeilidConfigRPCCopyWith<$Res>(_self.rpc, (value) { + return _then(_self.copyWith(rpc: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigDHTCopyWith<$Res> get dht { + + return $VeilidConfigDHTCopyWith<$Res>(_self.dht, (value) { + return _then(_self.copyWith(dht: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTLSCopyWith<$Res> get tls { + + return $VeilidConfigTLSCopyWith<$Res>(_self.tls, (value) { + return _then(_self.copyWith(tls: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigApplicationCopyWith<$Res> get application { + + return $VeilidConfigApplicationCopyWith<$Res>(_self.application, (value) { + return _then(_self.copyWith(application: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigProtocolCopyWith<$Res> get protocol { + + return $VeilidConfigProtocolCopyWith<$Res>(_self.protocol, (value) { + return _then(_self.copyWith(protocol: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigPrivacyCopyWith<$Res> get privacy { + + return $VeilidConfigPrivacyCopyWith<$Res>(_self.privacy, (value) { + return _then(_self.copyWith(privacy: value)); + }); +} +} - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigRoutingTableCopyWith<$Res> get routingTable { - return $VeilidConfigRoutingTableCopyWith<$Res>(_self.routingTable, (value) { - return _then(_self.copyWith(routingTable: value)); - }); - } - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigRPCCopyWith<$Res> get rpc { - return $VeilidConfigRPCCopyWith<$Res>(_self.rpc, (value) { - return _then(_self.copyWith(rpc: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidConfigNetwork]. +extension VeilidConfigNetworkPatterns on VeilidConfigNetwork { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigDHTCopyWith<$Res> get dht { - return $VeilidConfigDHTCopyWith<$Res>(_self.dht, (value) { - return _then(_self.copyWith(dht: value)); - }); - } +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigNetwork value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigNetwork() when $default != null: +return $default(_that);case _: + return orElse(); - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTLSCopyWith<$Res> get tls { - return $VeilidConfigTLSCopyWith<$Res>(_self.tls, (value) { - return _then(_self.copyWith(tls: value)); - }); - } +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigApplicationCopyWith<$Res> get application { - return $VeilidConfigApplicationCopyWith<$Res>(_self.application, (value) { - return _then(_self.copyWith(application: value)); - }); - } +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigNetwork value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigNetwork(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigProtocolCopyWith<$Res> get protocol { - return $VeilidConfigProtocolCopyWith<$Res>(_self.protocol, (value) { - return _then(_self.copyWith(protocol: value)); - }); - } +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigNetwork value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigNetwork() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int connectionInitialTimeoutMs, int connectionInactivityTimeoutMs, int maxConnectionsPerIp4, int maxConnectionsPerIp6Prefix, int maxConnectionsPerIp6PrefixSize, int maxConnectionFrequencyPerMin, int clientAllowlistTimeoutMs, int reverseConnectionReceiptTimeMs, int holePunchReceiptTimeMs, VeilidConfigRoutingTable routingTable, VeilidConfigRPC rpc, VeilidConfigDHT dht, bool upnp, bool? detectAddressChanges, int restrictedNatRetries, VeilidConfigTLS tls, VeilidConfigApplication application, VeilidConfigProtocol protocol, VeilidConfigPrivacy privacy, String? networkKeyPassword)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigNetwork() when $default != null: +return $default(_that.connectionInitialTimeoutMs,_that.connectionInactivityTimeoutMs,_that.maxConnectionsPerIp4,_that.maxConnectionsPerIp6Prefix,_that.maxConnectionsPerIp6PrefixSize,_that.maxConnectionFrequencyPerMin,_that.clientAllowlistTimeoutMs,_that.reverseConnectionReceiptTimeMs,_that.holePunchReceiptTimeMs,_that.routingTable,_that.rpc,_that.dht,_that.upnp,_that.detectAddressChanges,_that.restrictedNatRetries,_that.tls,_that.application,_that.protocol,_that.privacy,_that.networkKeyPassword);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int connectionInitialTimeoutMs, int connectionInactivityTimeoutMs, int maxConnectionsPerIp4, int maxConnectionsPerIp6Prefix, int maxConnectionsPerIp6PrefixSize, int maxConnectionFrequencyPerMin, int clientAllowlistTimeoutMs, int reverseConnectionReceiptTimeMs, int holePunchReceiptTimeMs, VeilidConfigRoutingTable routingTable, VeilidConfigRPC rpc, VeilidConfigDHT dht, bool upnp, bool? detectAddressChanges, int restrictedNatRetries, VeilidConfigTLS tls, VeilidConfigApplication application, VeilidConfigProtocol protocol, VeilidConfigPrivacy privacy, String? networkKeyPassword) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigNetwork(): +return $default(_that.connectionInitialTimeoutMs,_that.connectionInactivityTimeoutMs,_that.maxConnectionsPerIp4,_that.maxConnectionsPerIp6Prefix,_that.maxConnectionsPerIp6PrefixSize,_that.maxConnectionFrequencyPerMin,_that.clientAllowlistTimeoutMs,_that.reverseConnectionReceiptTimeMs,_that.holePunchReceiptTimeMs,_that.routingTable,_that.rpc,_that.dht,_that.upnp,_that.detectAddressChanges,_that.restrictedNatRetries,_that.tls,_that.application,_that.protocol,_that.privacy,_that.networkKeyPassword);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int connectionInitialTimeoutMs, int connectionInactivityTimeoutMs, int maxConnectionsPerIp4, int maxConnectionsPerIp6Prefix, int maxConnectionsPerIp6PrefixSize, int maxConnectionFrequencyPerMin, int clientAllowlistTimeoutMs, int reverseConnectionReceiptTimeMs, int holePunchReceiptTimeMs, VeilidConfigRoutingTable routingTable, VeilidConfigRPC rpc, VeilidConfigDHT dht, bool upnp, bool? detectAddressChanges, int restrictedNatRetries, VeilidConfigTLS tls, VeilidConfigApplication application, VeilidConfigProtocol protocol, VeilidConfigPrivacy privacy, String? networkKeyPassword)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigNetwork() when $default != null: +return $default(_that.connectionInitialTimeoutMs,_that.connectionInactivityTimeoutMs,_that.maxConnectionsPerIp4,_that.maxConnectionsPerIp6Prefix,_that.maxConnectionsPerIp6PrefixSize,_that.maxConnectionFrequencyPerMin,_that.clientAllowlistTimeoutMs,_that.reverseConnectionReceiptTimeMs,_that.holePunchReceiptTimeMs,_that.routingTable,_that.rpc,_that.dht,_that.upnp,_that.detectAddressChanges,_that.restrictedNatRetries,_that.tls,_that.application,_that.protocol,_that.privacy,_that.networkKeyPassword);case _: + return null; + +} +} - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigPrivacyCopyWith<$Res> get privacy { - return $VeilidConfigPrivacyCopyWith<$Res>(_self.privacy, (value) { - return _then(_self.copyWith(privacy: value)); - }); - } } /// @nodoc @JsonSerializable() -class _VeilidConfigNetwork - with DiagnosticableTreeMixin - implements VeilidConfigNetwork { - const _VeilidConfigNetwork( - {required this.connectionInitialTimeoutMs, - required this.connectionInactivityTimeoutMs, - required this.maxConnectionsPerIp4, - required this.maxConnectionsPerIp6Prefix, - required this.maxConnectionsPerIp6PrefixSize, - required this.maxConnectionFrequencyPerMin, - required this.clientAllowlistTimeoutMs, - required this.reverseConnectionReceiptTimeMs, - required this.holePunchReceiptTimeMs, - required this.routingTable, - required this.rpc, - required this.dht, - required this.upnp, - required this.detectAddressChanges, - required this.restrictedNatRetries, - required this.tls, - required this.application, - required this.protocol, - required this.privacy, - this.networkKeyPassword}); - factory _VeilidConfigNetwork.fromJson(Map json) => - _$VeilidConfigNetworkFromJson(json); - @override - final int connectionInitialTimeoutMs; - @override - final int connectionInactivityTimeoutMs; - @override - final int maxConnectionsPerIp4; - @override - final int maxConnectionsPerIp6Prefix; - @override - final int maxConnectionsPerIp6PrefixSize; - @override - final int maxConnectionFrequencyPerMin; - @override - final int clientAllowlistTimeoutMs; - @override - final int reverseConnectionReceiptTimeMs; - @override - final int holePunchReceiptTimeMs; - @override - final VeilidConfigRoutingTable routingTable; - @override - final VeilidConfigRPC rpc; - @override - final VeilidConfigDHT dht; - @override - final bool upnp; - @override - final bool? detectAddressChanges; - @override - final int restrictedNatRetries; - @override - final VeilidConfigTLS tls; - @override - final VeilidConfigApplication application; - @override - final VeilidConfigProtocol protocol; - @override - final VeilidConfigPrivacy privacy; - @override - final String? networkKeyPassword; +class _VeilidConfigNetwork with DiagnosticableTreeMixin implements VeilidConfigNetwork { + const _VeilidConfigNetwork({required this.connectionInitialTimeoutMs, required this.connectionInactivityTimeoutMs, required this.maxConnectionsPerIp4, required this.maxConnectionsPerIp6Prefix, required this.maxConnectionsPerIp6PrefixSize, required this.maxConnectionFrequencyPerMin, required this.clientAllowlistTimeoutMs, required this.reverseConnectionReceiptTimeMs, required this.holePunchReceiptTimeMs, required this.routingTable, required this.rpc, required this.dht, required this.upnp, required this.detectAddressChanges, required this.restrictedNatRetries, required this.tls, required this.application, required this.protocol, required this.privacy, this.networkKeyPassword}); + factory _VeilidConfigNetwork.fromJson(Map json) => _$VeilidConfigNetworkFromJson(json); - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigNetworkCopyWith<_VeilidConfigNetwork> get copyWith => - __$VeilidConfigNetworkCopyWithImpl<_VeilidConfigNetwork>( - this, _$identity); +@override final int connectionInitialTimeoutMs; +@override final int connectionInactivityTimeoutMs; +@override final int maxConnectionsPerIp4; +@override final int maxConnectionsPerIp6Prefix; +@override final int maxConnectionsPerIp6PrefixSize; +@override final int maxConnectionFrequencyPerMin; +@override final int clientAllowlistTimeoutMs; +@override final int reverseConnectionReceiptTimeMs; +@override final int holePunchReceiptTimeMs; +@override final VeilidConfigRoutingTable routingTable; +@override final VeilidConfigRPC rpc; +@override final VeilidConfigDHT dht; +@override final bool upnp; +@override final bool? detectAddressChanges; +@override final int restrictedNatRetries; +@override final VeilidConfigTLS tls; +@override final VeilidConfigApplication application; +@override final VeilidConfigProtocol protocol; +@override final VeilidConfigPrivacy privacy; +@override final String? networkKeyPassword; - @override - Map toJson() { - return _$VeilidConfigNetworkToJson( - this, - ); - } +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigNetworkCopyWith<_VeilidConfigNetwork> get copyWith => __$VeilidConfigNetworkCopyWithImpl<_VeilidConfigNetwork>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigNetwork')) - ..add(DiagnosticsProperty( - 'connectionInitialTimeoutMs', connectionInitialTimeoutMs)) - ..add(DiagnosticsProperty( - 'connectionInactivityTimeoutMs', connectionInactivityTimeoutMs)) - ..add(DiagnosticsProperty('maxConnectionsPerIp4', maxConnectionsPerIp4)) - ..add(DiagnosticsProperty( - 'maxConnectionsPerIp6Prefix', maxConnectionsPerIp6Prefix)) - ..add(DiagnosticsProperty( - 'maxConnectionsPerIp6PrefixSize', maxConnectionsPerIp6PrefixSize)) - ..add(DiagnosticsProperty( - 'maxConnectionFrequencyPerMin', maxConnectionFrequencyPerMin)) - ..add(DiagnosticsProperty( - 'clientAllowlistTimeoutMs', clientAllowlistTimeoutMs)) - ..add(DiagnosticsProperty( - 'reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs)) - ..add( - DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs)) - ..add(DiagnosticsProperty('routingTable', routingTable)) - ..add(DiagnosticsProperty('rpc', rpc)) - ..add(DiagnosticsProperty('dht', dht)) - ..add(DiagnosticsProperty('upnp', upnp)) - ..add(DiagnosticsProperty('detectAddressChanges', detectAddressChanges)) - ..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries)) - ..add(DiagnosticsProperty('tls', tls)) - ..add(DiagnosticsProperty('application', application)) - ..add(DiagnosticsProperty('protocol', protocol)) - ..add(DiagnosticsProperty('privacy', privacy)) - ..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword)); - } +@override +Map toJson() { + return _$VeilidConfigNetworkToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigNetwork')) + ..add(DiagnosticsProperty('connectionInitialTimeoutMs', connectionInitialTimeoutMs))..add(DiagnosticsProperty('connectionInactivityTimeoutMs', connectionInactivityTimeoutMs))..add(DiagnosticsProperty('maxConnectionsPerIp4', maxConnectionsPerIp4))..add(DiagnosticsProperty('maxConnectionsPerIp6Prefix', maxConnectionsPerIp6Prefix))..add(DiagnosticsProperty('maxConnectionsPerIp6PrefixSize', maxConnectionsPerIp6PrefixSize))..add(DiagnosticsProperty('maxConnectionFrequencyPerMin', maxConnectionFrequencyPerMin))..add(DiagnosticsProperty('clientAllowlistTimeoutMs', clientAllowlistTimeoutMs))..add(DiagnosticsProperty('reverseConnectionReceiptTimeMs', reverseConnectionReceiptTimeMs))..add(DiagnosticsProperty('holePunchReceiptTimeMs', holePunchReceiptTimeMs))..add(DiagnosticsProperty('routingTable', routingTable))..add(DiagnosticsProperty('rpc', rpc))..add(DiagnosticsProperty('dht', dht))..add(DiagnosticsProperty('upnp', upnp))..add(DiagnosticsProperty('detectAddressChanges', detectAddressChanges))..add(DiagnosticsProperty('restrictedNatRetries', restrictedNatRetries))..add(DiagnosticsProperty('tls', tls))..add(DiagnosticsProperty('application', application))..add(DiagnosticsProperty('protocol', protocol))..add(DiagnosticsProperty('privacy', privacy))..add(DiagnosticsProperty('networkKeyPassword', networkKeyPassword)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigNetwork && - (identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || - other.connectionInitialTimeoutMs == - connectionInitialTimeoutMs) && - (identical(other.connectionInactivityTimeoutMs, connectionInactivityTimeoutMs) || - other.connectionInactivityTimeoutMs == - connectionInactivityTimeoutMs) && - (identical(other.maxConnectionsPerIp4, maxConnectionsPerIp4) || - other.maxConnectionsPerIp4 == maxConnectionsPerIp4) && - (identical(other.maxConnectionsPerIp6Prefix, maxConnectionsPerIp6Prefix) || - other.maxConnectionsPerIp6Prefix == - maxConnectionsPerIp6Prefix) && - (identical(other.maxConnectionsPerIp6PrefixSize, maxConnectionsPerIp6PrefixSize) || - other.maxConnectionsPerIp6PrefixSize == - maxConnectionsPerIp6PrefixSize) && - (identical(other.maxConnectionFrequencyPerMin, maxConnectionFrequencyPerMin) || - other.maxConnectionFrequencyPerMin == - maxConnectionFrequencyPerMin) && - (identical(other.clientAllowlistTimeoutMs, clientAllowlistTimeoutMs) || - other.clientAllowlistTimeoutMs == clientAllowlistTimeoutMs) && - (identical(other.reverseConnectionReceiptTimeMs, - reverseConnectionReceiptTimeMs) || - other.reverseConnectionReceiptTimeMs == - reverseConnectionReceiptTimeMs) && - (identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) || - other.holePunchReceiptTimeMs == holePunchReceiptTimeMs) && - (identical(other.routingTable, routingTable) || - other.routingTable == routingTable) && - (identical(other.rpc, rpc) || other.rpc == rpc) && - (identical(other.dht, dht) || other.dht == dht) && - (identical(other.upnp, upnp) || other.upnp == upnp) && - (identical(other.detectAddressChanges, detectAddressChanges) || - other.detectAddressChanges == detectAddressChanges) && - (identical(other.restrictedNatRetries, restrictedNatRetries) || - other.restrictedNatRetries == restrictedNatRetries) && - (identical(other.tls, tls) || other.tls == tls) && - (identical(other.application, application) || - other.application == application) && - (identical(other.protocol, protocol) || - other.protocol == protocol) && - (identical(other.privacy, privacy) || other.privacy == privacy) && - (identical(other.networkKeyPassword, networkKeyPassword) || - other.networkKeyPassword == networkKeyPassword)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigNetwork&&(identical(other.connectionInitialTimeoutMs, connectionInitialTimeoutMs) || other.connectionInitialTimeoutMs == connectionInitialTimeoutMs)&&(identical(other.connectionInactivityTimeoutMs, connectionInactivityTimeoutMs) || other.connectionInactivityTimeoutMs == connectionInactivityTimeoutMs)&&(identical(other.maxConnectionsPerIp4, maxConnectionsPerIp4) || other.maxConnectionsPerIp4 == maxConnectionsPerIp4)&&(identical(other.maxConnectionsPerIp6Prefix, maxConnectionsPerIp6Prefix) || other.maxConnectionsPerIp6Prefix == maxConnectionsPerIp6Prefix)&&(identical(other.maxConnectionsPerIp6PrefixSize, maxConnectionsPerIp6PrefixSize) || other.maxConnectionsPerIp6PrefixSize == maxConnectionsPerIp6PrefixSize)&&(identical(other.maxConnectionFrequencyPerMin, maxConnectionFrequencyPerMin) || other.maxConnectionFrequencyPerMin == maxConnectionFrequencyPerMin)&&(identical(other.clientAllowlistTimeoutMs, clientAllowlistTimeoutMs) || other.clientAllowlistTimeoutMs == clientAllowlistTimeoutMs)&&(identical(other.reverseConnectionReceiptTimeMs, reverseConnectionReceiptTimeMs) || other.reverseConnectionReceiptTimeMs == reverseConnectionReceiptTimeMs)&&(identical(other.holePunchReceiptTimeMs, holePunchReceiptTimeMs) || other.holePunchReceiptTimeMs == holePunchReceiptTimeMs)&&(identical(other.routingTable, routingTable) || other.routingTable == routingTable)&&(identical(other.rpc, rpc) || other.rpc == rpc)&&(identical(other.dht, dht) || other.dht == dht)&&(identical(other.upnp, upnp) || other.upnp == upnp)&&(identical(other.detectAddressChanges, detectAddressChanges) || other.detectAddressChanges == detectAddressChanges)&&(identical(other.restrictedNatRetries, restrictedNatRetries) || other.restrictedNatRetries == restrictedNatRetries)&&(identical(other.tls, tls) || other.tls == tls)&&(identical(other.application, application) || other.application == application)&&(identical(other.protocol, protocol) || other.protocol == protocol)&&(identical(other.privacy, privacy) || other.privacy == privacy)&&(identical(other.networkKeyPassword, networkKeyPassword) || other.networkKeyPassword == networkKeyPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,connectionInitialTimeoutMs,connectionInactivityTimeoutMs,maxConnectionsPerIp4,maxConnectionsPerIp6Prefix,maxConnectionsPerIp6PrefixSize,maxConnectionFrequencyPerMin,clientAllowlistTimeoutMs,reverseConnectionReceiptTimeMs,holePunchReceiptTimeMs,routingTable,rpc,dht,upnp,detectAddressChanges,restrictedNatRetries,tls,application,protocol,privacy,networkKeyPassword]); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientAllowlistTimeoutMs: $clientAllowlistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol, privacy: $privacy, networkKeyPassword: $networkKeyPassword)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hashAll([ - runtimeType, - connectionInitialTimeoutMs, - connectionInactivityTimeoutMs, - maxConnectionsPerIp4, - maxConnectionsPerIp6Prefix, - maxConnectionsPerIp6PrefixSize, - maxConnectionFrequencyPerMin, - clientAllowlistTimeoutMs, - reverseConnectionReceiptTimeMs, - holePunchReceiptTimeMs, - routingTable, - rpc, - dht, - upnp, - detectAddressChanges, - restrictedNatRetries, - tls, - application, - protocol, - privacy, - networkKeyPassword - ]); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigNetwork(connectionInitialTimeoutMs: $connectionInitialTimeoutMs, connectionInactivityTimeoutMs: $connectionInactivityTimeoutMs, maxConnectionsPerIp4: $maxConnectionsPerIp4, maxConnectionsPerIp6Prefix: $maxConnectionsPerIp6Prefix, maxConnectionsPerIp6PrefixSize: $maxConnectionsPerIp6PrefixSize, maxConnectionFrequencyPerMin: $maxConnectionFrequencyPerMin, clientAllowlistTimeoutMs: $clientAllowlistTimeoutMs, reverseConnectionReceiptTimeMs: $reverseConnectionReceiptTimeMs, holePunchReceiptTimeMs: $holePunchReceiptTimeMs, routingTable: $routingTable, rpc: $rpc, dht: $dht, upnp: $upnp, detectAddressChanges: $detectAddressChanges, restrictedNatRetries: $restrictedNatRetries, tls: $tls, application: $application, protocol: $protocol, privacy: $privacy, networkKeyPassword: $networkKeyPassword)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigNetworkCopyWith<$Res> - implements $VeilidConfigNetworkCopyWith<$Res> { - factory _$VeilidConfigNetworkCopyWith(_VeilidConfigNetwork value, - $Res Function(_VeilidConfigNetwork) _then) = - __$VeilidConfigNetworkCopyWithImpl; - @override - @useResult - $Res call( - {int connectionInitialTimeoutMs, - int connectionInactivityTimeoutMs, - int maxConnectionsPerIp4, - int maxConnectionsPerIp6Prefix, - int maxConnectionsPerIp6PrefixSize, - int maxConnectionFrequencyPerMin, - int clientAllowlistTimeoutMs, - int reverseConnectionReceiptTimeMs, - int holePunchReceiptTimeMs, - VeilidConfigRoutingTable routingTable, - VeilidConfigRPC rpc, - VeilidConfigDHT dht, - bool upnp, - bool? detectAddressChanges, - int restrictedNatRetries, - VeilidConfigTLS tls, - VeilidConfigApplication application, - VeilidConfigProtocol protocol, - VeilidConfigPrivacy privacy, - String? networkKeyPassword}); +abstract mixin class _$VeilidConfigNetworkCopyWith<$Res> implements $VeilidConfigNetworkCopyWith<$Res> { + factory _$VeilidConfigNetworkCopyWith(_VeilidConfigNetwork value, $Res Function(_VeilidConfigNetwork) _then) = __$VeilidConfigNetworkCopyWithImpl; +@override @useResult +$Res call({ + int connectionInitialTimeoutMs, int connectionInactivityTimeoutMs, int maxConnectionsPerIp4, int maxConnectionsPerIp6Prefix, int maxConnectionsPerIp6PrefixSize, int maxConnectionFrequencyPerMin, int clientAllowlistTimeoutMs, int reverseConnectionReceiptTimeMs, int holePunchReceiptTimeMs, VeilidConfigRoutingTable routingTable, VeilidConfigRPC rpc, VeilidConfigDHT dht, bool upnp, bool? detectAddressChanges, int restrictedNatRetries, VeilidConfigTLS tls, VeilidConfigApplication application, VeilidConfigProtocol protocol, VeilidConfigPrivacy privacy, String? networkKeyPassword +}); + + +@override $VeilidConfigRoutingTableCopyWith<$Res> get routingTable;@override $VeilidConfigRPCCopyWith<$Res> get rpc;@override $VeilidConfigDHTCopyWith<$Res> get dht;@override $VeilidConfigTLSCopyWith<$Res> get tls;@override $VeilidConfigApplicationCopyWith<$Res> get application;@override $VeilidConfigProtocolCopyWith<$Res> get protocol;@override $VeilidConfigPrivacyCopyWith<$Res> get privacy; - @override - $VeilidConfigRoutingTableCopyWith<$Res> get routingTable; - @override - $VeilidConfigRPCCopyWith<$Res> get rpc; - @override - $VeilidConfigDHTCopyWith<$Res> get dht; - @override - $VeilidConfigTLSCopyWith<$Res> get tls; - @override - $VeilidConfigApplicationCopyWith<$Res> get application; - @override - $VeilidConfigProtocolCopyWith<$Res> get protocol; - @override - $VeilidConfigPrivacyCopyWith<$Res> get privacy; } - /// @nodoc class __$VeilidConfigNetworkCopyWithImpl<$Res> implements _$VeilidConfigNetworkCopyWith<$Res> { @@ -6697,240 +7111,150 @@ class __$VeilidConfigNetworkCopyWithImpl<$Res> final _VeilidConfigNetwork _self; final $Res Function(_VeilidConfigNetwork) _then; - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? connectionInitialTimeoutMs = null, - Object? connectionInactivityTimeoutMs = null, - Object? maxConnectionsPerIp4 = null, - Object? maxConnectionsPerIp6Prefix = null, - Object? maxConnectionsPerIp6PrefixSize = null, - Object? maxConnectionFrequencyPerMin = null, - Object? clientAllowlistTimeoutMs = null, - Object? reverseConnectionReceiptTimeMs = null, - Object? holePunchReceiptTimeMs = null, - Object? routingTable = null, - Object? rpc = null, - Object? dht = null, - Object? upnp = null, - Object? detectAddressChanges = freezed, - Object? restrictedNatRetries = null, - Object? tls = null, - Object? application = null, - Object? protocol = null, - Object? privacy = null, - Object? networkKeyPassword = freezed, - }) { - return _then(_VeilidConfigNetwork( - connectionInitialTimeoutMs: null == connectionInitialTimeoutMs - ? _self.connectionInitialTimeoutMs - : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - connectionInactivityTimeoutMs: null == connectionInactivityTimeoutMs - ? _self.connectionInactivityTimeoutMs - : connectionInactivityTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp4: null == maxConnectionsPerIp4 - ? _self.maxConnectionsPerIp4 - : maxConnectionsPerIp4 // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp6Prefix: null == maxConnectionsPerIp6Prefix - ? _self.maxConnectionsPerIp6Prefix - : maxConnectionsPerIp6Prefix // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionsPerIp6PrefixSize: null == maxConnectionsPerIp6PrefixSize - ? _self.maxConnectionsPerIp6PrefixSize - : maxConnectionsPerIp6PrefixSize // ignore: cast_nullable_to_non_nullable - as int, - maxConnectionFrequencyPerMin: null == maxConnectionFrequencyPerMin - ? _self.maxConnectionFrequencyPerMin - : maxConnectionFrequencyPerMin // ignore: cast_nullable_to_non_nullable - as int, - clientAllowlistTimeoutMs: null == clientAllowlistTimeoutMs - ? _self.clientAllowlistTimeoutMs - : clientAllowlistTimeoutMs // ignore: cast_nullable_to_non_nullable - as int, - reverseConnectionReceiptTimeMs: null == reverseConnectionReceiptTimeMs - ? _self.reverseConnectionReceiptTimeMs - : reverseConnectionReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - holePunchReceiptTimeMs: null == holePunchReceiptTimeMs - ? _self.holePunchReceiptTimeMs - : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable - as int, - routingTable: null == routingTable - ? _self.routingTable - : routingTable // ignore: cast_nullable_to_non_nullable - as VeilidConfigRoutingTable, - rpc: null == rpc - ? _self.rpc - : rpc // ignore: cast_nullable_to_non_nullable - as VeilidConfigRPC, - dht: null == dht - ? _self.dht - : dht // ignore: cast_nullable_to_non_nullable - as VeilidConfigDHT, - upnp: null == upnp - ? _self.upnp - : upnp // ignore: cast_nullable_to_non_nullable - as bool, - detectAddressChanges: freezed == detectAddressChanges - ? _self.detectAddressChanges - : detectAddressChanges // ignore: cast_nullable_to_non_nullable - as bool?, - restrictedNatRetries: null == restrictedNatRetries - ? _self.restrictedNatRetries - : restrictedNatRetries // ignore: cast_nullable_to_non_nullable - as int, - tls: null == tls - ? _self.tls - : tls // ignore: cast_nullable_to_non_nullable - as VeilidConfigTLS, - application: null == application - ? _self.application - : application // ignore: cast_nullable_to_non_nullable - as VeilidConfigApplication, - protocol: null == protocol - ? _self.protocol - : protocol // ignore: cast_nullable_to_non_nullable - as VeilidConfigProtocol, - privacy: null == privacy - ? _self.privacy - : privacy // ignore: cast_nullable_to_non_nullable - as VeilidConfigPrivacy, - networkKeyPassword: freezed == networkKeyPassword - ? _self.networkKeyPassword - : networkKeyPassword // ignore: cast_nullable_to_non_nullable - as String?, - )); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigRoutingTableCopyWith<$Res> get routingTable { - return $VeilidConfigRoutingTableCopyWith<$Res>(_self.routingTable, (value) { - return _then(_self.copyWith(routingTable: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigRPCCopyWith<$Res> get rpc { - return $VeilidConfigRPCCopyWith<$Res>(_self.rpc, (value) { - return _then(_self.copyWith(rpc: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigDHTCopyWith<$Res> get dht { - return $VeilidConfigDHTCopyWith<$Res>(_self.dht, (value) { - return _then(_self.copyWith(dht: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTLSCopyWith<$Res> get tls { - return $VeilidConfigTLSCopyWith<$Res>(_self.tls, (value) { - return _then(_self.copyWith(tls: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigApplicationCopyWith<$Res> get application { - return $VeilidConfigApplicationCopyWith<$Res>(_self.application, (value) { - return _then(_self.copyWith(application: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigProtocolCopyWith<$Res> get protocol { - return $VeilidConfigProtocolCopyWith<$Res>(_self.protocol, (value) { - return _then(_self.copyWith(protocol: value)); - }); - } - - /// Create a copy of VeilidConfigNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigPrivacyCopyWith<$Res> get privacy { - return $VeilidConfigPrivacyCopyWith<$Res>(_self.privacy, (value) { - return _then(_self.copyWith(privacy: value)); - }); - } +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? connectionInitialTimeoutMs = null,Object? connectionInactivityTimeoutMs = null,Object? maxConnectionsPerIp4 = null,Object? maxConnectionsPerIp6Prefix = null,Object? maxConnectionsPerIp6PrefixSize = null,Object? maxConnectionFrequencyPerMin = null,Object? clientAllowlistTimeoutMs = null,Object? reverseConnectionReceiptTimeMs = null,Object? holePunchReceiptTimeMs = null,Object? routingTable = null,Object? rpc = null,Object? dht = null,Object? upnp = null,Object? detectAddressChanges = freezed,Object? restrictedNatRetries = null,Object? tls = null,Object? application = null,Object? protocol = null,Object? privacy = null,Object? networkKeyPassword = freezed,}) { + return _then(_VeilidConfigNetwork( +connectionInitialTimeoutMs: null == connectionInitialTimeoutMs ? _self.connectionInitialTimeoutMs : connectionInitialTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,connectionInactivityTimeoutMs: null == connectionInactivityTimeoutMs ? _self.connectionInactivityTimeoutMs : connectionInactivityTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp4: null == maxConnectionsPerIp4 ? _self.maxConnectionsPerIp4 : maxConnectionsPerIp4 // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp6Prefix: null == maxConnectionsPerIp6Prefix ? _self.maxConnectionsPerIp6Prefix : maxConnectionsPerIp6Prefix // ignore: cast_nullable_to_non_nullable +as int,maxConnectionsPerIp6PrefixSize: null == maxConnectionsPerIp6PrefixSize ? _self.maxConnectionsPerIp6PrefixSize : maxConnectionsPerIp6PrefixSize // ignore: cast_nullable_to_non_nullable +as int,maxConnectionFrequencyPerMin: null == maxConnectionFrequencyPerMin ? _self.maxConnectionFrequencyPerMin : maxConnectionFrequencyPerMin // ignore: cast_nullable_to_non_nullable +as int,clientAllowlistTimeoutMs: null == clientAllowlistTimeoutMs ? _self.clientAllowlistTimeoutMs : clientAllowlistTimeoutMs // ignore: cast_nullable_to_non_nullable +as int,reverseConnectionReceiptTimeMs: null == reverseConnectionReceiptTimeMs ? _self.reverseConnectionReceiptTimeMs : reverseConnectionReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,holePunchReceiptTimeMs: null == holePunchReceiptTimeMs ? _self.holePunchReceiptTimeMs : holePunchReceiptTimeMs // ignore: cast_nullable_to_non_nullable +as int,routingTable: null == routingTable ? _self.routingTable : routingTable // ignore: cast_nullable_to_non_nullable +as VeilidConfigRoutingTable,rpc: null == rpc ? _self.rpc : rpc // ignore: cast_nullable_to_non_nullable +as VeilidConfigRPC,dht: null == dht ? _self.dht : dht // ignore: cast_nullable_to_non_nullable +as VeilidConfigDHT,upnp: null == upnp ? _self.upnp : upnp // ignore: cast_nullable_to_non_nullable +as bool,detectAddressChanges: freezed == detectAddressChanges ? _self.detectAddressChanges : detectAddressChanges // ignore: cast_nullable_to_non_nullable +as bool?,restrictedNatRetries: null == restrictedNatRetries ? _self.restrictedNatRetries : restrictedNatRetries // ignore: cast_nullable_to_non_nullable +as int,tls: null == tls ? _self.tls : tls // ignore: cast_nullable_to_non_nullable +as VeilidConfigTLS,application: null == application ? _self.application : application // ignore: cast_nullable_to_non_nullable +as VeilidConfigApplication,protocol: null == protocol ? _self.protocol : protocol // ignore: cast_nullable_to_non_nullable +as VeilidConfigProtocol,privacy: null == privacy ? _self.privacy : privacy // ignore: cast_nullable_to_non_nullable +as VeilidConfigPrivacy,networkKeyPassword: freezed == networkKeyPassword ? _self.networkKeyPassword : networkKeyPassword // ignore: cast_nullable_to_non_nullable +as String?, + )); } +/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigRoutingTableCopyWith<$Res> get routingTable { + + return $VeilidConfigRoutingTableCopyWith<$Res>(_self.routingTable, (value) { + return _then(_self.copyWith(routingTable: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigRPCCopyWith<$Res> get rpc { + + return $VeilidConfigRPCCopyWith<$Res>(_self.rpc, (value) { + return _then(_self.copyWith(rpc: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigDHTCopyWith<$Res> get dht { + + return $VeilidConfigDHTCopyWith<$Res>(_self.dht, (value) { + return _then(_self.copyWith(dht: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTLSCopyWith<$Res> get tls { + + return $VeilidConfigTLSCopyWith<$Res>(_self.tls, (value) { + return _then(_self.copyWith(tls: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigApplicationCopyWith<$Res> get application { + + return $VeilidConfigApplicationCopyWith<$Res>(_self.application, (value) { + return _then(_self.copyWith(application: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigProtocolCopyWith<$Res> get protocol { + + return $VeilidConfigProtocolCopyWith<$Res>(_self.protocol, (value) { + return _then(_self.copyWith(protocol: value)); + }); +}/// Create a copy of VeilidConfigNetwork +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigPrivacyCopyWith<$Res> get privacy { + + return $VeilidConfigPrivacyCopyWith<$Res>(_self.privacy, (value) { + return _then(_self.copyWith(privacy: value)); + }); +} +} + + /// @nodoc mixin _$VeilidConfigTableStore implements DiagnosticableTreeMixin { - String get directory; - bool get delete; - /// Create a copy of VeilidConfigTableStore - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigTableStoreCopyWith get copyWith => - _$VeilidConfigTableStoreCopyWithImpl( - this as VeilidConfigTableStore, _$identity); + String get directory; bool get delete; +/// Create a copy of VeilidConfigTableStore +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigTableStoreCopyWith get copyWith => _$VeilidConfigTableStoreCopyWithImpl(this as VeilidConfigTableStore, _$identity); /// Serializes this VeilidConfigTableStore to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTableStore')) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTableStore')) + ..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigTableStore && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigTableStore&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,directory,delete); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTableStore(directory: $directory, delete: $delete)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, directory, delete); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTableStore(directory: $directory, delete: $delete)'; - } } /// @nodoc -abstract mixin class $VeilidConfigTableStoreCopyWith<$Res> { - factory $VeilidConfigTableStoreCopyWith(VeilidConfigTableStore value, - $Res Function(VeilidConfigTableStore) _then) = - _$VeilidConfigTableStoreCopyWithImpl; - @useResult - $Res call({String directory, bool delete}); -} +abstract mixin class $VeilidConfigTableStoreCopyWith<$Res> { + factory $VeilidConfigTableStoreCopyWith(VeilidConfigTableStore value, $Res Function(VeilidConfigTableStore) _then) = _$VeilidConfigTableStoreCopyWithImpl; +@useResult +$Res call({ + String directory, bool delete +}); + + + +} /// @nodoc class _$VeilidConfigTableStoreCopyWithImpl<$Res> implements $VeilidConfigTableStoreCopyWith<$Res> { @@ -6939,97 +7263,199 @@ class _$VeilidConfigTableStoreCopyWithImpl<$Res> final VeilidConfigTableStore _self; final $Res Function(VeilidConfigTableStore) _then; - /// Create a copy of VeilidConfigTableStore - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? directory = null, - Object? delete = null, - }) { - return _then(_self.copyWith( - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigTableStore +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? directory = null,Object? delete = null,}) { + return _then(_self.copyWith( +directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigTableStore]. +extension VeilidConfigTableStorePatterns on VeilidConfigTableStore { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigTableStore value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigTableStore() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigTableStore value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTableStore(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigTableStore value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigTableStore() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String directory, bool delete)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigTableStore() when $default != null: +return $default(_that.directory,_that.delete);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String directory, bool delete) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTableStore(): +return $default(_that.directory,_that.delete);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String directory, bool delete)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigTableStore() when $default != null: +return $default(_that.directory,_that.delete);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigTableStore - with DiagnosticableTreeMixin - implements VeilidConfigTableStore { - const _VeilidConfigTableStore( - {required this.directory, required this.delete}); - factory _VeilidConfigTableStore.fromJson(Map json) => - _$VeilidConfigTableStoreFromJson(json); - @override - final String directory; - @override - final bool delete; +class _VeilidConfigTableStore with DiagnosticableTreeMixin implements VeilidConfigTableStore { + const _VeilidConfigTableStore({required this.directory, required this.delete}); + factory _VeilidConfigTableStore.fromJson(Map json) => _$VeilidConfigTableStoreFromJson(json); - /// Create a copy of VeilidConfigTableStore - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigTableStoreCopyWith<_VeilidConfigTableStore> get copyWith => - __$VeilidConfigTableStoreCopyWithImpl<_VeilidConfigTableStore>( - this, _$identity); +@override final String directory; +@override final bool delete; - @override - Map toJson() { - return _$VeilidConfigTableStoreToJson( - this, - ); - } +/// Create a copy of VeilidConfigTableStore +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigTableStoreCopyWith<_VeilidConfigTableStore> get copyWith => __$VeilidConfigTableStoreCopyWithImpl<_VeilidConfigTableStore>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigTableStore')) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)); - } +@override +Map toJson() { + return _$VeilidConfigTableStoreToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigTableStore')) + ..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigTableStore && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigTableStore&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,directory,delete); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigTableStore(directory: $directory, delete: $delete)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, directory, delete); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigTableStore(directory: $directory, delete: $delete)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigTableStoreCopyWith<$Res> - implements $VeilidConfigTableStoreCopyWith<$Res> { - factory _$VeilidConfigTableStoreCopyWith(_VeilidConfigTableStore value, - $Res Function(_VeilidConfigTableStore) _then) = - __$VeilidConfigTableStoreCopyWithImpl; - @override - @useResult - $Res call({String directory, bool delete}); -} +abstract mixin class _$VeilidConfigTableStoreCopyWith<$Res> implements $VeilidConfigTableStoreCopyWith<$Res> { + factory _$VeilidConfigTableStoreCopyWith(_VeilidConfigTableStore value, $Res Function(_VeilidConfigTableStore) _then) = __$VeilidConfigTableStoreCopyWithImpl; +@override @useResult +$Res call({ + String directory, bool delete +}); + + + +} /// @nodoc class __$VeilidConfigTableStoreCopyWithImpl<$Res> implements _$VeilidConfigTableStoreCopyWith<$Res> { @@ -7038,80 +7464,69 @@ class __$VeilidConfigTableStoreCopyWithImpl<$Res> final _VeilidConfigTableStore _self; final $Res Function(_VeilidConfigTableStore) _then; - /// Create a copy of VeilidConfigTableStore - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? directory = null, - Object? delete = null, - }) { - return _then(_VeilidConfigTableStore( - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigTableStore +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? directory = null,Object? delete = null,}) { + return _then(_VeilidConfigTableStore( +directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool, + )); } + +} + + /// @nodoc mixin _$VeilidConfigBlockStore implements DiagnosticableTreeMixin { - String get directory; - bool get delete; - /// Create a copy of VeilidConfigBlockStore - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigBlockStoreCopyWith get copyWith => - _$VeilidConfigBlockStoreCopyWithImpl( - this as VeilidConfigBlockStore, _$identity); + String get directory; bool get delete; +/// Create a copy of VeilidConfigBlockStore +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigBlockStoreCopyWith get copyWith => _$VeilidConfigBlockStoreCopyWithImpl(this as VeilidConfigBlockStore, _$identity); /// Serializes this VeilidConfigBlockStore to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigBlockStore')) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigBlockStore')) + ..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigBlockStore && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigBlockStore&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,directory,delete); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigBlockStore(directory: $directory, delete: $delete)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, directory, delete); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigBlockStore(directory: $directory, delete: $delete)'; - } } /// @nodoc -abstract mixin class $VeilidConfigBlockStoreCopyWith<$Res> { - factory $VeilidConfigBlockStoreCopyWith(VeilidConfigBlockStore value, - $Res Function(VeilidConfigBlockStore) _then) = - _$VeilidConfigBlockStoreCopyWithImpl; - @useResult - $Res call({String directory, bool delete}); -} +abstract mixin class $VeilidConfigBlockStoreCopyWith<$Res> { + factory $VeilidConfigBlockStoreCopyWith(VeilidConfigBlockStore value, $Res Function(VeilidConfigBlockStore) _then) = _$VeilidConfigBlockStoreCopyWithImpl; +@useResult +$Res call({ + String directory, bool delete +}); + + + +} /// @nodoc class _$VeilidConfigBlockStoreCopyWithImpl<$Res> implements $VeilidConfigBlockStoreCopyWith<$Res> { @@ -7120,97 +7535,199 @@ class _$VeilidConfigBlockStoreCopyWithImpl<$Res> final VeilidConfigBlockStore _self; final $Res Function(VeilidConfigBlockStore) _then; - /// Create a copy of VeilidConfigBlockStore - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? directory = null, - Object? delete = null, - }) { - return _then(_self.copyWith( - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigBlockStore +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? directory = null,Object? delete = null,}) { + return _then(_self.copyWith( +directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigBlockStore]. +extension VeilidConfigBlockStorePatterns on VeilidConfigBlockStore { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigBlockStore value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigBlockStore() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigBlockStore value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigBlockStore(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigBlockStore value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigBlockStore() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String directory, bool delete)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigBlockStore() when $default != null: +return $default(_that.directory,_that.delete);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String directory, bool delete) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigBlockStore(): +return $default(_that.directory,_that.delete);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String directory, bool delete)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigBlockStore() when $default != null: +return $default(_that.directory,_that.delete);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigBlockStore - with DiagnosticableTreeMixin - implements VeilidConfigBlockStore { - const _VeilidConfigBlockStore( - {required this.directory, required this.delete}); - factory _VeilidConfigBlockStore.fromJson(Map json) => - _$VeilidConfigBlockStoreFromJson(json); - @override - final String directory; - @override - final bool delete; +class _VeilidConfigBlockStore with DiagnosticableTreeMixin implements VeilidConfigBlockStore { + const _VeilidConfigBlockStore({required this.directory, required this.delete}); + factory _VeilidConfigBlockStore.fromJson(Map json) => _$VeilidConfigBlockStoreFromJson(json); - /// Create a copy of VeilidConfigBlockStore - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigBlockStoreCopyWith<_VeilidConfigBlockStore> get copyWith => - __$VeilidConfigBlockStoreCopyWithImpl<_VeilidConfigBlockStore>( - this, _$identity); +@override final String directory; +@override final bool delete; - @override - Map toJson() { - return _$VeilidConfigBlockStoreToJson( - this, - ); - } +/// Create a copy of VeilidConfigBlockStore +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigBlockStoreCopyWith<_VeilidConfigBlockStore> get copyWith => __$VeilidConfigBlockStoreCopyWithImpl<_VeilidConfigBlockStore>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigBlockStore')) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)); - } +@override +Map toJson() { + return _$VeilidConfigBlockStoreToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigBlockStore')) + ..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigBlockStore && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigBlockStore&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,directory,delete); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigBlockStore(directory: $directory, delete: $delete)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, directory, delete); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigBlockStore(directory: $directory, delete: $delete)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigBlockStoreCopyWith<$Res> - implements $VeilidConfigBlockStoreCopyWith<$Res> { - factory _$VeilidConfigBlockStoreCopyWith(_VeilidConfigBlockStore value, - $Res Function(_VeilidConfigBlockStore) _then) = - __$VeilidConfigBlockStoreCopyWithImpl; - @override - @useResult - $Res call({String directory, bool delete}); -} +abstract mixin class _$VeilidConfigBlockStoreCopyWith<$Res> implements $VeilidConfigBlockStoreCopyWith<$Res> { + factory _$VeilidConfigBlockStoreCopyWith(_VeilidConfigBlockStore value, $Res Function(_VeilidConfigBlockStore) _then) = __$VeilidConfigBlockStoreCopyWithImpl; +@override @useResult +$Res call({ + String directory, bool delete +}); + + + +} /// @nodoc class __$VeilidConfigBlockStoreCopyWithImpl<$Res> implements _$VeilidConfigBlockStoreCopyWith<$Res> { @@ -7219,118 +7736,69 @@ class __$VeilidConfigBlockStoreCopyWithImpl<$Res> final _VeilidConfigBlockStore _self; final $Res Function(_VeilidConfigBlockStore) _then; - /// Create a copy of VeilidConfigBlockStore - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? directory = null, - Object? delete = null, - }) { - return _then(_VeilidConfigBlockStore( - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - )); - } +/// Create a copy of VeilidConfigBlockStore +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? directory = null,Object? delete = null,}) { + return _then(_VeilidConfigBlockStore( +directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool, + )); } + +} + + /// @nodoc mixin _$VeilidConfigProtectedStore implements DiagnosticableTreeMixin { - bool get allowInsecureFallback; - bool get alwaysUseInsecureStorage; - String get directory; - bool get delete; - String get deviceEncryptionKeyPassword; - String? get newDeviceEncryptionKeyPassword; - /// Create a copy of VeilidConfigProtectedStore - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigProtectedStoreCopyWith - get copyWith => - _$VeilidConfigProtectedStoreCopyWithImpl( - this as VeilidConfigProtectedStore, _$identity); + bool get allowInsecureFallback; bool get alwaysUseInsecureStorage; String get directory; bool get delete; String get deviceEncryptionKeyPassword; String? get newDeviceEncryptionKeyPassword; +/// Create a copy of VeilidConfigProtectedStore +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigProtectedStoreCopyWith get copyWith => _$VeilidConfigProtectedStoreCopyWithImpl(this as VeilidConfigProtectedStore, _$identity); /// Serializes this VeilidConfigProtectedStore to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigProtectedStore')) - ..add(DiagnosticsProperty('allowInsecureFallback', allowInsecureFallback)) - ..add(DiagnosticsProperty( - 'alwaysUseInsecureStorage', alwaysUseInsecureStorage)) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)) - ..add(DiagnosticsProperty( - 'deviceEncryptionKeyPassword', deviceEncryptionKeyPassword)) - ..add(DiagnosticsProperty( - 'newDeviceEncryptionKeyPassword', newDeviceEncryptionKeyPassword)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigProtectedStore')) + ..add(DiagnosticsProperty('allowInsecureFallback', allowInsecureFallback))..add(DiagnosticsProperty('alwaysUseInsecureStorage', alwaysUseInsecureStorage))..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete))..add(DiagnosticsProperty('deviceEncryptionKeyPassword', deviceEncryptionKeyPassword))..add(DiagnosticsProperty('newDeviceEncryptionKeyPassword', newDeviceEncryptionKeyPassword)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigProtectedStore && - (identical(other.allowInsecureFallback, allowInsecureFallback) || - other.allowInsecureFallback == allowInsecureFallback) && - (identical( - other.alwaysUseInsecureStorage, alwaysUseInsecureStorage) || - other.alwaysUseInsecureStorage == alwaysUseInsecureStorage) && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete) && - (identical(other.deviceEncryptionKeyPassword, - deviceEncryptionKeyPassword) || - other.deviceEncryptionKeyPassword == - deviceEncryptionKeyPassword) && - (identical(other.newDeviceEncryptionKeyPassword, - newDeviceEncryptionKeyPassword) || - other.newDeviceEncryptionKeyPassword == - newDeviceEncryptionKeyPassword)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigProtectedStore&&(identical(other.allowInsecureFallback, allowInsecureFallback) || other.allowInsecureFallback == allowInsecureFallback)&&(identical(other.alwaysUseInsecureStorage, alwaysUseInsecureStorage) || other.alwaysUseInsecureStorage == alwaysUseInsecureStorage)&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)&&(identical(other.deviceEncryptionKeyPassword, deviceEncryptionKeyPassword) || other.deviceEncryptionKeyPassword == deviceEncryptionKeyPassword)&&(identical(other.newDeviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword) || other.newDeviceEncryptionKeyPassword == newDeviceEncryptionKeyPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,allowInsecureFallback,alwaysUseInsecureStorage,directory,delete,deviceEncryptionKeyPassword,newDeviceEncryptionKeyPassword); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigProtectedStore(allowInsecureFallback: $allowInsecureFallback, alwaysUseInsecureStorage: $alwaysUseInsecureStorage, directory: $directory, delete: $delete, deviceEncryptionKeyPassword: $deviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword: $newDeviceEncryptionKeyPassword)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - allowInsecureFallback, - alwaysUseInsecureStorage, - directory, - delete, - deviceEncryptionKeyPassword, - newDeviceEncryptionKeyPassword); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigProtectedStore(allowInsecureFallback: $allowInsecureFallback, alwaysUseInsecureStorage: $alwaysUseInsecureStorage, directory: $directory, delete: $delete, deviceEncryptionKeyPassword: $deviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword: $newDeviceEncryptionKeyPassword)'; - } } /// @nodoc -abstract mixin class $VeilidConfigProtectedStoreCopyWith<$Res> { - factory $VeilidConfigProtectedStoreCopyWith(VeilidConfigProtectedStore value, - $Res Function(VeilidConfigProtectedStore) _then) = - _$VeilidConfigProtectedStoreCopyWithImpl; - @useResult - $Res call( - {bool allowInsecureFallback, - bool alwaysUseInsecureStorage, - String directory, - bool delete, - String deviceEncryptionKeyPassword, - String? newDeviceEncryptionKeyPassword}); -} +abstract mixin class $VeilidConfigProtectedStoreCopyWith<$Res> { + factory $VeilidConfigProtectedStoreCopyWith(VeilidConfigProtectedStore value, $Res Function(VeilidConfigProtectedStore) _then) = _$VeilidConfigProtectedStoreCopyWithImpl; +@useResult +$Res call({ + bool allowInsecureFallback, bool alwaysUseInsecureStorage, String directory, bool delete, String deviceEncryptionKeyPassword, String? newDeviceEncryptionKeyPassword +}); + + + +} /// @nodoc class _$VeilidConfigProtectedStoreCopyWithImpl<$Res> implements $VeilidConfigProtectedStoreCopyWith<$Res> { @@ -7339,164 +7807,207 @@ class _$VeilidConfigProtectedStoreCopyWithImpl<$Res> final VeilidConfigProtectedStore _self; final $Res Function(VeilidConfigProtectedStore) _then; - /// Create a copy of VeilidConfigProtectedStore - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? allowInsecureFallback = null, - Object? alwaysUseInsecureStorage = null, - Object? directory = null, - Object? delete = null, - Object? deviceEncryptionKeyPassword = null, - Object? newDeviceEncryptionKeyPassword = freezed, - }) { - return _then(_self.copyWith( - allowInsecureFallback: null == allowInsecureFallback - ? _self.allowInsecureFallback - : allowInsecureFallback // ignore: cast_nullable_to_non_nullable - as bool, - alwaysUseInsecureStorage: null == alwaysUseInsecureStorage - ? _self.alwaysUseInsecureStorage - : alwaysUseInsecureStorage // ignore: cast_nullable_to_non_nullable - as bool, - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - deviceEncryptionKeyPassword: null == deviceEncryptionKeyPassword - ? _self.deviceEncryptionKeyPassword - : deviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable - as String, - newDeviceEncryptionKeyPassword: freezed == newDeviceEncryptionKeyPassword - ? _self.newDeviceEncryptionKeyPassword - : newDeviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigProtectedStore +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? allowInsecureFallback = null,Object? alwaysUseInsecureStorage = null,Object? directory = null,Object? delete = null,Object? deviceEncryptionKeyPassword = null,Object? newDeviceEncryptionKeyPassword = freezed,}) { + return _then(_self.copyWith( +allowInsecureFallback: null == allowInsecureFallback ? _self.allowInsecureFallback : allowInsecureFallback // ignore: cast_nullable_to_non_nullable +as bool,alwaysUseInsecureStorage: null == alwaysUseInsecureStorage ? _self.alwaysUseInsecureStorage : alwaysUseInsecureStorage // ignore: cast_nullable_to_non_nullable +as bool,directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool,deviceEncryptionKeyPassword: null == deviceEncryptionKeyPassword ? _self.deviceEncryptionKeyPassword : deviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable +as String,newDeviceEncryptionKeyPassword: freezed == newDeviceEncryptionKeyPassword ? _self.newDeviceEncryptionKeyPassword : newDeviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigProtectedStore]. +extension VeilidConfigProtectedStorePatterns on VeilidConfigProtectedStore { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigProtectedStore value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigProtectedStore value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigProtectedStore value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool allowInsecureFallback, bool alwaysUseInsecureStorage, String directory, bool delete, String deviceEncryptionKeyPassword, String? newDeviceEncryptionKeyPassword)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore() when $default != null: +return $default(_that.allowInsecureFallback,_that.alwaysUseInsecureStorage,_that.directory,_that.delete,_that.deviceEncryptionKeyPassword,_that.newDeviceEncryptionKeyPassword);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool allowInsecureFallback, bool alwaysUseInsecureStorage, String directory, bool delete, String deviceEncryptionKeyPassword, String? newDeviceEncryptionKeyPassword) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore(): +return $default(_that.allowInsecureFallback,_that.alwaysUseInsecureStorage,_that.directory,_that.delete,_that.deviceEncryptionKeyPassword,_that.newDeviceEncryptionKeyPassword);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool allowInsecureFallback, bool alwaysUseInsecureStorage, String directory, bool delete, String deviceEncryptionKeyPassword, String? newDeviceEncryptionKeyPassword)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigProtectedStore() when $default != null: +return $default(_that.allowInsecureFallback,_that.alwaysUseInsecureStorage,_that.directory,_that.delete,_that.deviceEncryptionKeyPassword,_that.newDeviceEncryptionKeyPassword);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigProtectedStore - with DiagnosticableTreeMixin - implements VeilidConfigProtectedStore { - const _VeilidConfigProtectedStore( - {required this.allowInsecureFallback, - required this.alwaysUseInsecureStorage, - required this.directory, - required this.delete, - required this.deviceEncryptionKeyPassword, - this.newDeviceEncryptionKeyPassword}); - factory _VeilidConfigProtectedStore.fromJson(Map json) => - _$VeilidConfigProtectedStoreFromJson(json); - @override - final bool allowInsecureFallback; - @override - final bool alwaysUseInsecureStorage; - @override - final String directory; - @override - final bool delete; - @override - final String deviceEncryptionKeyPassword; - @override - final String? newDeviceEncryptionKeyPassword; +class _VeilidConfigProtectedStore with DiagnosticableTreeMixin implements VeilidConfigProtectedStore { + const _VeilidConfigProtectedStore({required this.allowInsecureFallback, required this.alwaysUseInsecureStorage, required this.directory, required this.delete, required this.deviceEncryptionKeyPassword, this.newDeviceEncryptionKeyPassword}); + factory _VeilidConfigProtectedStore.fromJson(Map json) => _$VeilidConfigProtectedStoreFromJson(json); - /// Create a copy of VeilidConfigProtectedStore - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigProtectedStoreCopyWith<_VeilidConfigProtectedStore> - get copyWith => __$VeilidConfigProtectedStoreCopyWithImpl< - _VeilidConfigProtectedStore>(this, _$identity); +@override final bool allowInsecureFallback; +@override final bool alwaysUseInsecureStorage; +@override final String directory; +@override final bool delete; +@override final String deviceEncryptionKeyPassword; +@override final String? newDeviceEncryptionKeyPassword; - @override - Map toJson() { - return _$VeilidConfigProtectedStoreToJson( - this, - ); - } +/// Create a copy of VeilidConfigProtectedStore +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigProtectedStoreCopyWith<_VeilidConfigProtectedStore> get copyWith => __$VeilidConfigProtectedStoreCopyWithImpl<_VeilidConfigProtectedStore>(this, _$identity); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigProtectedStore')) - ..add(DiagnosticsProperty('allowInsecureFallback', allowInsecureFallback)) - ..add(DiagnosticsProperty( - 'alwaysUseInsecureStorage', alwaysUseInsecureStorage)) - ..add(DiagnosticsProperty('directory', directory)) - ..add(DiagnosticsProperty('delete', delete)) - ..add(DiagnosticsProperty( - 'deviceEncryptionKeyPassword', deviceEncryptionKeyPassword)) - ..add(DiagnosticsProperty( - 'newDeviceEncryptionKeyPassword', newDeviceEncryptionKeyPassword)); - } +@override +Map toJson() { + return _$VeilidConfigProtectedStoreToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigProtectedStore')) + ..add(DiagnosticsProperty('allowInsecureFallback', allowInsecureFallback))..add(DiagnosticsProperty('alwaysUseInsecureStorage', alwaysUseInsecureStorage))..add(DiagnosticsProperty('directory', directory))..add(DiagnosticsProperty('delete', delete))..add(DiagnosticsProperty('deviceEncryptionKeyPassword', deviceEncryptionKeyPassword))..add(DiagnosticsProperty('newDeviceEncryptionKeyPassword', newDeviceEncryptionKeyPassword)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigProtectedStore && - (identical(other.allowInsecureFallback, allowInsecureFallback) || - other.allowInsecureFallback == allowInsecureFallback) && - (identical( - other.alwaysUseInsecureStorage, alwaysUseInsecureStorage) || - other.alwaysUseInsecureStorage == alwaysUseInsecureStorage) && - (identical(other.directory, directory) || - other.directory == directory) && - (identical(other.delete, delete) || other.delete == delete) && - (identical(other.deviceEncryptionKeyPassword, - deviceEncryptionKeyPassword) || - other.deviceEncryptionKeyPassword == - deviceEncryptionKeyPassword) && - (identical(other.newDeviceEncryptionKeyPassword, - newDeviceEncryptionKeyPassword) || - other.newDeviceEncryptionKeyPassword == - newDeviceEncryptionKeyPassword)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigProtectedStore&&(identical(other.allowInsecureFallback, allowInsecureFallback) || other.allowInsecureFallback == allowInsecureFallback)&&(identical(other.alwaysUseInsecureStorage, alwaysUseInsecureStorage) || other.alwaysUseInsecureStorage == alwaysUseInsecureStorage)&&(identical(other.directory, directory) || other.directory == directory)&&(identical(other.delete, delete) || other.delete == delete)&&(identical(other.deviceEncryptionKeyPassword, deviceEncryptionKeyPassword) || other.deviceEncryptionKeyPassword == deviceEncryptionKeyPassword)&&(identical(other.newDeviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword) || other.newDeviceEncryptionKeyPassword == newDeviceEncryptionKeyPassword)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,allowInsecureFallback,alwaysUseInsecureStorage,directory,delete,deviceEncryptionKeyPassword,newDeviceEncryptionKeyPassword); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigProtectedStore(allowInsecureFallback: $allowInsecureFallback, alwaysUseInsecureStorage: $alwaysUseInsecureStorage, directory: $directory, delete: $delete, deviceEncryptionKeyPassword: $deviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword: $newDeviceEncryptionKeyPassword)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - allowInsecureFallback, - alwaysUseInsecureStorage, - directory, - delete, - deviceEncryptionKeyPassword, - newDeviceEncryptionKeyPassword); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigProtectedStore(allowInsecureFallback: $allowInsecureFallback, alwaysUseInsecureStorage: $alwaysUseInsecureStorage, directory: $directory, delete: $delete, deviceEncryptionKeyPassword: $deviceEncryptionKeyPassword, newDeviceEncryptionKeyPassword: $newDeviceEncryptionKeyPassword)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigProtectedStoreCopyWith<$Res> - implements $VeilidConfigProtectedStoreCopyWith<$Res> { - factory _$VeilidConfigProtectedStoreCopyWith( - _VeilidConfigProtectedStore value, - $Res Function(_VeilidConfigProtectedStore) _then) = - __$VeilidConfigProtectedStoreCopyWithImpl; - @override - @useResult - $Res call( - {bool allowInsecureFallback, - bool alwaysUseInsecureStorage, - String directory, - bool delete, - String deviceEncryptionKeyPassword, - String? newDeviceEncryptionKeyPassword}); -} +abstract mixin class _$VeilidConfigProtectedStoreCopyWith<$Res> implements $VeilidConfigProtectedStoreCopyWith<$Res> { + factory _$VeilidConfigProtectedStoreCopyWith(_VeilidConfigProtectedStore value, $Res Function(_VeilidConfigProtectedStore) _then) = __$VeilidConfigProtectedStoreCopyWithImpl; +@override @useResult +$Res call({ + bool allowInsecureFallback, bool alwaysUseInsecureStorage, String directory, bool delete, String deviceEncryptionKeyPassword, String? newDeviceEncryptionKeyPassword +}); + + + +} /// @nodoc class __$VeilidConfigProtectedStoreCopyWithImpl<$Res> implements _$VeilidConfigProtectedStoreCopyWith<$Res> { @@ -7505,97 +8016,73 @@ class __$VeilidConfigProtectedStoreCopyWithImpl<$Res> final _VeilidConfigProtectedStore _self; final $Res Function(_VeilidConfigProtectedStore) _then; - /// Create a copy of VeilidConfigProtectedStore - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? allowInsecureFallback = null, - Object? alwaysUseInsecureStorage = null, - Object? directory = null, - Object? delete = null, - Object? deviceEncryptionKeyPassword = null, - Object? newDeviceEncryptionKeyPassword = freezed, - }) { - return _then(_VeilidConfigProtectedStore( - allowInsecureFallback: null == allowInsecureFallback - ? _self.allowInsecureFallback - : allowInsecureFallback // ignore: cast_nullable_to_non_nullable - as bool, - alwaysUseInsecureStorage: null == alwaysUseInsecureStorage - ? _self.alwaysUseInsecureStorage - : alwaysUseInsecureStorage // ignore: cast_nullable_to_non_nullable - as bool, - directory: null == directory - ? _self.directory - : directory // ignore: cast_nullable_to_non_nullable - as String, - delete: null == delete - ? _self.delete - : delete // ignore: cast_nullable_to_non_nullable - as bool, - deviceEncryptionKeyPassword: null == deviceEncryptionKeyPassword - ? _self.deviceEncryptionKeyPassword - : deviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable - as String, - newDeviceEncryptionKeyPassword: freezed == newDeviceEncryptionKeyPassword - ? _self.newDeviceEncryptionKeyPassword - : newDeviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidConfigProtectedStore +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? allowInsecureFallback = null,Object? alwaysUseInsecureStorage = null,Object? directory = null,Object? delete = null,Object? deviceEncryptionKeyPassword = null,Object? newDeviceEncryptionKeyPassword = freezed,}) { + return _then(_VeilidConfigProtectedStore( +allowInsecureFallback: null == allowInsecureFallback ? _self.allowInsecureFallback : allowInsecureFallback // ignore: cast_nullable_to_non_nullable +as bool,alwaysUseInsecureStorage: null == alwaysUseInsecureStorage ? _self.alwaysUseInsecureStorage : alwaysUseInsecureStorage // ignore: cast_nullable_to_non_nullable +as bool,directory: null == directory ? _self.directory : directory // ignore: cast_nullable_to_non_nullable +as String,delete: null == delete ? _self.delete : delete // ignore: cast_nullable_to_non_nullable +as bool,deviceEncryptionKeyPassword: null == deviceEncryptionKeyPassword ? _self.deviceEncryptionKeyPassword : deviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable +as String,newDeviceEncryptionKeyPassword: freezed == newDeviceEncryptionKeyPassword ? _self.newDeviceEncryptionKeyPassword : newDeviceEncryptionKeyPassword // ignore: cast_nullable_to_non_nullable +as String?, + )); } + +} + + /// @nodoc mixin _$VeilidConfigCapabilities implements DiagnosticableTreeMixin { - List get disable; - /// Create a copy of VeilidConfigCapabilities - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigCapabilitiesCopyWith get copyWith => - _$VeilidConfigCapabilitiesCopyWithImpl( - this as VeilidConfigCapabilities, _$identity); + List get disable; +/// Create a copy of VeilidConfigCapabilities +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigCapabilitiesCopyWith get copyWith => _$VeilidConfigCapabilitiesCopyWithImpl(this as VeilidConfigCapabilities, _$identity); /// Serializes this VeilidConfigCapabilities to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigCapabilities')) - ..add(DiagnosticsProperty('disable', disable)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigCapabilities')) + ..add(DiagnosticsProperty('disable', disable)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfigCapabilities && - const DeepCollectionEquality().equals(other.disable, disable)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfigCapabilities&&const DeepCollectionEquality().equals(other.disable, disable)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(disable)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigCapabilities(disable: $disable)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(disable)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigCapabilities(disable: $disable)'; - } } /// @nodoc -abstract mixin class $VeilidConfigCapabilitiesCopyWith<$Res> { - factory $VeilidConfigCapabilitiesCopyWith(VeilidConfigCapabilities value, - $Res Function(VeilidConfigCapabilities) _then) = - _$VeilidConfigCapabilitiesCopyWithImpl; - @useResult - $Res call({List disable}); -} +abstract mixin class $VeilidConfigCapabilitiesCopyWith<$Res> { + factory $VeilidConfigCapabilitiesCopyWith(VeilidConfigCapabilities value, $Res Function(VeilidConfigCapabilities) _then) = _$VeilidConfigCapabilitiesCopyWithImpl; +@useResult +$Res call({ + List disable +}); + + + +} /// @nodoc class _$VeilidConfigCapabilitiesCopyWithImpl<$Res> implements $VeilidConfigCapabilitiesCopyWith<$Res> { @@ -7604,93 +8091,203 @@ class _$VeilidConfigCapabilitiesCopyWithImpl<$Res> final VeilidConfigCapabilities _self; final $Res Function(VeilidConfigCapabilities) _then; - /// Create a copy of VeilidConfigCapabilities - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? disable = null, - }) { - return _then(_self.copyWith( - disable: null == disable - ? _self.disable - : disable // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidConfigCapabilities +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? disable = null,}) { + return _then(_self.copyWith( +disable: null == disable ? _self.disable : disable // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidConfigCapabilities]. +extension VeilidConfigCapabilitiesPatterns on VeilidConfigCapabilities { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfigCapabilities value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfigCapabilities() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfigCapabilities value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigCapabilities(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfigCapabilities value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfigCapabilities() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List disable)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfigCapabilities() when $default != null: +return $default(_that.disable);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List disable) $default,) {final _that = this; +switch (_that) { +case _VeilidConfigCapabilities(): +return $default(_that.disable);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List disable)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfigCapabilities() when $default != null: +return $default(_that.disable);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() -class _VeilidConfigCapabilities - with DiagnosticableTreeMixin - implements VeilidConfigCapabilities { - const _VeilidConfigCapabilities({required final List disable}) - : _disable = disable; - factory _VeilidConfigCapabilities.fromJson(Map json) => - _$VeilidConfigCapabilitiesFromJson(json); - final List _disable; - @override - List get disable { - if (_disable is EqualUnmodifiableListView) return _disable; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_disable); - } +class _VeilidConfigCapabilities with DiagnosticableTreeMixin implements VeilidConfigCapabilities { + const _VeilidConfigCapabilities({required final List disable}): _disable = disable; + factory _VeilidConfigCapabilities.fromJson(Map json) => _$VeilidConfigCapabilitiesFromJson(json); - /// Create a copy of VeilidConfigCapabilities - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigCapabilitiesCopyWith<_VeilidConfigCapabilities> get copyWith => - __$VeilidConfigCapabilitiesCopyWithImpl<_VeilidConfigCapabilities>( - this, _$identity); + final List _disable; +@override List get disable { + if (_disable is EqualUnmodifiableListView) return _disable; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_disable); +} - @override - Map toJson() { - return _$VeilidConfigCapabilitiesToJson( - this, - ); - } - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfigCapabilities')) - ..add(DiagnosticsProperty('disable', disable)); - } +/// Create a copy of VeilidConfigCapabilities +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigCapabilitiesCopyWith<_VeilidConfigCapabilities> get copyWith => __$VeilidConfigCapabilitiesCopyWithImpl<_VeilidConfigCapabilities>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfigCapabilities && - const DeepCollectionEquality().equals(other._disable, _disable)); - } +@override +Map toJson() { + return _$VeilidConfigCapabilitiesToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfigCapabilities')) + ..add(DiagnosticsProperty('disable', disable)); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfigCapabilities&&const DeepCollectionEquality().equals(other._disable, _disable)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_disable)); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfigCapabilities(disable: $disable)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_disable)); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfigCapabilities(disable: $disable)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigCapabilitiesCopyWith<$Res> - implements $VeilidConfigCapabilitiesCopyWith<$Res> { - factory _$VeilidConfigCapabilitiesCopyWith(_VeilidConfigCapabilities value, - $Res Function(_VeilidConfigCapabilities) _then) = - __$VeilidConfigCapabilitiesCopyWithImpl; - @override - @useResult - $Res call({List disable}); -} +abstract mixin class _$VeilidConfigCapabilitiesCopyWith<$Res> implements $VeilidConfigCapabilitiesCopyWith<$Res> { + factory _$VeilidConfigCapabilitiesCopyWith(_VeilidConfigCapabilities value, $Res Function(_VeilidConfigCapabilities) _then) = __$VeilidConfigCapabilitiesCopyWithImpl; +@override @useResult +$Res call({ + List disable +}); + + + +} /// @nodoc class __$VeilidConfigCapabilitiesCopyWithImpl<$Res> implements _$VeilidConfigCapabilitiesCopyWith<$Res> { @@ -7699,330 +8296,324 @@ class __$VeilidConfigCapabilitiesCopyWithImpl<$Res> final _VeilidConfigCapabilities _self; final $Res Function(_VeilidConfigCapabilities) _then; - /// Create a copy of VeilidConfigCapabilities - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? disable = null, - }) { - return _then(_VeilidConfigCapabilities( - disable: null == disable - ? _self._disable - : disable // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidConfigCapabilities +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? disable = null,}) { + return _then(_VeilidConfigCapabilities( +disable: null == disable ? _self._disable : disable // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidConfig implements DiagnosticableTreeMixin { - String get programName; - String get namespace; - VeilidConfigCapabilities get capabilities; - VeilidConfigProtectedStore get protectedStore; - VeilidConfigTableStore get tableStore; - VeilidConfigBlockStore get blockStore; - VeilidConfigNetwork get network; - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidConfigCopyWith get copyWith => - _$VeilidConfigCopyWithImpl( - this as VeilidConfig, _$identity); + String get programName; String get namespace; VeilidConfigCapabilities get capabilities; VeilidConfigProtectedStore get protectedStore; VeilidConfigTableStore get tableStore; VeilidConfigBlockStore get blockStore; VeilidConfigNetwork get network; +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidConfigCopyWith get copyWith => _$VeilidConfigCopyWithImpl(this as VeilidConfig, _$identity); /// Serializes this VeilidConfig to a JSON map. Map toJson(); - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfig')) - ..add(DiagnosticsProperty('programName', programName)) - ..add(DiagnosticsProperty('namespace', namespace)) - ..add(DiagnosticsProperty('capabilities', capabilities)) - ..add(DiagnosticsProperty('protectedStore', protectedStore)) - ..add(DiagnosticsProperty('tableStore', tableStore)) - ..add(DiagnosticsProperty('blockStore', blockStore)) - ..add(DiagnosticsProperty('network', network)); - } +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfig')) + ..add(DiagnosticsProperty('programName', programName))..add(DiagnosticsProperty('namespace', namespace))..add(DiagnosticsProperty('capabilities', capabilities))..add(DiagnosticsProperty('protectedStore', protectedStore))..add(DiagnosticsProperty('tableStore', tableStore))..add(DiagnosticsProperty('blockStore', blockStore))..add(DiagnosticsProperty('network', network)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidConfig && - (identical(other.programName, programName) || - other.programName == programName) && - (identical(other.namespace, namespace) || - other.namespace == namespace) && - (identical(other.capabilities, capabilities) || - other.capabilities == capabilities) && - (identical(other.protectedStore, protectedStore) || - other.protectedStore == protectedStore) && - (identical(other.tableStore, tableStore) || - other.tableStore == tableStore) && - (identical(other.blockStore, blockStore) || - other.blockStore == blockStore) && - (identical(other.network, network) || other.network == network)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidConfig&&(identical(other.programName, programName) || other.programName == programName)&&(identical(other.namespace, namespace) || other.namespace == namespace)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.protectedStore, protectedStore) || other.protectedStore == protectedStore)&&(identical(other.tableStore, tableStore) || other.tableStore == tableStore)&&(identical(other.blockStore, blockStore) || other.blockStore == blockStore)&&(identical(other.network, network) || other.network == network)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,programName,namespace,capabilities,protectedStore,tableStore,blockStore,network); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfig(programName: $programName, namespace: $namespace, capabilities: $capabilities, protectedStore: $protectedStore, tableStore: $tableStore, blockStore: $blockStore, network: $network)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, programName, namespace, - capabilities, protectedStore, tableStore, blockStore, network); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfig(programName: $programName, namespace: $namespace, capabilities: $capabilities, protectedStore: $protectedStore, tableStore: $tableStore, blockStore: $blockStore, network: $network)'; - } } /// @nodoc -abstract mixin class $VeilidConfigCopyWith<$Res> { - factory $VeilidConfigCopyWith( - VeilidConfig value, $Res Function(VeilidConfig) _then) = - _$VeilidConfigCopyWithImpl; - @useResult - $Res call( - {String programName, - String namespace, - VeilidConfigCapabilities capabilities, - VeilidConfigProtectedStore protectedStore, - VeilidConfigTableStore tableStore, - VeilidConfigBlockStore blockStore, - VeilidConfigNetwork network}); +abstract mixin class $VeilidConfigCopyWith<$Res> { + factory $VeilidConfigCopyWith(VeilidConfig value, $Res Function(VeilidConfig) _then) = _$VeilidConfigCopyWithImpl; +@useResult +$Res call({ + String programName, String namespace, VeilidConfigCapabilities capabilities, VeilidConfigProtectedStore protectedStore, VeilidConfigTableStore tableStore, VeilidConfigBlockStore blockStore, VeilidConfigNetwork network +}); + + +$VeilidConfigCapabilitiesCopyWith<$Res> get capabilities;$VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore;$VeilidConfigTableStoreCopyWith<$Res> get tableStore;$VeilidConfigBlockStoreCopyWith<$Res> get blockStore;$VeilidConfigNetworkCopyWith<$Res> get network; - $VeilidConfigCapabilitiesCopyWith<$Res> get capabilities; - $VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore; - $VeilidConfigTableStoreCopyWith<$Res> get tableStore; - $VeilidConfigBlockStoreCopyWith<$Res> get blockStore; - $VeilidConfigNetworkCopyWith<$Res> get network; } - /// @nodoc -class _$VeilidConfigCopyWithImpl<$Res> implements $VeilidConfigCopyWith<$Res> { +class _$VeilidConfigCopyWithImpl<$Res> + implements $VeilidConfigCopyWith<$Res> { _$VeilidConfigCopyWithImpl(this._self, this._then); final VeilidConfig _self; final $Res Function(VeilidConfig) _then; - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? programName = null, - Object? namespace = null, - Object? capabilities = null, - Object? protectedStore = null, - Object? tableStore = null, - Object? blockStore = null, - Object? network = null, - }) { - return _then(_self.copyWith( - programName: null == programName - ? _self.programName - : programName // ignore: cast_nullable_to_non_nullable - as String, - namespace: null == namespace - ? _self.namespace - : namespace // ignore: cast_nullable_to_non_nullable - as String, - capabilities: null == capabilities - ? _self.capabilities - : capabilities // ignore: cast_nullable_to_non_nullable - as VeilidConfigCapabilities, - protectedStore: null == protectedStore - ? _self.protectedStore - : protectedStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigProtectedStore, - tableStore: null == tableStore - ? _self.tableStore - : tableStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigTableStore, - blockStore: null == blockStore - ? _self.blockStore - : blockStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigBlockStore, - network: null == network - ? _self.network - : network // ignore: cast_nullable_to_non_nullable - as VeilidConfigNetwork, - )); - } +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? programName = null,Object? namespace = null,Object? capabilities = null,Object? protectedStore = null,Object? tableStore = null,Object? blockStore = null,Object? network = null,}) { + return _then(_self.copyWith( +programName: null == programName ? _self.programName : programName // ignore: cast_nullable_to_non_nullable +as String,namespace: null == namespace ? _self.namespace : namespace // ignore: cast_nullable_to_non_nullable +as String,capabilities: null == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable +as VeilidConfigCapabilities,protectedStore: null == protectedStore ? _self.protectedStore : protectedStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigProtectedStore,tableStore: null == tableStore ? _self.tableStore : tableStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigTableStore,blockStore: null == blockStore ? _self.blockStore : blockStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigBlockStore,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable +as VeilidConfigNetwork, + )); +} +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigCapabilitiesCopyWith<$Res> get capabilities { + + return $VeilidConfigCapabilitiesCopyWith<$Res>(_self.capabilities, (value) { + return _then(_self.copyWith(capabilities: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore { + + return $VeilidConfigProtectedStoreCopyWith<$Res>(_self.protectedStore, (value) { + return _then(_self.copyWith(protectedStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTableStoreCopyWith<$Res> get tableStore { + + return $VeilidConfigTableStoreCopyWith<$Res>(_self.tableStore, (value) { + return _then(_self.copyWith(tableStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigBlockStoreCopyWith<$Res> get blockStore { + + return $VeilidConfigBlockStoreCopyWith<$Res>(_self.blockStore, (value) { + return _then(_self.copyWith(blockStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigNetworkCopyWith<$Res> get network { + + return $VeilidConfigNetworkCopyWith<$Res>(_self.network, (value) { + return _then(_self.copyWith(network: value)); + }); +} +} - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigCapabilitiesCopyWith<$Res> get capabilities { - return $VeilidConfigCapabilitiesCopyWith<$Res>(_self.capabilities, (value) { - return _then(_self.copyWith(capabilities: value)); - }); - } - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore { - return $VeilidConfigProtectedStoreCopyWith<$Res>(_self.protectedStore, - (value) { - return _then(_self.copyWith(protectedStore: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidConfig]. +extension VeilidConfigPatterns on VeilidConfig { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTableStoreCopyWith<$Res> get tableStore { - return $VeilidConfigTableStoreCopyWith<$Res>(_self.tableStore, (value) { - return _then(_self.copyWith(tableStore: value)); - }); - } +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidConfig value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidConfig() when $default != null: +return $default(_that);case _: + return orElse(); - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigBlockStoreCopyWith<$Res> get blockStore { - return $VeilidConfigBlockStoreCopyWith<$Res>(_self.blockStore, (value) { - return _then(_self.copyWith(blockStore: value)); - }); - } +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidConfig value) $default,){ +final _that = this; +switch (_that) { +case _VeilidConfig(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidConfig value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidConfig() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String programName, String namespace, VeilidConfigCapabilities capabilities, VeilidConfigProtectedStore protectedStore, VeilidConfigTableStore tableStore, VeilidConfigBlockStore blockStore, VeilidConfigNetwork network)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidConfig() when $default != null: +return $default(_that.programName,_that.namespace,_that.capabilities,_that.protectedStore,_that.tableStore,_that.blockStore,_that.network);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String programName, String namespace, VeilidConfigCapabilities capabilities, VeilidConfigProtectedStore protectedStore, VeilidConfigTableStore tableStore, VeilidConfigBlockStore blockStore, VeilidConfigNetwork network) $default,) {final _that = this; +switch (_that) { +case _VeilidConfig(): +return $default(_that.programName,_that.namespace,_that.capabilities,_that.protectedStore,_that.tableStore,_that.blockStore,_that.network);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String programName, String namespace, VeilidConfigCapabilities capabilities, VeilidConfigProtectedStore protectedStore, VeilidConfigTableStore tableStore, VeilidConfigBlockStore blockStore, VeilidConfigNetwork network)? $default,) {final _that = this; +switch (_that) { +case _VeilidConfig() when $default != null: +return $default(_that.programName,_that.namespace,_that.capabilities,_that.protectedStore,_that.tableStore,_that.blockStore,_that.network);case _: + return null; + +} +} - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigNetworkCopyWith<$Res> get network { - return $VeilidConfigNetworkCopyWith<$Res>(_self.network, (value) { - return _then(_self.copyWith(network: value)); - }); - } } /// @nodoc @JsonSerializable() + class _VeilidConfig with DiagnosticableTreeMixin implements VeilidConfig { - const _VeilidConfig( - {required this.programName, - required this.namespace, - required this.capabilities, - required this.protectedStore, - required this.tableStore, - required this.blockStore, - required this.network}); - factory _VeilidConfig.fromJson(Map json) => - _$VeilidConfigFromJson(json); + const _VeilidConfig({required this.programName, required this.namespace, required this.capabilities, required this.protectedStore, required this.tableStore, required this.blockStore, required this.network}); + factory _VeilidConfig.fromJson(Map json) => _$VeilidConfigFromJson(json); - @override - final String programName; - @override - final String namespace; - @override - final VeilidConfigCapabilities capabilities; - @override - final VeilidConfigProtectedStore protectedStore; - @override - final VeilidConfigTableStore tableStore; - @override - final VeilidConfigBlockStore blockStore; - @override - final VeilidConfigNetwork network; +@override final String programName; +@override final String namespace; +@override final VeilidConfigCapabilities capabilities; +@override final VeilidConfigProtectedStore protectedStore; +@override final VeilidConfigTableStore tableStore; +@override final VeilidConfigBlockStore blockStore; +@override final VeilidConfigNetwork network; - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidConfigCopyWith<_VeilidConfig> get copyWith => - __$VeilidConfigCopyWithImpl<_VeilidConfig>(this, _$identity); +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidConfigCopyWith<_VeilidConfig> get copyWith => __$VeilidConfigCopyWithImpl<_VeilidConfig>(this, _$identity); - @override - Map toJson() { - return _$VeilidConfigToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidConfigToJson(this, ); +} +@override +void debugFillProperties(DiagnosticPropertiesBuilder properties) { + properties + ..add(DiagnosticsProperty('type', 'VeilidConfig')) + ..add(DiagnosticsProperty('programName', programName))..add(DiagnosticsProperty('namespace', namespace))..add(DiagnosticsProperty('capabilities', capabilities))..add(DiagnosticsProperty('protectedStore', protectedStore))..add(DiagnosticsProperty('tableStore', tableStore))..add(DiagnosticsProperty('blockStore', blockStore))..add(DiagnosticsProperty('network', network)); +} - @override - void debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties - ..add(DiagnosticsProperty('type', 'VeilidConfig')) - ..add(DiagnosticsProperty('programName', programName)) - ..add(DiagnosticsProperty('namespace', namespace)) - ..add(DiagnosticsProperty('capabilities', capabilities)) - ..add(DiagnosticsProperty('protectedStore', protectedStore)) - ..add(DiagnosticsProperty('tableStore', tableStore)) - ..add(DiagnosticsProperty('blockStore', blockStore)) - ..add(DiagnosticsProperty('network', network)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidConfig&&(identical(other.programName, programName) || other.programName == programName)&&(identical(other.namespace, namespace) || other.namespace == namespace)&&(identical(other.capabilities, capabilities) || other.capabilities == capabilities)&&(identical(other.protectedStore, protectedStore) || other.protectedStore == protectedStore)&&(identical(other.tableStore, tableStore) || other.tableStore == tableStore)&&(identical(other.blockStore, blockStore) || other.blockStore == blockStore)&&(identical(other.network, network) || other.network == network)); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidConfig && - (identical(other.programName, programName) || - other.programName == programName) && - (identical(other.namespace, namespace) || - other.namespace == namespace) && - (identical(other.capabilities, capabilities) || - other.capabilities == capabilities) && - (identical(other.protectedStore, protectedStore) || - other.protectedStore == protectedStore) && - (identical(other.tableStore, tableStore) || - other.tableStore == tableStore) && - (identical(other.blockStore, blockStore) || - other.blockStore == blockStore) && - (identical(other.network, network) || other.network == network)); - } +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,programName,namespace,capabilities,protectedStore,tableStore,blockStore,network); + +@override +String toString({ DiagnosticLevel minLevel = DiagnosticLevel.info }) { + return 'VeilidConfig(programName: $programName, namespace: $namespace, capabilities: $capabilities, protectedStore: $protectedStore, tableStore: $tableStore, blockStore: $blockStore, network: $network)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, programName, namespace, - capabilities, protectedStore, tableStore, blockStore, network); - @override - String toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) { - return 'VeilidConfig(programName: $programName, namespace: $namespace, capabilities: $capabilities, protectedStore: $protectedStore, tableStore: $tableStore, blockStore: $blockStore, network: $network)'; - } } /// @nodoc -abstract mixin class _$VeilidConfigCopyWith<$Res> - implements $VeilidConfigCopyWith<$Res> { - factory _$VeilidConfigCopyWith( - _VeilidConfig value, $Res Function(_VeilidConfig) _then) = - __$VeilidConfigCopyWithImpl; - @override - @useResult - $Res call( - {String programName, - String namespace, - VeilidConfigCapabilities capabilities, - VeilidConfigProtectedStore protectedStore, - VeilidConfigTableStore tableStore, - VeilidConfigBlockStore blockStore, - VeilidConfigNetwork network}); +abstract mixin class _$VeilidConfigCopyWith<$Res> implements $VeilidConfigCopyWith<$Res> { + factory _$VeilidConfigCopyWith(_VeilidConfig value, $Res Function(_VeilidConfig) _then) = __$VeilidConfigCopyWithImpl; +@override @useResult +$Res call({ + String programName, String namespace, VeilidConfigCapabilities capabilities, VeilidConfigProtectedStore protectedStore, VeilidConfigTableStore tableStore, VeilidConfigBlockStore blockStore, VeilidConfigNetwork network +}); + + +@override $VeilidConfigCapabilitiesCopyWith<$Res> get capabilities;@override $VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore;@override $VeilidConfigTableStoreCopyWith<$Res> get tableStore;@override $VeilidConfigBlockStoreCopyWith<$Res> get blockStore;@override $VeilidConfigNetworkCopyWith<$Res> get network; - @override - $VeilidConfigCapabilitiesCopyWith<$Res> get capabilities; - @override - $VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore; - @override - $VeilidConfigTableStoreCopyWith<$Res> get tableStore; - @override - $VeilidConfigBlockStoreCopyWith<$Res> get blockStore; - @override - $VeilidConfigNetworkCopyWith<$Res> get network; } - /// @nodoc class __$VeilidConfigCopyWithImpl<$Res> implements _$VeilidConfigCopyWith<$Res> { @@ -8031,101 +8622,67 @@ class __$VeilidConfigCopyWithImpl<$Res> final _VeilidConfig _self; final $Res Function(_VeilidConfig) _then; - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? programName = null, - Object? namespace = null, - Object? capabilities = null, - Object? protectedStore = null, - Object? tableStore = null, - Object? blockStore = null, - Object? network = null, - }) { - return _then(_VeilidConfig( - programName: null == programName - ? _self.programName - : programName // ignore: cast_nullable_to_non_nullable - as String, - namespace: null == namespace - ? _self.namespace - : namespace // ignore: cast_nullable_to_non_nullable - as String, - capabilities: null == capabilities - ? _self.capabilities - : capabilities // ignore: cast_nullable_to_non_nullable - as VeilidConfigCapabilities, - protectedStore: null == protectedStore - ? _self.protectedStore - : protectedStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigProtectedStore, - tableStore: null == tableStore - ? _self.tableStore - : tableStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigTableStore, - blockStore: null == blockStore - ? _self.blockStore - : blockStore // ignore: cast_nullable_to_non_nullable - as VeilidConfigBlockStore, - network: null == network - ? _self.network - : network // ignore: cast_nullable_to_non_nullable - as VeilidConfigNetwork, - )); - } +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? programName = null,Object? namespace = null,Object? capabilities = null,Object? protectedStore = null,Object? tableStore = null,Object? blockStore = null,Object? network = null,}) { + return _then(_VeilidConfig( +programName: null == programName ? _self.programName : programName // ignore: cast_nullable_to_non_nullable +as String,namespace: null == namespace ? _self.namespace : namespace // ignore: cast_nullable_to_non_nullable +as String,capabilities: null == capabilities ? _self.capabilities : capabilities // ignore: cast_nullable_to_non_nullable +as VeilidConfigCapabilities,protectedStore: null == protectedStore ? _self.protectedStore : protectedStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigProtectedStore,tableStore: null == tableStore ? _self.tableStore : tableStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigTableStore,blockStore: null == blockStore ? _self.blockStore : blockStore // ignore: cast_nullable_to_non_nullable +as VeilidConfigBlockStore,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable +as VeilidConfigNetwork, + )); +} - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigCapabilitiesCopyWith<$Res> get capabilities { - return $VeilidConfigCapabilitiesCopyWith<$Res>(_self.capabilities, (value) { - return _then(_self.copyWith(capabilities: value)); - }); - } - - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore { - return $VeilidConfigProtectedStoreCopyWith<$Res>(_self.protectedStore, - (value) { - return _then(_self.copyWith(protectedStore: value)); - }); - } - - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigTableStoreCopyWith<$Res> get tableStore { - return $VeilidConfigTableStoreCopyWith<$Res>(_self.tableStore, (value) { - return _then(_self.copyWith(tableStore: value)); - }); - } - - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigBlockStoreCopyWith<$Res> get blockStore { - return $VeilidConfigBlockStoreCopyWith<$Res>(_self.blockStore, (value) { - return _then(_self.copyWith(blockStore: value)); - }); - } - - /// Create a copy of VeilidConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigNetworkCopyWith<$Res> get network { - return $VeilidConfigNetworkCopyWith<$Res>(_self.network, (value) { - return _then(_self.copyWith(network: value)); - }); - } +/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigCapabilitiesCopyWith<$Res> get capabilities { + + return $VeilidConfigCapabilitiesCopyWith<$Res>(_self.capabilities, (value) { + return _then(_self.copyWith(capabilities: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigProtectedStoreCopyWith<$Res> get protectedStore { + + return $VeilidConfigProtectedStoreCopyWith<$Res>(_self.protectedStore, (value) { + return _then(_self.copyWith(protectedStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigTableStoreCopyWith<$Res> get tableStore { + + return $VeilidConfigTableStoreCopyWith<$Res>(_self.tableStore, (value) { + return _then(_self.copyWith(tableStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigBlockStoreCopyWith<$Res> get blockStore { + + return $VeilidConfigBlockStoreCopyWith<$Res>(_self.blockStore, (value) { + return _then(_self.copyWith(blockStore: value)); + }); +}/// Create a copy of VeilidConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigNetworkCopyWith<$Res> get network { + + return $VeilidConfigNetworkCopyWith<$Res>(_self.network, (value) { + return _then(_self.copyWith(network: value)); + }); +} } // dart format on diff --git a/veilid-flutter/lib/veilid_config.g.dart b/veilid-flutter/lib/veilid_config.g.dart index 4f25dc09..f57804a1 100644 --- a/veilid-flutter/lib/veilid_config.g.dart +++ b/veilid-flutter/lib/veilid_config.g.dart @@ -7,164 +7,161 @@ part of 'veilid_config.dart'; // ************************************************************************** _VeilidFFIConfigLoggingTerminal _$VeilidFFIConfigLoggingTerminalFromJson( - Map json) => - _VeilidFFIConfigLoggingTerminal( - enabled: json['enabled'] as bool, - level: VeilidConfigLogLevel.fromJson(json['level']), - ignoreLogTargets: (json['ignore_log_targets'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], - ); + Map json, +) => _VeilidFFIConfigLoggingTerminal( + enabled: json['enabled'] as bool, + level: VeilidConfigLogLevel.fromJson(json['level']), + ignoreLogTargets: + (json['ignore_log_targets'] as List?) + ?.map((e) => e as String) + .toList() ?? + const [], +); Map _$VeilidFFIConfigLoggingTerminalToJson( - _VeilidFFIConfigLoggingTerminal instance) => - { - 'enabled': instance.enabled, - 'level': instance.level.toJson(), - 'ignore_log_targets': instance.ignoreLogTargets, - }; + _VeilidFFIConfigLoggingTerminal instance, +) => { + 'enabled': instance.enabled, + 'level': instance.level.toJson(), + 'ignore_log_targets': instance.ignoreLogTargets, +}; _VeilidFFIConfigLoggingOtlp _$VeilidFFIConfigLoggingOtlpFromJson( - Map json) => - _VeilidFFIConfigLoggingOtlp( - enabled: json['enabled'] as bool, - level: VeilidConfigLogLevel.fromJson(json['level']), - grpcEndpoint: json['grpc_endpoint'] as String, - serviceName: json['service_name'] as String, - ignoreLogTargets: (json['ignore_log_targets'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], - ); + Map json, +) => _VeilidFFIConfigLoggingOtlp( + enabled: json['enabled'] as bool, + level: VeilidConfigLogLevel.fromJson(json['level']), + grpcEndpoint: json['grpc_endpoint'] as String, + serviceName: json['service_name'] as String, + ignoreLogTargets: + (json['ignore_log_targets'] as List?) + ?.map((e) => e as String) + .toList() ?? + const [], +); Map _$VeilidFFIConfigLoggingOtlpToJson( - _VeilidFFIConfigLoggingOtlp instance) => - { - 'enabled': instance.enabled, - 'level': instance.level.toJson(), - 'grpc_endpoint': instance.grpcEndpoint, - 'service_name': instance.serviceName, - 'ignore_log_targets': instance.ignoreLogTargets, - }; + _VeilidFFIConfigLoggingOtlp instance, +) => { + 'enabled': instance.enabled, + 'level': instance.level.toJson(), + 'grpc_endpoint': instance.grpcEndpoint, + 'service_name': instance.serviceName, + 'ignore_log_targets': instance.ignoreLogTargets, +}; _VeilidFFIConfigLoggingApi _$VeilidFFIConfigLoggingApiFromJson( - Map json) => - _VeilidFFIConfigLoggingApi( - enabled: json['enabled'] as bool, - level: VeilidConfigLogLevel.fromJson(json['level']), - ignoreLogTargets: (json['ignore_log_targets'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], - ); + Map json, +) => _VeilidFFIConfigLoggingApi( + enabled: json['enabled'] as bool, + level: VeilidConfigLogLevel.fromJson(json['level']), + ignoreLogTargets: + (json['ignore_log_targets'] as List?) + ?.map((e) => e as String) + .toList() ?? + const [], +); Map _$VeilidFFIConfigLoggingApiToJson( - _VeilidFFIConfigLoggingApi instance) => - { - 'enabled': instance.enabled, - 'level': instance.level.toJson(), - 'ignore_log_targets': instance.ignoreLogTargets, - }; + _VeilidFFIConfigLoggingApi instance, +) => { + 'enabled': instance.enabled, + 'level': instance.level.toJson(), + 'ignore_log_targets': instance.ignoreLogTargets, +}; _VeilidFFIConfigLoggingFlame _$VeilidFFIConfigLoggingFlameFromJson( - Map json) => - _VeilidFFIConfigLoggingFlame( - enabled: json['enabled'] as bool, - path: json['path'] as String, - ); + Map json, +) => _VeilidFFIConfigLoggingFlame( + enabled: json['enabled'] as bool, + path: json['path'] as String, +); Map _$VeilidFFIConfigLoggingFlameToJson( - _VeilidFFIConfigLoggingFlame instance) => - { - 'enabled': instance.enabled, - 'path': instance.path, - }; + _VeilidFFIConfigLoggingFlame instance, +) => {'enabled': instance.enabled, 'path': instance.path}; _VeilidFFIConfigLogging _$VeilidFFIConfigLoggingFromJson( - Map json) => - _VeilidFFIConfigLogging( - terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']), - otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']), - api: VeilidFFIConfigLoggingApi.fromJson(json['api']), - flame: VeilidFFIConfigLoggingFlame.fromJson(json['flame']), - ); + Map json, +) => _VeilidFFIConfigLogging( + terminal: VeilidFFIConfigLoggingTerminal.fromJson(json['terminal']), + otlp: VeilidFFIConfigLoggingOtlp.fromJson(json['otlp']), + api: VeilidFFIConfigLoggingApi.fromJson(json['api']), + flame: VeilidFFIConfigLoggingFlame.fromJson(json['flame']), +); Map _$VeilidFFIConfigLoggingToJson( - _VeilidFFIConfigLogging instance) => - { - 'terminal': instance.terminal.toJson(), - 'otlp': instance.otlp.toJson(), - 'api': instance.api.toJson(), - 'flame': instance.flame.toJson(), - }; + _VeilidFFIConfigLogging instance, +) => { + 'terminal': instance.terminal.toJson(), + 'otlp': instance.otlp.toJson(), + 'api': instance.api.toJson(), + 'flame': instance.flame.toJson(), +}; _VeilidFFIConfig _$VeilidFFIConfigFromJson(Map json) => - _VeilidFFIConfig( - logging: VeilidFFIConfigLogging.fromJson(json['logging']), - ); + _VeilidFFIConfig(logging: VeilidFFIConfigLogging.fromJson(json['logging'])); Map _$VeilidFFIConfigToJson(_VeilidFFIConfig instance) => - { - 'logging': instance.logging.toJson(), - }; + {'logging': instance.logging.toJson()}; _VeilidWASMConfigLoggingPerformance - _$VeilidWASMConfigLoggingPerformanceFromJson(Map json) => - _VeilidWASMConfigLoggingPerformance( - enabled: json['enabled'] as bool, - level: VeilidConfigLogLevel.fromJson(json['level']), - logsInTimings: json['logs_in_timings'] as bool, - logsInConsole: json['logs_in_console'] as bool, - ignoreLogTargets: (json['ignore_log_targets'] as List?) - ?.map((e) => e as String) - .toList() ?? - const [], - ); - -Map _$VeilidWASMConfigLoggingPerformanceToJson( - _VeilidWASMConfigLoggingPerformance instance) => - { - 'enabled': instance.enabled, - 'level': instance.level.toJson(), - 'logs_in_timings': instance.logsInTimings, - 'logs_in_console': instance.logsInConsole, - 'ignore_log_targets': instance.ignoreLogTargets, - }; - -_VeilidWASMConfigLoggingApi _$VeilidWASMConfigLoggingApiFromJson( - Map json) => - _VeilidWASMConfigLoggingApi( +_$VeilidWASMConfigLoggingPerformanceFromJson(Map json) => + _VeilidWASMConfigLoggingPerformance( enabled: json['enabled'] as bool, level: VeilidConfigLogLevel.fromJson(json['level']), - ignoreLogTargets: (json['ignore_log_targets'] as List?) + logsInTimings: json['logs_in_timings'] as bool, + logsInConsole: json['logs_in_console'] as bool, + ignoreLogTargets: + (json['ignore_log_targets'] as List?) ?.map((e) => e as String) .toList() ?? const [], ); +Map _$VeilidWASMConfigLoggingPerformanceToJson( + _VeilidWASMConfigLoggingPerformance instance, +) => { + 'enabled': instance.enabled, + 'level': instance.level.toJson(), + 'logs_in_timings': instance.logsInTimings, + 'logs_in_console': instance.logsInConsole, + 'ignore_log_targets': instance.ignoreLogTargets, +}; + +_VeilidWASMConfigLoggingApi _$VeilidWASMConfigLoggingApiFromJson( + Map json, +) => _VeilidWASMConfigLoggingApi( + enabled: json['enabled'] as bool, + level: VeilidConfigLogLevel.fromJson(json['level']), + ignoreLogTargets: + (json['ignore_log_targets'] as List?) + ?.map((e) => e as String) + .toList() ?? + const [], +); + Map _$VeilidWASMConfigLoggingApiToJson( - _VeilidWASMConfigLoggingApi instance) => - { - 'enabled': instance.enabled, - 'level': instance.level.toJson(), - 'ignore_log_targets': instance.ignoreLogTargets, - }; + _VeilidWASMConfigLoggingApi instance, +) => { + 'enabled': instance.enabled, + 'level': instance.level.toJson(), + 'ignore_log_targets': instance.ignoreLogTargets, +}; _VeilidWASMConfigLogging _$VeilidWASMConfigLoggingFromJson( - Map json) => - _VeilidWASMConfigLogging( - performance: - VeilidWASMConfigLoggingPerformance.fromJson(json['performance']), - api: VeilidWASMConfigLoggingApi.fromJson(json['api']), - ); + Map json, +) => _VeilidWASMConfigLogging( + performance: VeilidWASMConfigLoggingPerformance.fromJson(json['performance']), + api: VeilidWASMConfigLoggingApi.fromJson(json['api']), +); Map _$VeilidWASMConfigLoggingToJson( - _VeilidWASMConfigLogging instance) => - { - 'performance': instance.performance.toJson(), - 'api': instance.api.toJson(), - }; + _VeilidWASMConfigLogging instance, +) => { + 'performance': instance.performance.toJson(), + 'api': instance.api.toJson(), +}; _VeilidWASMConfig _$VeilidWASMConfigFromJson(Map json) => _VeilidWASMConfig( @@ -172,9 +169,7 @@ _VeilidWASMConfig _$VeilidWASMConfigFromJson(Map json) => ); Map _$VeilidWASMConfigToJson(_VeilidWASMConfig instance) => - { - 'logging': instance.logging.toJson(), - }; + {'logging': instance.logging.toJson()}; _VeilidConfigHTTPS _$VeilidConfigHTTPSFromJson(Map json) => _VeilidConfigHTTPS( @@ -209,18 +204,18 @@ Map _$VeilidConfigHTTPToJson(_VeilidConfigHTTP instance) => }; _VeilidConfigApplication _$VeilidConfigApplicationFromJson( - Map json) => - _VeilidConfigApplication( - https: VeilidConfigHTTPS.fromJson(json['https']), - http: VeilidConfigHTTP.fromJson(json['http']), - ); + Map json, +) => _VeilidConfigApplication( + https: VeilidConfigHTTPS.fromJson(json['https']), + http: VeilidConfigHTTP.fromJson(json['http']), +); Map _$VeilidConfigApplicationToJson( - _VeilidConfigApplication instance) => - { - 'https': instance.https.toJson(), - 'http': instance.http.toJson(), - }; + _VeilidConfigApplication instance, +) => { + 'https': instance.https.toJson(), + 'http': instance.http.toJson(), +}; _VeilidConfigUDP _$VeilidConfigUDPFromJson(Map json) => _VeilidConfigUDP( @@ -297,22 +292,22 @@ Map _$VeilidConfigWSSToJson(_VeilidConfigWSS instance) => }; _VeilidConfigProtocol _$VeilidConfigProtocolFromJson( - Map json) => - _VeilidConfigProtocol( - udp: VeilidConfigUDP.fromJson(json['udp']), - tcp: VeilidConfigTCP.fromJson(json['tcp']), - ws: VeilidConfigWS.fromJson(json['ws']), - wss: VeilidConfigWSS.fromJson(json['wss']), - ); + Map json, +) => _VeilidConfigProtocol( + udp: VeilidConfigUDP.fromJson(json['udp']), + tcp: VeilidConfigTCP.fromJson(json['tcp']), + ws: VeilidConfigWS.fromJson(json['ws']), + wss: VeilidConfigWSS.fromJson(json['wss']), +); Map _$VeilidConfigProtocolToJson( - _VeilidConfigProtocol instance) => - { - 'udp': instance.udp.toJson(), - 'tcp': instance.tcp.toJson(), - 'ws': instance.ws.toJson(), - 'wss': instance.wss.toJson(), - }; + _VeilidConfigProtocol instance, +) => { + 'udp': instance.udp.toJson(), + 'tcp': instance.tcp.toJson(), + 'ws': instance.ws.toJson(), + 'wss': instance.wss.toJson(), +}; _VeilidConfigPrivacy _$VeilidConfigPrivacyFromJson(Map json) => _VeilidConfigPrivacy( @@ -320,17 +315,15 @@ _VeilidConfigPrivacy _$VeilidConfigPrivacyFromJson(Map json) => ); Map _$VeilidConfigPrivacyToJson( - _VeilidConfigPrivacy instance) => - { - 'require_inbound_relay': instance.requireInboundRelay, - }; + _VeilidConfigPrivacy instance, +) => {'require_inbound_relay': instance.requireInboundRelay}; _VeilidConfigTLS _$VeilidConfigTLSFromJson(Map json) => _VeilidConfigTLS( certificatePath: json['certificate_path'] as String, privateKeyPath: json['private_key_path'] as String, - connectionInitialTimeoutMs: - (json['connection_initial_timeout_ms'] as num).toInt(), + connectionInitialTimeoutMs: (json['connection_initial_timeout_ms'] as num) + .toInt(), ); Map _$VeilidConfigTLSToJson(_VeilidConfigTLS instance) => @@ -363,40 +356,39 @@ _VeilidConfigDHT _$VeilidConfigDHTFromJson(Map json) => remoteMaxRecords: (json['remote_max_records'] as num).toInt(), remoteMaxSubkeyCacheMemoryMb: (json['remote_max_subkey_cache_memory_mb'] as num).toInt(), - remoteMaxStorageSpaceMb: - (json['remote_max_storage_space_mb'] as num).toInt(), + remoteMaxStorageSpaceMb: (json['remote_max_storage_space_mb'] as num) + .toInt(), publicWatchLimit: (json['public_watch_limit'] as num).toInt(), memberWatchLimit: (json['member_watch_limit'] as num).toInt(), maxWatchExpirationMs: (json['max_watch_expiration_ms'] as num).toInt(), ); -Map _$VeilidConfigDHTToJson(_VeilidConfigDHT instance) => - { - 'resolve_node_timeout_ms': instance.resolveNodeTimeoutMs, - 'resolve_node_count': instance.resolveNodeCount, - 'resolve_node_fanout': instance.resolveNodeFanout, - 'max_find_node_count': instance.maxFindNodeCount, - 'get_value_timeout_ms': instance.getValueTimeoutMs, - 'get_value_count': instance.getValueCount, - 'get_value_fanout': instance.getValueFanout, - 'set_value_timeout_ms': instance.setValueTimeoutMs, - 'set_value_count': instance.setValueCount, - 'set_value_fanout': instance.setValueFanout, - 'min_peer_count': instance.minPeerCount, - 'min_peer_refresh_time_ms': instance.minPeerRefreshTimeMs, - 'validate_dial_info_receipt_time_ms': - instance.validateDialInfoReceiptTimeMs, - 'local_subkey_cache_size': instance.localSubkeyCacheSize, - 'local_max_subkey_cache_memory_mb': instance.localMaxSubkeyCacheMemoryMb, - 'remote_subkey_cache_size': instance.remoteSubkeyCacheSize, - 'remote_max_records': instance.remoteMaxRecords, - 'remote_max_subkey_cache_memory_mb': - instance.remoteMaxSubkeyCacheMemoryMb, - 'remote_max_storage_space_mb': instance.remoteMaxStorageSpaceMb, - 'public_watch_limit': instance.publicWatchLimit, - 'member_watch_limit': instance.memberWatchLimit, - 'max_watch_expiration_ms': instance.maxWatchExpirationMs, - }; +Map _$VeilidConfigDHTToJson( + _VeilidConfigDHT instance, +) => { + 'resolve_node_timeout_ms': instance.resolveNodeTimeoutMs, + 'resolve_node_count': instance.resolveNodeCount, + 'resolve_node_fanout': instance.resolveNodeFanout, + 'max_find_node_count': instance.maxFindNodeCount, + 'get_value_timeout_ms': instance.getValueTimeoutMs, + 'get_value_count': instance.getValueCount, + 'get_value_fanout': instance.getValueFanout, + 'set_value_timeout_ms': instance.setValueTimeoutMs, + 'set_value_count': instance.setValueCount, + 'set_value_fanout': instance.setValueFanout, + 'min_peer_count': instance.minPeerCount, + 'min_peer_refresh_time_ms': instance.minPeerRefreshTimeMs, + 'validate_dial_info_receipt_time_ms': instance.validateDialInfoReceiptTimeMs, + 'local_subkey_cache_size': instance.localSubkeyCacheSize, + 'local_max_subkey_cache_memory_mb': instance.localMaxSubkeyCacheMemoryMb, + 'remote_subkey_cache_size': instance.remoteSubkeyCacheSize, + 'remote_max_records': instance.remoteMaxRecords, + 'remote_max_subkey_cache_memory_mb': instance.remoteMaxSubkeyCacheMemoryMb, + 'remote_max_storage_space_mb': instance.remoteMaxStorageSpaceMb, + 'public_watch_limit': instance.publicWatchLimit, + 'member_watch_limit': instance.memberWatchLimit, + 'max_watch_expiration_ms': instance.maxWatchExpirationMs, +}; _VeilidConfigRPC _$VeilidConfigRPCFromJson(Map json) => _VeilidConfigRPC( @@ -421,44 +413,45 @@ Map _$VeilidConfigRPCToJson(_VeilidConfigRPC instance) => }; _VeilidConfigRoutingTable _$VeilidConfigRoutingTableFromJson( - Map json) => - _VeilidConfigRoutingTable( - publicKeys: (json['public_keys'] as List) - .map(Typed.fromJson) - .toList(), - secretKeys: (json['secret_keys'] as List) - .map(Typed.fromJson) - .toList(), - bootstrap: - (json['bootstrap'] as List).map((e) => e as String).toList(), - bootstrapKeys: (json['bootstrap_keys'] as List) - .map(Typed.fromJson) - .toList(), - limitOverAttached: (json['limit_over_attached'] as num).toInt(), - limitFullyAttached: (json['limit_fully_attached'] as num).toInt(), - limitAttachedStrong: (json['limit_attached_strong'] as num).toInt(), - limitAttachedGood: (json['limit_attached_good'] as num).toInt(), - limitAttachedWeak: (json['limit_attached_weak'] as num).toInt(), - ); + Map json, +) => _VeilidConfigRoutingTable( + publicKeys: (json['public_keys'] as List) + .map(Typed.fromJson) + .toList(), + secretKeys: (json['secret_keys'] as List) + .map(Typed.fromJson) + .toList(), + bootstrap: (json['bootstrap'] as List) + .map((e) => e as String) + .toList(), + bootstrapKeys: (json['bootstrap_keys'] as List) + .map(Typed.fromJson) + .toList(), + limitOverAttached: (json['limit_over_attached'] as num).toInt(), + limitFullyAttached: (json['limit_fully_attached'] as num).toInt(), + limitAttachedStrong: (json['limit_attached_strong'] as num).toInt(), + limitAttachedGood: (json['limit_attached_good'] as num).toInt(), + limitAttachedWeak: (json['limit_attached_weak'] as num).toInt(), +); Map _$VeilidConfigRoutingTableToJson( - _VeilidConfigRoutingTable instance) => - { - 'public_keys': instance.publicKeys.map((e) => e.toJson()).toList(), - 'secret_keys': instance.secretKeys.map((e) => e.toJson()).toList(), - 'bootstrap': instance.bootstrap, - 'bootstrap_keys': instance.bootstrapKeys.map((e) => e.toJson()).toList(), - 'limit_over_attached': instance.limitOverAttached, - 'limit_fully_attached': instance.limitFullyAttached, - 'limit_attached_strong': instance.limitAttachedStrong, - 'limit_attached_good': instance.limitAttachedGood, - 'limit_attached_weak': instance.limitAttachedWeak, - }; + _VeilidConfigRoutingTable instance, +) => { + 'public_keys': instance.publicKeys.map((e) => e.toJson()).toList(), + 'secret_keys': instance.secretKeys.map((e) => e.toJson()).toList(), + 'bootstrap': instance.bootstrap, + 'bootstrap_keys': instance.bootstrapKeys.map((e) => e.toJson()).toList(), + 'limit_over_attached': instance.limitOverAttached, + 'limit_fully_attached': instance.limitFullyAttached, + 'limit_attached_strong': instance.limitAttachedStrong, + 'limit_attached_good': instance.limitAttachedGood, + 'limit_attached_weak': instance.limitAttachedWeak, +}; _VeilidConfigNetwork _$VeilidConfigNetworkFromJson(Map json) => _VeilidConfigNetwork( - connectionInitialTimeoutMs: - (json['connection_initial_timeout_ms'] as num).toInt(), + connectionInitialTimeoutMs: (json['connection_initial_timeout_ms'] as num) + .toInt(), connectionInactivityTimeoutMs: (json['connection_inactivity_timeout_ms'] as num).toInt(), maxConnectionsPerIp4: (json['max_connections_per_ip4'] as num).toInt(), @@ -468,12 +461,12 @@ _VeilidConfigNetwork _$VeilidConfigNetworkFromJson(Map json) => (json['max_connections_per_ip6_prefix_size'] as num).toInt(), maxConnectionFrequencyPerMin: (json['max_connection_frequency_per_min'] as num).toInt(), - clientAllowlistTimeoutMs: - (json['client_allowlist_timeout_ms'] as num).toInt(), + clientAllowlistTimeoutMs: (json['client_allowlist_timeout_ms'] as num) + .toInt(), reverseConnectionReceiptTimeMs: (json['reverse_connection_receipt_time_ms'] as num).toInt(), - holePunchReceiptTimeMs: - (json['hole_punch_receipt_time_ms'] as num).toInt(), + holePunchReceiptTimeMs: (json['hole_punch_receipt_time_ms'] as num) + .toInt(), routingTable: VeilidConfigRoutingTable.fromJson(json['routing_table']), rpc: VeilidConfigRPC.fromJson(json['rpc']), dht: VeilidConfigDHT.fromJson(json['dht']), @@ -488,106 +481,100 @@ _VeilidConfigNetwork _$VeilidConfigNetworkFromJson(Map json) => ); Map _$VeilidConfigNetworkToJson( - _VeilidConfigNetwork instance) => - { - 'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs, - 'connection_inactivity_timeout_ms': - instance.connectionInactivityTimeoutMs, - 'max_connections_per_ip4': instance.maxConnectionsPerIp4, - 'max_connections_per_ip6_prefix': instance.maxConnectionsPerIp6Prefix, - 'max_connections_per_ip6_prefix_size': - instance.maxConnectionsPerIp6PrefixSize, - 'max_connection_frequency_per_min': instance.maxConnectionFrequencyPerMin, - 'client_allowlist_timeout_ms': instance.clientAllowlistTimeoutMs, - 'reverse_connection_receipt_time_ms': - instance.reverseConnectionReceiptTimeMs, - 'hole_punch_receipt_time_ms': instance.holePunchReceiptTimeMs, - 'routing_table': instance.routingTable.toJson(), - 'rpc': instance.rpc.toJson(), - 'dht': instance.dht.toJson(), - 'upnp': instance.upnp, - 'detect_address_changes': instance.detectAddressChanges, - 'restricted_nat_retries': instance.restrictedNatRetries, - 'tls': instance.tls.toJson(), - 'application': instance.application.toJson(), - 'protocol': instance.protocol.toJson(), - 'privacy': instance.privacy.toJson(), - 'network_key_password': instance.networkKeyPassword, - }; + _VeilidConfigNetwork instance, +) => { + 'connection_initial_timeout_ms': instance.connectionInitialTimeoutMs, + 'connection_inactivity_timeout_ms': instance.connectionInactivityTimeoutMs, + 'max_connections_per_ip4': instance.maxConnectionsPerIp4, + 'max_connections_per_ip6_prefix': instance.maxConnectionsPerIp6Prefix, + 'max_connections_per_ip6_prefix_size': + instance.maxConnectionsPerIp6PrefixSize, + 'max_connection_frequency_per_min': instance.maxConnectionFrequencyPerMin, + 'client_allowlist_timeout_ms': instance.clientAllowlistTimeoutMs, + 'reverse_connection_receipt_time_ms': instance.reverseConnectionReceiptTimeMs, + 'hole_punch_receipt_time_ms': instance.holePunchReceiptTimeMs, + 'routing_table': instance.routingTable.toJson(), + 'rpc': instance.rpc.toJson(), + 'dht': instance.dht.toJson(), + 'upnp': instance.upnp, + 'detect_address_changes': instance.detectAddressChanges, + 'restricted_nat_retries': instance.restrictedNatRetries, + 'tls': instance.tls.toJson(), + 'application': instance.application.toJson(), + 'protocol': instance.protocol.toJson(), + 'privacy': instance.privacy.toJson(), + 'network_key_password': instance.networkKeyPassword, +}; _VeilidConfigTableStore _$VeilidConfigTableStoreFromJson( - Map json) => - _VeilidConfigTableStore( - directory: json['directory'] as String, - delete: json['delete'] as bool, - ); + Map json, +) => _VeilidConfigTableStore( + directory: json['directory'] as String, + delete: json['delete'] as bool, +); Map _$VeilidConfigTableStoreToJson( - _VeilidConfigTableStore instance) => - { - 'directory': instance.directory, - 'delete': instance.delete, - }; + _VeilidConfigTableStore instance, +) => { + 'directory': instance.directory, + 'delete': instance.delete, +}; _VeilidConfigBlockStore _$VeilidConfigBlockStoreFromJson( - Map json) => - _VeilidConfigBlockStore( - directory: json['directory'] as String, - delete: json['delete'] as bool, - ); + Map json, +) => _VeilidConfigBlockStore( + directory: json['directory'] as String, + delete: json['delete'] as bool, +); Map _$VeilidConfigBlockStoreToJson( - _VeilidConfigBlockStore instance) => - { - 'directory': instance.directory, - 'delete': instance.delete, - }; + _VeilidConfigBlockStore instance, +) => { + 'directory': instance.directory, + 'delete': instance.delete, +}; _VeilidConfigProtectedStore _$VeilidConfigProtectedStoreFromJson( - Map json) => - _VeilidConfigProtectedStore( - allowInsecureFallback: json['allow_insecure_fallback'] as bool, - alwaysUseInsecureStorage: json['always_use_insecure_storage'] as bool, - directory: json['directory'] as String, - delete: json['delete'] as bool, - deviceEncryptionKeyPassword: - json['device_encryption_key_password'] as String, - newDeviceEncryptionKeyPassword: - json['new_device_encryption_key_password'] as String?, - ); + Map json, +) => _VeilidConfigProtectedStore( + allowInsecureFallback: json['allow_insecure_fallback'] as bool, + alwaysUseInsecureStorage: json['always_use_insecure_storage'] as bool, + directory: json['directory'] as String, + delete: json['delete'] as bool, + deviceEncryptionKeyPassword: json['device_encryption_key_password'] as String, + newDeviceEncryptionKeyPassword: + json['new_device_encryption_key_password'] as String?, +); Map _$VeilidConfigProtectedStoreToJson( - _VeilidConfigProtectedStore instance) => - { - 'allow_insecure_fallback': instance.allowInsecureFallback, - 'always_use_insecure_storage': instance.alwaysUseInsecureStorage, - 'directory': instance.directory, - 'delete': instance.delete, - 'device_encryption_key_password': instance.deviceEncryptionKeyPassword, - 'new_device_encryption_key_password': - instance.newDeviceEncryptionKeyPassword, - }; + _VeilidConfigProtectedStore instance, +) => { + 'allow_insecure_fallback': instance.allowInsecureFallback, + 'always_use_insecure_storage': instance.alwaysUseInsecureStorage, + 'directory': instance.directory, + 'delete': instance.delete, + 'device_encryption_key_password': instance.deviceEncryptionKeyPassword, + 'new_device_encryption_key_password': instance.newDeviceEncryptionKeyPassword, +}; _VeilidConfigCapabilities _$VeilidConfigCapabilitiesFromJson( - Map json) => - _VeilidConfigCapabilities( - disable: - (json['disable'] as List).map((e) => e as String).toList(), - ); + Map json, +) => _VeilidConfigCapabilities( + disable: (json['disable'] as List).map((e) => e as String).toList(), +); Map _$VeilidConfigCapabilitiesToJson( - _VeilidConfigCapabilities instance) => - { - 'disable': instance.disable, - }; + _VeilidConfigCapabilities instance, +) => {'disable': instance.disable}; _VeilidConfig _$VeilidConfigFromJson(Map json) => _VeilidConfig( programName: json['program_name'] as String, namespace: json['namespace'] as String, capabilities: VeilidConfigCapabilities.fromJson(json['capabilities']), - protectedStore: - VeilidConfigProtectedStore.fromJson(json['protected_store']), + protectedStore: VeilidConfigProtectedStore.fromJson( + json['protected_store'], + ), tableStore: VeilidConfigTableStore.fromJson(json['table_store']), blockStore: VeilidConfigBlockStore.fromJson(json['block_store']), network: VeilidConfigNetwork.fromJson(json['network']), diff --git a/veilid-flutter/lib/veilid_crypto.dart b/veilid-flutter/lib/veilid_crypto.dart index b49e81d6..c58571cd 100644 --- a/veilid-flutter/lib/veilid_crypto.dart +++ b/veilid-flutter/lib/veilid_crypto.dart @@ -14,6 +14,8 @@ import 'veilid.dart'; typedef CryptoKind = int; const CryptoKind cryptoKindVLD0 = $V << 24 | $L << 16 | $D << 8 | $0 << 0; // "VLD0" +// const CryptoKind cryptoKindVLD1 = +// $V << 24 | $L << 16 | $D << 8 | $1 << 0; // "VLD1" const CryptoKind cryptoKindNONE = $N << 24 | $O << 16 | $N << 8 | $E << 0; // "NONE" @@ -35,16 +37,29 @@ CryptoKind cryptoKindFromString(String s) { if (s.codeUnits.length != 4) { throw const FormatException('malformed string'); } - final kind = - ByteData.sublistView(Uint8List.fromList(s.codeUnits)).getUint32(0); + final kind = ByteData.sublistView( + Uint8List.fromList(s.codeUnits), + ).getUint32(0); return kind; } ////////////////////////////////////// /// Types +abstract interface class TypedCryptoKey { + CryptoKind get kind; + V get value; +} + @immutable -class Typed extends Equatable { +class Typed extends Equatable + implements TypedCryptoKey { + @override + final CryptoKind kind; + + @override + final V value; + const Typed({required this.kind, required this.value}); factory Typed.fromString(String s) { @@ -56,24 +71,25 @@ class Typed extends Equatable { final value = EncodedString.fromString(parts.sublist(1).join(':')); return Typed(kind: kind, value: value); } + factory Typed.fromBytes(Uint8List b) { final kind = cryptoKindFromBytes(b); final value = EncodedString.fromBytes(b.sublist(4)); return Typed(kind: kind, value: value); } + factory Typed.fromJson(dynamic json) => Typed.fromString(json as String); - final CryptoKind kind; - final V value; + @override List get props => [kind, value]; @override String toString() => '${cryptoKindToString(kind)}:$value'; - Uint8List decode() { + Uint8List toBytes() { final b = BytesBuilder() ..add(cryptoKindToBytes(kind)) - ..add(value.decode()); + ..add(value.toBytes()); return b.toBytes(); } @@ -82,6 +98,10 @@ class Typed extends Equatable { @immutable class BareKeyPair extends Equatable { + final BarePublicKey key; + + final BareSecretKey secret; + const BareKeyPair({required this.key, required this.secret}); factory BareKeyPair.fromString(String s) { @@ -93,10 +113,10 @@ class BareKeyPair extends Equatable { final secret = BareSecretKey.fromString(parts[1]); return BareKeyPair(key: key, secret: secret); } + factory BareKeyPair.fromJson(dynamic json) => BareKeyPair.fromString(json as String); - final BarePublicKey key; - final BareSecretKey secret; + @override List get props => [key, secret]; @@ -107,9 +127,13 @@ class BareKeyPair extends Equatable { } @immutable -class KeyPair extends Equatable { +class KeyPair extends Equatable implements TypedCryptoKey { + final PublicKey key; + + final SecretKey secret; + KeyPair({required this.key, required this.secret}) - : assert(key.kind == secret.kind, 'keypair parts must have same kind'); + : assert(key.kind == secret.kind, 'keypair parts must have same kind'); factory KeyPair.fromString(String s) { final parts = s.split(':'); @@ -117,22 +141,39 @@ class KeyPair extends Equatable { throw VeilidAPIExceptionInvalidArgument('malformed string', 's', s); } final kind = cryptoKindFromString(parts[0]); - final key = - PublicKey(kind: kind, value: BarePublicKey.fromString(parts[1])); - final secret = - SecretKey(kind: kind, value: BareSecretKey.fromString(parts[2])); + final key = PublicKey( + kind: kind, + value: BarePublicKey.fromString(parts[1]), + ); + final secret = SecretKey( + kind: kind, + value: BareSecretKey.fromString(parts[2]), + ); return KeyPair(key: key, secret: secret); } + factory KeyPair.fromJson(dynamic json) => KeyPair.fromString(json as String); + factory KeyPair.fromBareKeyPair(CryptoKind kind, BareKeyPair keyPair) => KeyPair( - key: PublicKey(kind: kind, value: keyPair.key), - secret: SecretKey(kind: kind, value: keyPair.secret)); + key: PublicKey(kind: kind, value: keyPair.key), + secret: SecretKey(kind: kind, value: keyPair.secret), + ); + factory KeyPair.fromPublicAndBareSecret( - PublicKey key, BareSecretKey secret) => - KeyPair(key: key, secret: SecretKey(kind: key.kind, value: secret)); - final PublicKey key; - final SecretKey secret; + PublicKey key, + BareSecretKey secret, + ) => KeyPair( + key: key, + secret: SecretKey(kind: key.kind, value: secret), + ); + + @override + CryptoKind get kind => key.kind; + + @override + BareKeyPair get value => BareKeyPair(key: key.value, secret: secret.value); + @override List get props => [key, secret]; @@ -141,12 +182,17 @@ class KeyPair extends Equatable { '${cryptoKindToString(key.kind)}:${key.value}:${secret.value}'; String toJson() => toString(); + BareKeyPair toBareKeyPair() => BareKeyPair(key: key.value, secret: secret.value); } @immutable class BareRecordKey extends Equatable { + final BareOpaqueRecordKey key; + + final BareSharedSecret? encryptionKey; + const BareRecordKey({required this.key, required this.encryptionKey}); factory BareRecordKey.fromString(String s) { @@ -162,10 +208,10 @@ class BareRecordKey extends Equatable { final key = BareOpaqueRecordKey.fromString(parts[0]); return BareRecordKey(key: key, encryptionKey: null); } + factory BareRecordKey.fromJson(dynamic json) => BareRecordKey.fromString(json as String); - final BareOpaqueRecordKey key; - final BareSharedSecret? encryptionKey; + @override List get props => [key, encryptionKey]; @@ -176,10 +222,16 @@ class BareRecordKey extends Equatable { } @immutable -class RecordKey extends Equatable { - RecordKey({required this.key, required this.encryptionKey}) - : assert(encryptionKey == null || key.kind == encryptionKey.kind, - 'recordkey parts must have same kind'); +class RecordKey extends Equatable implements TypedCryptoKey { + final OpaqueRecordKey opaque; + + final SharedSecret? encryptionKey; + + RecordKey({required this.opaque, required this.encryptionKey}) + : assert( + encryptionKey == null || opaque.kind == encryptionKey.kind, + 'recordkey parts must have same kind', + ); factory RecordKey.fromString(String s) { final parts = s.split(':'); @@ -190,41 +242,75 @@ class RecordKey extends Equatable { } final kind = cryptoKindFromString(parts[0]); final key = OpaqueRecordKey( - kind: kind, value: BareOpaqueRecordKey.fromString(parts[1])); + kind: kind, + value: BareOpaqueRecordKey.fromString(parts[1]), + ); if (parts.length == 3) { final encryptionKey = SharedSecret( - kind: kind, value: BareSharedSecret.fromString(parts[2])); - return RecordKey(key: key, encryptionKey: encryptionKey); + kind: kind, + value: BareSharedSecret.fromString(parts[2]), + ); + return RecordKey(opaque: key, encryptionKey: encryptionKey); } - return RecordKey(key: key, encryptionKey: null); + return RecordKey(opaque: key, encryptionKey: null); } + factory RecordKey.fromJson(dynamic json) => RecordKey.fromString(json as String); + factory RecordKey.fromBareRecordKey( - CryptoKind kind, BareRecordKey bareRecordKey) => - RecordKey( - key: OpaqueRecordKey(kind: kind, value: bareRecordKey.key), - encryptionKey: bareRecordKey.encryptionKey == null - ? null - : SharedSecret(kind: kind, value: bareRecordKey.encryptionKey!)); - factory RecordKey.fromOpaqueRecordKey( - OpaqueRecordKey key, BareSharedSecret? encryptionKey) => - RecordKey( - key: key, - encryptionKey: encryptionKey == null - ? null - : SharedSecret(kind: key.kind, value: encryptionKey)); - final OpaqueRecordKey key; - final SharedSecret? encryptionKey; + CryptoKind kind, + BareRecordKey bareRecordKey, + ) => RecordKey( + opaque: OpaqueRecordKey(kind: kind, value: bareRecordKey.key), + encryptionKey: bareRecordKey.encryptionKey == null + ? null + : SharedSecret(kind: kind, value: bareRecordKey.encryptionKey!), + ); + + factory RecordKey.fromBytes(Uint8List bytes) { + final keyLength = ByteData.sublistView(bytes).getUint8(0); + final keyBytes = bytes.sublist(1, 1 + keyLength); + final key = OpaqueRecordKey.fromBytes(keyBytes); + SharedSecret? encryptionKey; + if (bytes.length > 1 + keyLength) { + final ekBytes = bytes.sublist(1 + keyLength, bytes.length); + encryptionKey = SharedSecret( + kind: key.kind, + value: BareSharedSecret.fromBytes(ekBytes), + ); + } + return RecordKey(opaque: key, encryptionKey: encryptionKey); + } + @override - List get props => [key, encryptionKey]; + List get props => [opaque, encryptionKey]; + + @override + CryptoKind get kind => opaque.kind; + + @override + BareRecordKey get value => + BareRecordKey(key: opaque.value, encryptionKey: encryptionKey?.value); @override String toString() => encryptionKey != null - ? '${cryptoKindToString(key.kind)}:${key.value}:${encryptionKey!.value}' - : '${cryptoKindToString(key.kind)}:${key.value}'; + ? '${cryptoKindToString(opaque.kind)}:${opaque.value}:${encryptionKey!.value}' + : '${cryptoKindToString(opaque.kind)}:${opaque.value}'; String toJson() => toString(); + + Uint8List toBytes() { + final keyBytes = opaque.toBytes(); + final b = BytesBuilder() + ..addByte(keyBytes.lengthInBytes) + ..add(keyBytes); + final ek = encryptionKey; + if (ek != null) { + b.add(ek.value.toBytes()); + } + return b.toBytes(); + } } typedef PublicKey = Typed; @@ -257,7 +343,10 @@ abstract class VeilidCryptoSystem { Future randomSharedSecret(); Future computeDH(PublicKey key, SecretKey secret); Future generateSharedSecret( - PublicKey key, SecretKey secret, Uint8List domain); + PublicKey key, + SecretKey secret, + Uint8List domain, + ); Future generateKeyPair(); Future generateHash(Uint8List data); //Future generateHashReader(Stream> reader); @@ -297,26 +386,41 @@ abstract class VeilidCryptoSystem { // AEAD Encrypt/Decrypt - Future decryptAead(Uint8List body, Nonce nonce, - SharedSecret sharedSecret, Uint8List? associatedData); - Future encryptAead(Uint8List body, Nonce nonce, - SharedSecret sharedSecret, Uint8List? associatedData); + Future decryptAead( + Uint8List body, + Nonce nonce, + SharedSecret sharedSecret, + Uint8List? associatedData, + ); + Future encryptAead( + Uint8List body, + Nonce nonce, + SharedSecret sharedSecret, + Uint8List? associatedData, + ); Future cryptNoAuth( - Uint8List body, Nonce nonce, SharedSecret sharedSecret); + Uint8List body, + Nonce nonce, + SharedSecret sharedSecret, + ); Future encryptAeadWithNonce( - Uint8List body, SharedSecret secret) async { + Uint8List body, + SharedSecret secret, + ) async { // generate nonce final nonce = await randomNonce(); // crypt and append nonce final b = BytesBuilder() ..add(await encryptAead(body, nonce, secret, null)) - ..add(nonce.decode()); + ..add(nonce.toBytes()); return b.toBytes(); } Future decryptAeadWithNonce( - Uint8List body, SharedSecret secret) async { + Uint8List body, + SharedSecret secret, + ) async { final nlen = await nonceLength(); if (body.length < nlen) { throw const FormatException('not enough data to decrypt'); @@ -328,17 +432,22 @@ abstract class VeilidCryptoSystem { } Future encryptAeadWithPassword( - Uint8List body, String password) async { + Uint8List body, + String password, + ) async { final ekbytes = Uint8List.fromList(utf8.encode(password)); final nonce = await randomNonce(); - final saltBytes = nonce.decode(); + final saltBytes = nonce.toBytes(); final sharedSecret = await deriveSharedSecret(ekbytes, saltBytes); return Uint8List.fromList( - (await encryptAead(body, nonce, sharedSecret, null)) + saltBytes); + (await encryptAead(body, nonce, sharedSecret, null)) + saltBytes, + ); } Future decryptAeadWithPassword( - Uint8List body, String password) async { + Uint8List body, + String password, + ) async { final nlen = await nonceLength(); if (body.length < nlen) { throw const FormatException('not enough data to decrypt'); @@ -354,18 +463,22 @@ abstract class VeilidCryptoSystem { // NoAuth Encrypt/Decrypt Future encryptNoAuthWithNonce( - Uint8List body, SharedSecret secret) async { + Uint8List body, + SharedSecret secret, + ) async { // generate nonce final nonce = await randomNonce(); // crypt and append nonce final b = BytesBuilder() ..add(await cryptNoAuth(body, nonce, secret)) - ..add(nonce.decode()); + ..add(nonce.toBytes()); return b.toBytes(); } Future decryptNoAuthWithNonce( - Uint8List body, SharedSecret secret) async { + Uint8List body, + SharedSecret secret, + ) async { final nlen = await nonceLength(); if (body.length < nlen) { throw const FormatException('not enough data to decrypt'); @@ -377,17 +490,22 @@ abstract class VeilidCryptoSystem { } Future encryptNoAuthWithPassword( - Uint8List body, String password) async { + Uint8List body, + String password, + ) async { final ekbytes = Uint8List.fromList(utf8.encode(password)); final nonce = await randomNonce(); - final saltBytes = nonce.decode(); + final saltBytes = nonce.toBytes(); final sharedSecret = await deriveSharedSecret(ekbytes, saltBytes); return Uint8List.fromList( - (await cryptNoAuth(body, nonce, sharedSecret)) + saltBytes); + (await cryptNoAuth(body, nonce, sharedSecret)) + saltBytes, + ); } Future decryptNoAuthWithPassword( - Uint8List body, String password) async { + Uint8List body, + String password, + ) async { final nlen = await nonceLength(); if (body.length < nlen) { throw const FormatException('not enough data to decrypt'); diff --git a/veilid-flutter/lib/veilid_encoding.dart b/veilid-flutter/lib/veilid_encoding.dart index a2714f07..88bb0acc 100644 --- a/veilid-flutter/lib/veilid_encoding.dart +++ b/veilid-flutter/lib/veilid_encoding.dart @@ -25,15 +25,17 @@ Uint8List base64UrlNoPadDecodeDynamic(dynamic source) => base64UrlNoPadDecode(source as String); class Uint8ListJsonConverter implements JsonConverter { - const Uint8ListJsonConverter() : _jsIsArray = false; - const Uint8ListJsonConverter.jsIsArray() : _jsIsArray = true; - final bool _jsIsArray; + const Uint8ListJsonConverter() : _jsIsArray = false; + + const Uint8ListJsonConverter.jsIsArray() : _jsIsArray = true; + @override Uint8List fromJson(dynamic json) => kIsWeb && _jsIsArray ? convertUint8ListFromJson(json) : base64UrlNoPadDecode(json as String); + @override dynamic toJson(Uint8List data) => kIsWeb && _jsIsArray ? convertUint8ListToJson(data) @@ -42,6 +44,10 @@ class Uint8ListJsonConverter implements JsonConverter { @immutable sealed class EncodedString extends Equatable { + //////////////////////////////////////////////////////////////////////////// + + final String contents; + EncodedString._fromBytes(Uint8List bytes) : contents = base64UrlNoPadEncode(bytes); @@ -49,13 +55,15 @@ sealed class EncodedString extends Equatable { // Ensure things can be decoded, will throw an exception if it fails base64UrlNoPadDecode(contents); } + EncodedString._fromJson(dynamic json) : contents = json as String { // Ensure things can be decoded, will throw an exception if it fails base64UrlNoPadDecode(contents); } String toJson() => toString(); - Uint8List decode() => base64UrlNoPadDecode(contents); + + Uint8List toBytes() => base64UrlNoPadDecode(contents); @override String toString() => contents; @@ -74,10 +82,10 @@ sealed class EncodedString extends Equatable { return BareSecretKey.fromBytes(bytes) as T; case const (BareHashDigest): return BareHashDigest.fromBytes(bytes) as T; + case const (BareOpaqueRecordKey): + return BareOpaqueRecordKey.fromBytes(bytes) as T; case const (BareSharedSecret): return BareSharedSecret.fromBytes(bytes) as T; - case const (BareHashDistance): - return BareHashDistance.fromBytes(bytes) as T; case const (BareRouteId): return BareRouteId.fromBytes(bytes) as T; case const (BareNodeId): @@ -101,10 +109,10 @@ sealed class EncodedString extends Equatable { return BareSecretKey.fromString(s) as T; case const (BareHashDigest): return BareHashDigest.fromString(s) as T; + case const (BareOpaqueRecordKey): + return BareOpaqueRecordKey.fromString(s) as T; case const (BareSharedSecret): return BareSharedSecret.fromString(s) as T; - case const (BareHashDistance): - return BareHashDistance.fromString(s) as T; case const (BareRouteId): return BareRouteId.fromString(s) as T; case const (BareNodeId): @@ -128,10 +136,10 @@ sealed class EncodedString extends Equatable { return BareSecretKey.fromJson(json) as T; case const (BareHashDigest): return BareHashDigest.fromJson(json) as T; + case const (BareOpaqueRecordKey): + return BareOpaqueRecordKey.fromJson(json) as T; case const (BareSharedSecret): return BareSharedSecret.fromJson(json) as T; - case const (BareHashDistance): - return BareHashDistance.fromJson(json) as T; case const (BareRouteId): return BareRouteId.fromJson(json) as T; case const (BareNodeId): @@ -143,9 +151,6 @@ sealed class EncodedString extends Equatable { } } - //////////////////////////////////////////////////////////////////////////// - - final String contents; @override List get props => [contents]; } @@ -180,24 +185,18 @@ class BareHashDigest extends EncodedString { BareHashDigest.fromJson(super.json) : super._fromJson(); } -class BareSharedSecret extends EncodedString { - BareSharedSecret.fromBytes(super.bytes) : super._fromBytes(); - BareSharedSecret.fromString(super.s) : super._fromString(); - BareSharedSecret.fromJson(super.json) : super._fromJson(); -} - -class BareHashDistance extends EncodedString { - BareHashDistance.fromBytes(super.bytes) : super._fromBytes(); - BareHashDistance.fromString(super.s) : super._fromString(); - BareHashDistance.fromJson(super.json) : super._fromJson(); -} - class BareOpaqueRecordKey extends EncodedString { BareOpaqueRecordKey.fromBytes(super.bytes) : super._fromBytes(); BareOpaqueRecordKey.fromString(super.s) : super._fromString(); BareOpaqueRecordKey.fromJson(super.json) : super._fromJson(); } +class BareSharedSecret extends EncodedString { + BareSharedSecret.fromBytes(super.bytes) : super._fromBytes(); + BareSharedSecret.fromString(super.s) : super._fromString(); + BareSharedSecret.fromJson(super.json) : super._fromJson(); +} + class BareRouteId extends EncodedString { BareRouteId.fromBytes(super.bytes) : super._fromBytes(); BareRouteId.fromString(super.s) : super._fromString(); diff --git a/veilid-flutter/lib/veilid_ffi.dart b/veilid-flutter/lib/veilid_ffi.dart index b548e507..f877b479 100644 --- a/veilid-flutter/lib/veilid_ffi.dart +++ b/veilid-flutter/lib/veilid_ffi.dart @@ -547,10 +547,11 @@ Stream processStreamJson( } class _Ctx { - _Ctx(int this.id, this.ffi); int? id; final VeilidFFI ffi; + _Ctx(int this.id, this.ffi); + void ensureValid() { if (id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -567,11 +568,12 @@ class _Ctx { // FFI implementation of VeilidRoutingContext class VeilidRoutingContextFFI extends VeilidRoutingContext { + final _Ctx _ctx; + static final Finalizer<_Ctx> _finalizer = Finalizer((ctx) => ctx.close()); + VeilidRoutingContextFFI._(this._ctx) { _finalizer.attach(this, _ctx, detach: this); } - final _Ctx _ctx; - static final Finalizer<_Ctx> _finalizer = Finalizer((ctx) => ctx.close()); @override void close() { @@ -818,10 +820,12 @@ class VeilidRoutingContextFFI extends VeilidRoutingContext { } class _TDBT { - _TDBT(int this.id, this.tdbffi, this.ffi); int? id; final VeilidTableDBFFI tdbffi; final VeilidFFI ffi; + + _TDBT(int this.id, this.tdbffi, this.ffi); + void ensureValid() { if (id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -838,11 +842,12 @@ class _TDBT { // FFI implementation of VeilidTableDBTransaction class VeilidTableDBTransactionFFI extends VeilidTableDBTransaction { + final _TDBT _tdbt; + static final Finalizer<_TDBT> _finalizer = Finalizer((tdbt) => tdbt.close()); + VeilidTableDBTransactionFFI._(this._tdbt) { _finalizer.attach(this, _tdbt, detach: this); } - final _TDBT _tdbt; - static final Finalizer<_TDBT> _finalizer = Finalizer((tdbt) => tdbt.close()); @override bool isDone() => _tdbt.id == null; @@ -909,9 +914,11 @@ class VeilidTableDBTransactionFFI extends VeilidTableDBTransaction { } class _TDB { - _TDB(int this.id, this.ffi); int? id; final VeilidFFI ffi; + + _TDB(int this.id, this.ffi); + void ensureValid() { if (id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -928,11 +935,12 @@ class _TDB { // FFI implementation of VeilidTableDB class VeilidTableDBFFI extends VeilidTableDB { + final _TDB _tdb; + static final Finalizer<_TDB> _finalizer = Finalizer((tdb) => tdb.close()); + VeilidTableDBFFI._(this._tdb) { _finalizer.attach(this, _tdb, detach: this); } - final _TDB _tdb; - static final Finalizer<_TDB> _finalizer = Finalizer((tdb) => tdb.close()); @override void close() { @@ -1029,10 +1037,11 @@ class VeilidTableDBFFI extends VeilidTableDB { // FFI implementation of VeilidCryptoSystem class VeilidCryptoSystemFFI extends VeilidCryptoSystem { - VeilidCryptoSystemFFI._(this._ffi, this._kind); final CryptoKind _kind; final VeilidFFI _ffi; + VeilidCryptoSystemFFI._(this._ffi, this._kind); + @override CryptoKind kind() => _kind; @@ -1376,6 +1385,113 @@ class VeilidCryptoSystemFFI extends VeilidCryptoSystem { // FFI implementation of high level Veilid API class VeilidFFI extends Veilid { + // veilid_core shared library + final DynamicLibrary _dylib; + + // Shared library functions + final _FreeStringDart _freeString; + final _InitializeVeilidCoreDart _initializeVeilidCore; + final _ChangeLogLevelDart _changeLogLevel; + final _ChangeLogIgnoreDart _changeLogIgnore; + final _StartupVeilidCoreDart _startupVeilidCore; + final _GetVeilidStateDart _getVeilidState; + final _IsShutdownDart _isShutdown; + final _AttachDart _attach; + final _DetachDart _detach; + final _ShutdownVeilidCoreDart _shutdownVeilidCore; + + final _RoutingContextDart _routingContext; + final _ReleaseRoutingContextDart _releaseRoutingContext; + final _RoutingContextWithDefaultSafetyDart _routingContextWithDefaultSafety; + final _RoutingContextWithSafetyDart _routingContextWithSafety; + final _RoutingContextWithSequencingDart _routingContextWithSequencing; + final _RoutingContextSafetyDart _routingContextSafety; + final _RoutingContextAppCallDart _routingContextAppCall; + final _RoutingContextAppMessageDart _routingContextAppMessage; + final _RoutingContextGetDHTRecordKeyDart _routingContextGetDHTRecordKey; + final _RoutingContextCreateDHTRecordDart _routingContextCreateDHTRecord; + final _RoutingContextOpenDHTRecordDart _routingContextOpenDHTRecord; + final _RoutingContextCloseDHTRecordDart _routingContextCloseDHTRecord; + final _RoutingContextDeleteDHTRecordDart _routingContextDeleteDHTRecord; + final _RoutingContextGetDHTValueDart _routingContextGetDHTValue; + final _RoutingContextSetDHTValueDart _routingContextSetDHTValue; + final _RoutingContextWatchDHTValuesDart _routingContextWatchDHTValues; + final _RoutingContextCancelDHTWatchDart _routingContextCancelDHTWatch; + final _RoutingContextInspectDHTRecordDart _routingContextInspectDHTRecord; + + final _GenerateMemberIdDart _generateMemberId; + + final _NewPrivateRouteDart _newPrivateRoute; + final _NewCustomPrivateRouteDart _newCustomPrivateRoute; + final _ImportRemotePrivateRouteDart _importRemotePrivateRoute; + final _ReleasePrivateRouteDart _releasePrivateRoute; + + final _AppCallReplyDart _appCallReply; + + final _OpenTableDbDart _openTableDb; + final _ReleaseTableDbDart _releaseTableDb; + final _DeleteTableDbDart _deleteTableDb; + final _TableDbGetColumnCountDart _tableDbGetColumnCount; + final _TableDbGetKeysDart _tableDbGetKeys; + final _TableDbStoreDart _tableDbStore; + final _TableDbLoadDart _tableDbLoad; + final _TableDbDeleteDart _tableDbDelete; + final _TableDbTransactDart _tableDbTransact; + final _ReleaseTableDbTransactionDart _releaseTableDbTransaction; + final _TableDbTransactionCommitDart _tableDbTransactionCommit; + final _TableDbTransactionRollbackDart _tableDbTransactionRollback; + final _TableDbTransactionStoreDart _tableDbTransactionStore; + final _TableDbTransactionDeleteDart _tableDbTransactionDelete; + + final _ValidCryptoKindsDart _validCryptoKinds; + final _VerifySignaturesDart _verifySignatures; + final _GenerateSignaturesDart _generateSignatures; + final _GenerateKeyPairDart _generateKeyPair; + + final _CryptoCachedDHDart _cryptoCachedDH; + final _CryptoComputeDHDart _cryptoComputeDH; + final _CryptoGenerateSharedSecretDart _cryptoGenerateSharedSecret; + + final _CryptoRandomBytesDart _cryptoRandomBytes; + final _CryptoHashPasswordDart _cryptoHashPassword; + final _CryptoVerifyPasswordDart _cryptoVerifyPassword; + final _CryptoDeriveSharedSecretDart _cryptoDeriveSharedSecret; + + final _CryptoSharedSecretLengthDart _cryptoSharedSecretLength; + final _CryptoNonceLengthDart _cryptoNonceLength; + final _CryptoHashDigestLengthDart _cryptoHashDigestLength; + final _CryptoPublicKeyLengthDart _cryptoPublicKeyLength; + final _CryptoSecretKeyLengthDart _cryptoSecretKeyLength; + final _CryptoSignatureLengthDart _cryptoSignatureLength; + final _CryptoDefaultSaltLengthDart _cryptoDefaultSaltLength; + final _CryptoAeadOverheadDart _cryptoAeadOverhead; + + final _CryptoCheckSharedSecretDart _cryptoCheckSharedSecret; + final _CryptoCheckNonceDart _cryptoCheckNonce; + final _CryptoCheckHashDigestDart _cryptoCheckHashDigest; + final _CryptoCheckPublicKeyDart _cryptoCheckPublicKey; + final _CryptoCheckSecretKeyDart _cryptoCheckSecretKey; + final _CryptoCheckSignatureDart _cryptoCheckSignature; + + final _CryptoRandomNonceDart _cryptoRandomNonce; + final _CryptoRandomSharedSecretDart _cryptoRandomSharedSecret; + final _CryptoGenerateKeyPairDart _cryptoGenerateKeyPair; + final _CryptoGenerateHashDart _cryptoGenerateHash; + final _CryptoValidateKeyPairDart _cryptoValidateKeyPair; + final _CryptoValidateHashDart _cryptoValidateHash; + final _CryptoSignDart _cryptoSign; + final _CryptoVerifyDart _cryptoVerify; + final _CryptoDecryptAeadDart _cryptoDecryptAead; + final _CryptoEncryptAeadDart _cryptoEncryptAead; + final _CryptoCryptNoAuthDart _cryptoCryptNoAuth; + + final _NowDart _now; + final _DebugDart _debug; + final _VeilidVersionStringDart _veilidVersionString; + final _VeilidVersionDart _veilidVersion; + final _DefaultVeilidConfigDart _defaultVeilidConfig; + final _VeilidFeaturesDart _veilidFeatures; + VeilidFFI(DynamicLibrary dylib) : _dylib = dylib, _freeString = @@ -1666,113 +1782,6 @@ class VeilidFFI extends Veilid { const String.fromEnvironment('VEILID_CRASH_PATH').toNativeUtf8(), ); } - // veilid_core shared library - final DynamicLibrary _dylib; - - // Shared library functions - final _FreeStringDart _freeString; - final _InitializeVeilidCoreDart _initializeVeilidCore; - final _ChangeLogLevelDart _changeLogLevel; - final _ChangeLogIgnoreDart _changeLogIgnore; - final _StartupVeilidCoreDart _startupVeilidCore; - final _GetVeilidStateDart _getVeilidState; - final _IsShutdownDart _isShutdown; - final _AttachDart _attach; - final _DetachDart _detach; - final _ShutdownVeilidCoreDart _shutdownVeilidCore; - - final _RoutingContextDart _routingContext; - final _ReleaseRoutingContextDart _releaseRoutingContext; - final _RoutingContextWithDefaultSafetyDart _routingContextWithDefaultSafety; - final _RoutingContextWithSafetyDart _routingContextWithSafety; - final _RoutingContextWithSequencingDart _routingContextWithSequencing; - final _RoutingContextSafetyDart _routingContextSafety; - final _RoutingContextAppCallDart _routingContextAppCall; - final _RoutingContextAppMessageDart _routingContextAppMessage; - final _RoutingContextGetDHTRecordKeyDart _routingContextGetDHTRecordKey; - final _RoutingContextCreateDHTRecordDart _routingContextCreateDHTRecord; - final _RoutingContextOpenDHTRecordDart _routingContextOpenDHTRecord; - final _RoutingContextCloseDHTRecordDart _routingContextCloseDHTRecord; - final _RoutingContextDeleteDHTRecordDart _routingContextDeleteDHTRecord; - final _RoutingContextGetDHTValueDart _routingContextGetDHTValue; - final _RoutingContextSetDHTValueDart _routingContextSetDHTValue; - final _RoutingContextWatchDHTValuesDart _routingContextWatchDHTValues; - final _RoutingContextCancelDHTWatchDart _routingContextCancelDHTWatch; - final _RoutingContextInspectDHTRecordDart _routingContextInspectDHTRecord; - - final _GenerateMemberIdDart _generateMemberId; - - final _NewPrivateRouteDart _newPrivateRoute; - final _NewCustomPrivateRouteDart _newCustomPrivateRoute; - final _ImportRemotePrivateRouteDart _importRemotePrivateRoute; - final _ReleasePrivateRouteDart _releasePrivateRoute; - - final _AppCallReplyDart _appCallReply; - - final _OpenTableDbDart _openTableDb; - final _ReleaseTableDbDart _releaseTableDb; - final _DeleteTableDbDart _deleteTableDb; - final _TableDbGetColumnCountDart _tableDbGetColumnCount; - final _TableDbGetKeysDart _tableDbGetKeys; - final _TableDbStoreDart _tableDbStore; - final _TableDbLoadDart _tableDbLoad; - final _TableDbDeleteDart _tableDbDelete; - final _TableDbTransactDart _tableDbTransact; - final _ReleaseTableDbTransactionDart _releaseTableDbTransaction; - final _TableDbTransactionCommitDart _tableDbTransactionCommit; - final _TableDbTransactionRollbackDart _tableDbTransactionRollback; - final _TableDbTransactionStoreDart _tableDbTransactionStore; - final _TableDbTransactionDeleteDart _tableDbTransactionDelete; - - final _ValidCryptoKindsDart _validCryptoKinds; - final _VerifySignaturesDart _verifySignatures; - final _GenerateSignaturesDart _generateSignatures; - final _GenerateKeyPairDart _generateKeyPair; - - final _CryptoCachedDHDart _cryptoCachedDH; - final _CryptoComputeDHDart _cryptoComputeDH; - final _CryptoGenerateSharedSecretDart _cryptoGenerateSharedSecret; - - final _CryptoRandomBytesDart _cryptoRandomBytes; - final _CryptoHashPasswordDart _cryptoHashPassword; - final _CryptoVerifyPasswordDart _cryptoVerifyPassword; - final _CryptoDeriveSharedSecretDart _cryptoDeriveSharedSecret; - - final _CryptoSharedSecretLengthDart _cryptoSharedSecretLength; - final _CryptoNonceLengthDart _cryptoNonceLength; - final _CryptoHashDigestLengthDart _cryptoHashDigestLength; - final _CryptoPublicKeyLengthDart _cryptoPublicKeyLength; - final _CryptoSecretKeyLengthDart _cryptoSecretKeyLength; - final _CryptoSignatureLengthDart _cryptoSignatureLength; - final _CryptoDefaultSaltLengthDart _cryptoDefaultSaltLength; - final _CryptoAeadOverheadDart _cryptoAeadOverhead; - - final _CryptoCheckSharedSecretDart _cryptoCheckSharedSecret; - final _CryptoCheckNonceDart _cryptoCheckNonce; - final _CryptoCheckHashDigestDart _cryptoCheckHashDigest; - final _CryptoCheckPublicKeyDart _cryptoCheckPublicKey; - final _CryptoCheckSecretKeyDart _cryptoCheckSecretKey; - final _CryptoCheckSignatureDart _cryptoCheckSignature; - - final _CryptoRandomNonceDart _cryptoRandomNonce; - final _CryptoRandomSharedSecretDart _cryptoRandomSharedSecret; - final _CryptoGenerateKeyPairDart _cryptoGenerateKeyPair; - final _CryptoGenerateHashDart _cryptoGenerateHash; - final _CryptoValidateKeyPairDart _cryptoValidateKeyPair; - final _CryptoValidateHashDart _cryptoValidateHash; - final _CryptoSignDart _cryptoSign; - final _CryptoVerifyDart _cryptoVerify; - final _CryptoDecryptAeadDart _cryptoDecryptAead; - final _CryptoEncryptAeadDart _cryptoEncryptAead; - final _CryptoCryptNoAuthDart _cryptoCryptNoAuth; - - final _NowDart _now; - final _DebugDart _debug; - final _VeilidVersionStringDart _veilidVersionString; - final _VeilidVersionDart _veilidVersion; - final _DefaultVeilidConfigDart _defaultVeilidConfig; - final _VeilidFeaturesDart _veilidFeatures; - @override void initializeVeilidCore(Map platformConfigJson) { final nativePlatformConfig = jsonEncode(platformConfigJson).toNativeUtf8(); diff --git a/veilid-flutter/lib/veilid_js.dart b/veilid-flutter/lib/veilid_js.dart index 7ff24dc0..dde9e310 100644 --- a/veilid-flutter/lib/veilid_js.dart +++ b/veilid-flutter/lib/veilid_js.dart @@ -41,9 +41,12 @@ Future _wrapApiPromise(Object p) => js_util }); class _Ctx { - _Ctx(int id, this.js) : _id = id; int? _id; + final VeilidJS js; + + _Ctx(int id, this.js) : _id = id; + int requireId() { if (_id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -61,11 +64,13 @@ class _Ctx { // JS implementation of VeilidRoutingContext class VeilidRoutingContextJS extends VeilidRoutingContext { + final _Ctx _ctx; + + static final Finalizer<_Ctx> _finalizer = Finalizer((ctx) => ctx.close()); + VeilidRoutingContextJS._(this._ctx) { _finalizer.attach(this, _ctx, detach: this); } - final _Ctx _ctx; - static final Finalizer<_Ctx> _finalizer = Finalizer((ctx) => ctx.close()); @override void close() { @@ -270,13 +275,14 @@ class VeilidRoutingContextJS extends VeilidRoutingContext { // JS implementation of VeilidCryptoSystem class VeilidCryptoSystemJS extends VeilidCryptoSystem { - VeilidCryptoSystemJS._(this._js, this._kind); - final CryptoKind _kind; + // Keep the reference // ignore: unused_field final VeilidJS _js; + VeilidCryptoSystemJS._(this._js, this._kind); + @override CryptoKind kind() => _kind; @@ -293,6 +299,7 @@ class VeilidCryptoSystemJS extends VeilidCryptoSystem { wasm, 'crypto_compute_dh', [_kind, jsonEncode(key), jsonEncode(secret)])))); + @override Future generateSharedSecret( PublicKey key, SecretKey secret, Uint8List domain) async => @@ -481,10 +488,14 @@ class VeilidCryptoSystemJS extends VeilidCryptoSystem { } class _TDBT { - _TDBT(this.id, this.tdbjs, this.js); int? id; + final VeilidTableDBJS tdbjs; + final VeilidJS js; + + _TDBT(this.id, this.tdbjs, this.js); + void ensureValid() { if (id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -501,11 +512,13 @@ class _TDBT { // JS implementation of VeilidTableDBTransaction class VeilidTableDBTransactionJS extends VeilidTableDBTransaction { + final _TDBT _tdbt; + + static final Finalizer<_TDBT> _finalizer = Finalizer((tdbt) => tdbt.close()); + VeilidTableDBTransactionJS._(this._tdbt) { _finalizer.attach(this, _tdbt, detach: this); } - final _TDBT _tdbt; - static final Finalizer<_TDBT> _finalizer = Finalizer((tdbt) => tdbt.close()); @override bool isDone() => _tdbt.id == null; @@ -551,11 +564,12 @@ class VeilidTableDBTransactionJS extends VeilidTableDBTransaction { } class _TDB { - _TDB(int id, this.js) : _id = id; - int? _id; final VeilidJS js; + + _TDB(int id, this.js) : _id = id; + int requireId() { if (_id == null) { throw VeilidAPIExceptionNotInitialized(); @@ -573,11 +587,13 @@ class _TDB { // JS implementation of VeilidTableDB class VeilidTableDBJS extends VeilidTableDB { + final _TDB _tdb; + + static final Finalizer<_TDB> _finalizer = Finalizer((tdb) => tdb.close()); + VeilidTableDBJS._(this._tdb) { _finalizer.attach(this, _tdb, detach: this); } - final _TDB _tdb; - static final Finalizer<_TDB> _finalizer = Finalizer((tdb) => tdb.close()); @override void close() { diff --git a/veilid-flutter/lib/veilid_state.freezed.dart b/veilid-flutter/lib/veilid_state.freezed.dart index 443352a3..bc49c892 100644 --- a/veilid-flutter/lib/veilid_state.freezed.dart +++ b/veilid-flutter/lib/veilid_state.freezed.dart @@ -1,6 +1,5 @@ -// dart format width=80 -// coverage:ignore-file // GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file // 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 @@ -15,206 +14,252 @@ T _$identity(T value) => value; /// @nodoc mixin _$LatencyStats { - TimestampDuration get fastest; - TimestampDuration get average; - TimestampDuration get slowest; - TimestampDuration get tm90; - TimestampDuration get tm75; - TimestampDuration get p90; - TimestampDuration get p75; - /// Create a copy of LatencyStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $LatencyStatsCopyWith get copyWith => - _$LatencyStatsCopyWithImpl( - this as LatencyStats, _$identity); + TimestampDuration get fastest; TimestampDuration get average; TimestampDuration get slowest; TimestampDuration get tm90; TimestampDuration get tm75; TimestampDuration get p90; TimestampDuration get p75; +/// Create a copy of LatencyStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LatencyStatsCopyWith get copyWith => _$LatencyStatsCopyWithImpl(this as LatencyStats, _$identity); /// Serializes this LatencyStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is LatencyStats && - (identical(other.fastest, fastest) || other.fastest == fastest) && - (identical(other.average, average) || other.average == average) && - (identical(other.slowest, slowest) || other.slowest == slowest) && - (identical(other.tm90, tm90) || other.tm90 == tm90) && - (identical(other.tm75, tm75) || other.tm75 == tm75) && - (identical(other.p90, p90) || other.p90 == p90) && - (identical(other.p75, p75) || other.p75 == p75)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, fastest, average, slowest, tm90, tm75, p90, p75); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LatencyStats&&(identical(other.fastest, fastest) || other.fastest == fastest)&&(identical(other.average, average) || other.average == average)&&(identical(other.slowest, slowest) || other.slowest == slowest)&&(identical(other.tm90, tm90) || other.tm90 == tm90)&&(identical(other.tm75, tm75) || other.tm75 == tm75)&&(identical(other.p90, p90) || other.p90 == p90)&&(identical(other.p75, p75) || other.p75 == p75)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fastest,average,slowest,tm90,tm75,p90,p75); + +@override +String toString() { + return 'LatencyStats(fastest: $fastest, average: $average, slowest: $slowest, tm90: $tm90, tm75: $tm75, p90: $p90, p75: $p75)'; +} + - @override - String toString() { - return 'LatencyStats(fastest: $fastest, average: $average, slowest: $slowest, tm90: $tm90, tm75: $tm75, p90: $p90, p75: $p75)'; - } } /// @nodoc -abstract mixin class $LatencyStatsCopyWith<$Res> { - factory $LatencyStatsCopyWith( - LatencyStats value, $Res Function(LatencyStats) _then) = - _$LatencyStatsCopyWithImpl; - @useResult - $Res call( - {TimestampDuration fastest, - TimestampDuration average, - TimestampDuration slowest, - TimestampDuration tm90, - TimestampDuration tm75, - TimestampDuration p90, - TimestampDuration p75}); -} +abstract mixin class $LatencyStatsCopyWith<$Res> { + factory $LatencyStatsCopyWith(LatencyStats value, $Res Function(LatencyStats) _then) = _$LatencyStatsCopyWithImpl; +@useResult +$Res call({ + TimestampDuration fastest, TimestampDuration average, TimestampDuration slowest, TimestampDuration tm90, TimestampDuration tm75, TimestampDuration p90, TimestampDuration p75 +}); + + + +} /// @nodoc -class _$LatencyStatsCopyWithImpl<$Res> implements $LatencyStatsCopyWith<$Res> { +class _$LatencyStatsCopyWithImpl<$Res> + implements $LatencyStatsCopyWith<$Res> { _$LatencyStatsCopyWithImpl(this._self, this._then); final LatencyStats _self; final $Res Function(LatencyStats) _then; - /// Create a copy of LatencyStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? fastest = null, - Object? average = null, - Object? slowest = null, - Object? tm90 = null, - Object? tm75 = null, - Object? p90 = null, - Object? p75 = null, - }) { - return _then(_self.copyWith( - fastest: null == fastest - ? _self.fastest - : fastest // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - average: null == average - ? _self.average - : average // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - slowest: null == slowest - ? _self.slowest - : slowest // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tm90: null == tm90 - ? _self.tm90 - : tm90 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tm75: null == tm75 - ? _self.tm75 - : tm75 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - p90: null == p90 - ? _self.p90 - : p90 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - p75: null == p75 - ? _self.p75 - : p75 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - )); - } +/// Create a copy of LatencyStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? fastest = null,Object? average = null,Object? slowest = null,Object? tm90 = null,Object? tm75 = null,Object? p90 = null,Object? p75 = null,}) { + return _then(_self.copyWith( +fastest: null == fastest ? _self.fastest : fastest // ignore: cast_nullable_to_non_nullable +as TimestampDuration,average: null == average ? _self.average : average // ignore: cast_nullable_to_non_nullable +as TimestampDuration,slowest: null == slowest ? _self.slowest : slowest // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tm90: null == tm90 ? _self.tm90 : tm90 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tm75: null == tm75 ? _self.tm75 : tm75 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,p90: null == p90 ? _self.p90 : p90 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,p75: null == p75 ? _self.p75 : p75 // ignore: cast_nullable_to_non_nullable +as TimestampDuration, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LatencyStats]. +extension LatencyStatsPatterns on LatencyStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LatencyStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LatencyStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LatencyStats value) $default,){ +final _that = this; +switch (_that) { +case _LatencyStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LatencyStats value)? $default,){ +final _that = this; +switch (_that) { +case _LatencyStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TimestampDuration fastest, TimestampDuration average, TimestampDuration slowest, TimestampDuration tm90, TimestampDuration tm75, TimestampDuration p90, TimestampDuration p75)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LatencyStats() when $default != null: +return $default(_that.fastest,_that.average,_that.slowest,_that.tm90,_that.tm75,_that.p90,_that.p75);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TimestampDuration fastest, TimestampDuration average, TimestampDuration slowest, TimestampDuration tm90, TimestampDuration tm75, TimestampDuration p90, TimestampDuration p75) $default,) {final _that = this; +switch (_that) { +case _LatencyStats(): +return $default(_that.fastest,_that.average,_that.slowest,_that.tm90,_that.tm75,_that.p90,_that.p75);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TimestampDuration fastest, TimestampDuration average, TimestampDuration slowest, TimestampDuration tm90, TimestampDuration tm75, TimestampDuration p90, TimestampDuration p75)? $default,) {final _that = this; +switch (_that) { +case _LatencyStats() when $default != null: +return $default(_that.fastest,_that.average,_that.slowest,_that.tm90,_that.tm75,_that.p90,_that.p75);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _LatencyStats implements LatencyStats { - const _LatencyStats( - {required this.fastest, - required this.average, - required this.slowest, - required this.tm90, - required this.tm75, - required this.p90, - required this.p75}); - factory _LatencyStats.fromJson(Map json) => - _$LatencyStatsFromJson(json); + const _LatencyStats({required this.fastest, required this.average, required this.slowest, required this.tm90, required this.tm75, required this.p90, required this.p75}); + factory _LatencyStats.fromJson(Map json) => _$LatencyStatsFromJson(json); - @override - final TimestampDuration fastest; - @override - final TimestampDuration average; - @override - final TimestampDuration slowest; - @override - final TimestampDuration tm90; - @override - final TimestampDuration tm75; - @override - final TimestampDuration p90; - @override - final TimestampDuration p75; +@override final TimestampDuration fastest; +@override final TimestampDuration average; +@override final TimestampDuration slowest; +@override final TimestampDuration tm90; +@override final TimestampDuration tm75; +@override final TimestampDuration p90; +@override final TimestampDuration p75; - /// Create a copy of LatencyStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$LatencyStatsCopyWith<_LatencyStats> get copyWith => - __$LatencyStatsCopyWithImpl<_LatencyStats>(this, _$identity); +/// Create a copy of LatencyStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LatencyStatsCopyWith<_LatencyStats> get copyWith => __$LatencyStatsCopyWithImpl<_LatencyStats>(this, _$identity); - @override - Map toJson() { - return _$LatencyStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$LatencyStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _LatencyStats && - (identical(other.fastest, fastest) || other.fastest == fastest) && - (identical(other.average, average) || other.average == average) && - (identical(other.slowest, slowest) || other.slowest == slowest) && - (identical(other.tm90, tm90) || other.tm90 == tm90) && - (identical(other.tm75, tm75) || other.tm75 == tm75) && - (identical(other.p90, p90) || other.p90 == p90) && - (identical(other.p75, p75) || other.p75 == p75)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LatencyStats&&(identical(other.fastest, fastest) || other.fastest == fastest)&&(identical(other.average, average) || other.average == average)&&(identical(other.slowest, slowest) || other.slowest == slowest)&&(identical(other.tm90, tm90) || other.tm90 == tm90)&&(identical(other.tm75, tm75) || other.tm75 == tm75)&&(identical(other.p90, p90) || other.p90 == p90)&&(identical(other.p75, p75) || other.p75 == p75)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fastest,average,slowest,tm90,tm75,p90,p75); + +@override +String toString() { + return 'LatencyStats(fastest: $fastest, average: $average, slowest: $slowest, tm90: $tm90, tm75: $tm75, p90: $p90, p75: $p75)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, fastest, average, slowest, tm90, tm75, p90, p75); - @override - String toString() { - return 'LatencyStats(fastest: $fastest, average: $average, slowest: $slowest, tm90: $tm90, tm75: $tm75, p90: $p90, p75: $p75)'; - } } /// @nodoc -abstract mixin class _$LatencyStatsCopyWith<$Res> - implements $LatencyStatsCopyWith<$Res> { - factory _$LatencyStatsCopyWith( - _LatencyStats value, $Res Function(_LatencyStats) _then) = - __$LatencyStatsCopyWithImpl; - @override - @useResult - $Res call( - {TimestampDuration fastest, - TimestampDuration average, - TimestampDuration slowest, - TimestampDuration tm90, - TimestampDuration tm75, - TimestampDuration p90, - TimestampDuration p75}); -} +abstract mixin class _$LatencyStatsCopyWith<$Res> implements $LatencyStatsCopyWith<$Res> { + factory _$LatencyStatsCopyWith(_LatencyStats value, $Res Function(_LatencyStats) _then) = __$LatencyStatsCopyWithImpl; +@override @useResult +$Res call({ + TimestampDuration fastest, TimestampDuration average, TimestampDuration slowest, TimestampDuration tm90, TimestampDuration tm75, TimestampDuration p90, TimestampDuration p75 +}); + + + +} /// @nodoc class __$LatencyStatsCopyWithImpl<$Res> implements _$LatencyStatsCopyWith<$Res> { @@ -223,101 +268,68 @@ class __$LatencyStatsCopyWithImpl<$Res> final _LatencyStats _self; final $Res Function(_LatencyStats) _then; - /// Create a copy of LatencyStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? fastest = null, - Object? average = null, - Object? slowest = null, - Object? tm90 = null, - Object? tm75 = null, - Object? p90 = null, - Object? p75 = null, - }) { - return _then(_LatencyStats( - fastest: null == fastest - ? _self.fastest - : fastest // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - average: null == average - ? _self.average - : average // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - slowest: null == slowest - ? _self.slowest - : slowest // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tm90: null == tm90 - ? _self.tm90 - : tm90 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tm75: null == tm75 - ? _self.tm75 - : tm75 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - p90: null == p90 - ? _self.p90 - : p90 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - p75: null == p75 - ? _self.p75 - : p75 // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - )); - } +/// Create a copy of LatencyStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? fastest = null,Object? average = null,Object? slowest = null,Object? tm90 = null,Object? tm75 = null,Object? p90 = null,Object? p75 = null,}) { + return _then(_LatencyStats( +fastest: null == fastest ? _self.fastest : fastest // ignore: cast_nullable_to_non_nullable +as TimestampDuration,average: null == average ? _self.average : average // ignore: cast_nullable_to_non_nullable +as TimestampDuration,slowest: null == slowest ? _self.slowest : slowest // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tm90: null == tm90 ? _self.tm90 : tm90 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tm75: null == tm75 ? _self.tm75 : tm75 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,p90: null == p90 ? _self.p90 : p90 // ignore: cast_nullable_to_non_nullable +as TimestampDuration,p75: null == p75 ? _self.p75 : p75 // ignore: cast_nullable_to_non_nullable +as TimestampDuration, + )); } + +} + + /// @nodoc mixin _$TransferStats { - BigInt get total; - BigInt get maximum; - BigInt get average; - BigInt get minimum; - /// Create a copy of TransferStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransferStatsCopyWith get copyWith => - _$TransferStatsCopyWithImpl( - this as TransferStats, _$identity); + BigInt get total; BigInt get maximum; BigInt get average; BigInt get minimum; +/// Create a copy of TransferStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransferStatsCopyWith get copyWith => _$TransferStatsCopyWithImpl(this as TransferStats, _$identity); /// Serializes this TransferStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransferStats && - (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(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, total, maximum, average, minimum); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferStats&&(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(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,total,maximum,average,minimum); + +@override +String toString() { + return 'TransferStats(total: $total, maximum: $maximum, average: $average, minimum: $minimum)'; +} + - @override - String toString() { - return 'TransferStats(total: $total, maximum: $maximum, average: $average, minimum: $minimum)'; - } } /// @nodoc -abstract mixin class $TransferStatsCopyWith<$Res> { - factory $TransferStatsCopyWith( - TransferStats value, $Res Function(TransferStats) _then) = - _$TransferStatsCopyWithImpl; - @useResult - $Res call({BigInt total, BigInt maximum, BigInt average, BigInt minimum}); -} +abstract mixin class $TransferStatsCopyWith<$Res> { + factory $TransferStatsCopyWith(TransferStats value, $Res Function(TransferStats) _then) = _$TransferStatsCopyWithImpl; +@useResult +$Res call({ + BigInt total, BigInt maximum, BigInt average, BigInt minimum +}); + + + +} /// @nodoc class _$TransferStatsCopyWithImpl<$Res> implements $TransferStatsCopyWith<$Res> { @@ -326,105 +338,197 @@ class _$TransferStatsCopyWithImpl<$Res> final TransferStats _self; final $Res Function(TransferStats) _then; - /// Create a copy of TransferStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? total = null, - Object? maximum = null, - Object? average = null, - Object? minimum = null, - }) { - return _then(_self.copyWith( - total: null == total - ? _self.total - : total // ignore: cast_nullable_to_non_nullable - as BigInt, - maximum: null == maximum - ? _self.maximum - : maximum // ignore: cast_nullable_to_non_nullable - as BigInt, - average: null == average - ? _self.average - : average // ignore: cast_nullable_to_non_nullable - as BigInt, - minimum: null == minimum - ? _self.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of TransferStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? total = null,Object? maximum = null,Object? average = null,Object? minimum = null,}) { + return _then(_self.copyWith( +total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as BigInt,maximum: null == maximum ? _self.maximum : maximum // ignore: cast_nullable_to_non_nullable +as BigInt,average: null == average ? _self.average : average // ignore: cast_nullable_to_non_nullable +as BigInt,minimum: null == minimum ? _self.minimum : minimum // ignore: cast_nullable_to_non_nullable +as BigInt, + )); +} + +} + + +/// Adds pattern-matching-related methods to [TransferStats]. +extension TransferStatsPatterns on TransferStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransferStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransferStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransferStats value) $default,){ +final _that = this; +switch (_that) { +case _TransferStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransferStats value)? $default,){ +final _that = this; +switch (_that) { +case _TransferStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( BigInt total, BigInt maximum, BigInt average, BigInt minimum)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransferStats() when $default != null: +return $default(_that.total,_that.maximum,_that.average,_that.minimum);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( BigInt total, BigInt maximum, BigInt average, BigInt minimum) $default,) {final _that = this; +switch (_that) { +case _TransferStats(): +return $default(_that.total,_that.maximum,_that.average,_that.minimum);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( BigInt total, BigInt maximum, BigInt average, BigInt minimum)? $default,) {final _that = this; +switch (_that) { +case _TransferStats() when $default != null: +return $default(_that.total,_that.maximum,_that.average,_that.minimum);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransferStats implements TransferStats { - const _TransferStats( - {required this.total, - required this.maximum, - required this.average, - required this.minimum}); - factory _TransferStats.fromJson(Map json) => - _$TransferStatsFromJson(json); + const _TransferStats({required this.total, required this.maximum, required this.average, required this.minimum}); + factory _TransferStats.fromJson(Map json) => _$TransferStatsFromJson(json); - @override - final BigInt total; - @override - final BigInt maximum; - @override - final BigInt average; - @override - final BigInt minimum; +@override final BigInt total; +@override final BigInt maximum; +@override final BigInt average; +@override final BigInt minimum; - /// Create a copy of TransferStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransferStatsCopyWith<_TransferStats> get copyWith => - __$TransferStatsCopyWithImpl<_TransferStats>(this, _$identity); +/// Create a copy of TransferStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransferStatsCopyWith<_TransferStats> get copyWith => __$TransferStatsCopyWithImpl<_TransferStats>(this, _$identity); - @override - Map toJson() { - return _$TransferStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$TransferStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransferStats && - (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)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransferStats&&(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(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,total,maximum,average,minimum); + +@override +String toString() { + return 'TransferStats(total: $total, maximum: $maximum, average: $average, minimum: $minimum)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, total, maximum, average, minimum); - @override - String toString() { - return 'TransferStats(total: $total, maximum: $maximum, average: $average, minimum: $minimum)'; - } } /// @nodoc -abstract mixin class _$TransferStatsCopyWith<$Res> - implements $TransferStatsCopyWith<$Res> { - factory _$TransferStatsCopyWith( - _TransferStats value, $Res Function(_TransferStats) _then) = - __$TransferStatsCopyWithImpl; - @override - @useResult - $Res call({BigInt total, BigInt maximum, BigInt average, BigInt minimum}); -} +abstract mixin class _$TransferStatsCopyWith<$Res> implements $TransferStatsCopyWith<$Res> { + factory _$TransferStatsCopyWith(_TransferStats value, $Res Function(_TransferStats) _then) = __$TransferStatsCopyWithImpl; +@override @useResult +$Res call({ + BigInt total, BigInt maximum, BigInt average, BigInt minimum +}); + + + +} /// @nodoc class __$TransferStatsCopyWithImpl<$Res> implements _$TransferStatsCopyWith<$Res> { @@ -433,84 +537,65 @@ class __$TransferStatsCopyWithImpl<$Res> final _TransferStats _self; final $Res Function(_TransferStats) _then; - /// Create a copy of TransferStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? total = null, - Object? maximum = null, - Object? average = null, - Object? minimum = null, - }) { - return _then(_TransferStats( - total: null == total - ? _self.total - : total // ignore: cast_nullable_to_non_nullable - as BigInt, - maximum: null == maximum - ? _self.maximum - : maximum // ignore: cast_nullable_to_non_nullable - as BigInt, - average: null == average - ? _self.average - : average // ignore: cast_nullable_to_non_nullable - as BigInt, - minimum: null == minimum - ? _self.minimum - : minimum // ignore: cast_nullable_to_non_nullable - as BigInt, - )); - } +/// Create a copy of TransferStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? total = null,Object? maximum = null,Object? average = null,Object? minimum = null,}) { + return _then(_TransferStats( +total: null == total ? _self.total : total // ignore: cast_nullable_to_non_nullable +as BigInt,maximum: null == maximum ? _self.maximum : maximum // ignore: cast_nullable_to_non_nullable +as BigInt,average: null == average ? _self.average : average // ignore: cast_nullable_to_non_nullable +as BigInt,minimum: null == minimum ? _self.minimum : minimum // ignore: cast_nullable_to_non_nullable +as BigInt, + )); } + +} + + /// @nodoc mixin _$TransferStatsDownUp { - TransferStats get down; - TransferStats get up; - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $TransferStatsDownUpCopyWith get copyWith => - _$TransferStatsDownUpCopyWithImpl( - this as TransferStatsDownUp, _$identity); + TransferStats get down; TransferStats get up; +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$TransferStatsDownUpCopyWith get copyWith => _$TransferStatsDownUpCopyWithImpl(this as TransferStatsDownUp, _$identity); /// Serializes this TransferStatsDownUp to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is TransferStatsDownUp && - (identical(other.down, down) || other.down == down) && - (identical(other.up, up) || other.up == up)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, down, up); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is TransferStatsDownUp&&(identical(other.down, down) || other.down == down)&&(identical(other.up, up) || other.up == up)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,down,up); + +@override +String toString() { + return 'TransferStatsDownUp(down: $down, up: $up)'; +} + - @override - String toString() { - return 'TransferStatsDownUp(down: $down, up: $up)'; - } } /// @nodoc -abstract mixin class $TransferStatsDownUpCopyWith<$Res> { - factory $TransferStatsDownUpCopyWith( - TransferStatsDownUp value, $Res Function(TransferStatsDownUp) _then) = - _$TransferStatsDownUpCopyWithImpl; - @useResult - $Res call({TransferStats down, TransferStats up}); +abstract mixin class $TransferStatsDownUpCopyWith<$Res> { + factory $TransferStatsDownUpCopyWith(TransferStatsDownUp value, $Res Function(TransferStatsDownUp) _then) = _$TransferStatsDownUpCopyWithImpl; +@useResult +$Res call({ + TransferStats down, TransferStats up +}); + + +$TransferStatsCopyWith<$Res> get down;$TransferStatsCopyWith<$Res> get up; - $TransferStatsCopyWith<$Res> get down; - $TransferStatsCopyWith<$Res> get up; } - /// @nodoc class _$TransferStatsDownUpCopyWithImpl<$Res> implements $TransferStatsDownUpCopyWith<$Res> { @@ -519,110 +604,211 @@ class _$TransferStatsDownUpCopyWithImpl<$Res> final TransferStatsDownUp _self; final $Res Function(TransferStatsDownUp) _then; - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? down = null, - Object? up = null, - }) { - return _then(_self.copyWith( - down: null == down - ? _self.down - : down // ignore: cast_nullable_to_non_nullable - as TransferStats, - up: null == up - ? _self.up - : up // ignore: cast_nullable_to_non_nullable - as TransferStats, - )); - } +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? down = null,Object? up = null,}) { + return _then(_self.copyWith( +down: null == down ? _self.down : down // ignore: cast_nullable_to_non_nullable +as TransferStats,up: null == up ? _self.up : up // ignore: cast_nullable_to_non_nullable +as TransferStats, + )); +} +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsCopyWith<$Res> get down { + + return $TransferStatsCopyWith<$Res>(_self.down, (value) { + return _then(_self.copyWith(down: value)); + }); +}/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsCopyWith<$Res> get up { + + return $TransferStatsCopyWith<$Res>(_self.up, (value) { + return _then(_self.copyWith(up: value)); + }); +} +} - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsCopyWith<$Res> get down { - return $TransferStatsCopyWith<$Res>(_self.down, (value) { - return _then(_self.copyWith(down: value)); - }); - } - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsCopyWith<$Res> get up { - return $TransferStatsCopyWith<$Res>(_self.up, (value) { - return _then(_self.copyWith(up: value)); - }); - } +/// Adds pattern-matching-related methods to [TransferStatsDownUp]. +extension TransferStatsDownUpPatterns on TransferStatsDownUp { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _TransferStatsDownUp value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _TransferStatsDownUp() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _TransferStatsDownUp value) $default,){ +final _that = this; +switch (_that) { +case _TransferStatsDownUp(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _TransferStatsDownUp value)? $default,){ +final _that = this; +switch (_that) { +case _TransferStatsDownUp() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TransferStats down, TransferStats up)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _TransferStatsDownUp() when $default != null: +return $default(_that.down,_that.up);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TransferStats down, TransferStats up) $default,) {final _that = this; +switch (_that) { +case _TransferStatsDownUp(): +return $default(_that.down,_that.up);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TransferStats down, TransferStats up)? $default,) {final _that = this; +switch (_that) { +case _TransferStatsDownUp() when $default != null: +return $default(_that.down,_that.up);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _TransferStatsDownUp implements TransferStatsDownUp { const _TransferStatsDownUp({required this.down, required this.up}); - factory _TransferStatsDownUp.fromJson(Map json) => - _$TransferStatsDownUpFromJson(json); + factory _TransferStatsDownUp.fromJson(Map json) => _$TransferStatsDownUpFromJson(json); - @override - final TransferStats down; - @override - final TransferStats up; +@override final TransferStats down; +@override final TransferStats up; - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$TransferStatsDownUpCopyWith<_TransferStatsDownUp> get copyWith => - __$TransferStatsDownUpCopyWithImpl<_TransferStatsDownUp>( - this, _$identity); +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$TransferStatsDownUpCopyWith<_TransferStatsDownUp> get copyWith => __$TransferStatsDownUpCopyWithImpl<_TransferStatsDownUp>(this, _$identity); - @override - Map toJson() { - return _$TransferStatsDownUpToJson( - this, - ); - } +@override +Map toJson() { + return _$TransferStatsDownUpToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _TransferStatsDownUp && - (identical(other.down, down) || other.down == down) && - (identical(other.up, up) || other.up == up)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _TransferStatsDownUp&&(identical(other.down, down) || other.down == down)&&(identical(other.up, up) || other.up == up)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,down,up); + +@override +String toString() { + return 'TransferStatsDownUp(down: $down, up: $up)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, down, up); - @override - String toString() { - return 'TransferStatsDownUp(down: $down, up: $up)'; - } } /// @nodoc -abstract mixin class _$TransferStatsDownUpCopyWith<$Res> - implements $TransferStatsDownUpCopyWith<$Res> { - factory _$TransferStatsDownUpCopyWith(_TransferStatsDownUp value, - $Res Function(_TransferStatsDownUp) _then) = - __$TransferStatsDownUpCopyWithImpl; - @override - @useResult - $Res call({TransferStats down, TransferStats up}); +abstract mixin class _$TransferStatsDownUpCopyWith<$Res> implements $TransferStatsDownUpCopyWith<$Res> { + factory _$TransferStatsDownUpCopyWith(_TransferStatsDownUp value, $Res Function(_TransferStatsDownUp) _then) = __$TransferStatsDownUpCopyWithImpl; +@override @useResult +$Res call({ + TransferStats down, TransferStats up +}); + + +@override $TransferStatsCopyWith<$Res> get down;@override $TransferStatsCopyWith<$Res> get up; - @override - $TransferStatsCopyWith<$Res> get down; - @override - $TransferStatsCopyWith<$Res> get up; } - /// @nodoc class __$TransferStatsDownUpCopyWithImpl<$Res> implements _$TransferStatsDownUpCopyWith<$Res> { @@ -631,390 +817,371 @@ class __$TransferStatsDownUpCopyWithImpl<$Res> final _TransferStatsDownUp _self; final $Res Function(_TransferStatsDownUp) _then; - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? down = null, - Object? up = null, - }) { - return _then(_TransferStatsDownUp( - down: null == down - ? _self.down - : down // ignore: cast_nullable_to_non_nullable - as TransferStats, - up: null == up - ? _self.up - : up // ignore: cast_nullable_to_non_nullable - as TransferStats, - )); - } - - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsCopyWith<$Res> get down { - return $TransferStatsCopyWith<$Res>(_self.down, (value) { - return _then(_self.copyWith(down: value)); - }); - } - - /// Create a copy of TransferStatsDownUp - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsCopyWith<$Res> get up { - return $TransferStatsCopyWith<$Res>(_self.up, (value) { - return _then(_self.copyWith(up: value)); - }); - } +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? down = null,Object? up = null,}) { + return _then(_TransferStatsDownUp( +down: null == down ? _self.down : down // ignore: cast_nullable_to_non_nullable +as TransferStats,up: null == up ? _self.up : up // ignore: cast_nullable_to_non_nullable +as TransferStats, + )); } +/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsCopyWith<$Res> get down { + + return $TransferStatsCopyWith<$Res>(_self.down, (value) { + return _then(_self.copyWith(down: value)); + }); +}/// Create a copy of TransferStatsDownUp +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsCopyWith<$Res> get up { + + return $TransferStatsCopyWith<$Res>(_self.up, (value) { + return _then(_self.copyWith(up: value)); + }); +} +} + + /// @nodoc mixin _$StateStats { - TimestampDuration get span; - TimestampDuration get reliable; - TimestampDuration get unreliable; - TimestampDuration get dead; - TimestampDuration get punished; - StateReasonStats get reason; - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $StateStatsCopyWith get copyWith => - _$StateStatsCopyWithImpl(this as StateStats, _$identity); + TimestampDuration get span; TimestampDuration get reliable; TimestampDuration get unreliable; TimestampDuration get dead; TimestampDuration get punished; StateReasonStats get reason; +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$StateStatsCopyWith get copyWith => _$StateStatsCopyWithImpl(this as StateStats, _$identity); /// Serializes this StateStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StateStats && - (identical(other.span, span) || other.span == span) && - (identical(other.reliable, reliable) || - other.reliable == reliable) && - (identical(other.unreliable, unreliable) || - other.unreliable == unreliable) && - (identical(other.dead, dead) || other.dead == dead) && - (identical(other.punished, punished) || - other.punished == punished) && - (identical(other.reason, reason) || other.reason == reason)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, span, reliable, unreliable, dead, punished, reason); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is StateStats&&(identical(other.span, span) || other.span == span)&&(identical(other.reliable, reliable) || other.reliable == reliable)&&(identical(other.unreliable, unreliable) || other.unreliable == unreliable)&&(identical(other.dead, dead) || other.dead == dead)&&(identical(other.punished, punished) || other.punished == punished)&&(identical(other.reason, reason) || other.reason == reason)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,span,reliable,unreliable,dead,punished,reason); + +@override +String toString() { + return 'StateStats(span: $span, reliable: $reliable, unreliable: $unreliable, dead: $dead, punished: $punished, reason: $reason)'; +} + - @override - String toString() { - return 'StateStats(span: $span, reliable: $reliable, unreliable: $unreliable, dead: $dead, punished: $punished, reason: $reason)'; - } } /// @nodoc -abstract mixin class $StateStatsCopyWith<$Res> { - factory $StateStatsCopyWith( - StateStats value, $Res Function(StateStats) _then) = - _$StateStatsCopyWithImpl; - @useResult - $Res call( - {TimestampDuration span, - TimestampDuration reliable, - TimestampDuration unreliable, - TimestampDuration dead, - TimestampDuration punished, - StateReasonStats reason}); +abstract mixin class $StateStatsCopyWith<$Res> { + factory $StateStatsCopyWith(StateStats value, $Res Function(StateStats) _then) = _$StateStatsCopyWithImpl; +@useResult +$Res call({ + TimestampDuration span, TimestampDuration reliable, TimestampDuration unreliable, TimestampDuration dead, TimestampDuration punished, StateReasonStats reason +}); + + +$StateReasonStatsCopyWith<$Res> get reason; - $StateReasonStatsCopyWith<$Res> get reason; } - /// @nodoc -class _$StateStatsCopyWithImpl<$Res> implements $StateStatsCopyWith<$Res> { +class _$StateStatsCopyWithImpl<$Res> + implements $StateStatsCopyWith<$Res> { _$StateStatsCopyWithImpl(this._self, this._then); final StateStats _self; final $Res Function(StateStats) _then; - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? span = null, - Object? reliable = null, - Object? unreliable = null, - Object? dead = null, - Object? punished = null, - Object? reason = null, - }) { - return _then(_self.copyWith( - span: null == span - ? _self.span - : span // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - reliable: null == reliable - ? _self.reliable - : reliable // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - unreliable: null == unreliable - ? _self.unreliable - : unreliable // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - dead: null == dead - ? _self.dead - : dead // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - punished: null == punished - ? _self.punished - : punished // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - reason: null == reason - ? _self.reason - : reason // ignore: cast_nullable_to_non_nullable - as StateReasonStats, - )); - } +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? span = null,Object? reliable = null,Object? unreliable = null,Object? dead = null,Object? punished = null,Object? reason = null,}) { + return _then(_self.copyWith( +span: null == span ? _self.span : span // ignore: cast_nullable_to_non_nullable +as TimestampDuration,reliable: null == reliable ? _self.reliable : reliable // ignore: cast_nullable_to_non_nullable +as TimestampDuration,unreliable: null == unreliable ? _self.unreliable : unreliable // ignore: cast_nullable_to_non_nullable +as TimestampDuration,dead: null == dead ? _self.dead : dead // ignore: cast_nullable_to_non_nullable +as TimestampDuration,punished: null == punished ? _self.punished : punished // ignore: cast_nullable_to_non_nullable +as TimestampDuration,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable +as StateReasonStats, + )); +} +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$StateReasonStatsCopyWith<$Res> get reason { + + return $StateReasonStatsCopyWith<$Res>(_self.reason, (value) { + return _then(_self.copyWith(reason: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [StateStats]. +extension StateStatsPatterns on StateStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _StateStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _StateStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _StateStats value) $default,){ +final _that = this; +switch (_that) { +case _StateStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _StateStats value)? $default,){ +final _that = this; +switch (_that) { +case _StateStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TimestampDuration span, TimestampDuration reliable, TimestampDuration unreliable, TimestampDuration dead, TimestampDuration punished, StateReasonStats reason)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _StateStats() when $default != null: +return $default(_that.span,_that.reliable,_that.unreliable,_that.dead,_that.punished,_that.reason);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TimestampDuration span, TimestampDuration reliable, TimestampDuration unreliable, TimestampDuration dead, TimestampDuration punished, StateReasonStats reason) $default,) {final _that = this; +switch (_that) { +case _StateStats(): +return $default(_that.span,_that.reliable,_that.unreliable,_that.dead,_that.punished,_that.reason);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TimestampDuration span, TimestampDuration reliable, TimestampDuration unreliable, TimestampDuration dead, TimestampDuration punished, StateReasonStats reason)? $default,) {final _that = this; +switch (_that) { +case _StateStats() when $default != null: +return $default(_that.span,_that.reliable,_that.unreliable,_that.dead,_that.punished,_that.reason);case _: + return null; + +} +} - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $StateReasonStatsCopyWith<$Res> get reason { - return $StateReasonStatsCopyWith<$Res>(_self.reason, (value) { - return _then(_self.copyWith(reason: value)); - }); - } } /// @nodoc @JsonSerializable() + class _StateStats implements StateStats { - const _StateStats( - {required this.span, - required this.reliable, - required this.unreliable, - required this.dead, - required this.punished, - required this.reason}); - factory _StateStats.fromJson(Map json) => - _$StateStatsFromJson(json); + const _StateStats({required this.span, required this.reliable, required this.unreliable, required this.dead, required this.punished, required this.reason}); + factory _StateStats.fromJson(Map json) => _$StateStatsFromJson(json); - @override - final TimestampDuration span; - @override - final TimestampDuration reliable; - @override - final TimestampDuration unreliable; - @override - final TimestampDuration dead; - @override - final TimestampDuration punished; - @override - final StateReasonStats reason; +@override final TimestampDuration span; +@override final TimestampDuration reliable; +@override final TimestampDuration unreliable; +@override final TimestampDuration dead; +@override final TimestampDuration punished; +@override final StateReasonStats reason; - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StateStatsCopyWith<_StateStats> get copyWith => - __$StateStatsCopyWithImpl<_StateStats>(this, _$identity); +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$StateStatsCopyWith<_StateStats> get copyWith => __$StateStatsCopyWithImpl<_StateStats>(this, _$identity); - @override - Map toJson() { - return _$StateStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$StateStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _StateStats && - (identical(other.span, span) || other.span == span) && - (identical(other.reliable, reliable) || - other.reliable == reliable) && - (identical(other.unreliable, unreliable) || - other.unreliable == unreliable) && - (identical(other.dead, dead) || other.dead == dead) && - (identical(other.punished, punished) || - other.punished == punished) && - (identical(other.reason, reason) || other.reason == reason)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _StateStats&&(identical(other.span, span) || other.span == span)&&(identical(other.reliable, reliable) || other.reliable == reliable)&&(identical(other.unreliable, unreliable) || other.unreliable == unreliable)&&(identical(other.dead, dead) || other.dead == dead)&&(identical(other.punished, punished) || other.punished == punished)&&(identical(other.reason, reason) || other.reason == reason)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,span,reliable,unreliable,dead,punished,reason); + +@override +String toString() { + return 'StateStats(span: $span, reliable: $reliable, unreliable: $unreliable, dead: $dead, punished: $punished, reason: $reason)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, span, reliable, unreliable, dead, punished, reason); - @override - String toString() { - return 'StateStats(span: $span, reliable: $reliable, unreliable: $unreliable, dead: $dead, punished: $punished, reason: $reason)'; - } } /// @nodoc -abstract mixin class _$StateStatsCopyWith<$Res> - implements $StateStatsCopyWith<$Res> { - factory _$StateStatsCopyWith( - _StateStats value, $Res Function(_StateStats) _then) = - __$StateStatsCopyWithImpl; - @override - @useResult - $Res call( - {TimestampDuration span, - TimestampDuration reliable, - TimestampDuration unreliable, - TimestampDuration dead, - TimestampDuration punished, - StateReasonStats reason}); +abstract mixin class _$StateStatsCopyWith<$Res> implements $StateStatsCopyWith<$Res> { + factory _$StateStatsCopyWith(_StateStats value, $Res Function(_StateStats) _then) = __$StateStatsCopyWithImpl; +@override @useResult +$Res call({ + TimestampDuration span, TimestampDuration reliable, TimestampDuration unreliable, TimestampDuration dead, TimestampDuration punished, StateReasonStats reason +}); + + +@override $StateReasonStatsCopyWith<$Res> get reason; - @override - $StateReasonStatsCopyWith<$Res> get reason; } - /// @nodoc -class __$StateStatsCopyWithImpl<$Res> implements _$StateStatsCopyWith<$Res> { +class __$StateStatsCopyWithImpl<$Res> + implements _$StateStatsCopyWith<$Res> { __$StateStatsCopyWithImpl(this._self, this._then); final _StateStats _self; final $Res Function(_StateStats) _then; - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? span = null, - Object? reliable = null, - Object? unreliable = null, - Object? dead = null, - Object? punished = null, - Object? reason = null, - }) { - return _then(_StateStats( - span: null == span - ? _self.span - : span // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - reliable: null == reliable - ? _self.reliable - : reliable // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - unreliable: null == unreliable - ? _self.unreliable - : unreliable // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - dead: null == dead - ? _self.dead - : dead // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - punished: null == punished - ? _self.punished - : punished // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - reason: null == reason - ? _self.reason - : reason // ignore: cast_nullable_to_non_nullable - as StateReasonStats, - )); - } - - /// Create a copy of StateStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $StateReasonStatsCopyWith<$Res> get reason { - return $StateReasonStatsCopyWith<$Res>(_self.reason, (value) { - return _then(_self.copyWith(reason: value)); - }); - } +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? span = null,Object? reliable = null,Object? unreliable = null,Object? dead = null,Object? punished = null,Object? reason = null,}) { + return _then(_StateStats( +span: null == span ? _self.span : span // ignore: cast_nullable_to_non_nullable +as TimestampDuration,reliable: null == reliable ? _self.reliable : reliable // ignore: cast_nullable_to_non_nullable +as TimestampDuration,unreliable: null == unreliable ? _self.unreliable : unreliable // ignore: cast_nullable_to_non_nullable +as TimestampDuration,dead: null == dead ? _self.dead : dead // ignore: cast_nullable_to_non_nullable +as TimestampDuration,punished: null == punished ? _self.punished : punished // ignore: cast_nullable_to_non_nullable +as TimestampDuration,reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable +as StateReasonStats, + )); } +/// Create a copy of StateStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$StateReasonStatsCopyWith<$Res> get reason { + + return $StateReasonStatsCopyWith<$Res>(_self.reason, (value) { + return _then(_self.copyWith(reason: value)); + }); +} +} + + /// @nodoc mixin _$StateReasonStats { - TimestampDuration get canNotSend; - TimestampDuration get tooManyLostAnswers; - TimestampDuration get noPingResponse; - TimestampDuration get failedToSend; - TimestampDuration get lostAnswers; - TimestampDuration get notSeenConsecutively; - TimestampDuration get inUnreliablePingSpan; - /// Create a copy of StateReasonStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $StateReasonStatsCopyWith get copyWith => - _$StateReasonStatsCopyWithImpl( - this as StateReasonStats, _$identity); + TimestampDuration get canNotSend; TimestampDuration get tooManyLostAnswers; TimestampDuration get noPingResponse; TimestampDuration get failedToSend; TimestampDuration get lostAnswers; TimestampDuration get notSeenConsecutively; TimestampDuration get inUnreliablePingSpan; +/// Create a copy of StateReasonStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$StateReasonStatsCopyWith get copyWith => _$StateReasonStatsCopyWithImpl(this as StateReasonStats, _$identity); /// Serializes this StateReasonStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is StateReasonStats && - (identical(other.canNotSend, canNotSend) || - other.canNotSend == canNotSend) && - (identical(other.tooManyLostAnswers, tooManyLostAnswers) || - other.tooManyLostAnswers == tooManyLostAnswers) && - (identical(other.noPingResponse, noPingResponse) || - other.noPingResponse == noPingResponse) && - (identical(other.failedToSend, failedToSend) || - other.failedToSend == failedToSend) && - (identical(other.lostAnswers, lostAnswers) || - other.lostAnswers == lostAnswers) && - (identical(other.notSeenConsecutively, notSeenConsecutively) || - other.notSeenConsecutively == notSeenConsecutively) && - (identical(other.inUnreliablePingSpan, inUnreliablePingSpan) || - other.inUnreliablePingSpan == inUnreliablePingSpan)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - canNotSend, - tooManyLostAnswers, - noPingResponse, - failedToSend, - lostAnswers, - notSeenConsecutively, - inUnreliablePingSpan); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is StateReasonStats&&(identical(other.canNotSend, canNotSend) || other.canNotSend == canNotSend)&&(identical(other.tooManyLostAnswers, tooManyLostAnswers) || other.tooManyLostAnswers == tooManyLostAnswers)&&(identical(other.noPingResponse, noPingResponse) || other.noPingResponse == noPingResponse)&&(identical(other.failedToSend, failedToSend) || other.failedToSend == failedToSend)&&(identical(other.lostAnswers, lostAnswers) || other.lostAnswers == lostAnswers)&&(identical(other.notSeenConsecutively, notSeenConsecutively) || other.notSeenConsecutively == notSeenConsecutively)&&(identical(other.inUnreliablePingSpan, inUnreliablePingSpan) || other.inUnreliablePingSpan == inUnreliablePingSpan)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,canNotSend,tooManyLostAnswers,noPingResponse,failedToSend,lostAnswers,notSeenConsecutively,inUnreliablePingSpan); + +@override +String toString() { + return 'StateReasonStats(canNotSend: $canNotSend, tooManyLostAnswers: $tooManyLostAnswers, noPingResponse: $noPingResponse, failedToSend: $failedToSend, lostAnswers: $lostAnswers, notSeenConsecutively: $notSeenConsecutively, inUnreliablePingSpan: $inUnreliablePingSpan)'; +} + - @override - String toString() { - return 'StateReasonStats(canNotSend: $canNotSend, tooManyLostAnswers: $tooManyLostAnswers, noPingResponse: $noPingResponse, failedToSend: $failedToSend, lostAnswers: $lostAnswers, notSeenConsecutively: $notSeenConsecutively, inUnreliablePingSpan: $inUnreliablePingSpan)'; - } } /// @nodoc -abstract mixin class $StateReasonStatsCopyWith<$Res> { - factory $StateReasonStatsCopyWith( - StateReasonStats value, $Res Function(StateReasonStats) _then) = - _$StateReasonStatsCopyWithImpl; - @useResult - $Res call( - {TimestampDuration canNotSend, - TimestampDuration tooManyLostAnswers, - TimestampDuration noPingResponse, - TimestampDuration failedToSend, - TimestampDuration lostAnswers, - TimestampDuration notSeenConsecutively, - TimestampDuration inUnreliablePingSpan}); -} +abstract mixin class $StateReasonStatsCopyWith<$Res> { + factory $StateReasonStatsCopyWith(StateReasonStats value, $Res Function(StateReasonStats) _then) = _$StateReasonStatsCopyWithImpl; +@useResult +$Res call({ + TimestampDuration canNotSend, TimestampDuration tooManyLostAnswers, TimestampDuration noPingResponse, TimestampDuration failedToSend, TimestampDuration lostAnswers, TimestampDuration notSeenConsecutively, TimestampDuration inUnreliablePingSpan +}); + + + +} /// @nodoc class _$StateReasonStatsCopyWithImpl<$Res> implements $StateReasonStatsCopyWith<$Res> { @@ -1023,153 +1190,203 @@ class _$StateReasonStatsCopyWithImpl<$Res> final StateReasonStats _self; final $Res Function(StateReasonStats) _then; - /// Create a copy of StateReasonStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? canNotSend = null, - Object? tooManyLostAnswers = null, - Object? noPingResponse = null, - Object? failedToSend = null, - Object? lostAnswers = null, - Object? notSeenConsecutively = null, - Object? inUnreliablePingSpan = null, - }) { - return _then(_self.copyWith( - canNotSend: null == canNotSend - ? _self.canNotSend - : canNotSend // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tooManyLostAnswers: null == tooManyLostAnswers - ? _self.tooManyLostAnswers - : tooManyLostAnswers // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - noPingResponse: null == noPingResponse - ? _self.noPingResponse - : noPingResponse // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - failedToSend: null == failedToSend - ? _self.failedToSend - : failedToSend // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - lostAnswers: null == lostAnswers - ? _self.lostAnswers - : lostAnswers // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - notSeenConsecutively: null == notSeenConsecutively - ? _self.notSeenConsecutively - : notSeenConsecutively // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - inUnreliablePingSpan: null == inUnreliablePingSpan - ? _self.inUnreliablePingSpan - : inUnreliablePingSpan // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - )); - } +/// Create a copy of StateReasonStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? canNotSend = null,Object? tooManyLostAnswers = null,Object? noPingResponse = null,Object? failedToSend = null,Object? lostAnswers = null,Object? notSeenConsecutively = null,Object? inUnreliablePingSpan = null,}) { + return _then(_self.copyWith( +canNotSend: null == canNotSend ? _self.canNotSend : canNotSend // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tooManyLostAnswers: null == tooManyLostAnswers ? _self.tooManyLostAnswers : tooManyLostAnswers // ignore: cast_nullable_to_non_nullable +as TimestampDuration,noPingResponse: null == noPingResponse ? _self.noPingResponse : noPingResponse // ignore: cast_nullable_to_non_nullable +as TimestampDuration,failedToSend: null == failedToSend ? _self.failedToSend : failedToSend // ignore: cast_nullable_to_non_nullable +as TimestampDuration,lostAnswers: null == lostAnswers ? _self.lostAnswers : lostAnswers // ignore: cast_nullable_to_non_nullable +as TimestampDuration,notSeenConsecutively: null == notSeenConsecutively ? _self.notSeenConsecutively : notSeenConsecutively // ignore: cast_nullable_to_non_nullable +as TimestampDuration,inUnreliablePingSpan: null == inUnreliablePingSpan ? _self.inUnreliablePingSpan : inUnreliablePingSpan // ignore: cast_nullable_to_non_nullable +as TimestampDuration, + )); +} + +} + + +/// Adds pattern-matching-related methods to [StateReasonStats]. +extension StateReasonStatsPatterns on StateReasonStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _StateReasonStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _StateReasonStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _StateReasonStats value) $default,){ +final _that = this; +switch (_that) { +case _StateReasonStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _StateReasonStats value)? $default,){ +final _that = this; +switch (_that) { +case _StateReasonStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TimestampDuration canNotSend, TimestampDuration tooManyLostAnswers, TimestampDuration noPingResponse, TimestampDuration failedToSend, TimestampDuration lostAnswers, TimestampDuration notSeenConsecutively, TimestampDuration inUnreliablePingSpan)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _StateReasonStats() when $default != null: +return $default(_that.canNotSend,_that.tooManyLostAnswers,_that.noPingResponse,_that.failedToSend,_that.lostAnswers,_that.notSeenConsecutively,_that.inUnreliablePingSpan);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TimestampDuration canNotSend, TimestampDuration tooManyLostAnswers, TimestampDuration noPingResponse, TimestampDuration failedToSend, TimestampDuration lostAnswers, TimestampDuration notSeenConsecutively, TimestampDuration inUnreliablePingSpan) $default,) {final _that = this; +switch (_that) { +case _StateReasonStats(): +return $default(_that.canNotSend,_that.tooManyLostAnswers,_that.noPingResponse,_that.failedToSend,_that.lostAnswers,_that.notSeenConsecutively,_that.inUnreliablePingSpan);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TimestampDuration canNotSend, TimestampDuration tooManyLostAnswers, TimestampDuration noPingResponse, TimestampDuration failedToSend, TimestampDuration lostAnswers, TimestampDuration notSeenConsecutively, TimestampDuration inUnreliablePingSpan)? $default,) {final _that = this; +switch (_that) { +case _StateReasonStats() when $default != null: +return $default(_that.canNotSend,_that.tooManyLostAnswers,_that.noPingResponse,_that.failedToSend,_that.lostAnswers,_that.notSeenConsecutively,_that.inUnreliablePingSpan);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _StateReasonStats implements StateReasonStats { - const _StateReasonStats( - {required this.canNotSend, - required this.tooManyLostAnswers, - required this.noPingResponse, - required this.failedToSend, - required this.lostAnswers, - required this.notSeenConsecutively, - required this.inUnreliablePingSpan}); - factory _StateReasonStats.fromJson(Map json) => - _$StateReasonStatsFromJson(json); + const _StateReasonStats({required this.canNotSend, required this.tooManyLostAnswers, required this.noPingResponse, required this.failedToSend, required this.lostAnswers, required this.notSeenConsecutively, required this.inUnreliablePingSpan}); + factory _StateReasonStats.fromJson(Map json) => _$StateReasonStatsFromJson(json); - @override - final TimestampDuration canNotSend; - @override - final TimestampDuration tooManyLostAnswers; - @override - final TimestampDuration noPingResponse; - @override - final TimestampDuration failedToSend; - @override - final TimestampDuration lostAnswers; - @override - final TimestampDuration notSeenConsecutively; - @override - final TimestampDuration inUnreliablePingSpan; +@override final TimestampDuration canNotSend; +@override final TimestampDuration tooManyLostAnswers; +@override final TimestampDuration noPingResponse; +@override final TimestampDuration failedToSend; +@override final TimestampDuration lostAnswers; +@override final TimestampDuration notSeenConsecutively; +@override final TimestampDuration inUnreliablePingSpan; - /// Create a copy of StateReasonStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$StateReasonStatsCopyWith<_StateReasonStats> get copyWith => - __$StateReasonStatsCopyWithImpl<_StateReasonStats>(this, _$identity); +/// Create a copy of StateReasonStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$StateReasonStatsCopyWith<_StateReasonStats> get copyWith => __$StateReasonStatsCopyWithImpl<_StateReasonStats>(this, _$identity); - @override - Map toJson() { - return _$StateReasonStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$StateReasonStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _StateReasonStats && - (identical(other.canNotSend, canNotSend) || - other.canNotSend == canNotSend) && - (identical(other.tooManyLostAnswers, tooManyLostAnswers) || - other.tooManyLostAnswers == tooManyLostAnswers) && - (identical(other.noPingResponse, noPingResponse) || - other.noPingResponse == noPingResponse) && - (identical(other.failedToSend, failedToSend) || - other.failedToSend == failedToSend) && - (identical(other.lostAnswers, lostAnswers) || - other.lostAnswers == lostAnswers) && - (identical(other.notSeenConsecutively, notSeenConsecutively) || - other.notSeenConsecutively == notSeenConsecutively) && - (identical(other.inUnreliablePingSpan, inUnreliablePingSpan) || - other.inUnreliablePingSpan == inUnreliablePingSpan)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _StateReasonStats&&(identical(other.canNotSend, canNotSend) || other.canNotSend == canNotSend)&&(identical(other.tooManyLostAnswers, tooManyLostAnswers) || other.tooManyLostAnswers == tooManyLostAnswers)&&(identical(other.noPingResponse, noPingResponse) || other.noPingResponse == noPingResponse)&&(identical(other.failedToSend, failedToSend) || other.failedToSend == failedToSend)&&(identical(other.lostAnswers, lostAnswers) || other.lostAnswers == lostAnswers)&&(identical(other.notSeenConsecutively, notSeenConsecutively) || other.notSeenConsecutively == notSeenConsecutively)&&(identical(other.inUnreliablePingSpan, inUnreliablePingSpan) || other.inUnreliablePingSpan == inUnreliablePingSpan)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,canNotSend,tooManyLostAnswers,noPingResponse,failedToSend,lostAnswers,notSeenConsecutively,inUnreliablePingSpan); + +@override +String toString() { + return 'StateReasonStats(canNotSend: $canNotSend, tooManyLostAnswers: $tooManyLostAnswers, noPingResponse: $noPingResponse, failedToSend: $failedToSend, lostAnswers: $lostAnswers, notSeenConsecutively: $notSeenConsecutively, inUnreliablePingSpan: $inUnreliablePingSpan)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - canNotSend, - tooManyLostAnswers, - noPingResponse, - failedToSend, - lostAnswers, - notSeenConsecutively, - inUnreliablePingSpan); - @override - String toString() { - return 'StateReasonStats(canNotSend: $canNotSend, tooManyLostAnswers: $tooManyLostAnswers, noPingResponse: $noPingResponse, failedToSend: $failedToSend, lostAnswers: $lostAnswers, notSeenConsecutively: $notSeenConsecutively, inUnreliablePingSpan: $inUnreliablePingSpan)'; - } } /// @nodoc -abstract mixin class _$StateReasonStatsCopyWith<$Res> - implements $StateReasonStatsCopyWith<$Res> { - factory _$StateReasonStatsCopyWith( - _StateReasonStats value, $Res Function(_StateReasonStats) _then) = - __$StateReasonStatsCopyWithImpl; - @override - @useResult - $Res call( - {TimestampDuration canNotSend, - TimestampDuration tooManyLostAnswers, - TimestampDuration noPingResponse, - TimestampDuration failedToSend, - TimestampDuration lostAnswers, - TimestampDuration notSeenConsecutively, - TimestampDuration inUnreliablePingSpan}); -} +abstract mixin class _$StateReasonStatsCopyWith<$Res> implements $StateReasonStatsCopyWith<$Res> { + factory _$StateReasonStatsCopyWith(_StateReasonStats value, $Res Function(_StateReasonStats) _then) = __$StateReasonStatsCopyWithImpl; +@override @useResult +$Res call({ + TimestampDuration canNotSend, TimestampDuration tooManyLostAnswers, TimestampDuration noPingResponse, TimestampDuration failedToSend, TimestampDuration lostAnswers, TimestampDuration notSeenConsecutively, TimestampDuration inUnreliablePingSpan +}); + + + +} /// @nodoc class __$StateReasonStatsCopyWithImpl<$Res> implements _$StateReasonStatsCopyWith<$Res> { @@ -1178,1212 +1395,1022 @@ class __$StateReasonStatsCopyWithImpl<$Res> final _StateReasonStats _self; final $Res Function(_StateReasonStats) _then; - /// Create a copy of StateReasonStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? canNotSend = null, - Object? tooManyLostAnswers = null, - Object? noPingResponse = null, - Object? failedToSend = null, - Object? lostAnswers = null, - Object? notSeenConsecutively = null, - Object? inUnreliablePingSpan = null, - }) { - return _then(_StateReasonStats( - canNotSend: null == canNotSend - ? _self.canNotSend - : canNotSend // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - tooManyLostAnswers: null == tooManyLostAnswers - ? _self.tooManyLostAnswers - : tooManyLostAnswers // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - noPingResponse: null == noPingResponse - ? _self.noPingResponse - : noPingResponse // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - failedToSend: null == failedToSend - ? _self.failedToSend - : failedToSend // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - lostAnswers: null == lostAnswers - ? _self.lostAnswers - : lostAnswers // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - notSeenConsecutively: null == notSeenConsecutively - ? _self.notSeenConsecutively - : notSeenConsecutively // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - inUnreliablePingSpan: null == inUnreliablePingSpan - ? _self.inUnreliablePingSpan - : inUnreliablePingSpan // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - )); - } +/// Create a copy of StateReasonStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? canNotSend = null,Object? tooManyLostAnswers = null,Object? noPingResponse = null,Object? failedToSend = null,Object? lostAnswers = null,Object? notSeenConsecutively = null,Object? inUnreliablePingSpan = null,}) { + return _then(_StateReasonStats( +canNotSend: null == canNotSend ? _self.canNotSend : canNotSend // ignore: cast_nullable_to_non_nullable +as TimestampDuration,tooManyLostAnswers: null == tooManyLostAnswers ? _self.tooManyLostAnswers : tooManyLostAnswers // ignore: cast_nullable_to_non_nullable +as TimestampDuration,noPingResponse: null == noPingResponse ? _self.noPingResponse : noPingResponse // ignore: cast_nullable_to_non_nullable +as TimestampDuration,failedToSend: null == failedToSend ? _self.failedToSend : failedToSend // ignore: cast_nullable_to_non_nullable +as TimestampDuration,lostAnswers: null == lostAnswers ? _self.lostAnswers : lostAnswers // ignore: cast_nullable_to_non_nullable +as TimestampDuration,notSeenConsecutively: null == notSeenConsecutively ? _self.notSeenConsecutively : notSeenConsecutively // ignore: cast_nullable_to_non_nullable +as TimestampDuration,inUnreliablePingSpan: null == inUnreliablePingSpan ? _self.inUnreliablePingSpan : inUnreliablePingSpan // ignore: cast_nullable_to_non_nullable +as TimestampDuration, + )); } + +} + + /// @nodoc mixin _$AnswerStats { - TimestampDuration get span; - int get questions; - int get answers; - int get lostAnswers; - int get consecutiveAnswersMaximum; - int get consecutiveAnswersAverage; - int get consecutiveAnswersMinimum; - int get consecutiveLostAnswersMaximum; - int get consecutiveLostAnswersAverage; - int get consecutiveLostAnswersMinimum; - /// Create a copy of AnswerStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $AnswerStatsCopyWith get copyWith => - _$AnswerStatsCopyWithImpl(this as AnswerStats, _$identity); + TimestampDuration get span; int get questions; int get answers; int get lostAnswers; int get consecutiveAnswersMaximum; int get consecutiveAnswersAverage; int get consecutiveAnswersMinimum; int get consecutiveLostAnswersMaximum; int get consecutiveLostAnswersAverage; int get consecutiveLostAnswersMinimum; +/// Create a copy of AnswerStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AnswerStatsCopyWith get copyWith => _$AnswerStatsCopyWithImpl(this as AnswerStats, _$identity); /// Serializes this AnswerStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is AnswerStats && - (identical(other.span, span) || other.span == span) && - (identical(other.questions, questions) || - other.questions == questions) && - (identical(other.answers, answers) || other.answers == answers) && - (identical(other.lostAnswers, lostAnswers) || - other.lostAnswers == lostAnswers) && - (identical(other.consecutiveAnswersMaximum, - consecutiveAnswersMaximum) || - other.consecutiveAnswersMaximum == consecutiveAnswersMaximum) && - (identical(other.consecutiveAnswersAverage, - consecutiveAnswersAverage) || - other.consecutiveAnswersAverage == consecutiveAnswersAverage) && - (identical(other.consecutiveAnswersMinimum, - consecutiveAnswersMinimum) || - other.consecutiveAnswersMinimum == consecutiveAnswersMinimum) && - (identical(other.consecutiveLostAnswersMaximum, - consecutiveLostAnswersMaximum) || - other.consecutiveLostAnswersMaximum == - consecutiveLostAnswersMaximum) && - (identical(other.consecutiveLostAnswersAverage, - consecutiveLostAnswersAverage) || - other.consecutiveLostAnswersAverage == - consecutiveLostAnswersAverage) && - (identical(other.consecutiveLostAnswersMinimum, - consecutiveLostAnswersMinimum) || - other.consecutiveLostAnswersMinimum == - consecutiveLostAnswersMinimum)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - span, - questions, - answers, - lostAnswers, - consecutiveAnswersMaximum, - consecutiveAnswersAverage, - consecutiveAnswersMinimum, - consecutiveLostAnswersMaximum, - consecutiveLostAnswersAverage, - consecutiveLostAnswersMinimum); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is AnswerStats&&(identical(other.span, span) || other.span == span)&&(identical(other.questions, questions) || other.questions == questions)&&(identical(other.answers, answers) || other.answers == answers)&&(identical(other.lostAnswers, lostAnswers) || other.lostAnswers == lostAnswers)&&(identical(other.consecutiveAnswersMaximum, consecutiveAnswersMaximum) || other.consecutiveAnswersMaximum == consecutiveAnswersMaximum)&&(identical(other.consecutiveAnswersAverage, consecutiveAnswersAverage) || other.consecutiveAnswersAverage == consecutiveAnswersAverage)&&(identical(other.consecutiveAnswersMinimum, consecutiveAnswersMinimum) || other.consecutiveAnswersMinimum == consecutiveAnswersMinimum)&&(identical(other.consecutiveLostAnswersMaximum, consecutiveLostAnswersMaximum) || other.consecutiveLostAnswersMaximum == consecutiveLostAnswersMaximum)&&(identical(other.consecutiveLostAnswersAverage, consecutiveLostAnswersAverage) || other.consecutiveLostAnswersAverage == consecutiveLostAnswersAverage)&&(identical(other.consecutiveLostAnswersMinimum, consecutiveLostAnswersMinimum) || other.consecutiveLostAnswersMinimum == consecutiveLostAnswersMinimum)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,span,questions,answers,lostAnswers,consecutiveAnswersMaximum,consecutiveAnswersAverage,consecutiveAnswersMinimum,consecutiveLostAnswersMaximum,consecutiveLostAnswersAverage,consecutiveLostAnswersMinimum); + +@override +String toString() { + return 'AnswerStats(span: $span, questions: $questions, answers: $answers, lostAnswers: $lostAnswers, consecutiveAnswersMaximum: $consecutiveAnswersMaximum, consecutiveAnswersAverage: $consecutiveAnswersAverage, consecutiveAnswersMinimum: $consecutiveAnswersMinimum, consecutiveLostAnswersMaximum: $consecutiveLostAnswersMaximum, consecutiveLostAnswersAverage: $consecutiveLostAnswersAverage, consecutiveLostAnswersMinimum: $consecutiveLostAnswersMinimum)'; +} + - @override - String toString() { - return 'AnswerStats(span: $span, questions: $questions, answers: $answers, lostAnswers: $lostAnswers, consecutiveAnswersMaximum: $consecutiveAnswersMaximum, consecutiveAnswersAverage: $consecutiveAnswersAverage, consecutiveAnswersMinimum: $consecutiveAnswersMinimum, consecutiveLostAnswersMaximum: $consecutiveLostAnswersMaximum, consecutiveLostAnswersAverage: $consecutiveLostAnswersAverage, consecutiveLostAnswersMinimum: $consecutiveLostAnswersMinimum)'; - } } /// @nodoc -abstract mixin class $AnswerStatsCopyWith<$Res> { - factory $AnswerStatsCopyWith( - AnswerStats value, $Res Function(AnswerStats) _then) = - _$AnswerStatsCopyWithImpl; - @useResult - $Res call( - {TimestampDuration span, - int questions, - int answers, - int lostAnswers, - int consecutiveAnswersMaximum, - int consecutiveAnswersAverage, - int consecutiveAnswersMinimum, - int consecutiveLostAnswersMaximum, - int consecutiveLostAnswersAverage, - int consecutiveLostAnswersMinimum}); -} +abstract mixin class $AnswerStatsCopyWith<$Res> { + factory $AnswerStatsCopyWith(AnswerStats value, $Res Function(AnswerStats) _then) = _$AnswerStatsCopyWithImpl; +@useResult +$Res call({ + TimestampDuration span, int questions, int answers, int lostAnswers, int consecutiveAnswersMaximum, int consecutiveAnswersAverage, int consecutiveAnswersMinimum, int consecutiveLostAnswersMaximum, int consecutiveLostAnswersAverage, int consecutiveLostAnswersMinimum +}); + + + +} /// @nodoc -class _$AnswerStatsCopyWithImpl<$Res> implements $AnswerStatsCopyWith<$Res> { +class _$AnswerStatsCopyWithImpl<$Res> + implements $AnswerStatsCopyWith<$Res> { _$AnswerStatsCopyWithImpl(this._self, this._then); final AnswerStats _self; final $Res Function(AnswerStats) _then; - /// Create a copy of AnswerStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? span = null, - Object? questions = null, - Object? answers = null, - Object? lostAnswers = null, - Object? consecutiveAnswersMaximum = null, - Object? consecutiveAnswersAverage = null, - Object? consecutiveAnswersMinimum = null, - Object? consecutiveLostAnswersMaximum = null, - Object? consecutiveLostAnswersAverage = null, - Object? consecutiveLostAnswersMinimum = null, - }) { - return _then(_self.copyWith( - span: null == span - ? _self.span - : span // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - questions: null == questions - ? _self.questions - : questions // ignore: cast_nullable_to_non_nullable - as int, - answers: null == answers - ? _self.answers - : answers // ignore: cast_nullable_to_non_nullable - as int, - lostAnswers: null == lostAnswers - ? _self.lostAnswers - : lostAnswers // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersMaximum: null == consecutiveAnswersMaximum - ? _self.consecutiveAnswersMaximum - : consecutiveAnswersMaximum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersAverage: null == consecutiveAnswersAverage - ? _self.consecutiveAnswersAverage - : consecutiveAnswersAverage // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersMinimum: null == consecutiveAnswersMinimum - ? _self.consecutiveAnswersMinimum - : consecutiveAnswersMinimum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersMaximum: null == consecutiveLostAnswersMaximum - ? _self.consecutiveLostAnswersMaximum - : consecutiveLostAnswersMaximum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersAverage: null == consecutiveLostAnswersAverage - ? _self.consecutiveLostAnswersAverage - : consecutiveLostAnswersAverage // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersMinimum: null == consecutiveLostAnswersMinimum - ? _self.consecutiveLostAnswersMinimum - : consecutiveLostAnswersMinimum // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of AnswerStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? span = null,Object? questions = null,Object? answers = null,Object? lostAnswers = null,Object? consecutiveAnswersMaximum = null,Object? consecutiveAnswersAverage = null,Object? consecutiveAnswersMinimum = null,Object? consecutiveLostAnswersMaximum = null,Object? consecutiveLostAnswersAverage = null,Object? consecutiveLostAnswersMinimum = null,}) { + return _then(_self.copyWith( +span: null == span ? _self.span : span // ignore: cast_nullable_to_non_nullable +as TimestampDuration,questions: null == questions ? _self.questions : questions // ignore: cast_nullable_to_non_nullable +as int,answers: null == answers ? _self.answers : answers // ignore: cast_nullable_to_non_nullable +as int,lostAnswers: null == lostAnswers ? _self.lostAnswers : lostAnswers // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersMaximum: null == consecutiveAnswersMaximum ? _self.consecutiveAnswersMaximum : consecutiveAnswersMaximum // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersAverage: null == consecutiveAnswersAverage ? _self.consecutiveAnswersAverage : consecutiveAnswersAverage // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersMinimum: null == consecutiveAnswersMinimum ? _self.consecutiveAnswersMinimum : consecutiveAnswersMinimum // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersMaximum: null == consecutiveLostAnswersMaximum ? _self.consecutiveLostAnswersMaximum : consecutiveLostAnswersMaximum // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersAverage: null == consecutiveLostAnswersAverage ? _self.consecutiveLostAnswersAverage : consecutiveLostAnswersAverage // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersMinimum: null == consecutiveLostAnswersMinimum ? _self.consecutiveLostAnswersMinimum : consecutiveLostAnswersMinimum // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [AnswerStats]. +extension AnswerStatsPatterns on AnswerStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _AnswerStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _AnswerStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _AnswerStats value) $default,){ +final _that = this; +switch (_that) { +case _AnswerStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _AnswerStats value)? $default,){ +final _that = this; +switch (_that) { +case _AnswerStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( TimestampDuration span, int questions, int answers, int lostAnswers, int consecutiveAnswersMaximum, int consecutiveAnswersAverage, int consecutiveAnswersMinimum, int consecutiveLostAnswersMaximum, int consecutiveLostAnswersAverage, int consecutiveLostAnswersMinimum)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _AnswerStats() when $default != null: +return $default(_that.span,_that.questions,_that.answers,_that.lostAnswers,_that.consecutiveAnswersMaximum,_that.consecutiveAnswersAverage,_that.consecutiveAnswersMinimum,_that.consecutiveLostAnswersMaximum,_that.consecutiveLostAnswersAverage,_that.consecutiveLostAnswersMinimum);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( TimestampDuration span, int questions, int answers, int lostAnswers, int consecutiveAnswersMaximum, int consecutiveAnswersAverage, int consecutiveAnswersMinimum, int consecutiveLostAnswersMaximum, int consecutiveLostAnswersAverage, int consecutiveLostAnswersMinimum) $default,) {final _that = this; +switch (_that) { +case _AnswerStats(): +return $default(_that.span,_that.questions,_that.answers,_that.lostAnswers,_that.consecutiveAnswersMaximum,_that.consecutiveAnswersAverage,_that.consecutiveAnswersMinimum,_that.consecutiveLostAnswersMaximum,_that.consecutiveLostAnswersAverage,_that.consecutiveLostAnswersMinimum);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( TimestampDuration span, int questions, int answers, int lostAnswers, int consecutiveAnswersMaximum, int consecutiveAnswersAverage, int consecutiveAnswersMinimum, int consecutiveLostAnswersMaximum, int consecutiveLostAnswersAverage, int consecutiveLostAnswersMinimum)? $default,) {final _that = this; +switch (_that) { +case _AnswerStats() when $default != null: +return $default(_that.span,_that.questions,_that.answers,_that.lostAnswers,_that.consecutiveAnswersMaximum,_that.consecutiveAnswersAverage,_that.consecutiveAnswersMinimum,_that.consecutiveLostAnswersMaximum,_that.consecutiveLostAnswersAverage,_that.consecutiveLostAnswersMinimum);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _AnswerStats implements AnswerStats { - const _AnswerStats( - {required this.span, - required this.questions, - required this.answers, - required this.lostAnswers, - required this.consecutiveAnswersMaximum, - required this.consecutiveAnswersAverage, - required this.consecutiveAnswersMinimum, - required this.consecutiveLostAnswersMaximum, - required this.consecutiveLostAnswersAverage, - required this.consecutiveLostAnswersMinimum}); - factory _AnswerStats.fromJson(Map json) => - _$AnswerStatsFromJson(json); + const _AnswerStats({required this.span, required this.questions, required this.answers, required this.lostAnswers, required this.consecutiveAnswersMaximum, required this.consecutiveAnswersAverage, required this.consecutiveAnswersMinimum, required this.consecutiveLostAnswersMaximum, required this.consecutiveLostAnswersAverage, required this.consecutiveLostAnswersMinimum}); + factory _AnswerStats.fromJson(Map json) => _$AnswerStatsFromJson(json); - @override - final TimestampDuration span; - @override - final int questions; - @override - final int answers; - @override - final int lostAnswers; - @override - final int consecutiveAnswersMaximum; - @override - final int consecutiveAnswersAverage; - @override - final int consecutiveAnswersMinimum; - @override - final int consecutiveLostAnswersMaximum; - @override - final int consecutiveLostAnswersAverage; - @override - final int consecutiveLostAnswersMinimum; +@override final TimestampDuration span; +@override final int questions; +@override final int answers; +@override final int lostAnswers; +@override final int consecutiveAnswersMaximum; +@override final int consecutiveAnswersAverage; +@override final int consecutiveAnswersMinimum; +@override final int consecutiveLostAnswersMaximum; +@override final int consecutiveLostAnswersAverage; +@override final int consecutiveLostAnswersMinimum; - /// Create a copy of AnswerStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$AnswerStatsCopyWith<_AnswerStats> get copyWith => - __$AnswerStatsCopyWithImpl<_AnswerStats>(this, _$identity); +/// Create a copy of AnswerStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AnswerStatsCopyWith<_AnswerStats> get copyWith => __$AnswerStatsCopyWithImpl<_AnswerStats>(this, _$identity); - @override - Map toJson() { - return _$AnswerStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$AnswerStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _AnswerStats && - (identical(other.span, span) || other.span == span) && - (identical(other.questions, questions) || - other.questions == questions) && - (identical(other.answers, answers) || other.answers == answers) && - (identical(other.lostAnswers, lostAnswers) || - other.lostAnswers == lostAnswers) && - (identical(other.consecutiveAnswersMaximum, - consecutiveAnswersMaximum) || - other.consecutiveAnswersMaximum == consecutiveAnswersMaximum) && - (identical(other.consecutiveAnswersAverage, - consecutiveAnswersAverage) || - other.consecutiveAnswersAverage == consecutiveAnswersAverage) && - (identical(other.consecutiveAnswersMinimum, - consecutiveAnswersMinimum) || - other.consecutiveAnswersMinimum == consecutiveAnswersMinimum) && - (identical(other.consecutiveLostAnswersMaximum, - consecutiveLostAnswersMaximum) || - other.consecutiveLostAnswersMaximum == - consecutiveLostAnswersMaximum) && - (identical(other.consecutiveLostAnswersAverage, - consecutiveLostAnswersAverage) || - other.consecutiveLostAnswersAverage == - consecutiveLostAnswersAverage) && - (identical(other.consecutiveLostAnswersMinimum, - consecutiveLostAnswersMinimum) || - other.consecutiveLostAnswersMinimum == - consecutiveLostAnswersMinimum)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _AnswerStats&&(identical(other.span, span) || other.span == span)&&(identical(other.questions, questions) || other.questions == questions)&&(identical(other.answers, answers) || other.answers == answers)&&(identical(other.lostAnswers, lostAnswers) || other.lostAnswers == lostAnswers)&&(identical(other.consecutiveAnswersMaximum, consecutiveAnswersMaximum) || other.consecutiveAnswersMaximum == consecutiveAnswersMaximum)&&(identical(other.consecutiveAnswersAverage, consecutiveAnswersAverage) || other.consecutiveAnswersAverage == consecutiveAnswersAverage)&&(identical(other.consecutiveAnswersMinimum, consecutiveAnswersMinimum) || other.consecutiveAnswersMinimum == consecutiveAnswersMinimum)&&(identical(other.consecutiveLostAnswersMaximum, consecutiveLostAnswersMaximum) || other.consecutiveLostAnswersMaximum == consecutiveLostAnswersMaximum)&&(identical(other.consecutiveLostAnswersAverage, consecutiveLostAnswersAverage) || other.consecutiveLostAnswersAverage == consecutiveLostAnswersAverage)&&(identical(other.consecutiveLostAnswersMinimum, consecutiveLostAnswersMinimum) || other.consecutiveLostAnswersMinimum == consecutiveLostAnswersMinimum)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,span,questions,answers,lostAnswers,consecutiveAnswersMaximum,consecutiveAnswersAverage,consecutiveAnswersMinimum,consecutiveLostAnswersMaximum,consecutiveLostAnswersAverage,consecutiveLostAnswersMinimum); + +@override +String toString() { + return 'AnswerStats(span: $span, questions: $questions, answers: $answers, lostAnswers: $lostAnswers, consecutiveAnswersMaximum: $consecutiveAnswersMaximum, consecutiveAnswersAverage: $consecutiveAnswersAverage, consecutiveAnswersMinimum: $consecutiveAnswersMinimum, consecutiveLostAnswersMaximum: $consecutiveLostAnswersMaximum, consecutiveLostAnswersAverage: $consecutiveLostAnswersAverage, consecutiveLostAnswersMinimum: $consecutiveLostAnswersMinimum)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - span, - questions, - answers, - lostAnswers, - consecutiveAnswersMaximum, - consecutiveAnswersAverage, - consecutiveAnswersMinimum, - consecutiveLostAnswersMaximum, - consecutiveLostAnswersAverage, - consecutiveLostAnswersMinimum); - @override - String toString() { - return 'AnswerStats(span: $span, questions: $questions, answers: $answers, lostAnswers: $lostAnswers, consecutiveAnswersMaximum: $consecutiveAnswersMaximum, consecutiveAnswersAverage: $consecutiveAnswersAverage, consecutiveAnswersMinimum: $consecutiveAnswersMinimum, consecutiveLostAnswersMaximum: $consecutiveLostAnswersMaximum, consecutiveLostAnswersAverage: $consecutiveLostAnswersAverage, consecutiveLostAnswersMinimum: $consecutiveLostAnswersMinimum)'; - } } /// @nodoc -abstract mixin class _$AnswerStatsCopyWith<$Res> - implements $AnswerStatsCopyWith<$Res> { - factory _$AnswerStatsCopyWith( - _AnswerStats value, $Res Function(_AnswerStats) _then) = - __$AnswerStatsCopyWithImpl; - @override - @useResult - $Res call( - {TimestampDuration span, - int questions, - int answers, - int lostAnswers, - int consecutiveAnswersMaximum, - int consecutiveAnswersAverage, - int consecutiveAnswersMinimum, - int consecutiveLostAnswersMaximum, - int consecutiveLostAnswersAverage, - int consecutiveLostAnswersMinimum}); -} +abstract mixin class _$AnswerStatsCopyWith<$Res> implements $AnswerStatsCopyWith<$Res> { + factory _$AnswerStatsCopyWith(_AnswerStats value, $Res Function(_AnswerStats) _then) = __$AnswerStatsCopyWithImpl; +@override @useResult +$Res call({ + TimestampDuration span, int questions, int answers, int lostAnswers, int consecutiveAnswersMaximum, int consecutiveAnswersAverage, int consecutiveAnswersMinimum, int consecutiveLostAnswersMaximum, int consecutiveLostAnswersAverage, int consecutiveLostAnswersMinimum +}); + + + +} /// @nodoc -class __$AnswerStatsCopyWithImpl<$Res> implements _$AnswerStatsCopyWith<$Res> { +class __$AnswerStatsCopyWithImpl<$Res> + implements _$AnswerStatsCopyWith<$Res> { __$AnswerStatsCopyWithImpl(this._self, this._then); final _AnswerStats _self; final $Res Function(_AnswerStats) _then; - /// Create a copy of AnswerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? span = null, - Object? questions = null, - Object? answers = null, - Object? lostAnswers = null, - Object? consecutiveAnswersMaximum = null, - Object? consecutiveAnswersAverage = null, - Object? consecutiveAnswersMinimum = null, - Object? consecutiveLostAnswersMaximum = null, - Object? consecutiveLostAnswersAverage = null, - Object? consecutiveLostAnswersMinimum = null, - }) { - return _then(_AnswerStats( - span: null == span - ? _self.span - : span // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - questions: null == questions - ? _self.questions - : questions // ignore: cast_nullable_to_non_nullable - as int, - answers: null == answers - ? _self.answers - : answers // ignore: cast_nullable_to_non_nullable - as int, - lostAnswers: null == lostAnswers - ? _self.lostAnswers - : lostAnswers // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersMaximum: null == consecutiveAnswersMaximum - ? _self.consecutiveAnswersMaximum - : consecutiveAnswersMaximum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersAverage: null == consecutiveAnswersAverage - ? _self.consecutiveAnswersAverage - : consecutiveAnswersAverage // ignore: cast_nullable_to_non_nullable - as int, - consecutiveAnswersMinimum: null == consecutiveAnswersMinimum - ? _self.consecutiveAnswersMinimum - : consecutiveAnswersMinimum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersMaximum: null == consecutiveLostAnswersMaximum - ? _self.consecutiveLostAnswersMaximum - : consecutiveLostAnswersMaximum // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersAverage: null == consecutiveLostAnswersAverage - ? _self.consecutiveLostAnswersAverage - : consecutiveLostAnswersAverage // ignore: cast_nullable_to_non_nullable - as int, - consecutiveLostAnswersMinimum: null == consecutiveLostAnswersMinimum - ? _self.consecutiveLostAnswersMinimum - : consecutiveLostAnswersMinimum // ignore: cast_nullable_to_non_nullable - as int, - )); - } +/// Create a copy of AnswerStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? span = null,Object? questions = null,Object? answers = null,Object? lostAnswers = null,Object? consecutiveAnswersMaximum = null,Object? consecutiveAnswersAverage = null,Object? consecutiveAnswersMinimum = null,Object? consecutiveLostAnswersMaximum = null,Object? consecutiveLostAnswersAverage = null,Object? consecutiveLostAnswersMinimum = null,}) { + return _then(_AnswerStats( +span: null == span ? _self.span : span // ignore: cast_nullable_to_non_nullable +as TimestampDuration,questions: null == questions ? _self.questions : questions // ignore: cast_nullable_to_non_nullable +as int,answers: null == answers ? _self.answers : answers // ignore: cast_nullable_to_non_nullable +as int,lostAnswers: null == lostAnswers ? _self.lostAnswers : lostAnswers // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersMaximum: null == consecutiveAnswersMaximum ? _self.consecutiveAnswersMaximum : consecutiveAnswersMaximum // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersAverage: null == consecutiveAnswersAverage ? _self.consecutiveAnswersAverage : consecutiveAnswersAverage // ignore: cast_nullable_to_non_nullable +as int,consecutiveAnswersMinimum: null == consecutiveAnswersMinimum ? _self.consecutiveAnswersMinimum : consecutiveAnswersMinimum // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersMaximum: null == consecutiveLostAnswersMaximum ? _self.consecutiveLostAnswersMaximum : consecutiveLostAnswersMaximum // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersAverage: null == consecutiveLostAnswersAverage ? _self.consecutiveLostAnswersAverage : consecutiveLostAnswersAverage // ignore: cast_nullable_to_non_nullable +as int,consecutiveLostAnswersMinimum: null == consecutiveLostAnswersMinimum ? _self.consecutiveLostAnswersMinimum : consecutiveLostAnswersMinimum // ignore: cast_nullable_to_non_nullable +as int, + )); } + +} + + /// @nodoc mixin _$RPCStats { - int get messagesSent; - int get messagesRcvd; - int get questionsInFlight; - Timestamp? get lastQuestionTs; - Timestamp? get lastSeenTs; - Timestamp? get firstConsecutiveSeenTs; - int get recentLostAnswersUnordered; - int get recentLostAnswersOrdered; - int get failedToSend; - AnswerStats get answerUnordered; - AnswerStats get answerOrdered; - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $RPCStatsCopyWith get copyWith => - _$RPCStatsCopyWithImpl(this as RPCStats, _$identity); + int get messagesSent; int get messagesRcvd; int get questionsInFlight; Timestamp? get lastQuestionTs; Timestamp? get lastSeenTs; Timestamp? get firstConsecutiveSeenTs; int get recentLostAnswersUnordered; int get recentLostAnswersOrdered; int get failedToSend; AnswerStats get answerUnordered; AnswerStats get answerOrdered; +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$RPCStatsCopyWith get copyWith => _$RPCStatsCopyWithImpl(this as RPCStats, _$identity); /// Serializes this RPCStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is RPCStats && - (identical(other.messagesSent, messagesSent) || - other.messagesSent == messagesSent) && - (identical(other.messagesRcvd, messagesRcvd) || - other.messagesRcvd == messagesRcvd) && - (identical(other.questionsInFlight, questionsInFlight) || - other.questionsInFlight == questionsInFlight) && - (identical(other.lastQuestionTs, lastQuestionTs) || - other.lastQuestionTs == lastQuestionTs) && - (identical(other.lastSeenTs, lastSeenTs) || - other.lastSeenTs == lastSeenTs) && - (identical(other.firstConsecutiveSeenTs, firstConsecutiveSeenTs) || - other.firstConsecutiveSeenTs == firstConsecutiveSeenTs) && - (identical(other.recentLostAnswersUnordered, - recentLostAnswersUnordered) || - other.recentLostAnswersUnordered == - recentLostAnswersUnordered) && - (identical( - other.recentLostAnswersOrdered, recentLostAnswersOrdered) || - other.recentLostAnswersOrdered == recentLostAnswersOrdered) && - (identical(other.failedToSend, failedToSend) || - other.failedToSend == failedToSend) && - (identical(other.answerUnordered, answerUnordered) || - other.answerUnordered == answerUnordered) && - (identical(other.answerOrdered, answerOrdered) || - other.answerOrdered == answerOrdered)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - messagesSent, - messagesRcvd, - questionsInFlight, - lastQuestionTs, - lastSeenTs, - firstConsecutiveSeenTs, - recentLostAnswersUnordered, - recentLostAnswersOrdered, - failedToSend, - answerUnordered, - answerOrdered); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is RPCStats&&(identical(other.messagesSent, messagesSent) || other.messagesSent == messagesSent)&&(identical(other.messagesRcvd, messagesRcvd) || other.messagesRcvd == messagesRcvd)&&(identical(other.questionsInFlight, questionsInFlight) || other.questionsInFlight == questionsInFlight)&&(identical(other.lastQuestionTs, lastQuestionTs) || other.lastQuestionTs == lastQuestionTs)&&(identical(other.lastSeenTs, lastSeenTs) || other.lastSeenTs == lastSeenTs)&&(identical(other.firstConsecutiveSeenTs, firstConsecutiveSeenTs) || other.firstConsecutiveSeenTs == firstConsecutiveSeenTs)&&(identical(other.recentLostAnswersUnordered, recentLostAnswersUnordered) || other.recentLostAnswersUnordered == recentLostAnswersUnordered)&&(identical(other.recentLostAnswersOrdered, recentLostAnswersOrdered) || other.recentLostAnswersOrdered == recentLostAnswersOrdered)&&(identical(other.failedToSend, failedToSend) || other.failedToSend == failedToSend)&&(identical(other.answerUnordered, answerUnordered) || other.answerUnordered == answerUnordered)&&(identical(other.answerOrdered, answerOrdered) || other.answerOrdered == answerOrdered)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messagesSent,messagesRcvd,questionsInFlight,lastQuestionTs,lastSeenTs,firstConsecutiveSeenTs,recentLostAnswersUnordered,recentLostAnswersOrdered,failedToSend,answerUnordered,answerOrdered); + +@override +String toString() { + return 'RPCStats(messagesSent: $messagesSent, messagesRcvd: $messagesRcvd, questionsInFlight: $questionsInFlight, lastQuestionTs: $lastQuestionTs, lastSeenTs: $lastSeenTs, firstConsecutiveSeenTs: $firstConsecutiveSeenTs, recentLostAnswersUnordered: $recentLostAnswersUnordered, recentLostAnswersOrdered: $recentLostAnswersOrdered, failedToSend: $failedToSend, answerUnordered: $answerUnordered, answerOrdered: $answerOrdered)'; +} + - @override - String toString() { - return 'RPCStats(messagesSent: $messagesSent, messagesRcvd: $messagesRcvd, questionsInFlight: $questionsInFlight, lastQuestionTs: $lastQuestionTs, lastSeenTs: $lastSeenTs, firstConsecutiveSeenTs: $firstConsecutiveSeenTs, recentLostAnswersUnordered: $recentLostAnswersUnordered, recentLostAnswersOrdered: $recentLostAnswersOrdered, failedToSend: $failedToSend, answerUnordered: $answerUnordered, answerOrdered: $answerOrdered)'; - } } /// @nodoc -abstract mixin class $RPCStatsCopyWith<$Res> { - factory $RPCStatsCopyWith(RPCStats value, $Res Function(RPCStats) _then) = - _$RPCStatsCopyWithImpl; - @useResult - $Res call( - {int messagesSent, - int messagesRcvd, - int questionsInFlight, - Timestamp? lastQuestionTs, - Timestamp? lastSeenTs, - Timestamp? firstConsecutiveSeenTs, - int recentLostAnswersUnordered, - int recentLostAnswersOrdered, - int failedToSend, - AnswerStats answerUnordered, - AnswerStats answerOrdered}); +abstract mixin class $RPCStatsCopyWith<$Res> { + factory $RPCStatsCopyWith(RPCStats value, $Res Function(RPCStats) _then) = _$RPCStatsCopyWithImpl; +@useResult +$Res call({ + int messagesSent, int messagesRcvd, int questionsInFlight, Timestamp? lastQuestionTs, Timestamp? lastSeenTs, Timestamp? firstConsecutiveSeenTs, int recentLostAnswersUnordered, int recentLostAnswersOrdered, int failedToSend, AnswerStats answerUnordered, AnswerStats answerOrdered +}); + + +$AnswerStatsCopyWith<$Res> get answerUnordered;$AnswerStatsCopyWith<$Res> get answerOrdered; - $AnswerStatsCopyWith<$Res> get answerUnordered; - $AnswerStatsCopyWith<$Res> get answerOrdered; } - /// @nodoc -class _$RPCStatsCopyWithImpl<$Res> implements $RPCStatsCopyWith<$Res> { +class _$RPCStatsCopyWithImpl<$Res> + implements $RPCStatsCopyWith<$Res> { _$RPCStatsCopyWithImpl(this._self, this._then); final RPCStats _self; final $Res Function(RPCStats) _then; - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? messagesSent = null, - Object? messagesRcvd = null, - Object? questionsInFlight = null, - Object? lastQuestionTs = freezed, - Object? lastSeenTs = freezed, - Object? firstConsecutiveSeenTs = freezed, - Object? recentLostAnswersUnordered = null, - Object? recentLostAnswersOrdered = null, - Object? failedToSend = null, - Object? answerUnordered = null, - Object? answerOrdered = null, - }) { - return _then(_self.copyWith( - messagesSent: null == messagesSent - ? _self.messagesSent - : messagesSent // ignore: cast_nullable_to_non_nullable - as int, - messagesRcvd: null == messagesRcvd - ? _self.messagesRcvd - : messagesRcvd // ignore: cast_nullable_to_non_nullable - as int, - questionsInFlight: null == questionsInFlight - ? _self.questionsInFlight - : questionsInFlight // ignore: cast_nullable_to_non_nullable - as int, - lastQuestionTs: freezed == lastQuestionTs - ? _self.lastQuestionTs - : lastQuestionTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - lastSeenTs: freezed == lastSeenTs - ? _self.lastSeenTs - : lastSeenTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs - ? _self.firstConsecutiveSeenTs - : firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - recentLostAnswersUnordered: null == recentLostAnswersUnordered - ? _self.recentLostAnswersUnordered - : recentLostAnswersUnordered // ignore: cast_nullable_to_non_nullable - as int, - recentLostAnswersOrdered: null == recentLostAnswersOrdered - ? _self.recentLostAnswersOrdered - : recentLostAnswersOrdered // ignore: cast_nullable_to_non_nullable - as int, - failedToSend: null == failedToSend - ? _self.failedToSend - : failedToSend // ignore: cast_nullable_to_non_nullable - as int, - answerUnordered: null == answerUnordered - ? _self.answerUnordered - : answerUnordered // ignore: cast_nullable_to_non_nullable - as AnswerStats, - answerOrdered: null == answerOrdered - ? _self.answerOrdered - : answerOrdered // ignore: cast_nullable_to_non_nullable - as AnswerStats, - )); - } +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? messagesSent = null,Object? messagesRcvd = null,Object? questionsInFlight = null,Object? lastQuestionTs = freezed,Object? lastSeenTs = freezed,Object? firstConsecutiveSeenTs = freezed,Object? recentLostAnswersUnordered = null,Object? recentLostAnswersOrdered = null,Object? failedToSend = null,Object? answerUnordered = null,Object? answerOrdered = null,}) { + return _then(_self.copyWith( +messagesSent: null == messagesSent ? _self.messagesSent : messagesSent // ignore: cast_nullable_to_non_nullable +as int,messagesRcvd: null == messagesRcvd ? _self.messagesRcvd : messagesRcvd // ignore: cast_nullable_to_non_nullable +as int,questionsInFlight: null == questionsInFlight ? _self.questionsInFlight : questionsInFlight // ignore: cast_nullable_to_non_nullable +as int,lastQuestionTs: freezed == lastQuestionTs ? _self.lastQuestionTs : lastQuestionTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,lastSeenTs: freezed == lastSeenTs ? _self.lastSeenTs : lastSeenTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs ? _self.firstConsecutiveSeenTs : firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,recentLostAnswersUnordered: null == recentLostAnswersUnordered ? _self.recentLostAnswersUnordered : recentLostAnswersUnordered // ignore: cast_nullable_to_non_nullable +as int,recentLostAnswersOrdered: null == recentLostAnswersOrdered ? _self.recentLostAnswersOrdered : recentLostAnswersOrdered // ignore: cast_nullable_to_non_nullable +as int,failedToSend: null == failedToSend ? _self.failedToSend : failedToSend // ignore: cast_nullable_to_non_nullable +as int,answerUnordered: null == answerUnordered ? _self.answerUnordered : answerUnordered // ignore: cast_nullable_to_non_nullable +as AnswerStats,answerOrdered: null == answerOrdered ? _self.answerOrdered : answerOrdered // ignore: cast_nullable_to_non_nullable +as AnswerStats, + )); +} +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AnswerStatsCopyWith<$Res> get answerUnordered { + + return $AnswerStatsCopyWith<$Res>(_self.answerUnordered, (value) { + return _then(_self.copyWith(answerUnordered: value)); + }); +}/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AnswerStatsCopyWith<$Res> get answerOrdered { + + return $AnswerStatsCopyWith<$Res>(_self.answerOrdered, (value) { + return _then(_self.copyWith(answerOrdered: value)); + }); +} +} - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AnswerStatsCopyWith<$Res> get answerUnordered { - return $AnswerStatsCopyWith<$Res>(_self.answerUnordered, (value) { - return _then(_self.copyWith(answerUnordered: value)); - }); - } - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AnswerStatsCopyWith<$Res> get answerOrdered { - return $AnswerStatsCopyWith<$Res>(_self.answerOrdered, (value) { - return _then(_self.copyWith(answerOrdered: value)); - }); - } +/// Adds pattern-matching-related methods to [RPCStats]. +extension RPCStatsPatterns on RPCStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _RPCStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _RPCStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _RPCStats value) $default,){ +final _that = this; +switch (_that) { +case _RPCStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _RPCStats value)? $default,){ +final _that = this; +switch (_that) { +case _RPCStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int messagesSent, int messagesRcvd, int questionsInFlight, Timestamp? lastQuestionTs, Timestamp? lastSeenTs, Timestamp? firstConsecutiveSeenTs, int recentLostAnswersUnordered, int recentLostAnswersOrdered, int failedToSend, AnswerStats answerUnordered, AnswerStats answerOrdered)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _RPCStats() when $default != null: +return $default(_that.messagesSent,_that.messagesRcvd,_that.questionsInFlight,_that.lastQuestionTs,_that.lastSeenTs,_that.firstConsecutiveSeenTs,_that.recentLostAnswersUnordered,_that.recentLostAnswersOrdered,_that.failedToSend,_that.answerUnordered,_that.answerOrdered);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int messagesSent, int messagesRcvd, int questionsInFlight, Timestamp? lastQuestionTs, Timestamp? lastSeenTs, Timestamp? firstConsecutiveSeenTs, int recentLostAnswersUnordered, int recentLostAnswersOrdered, int failedToSend, AnswerStats answerUnordered, AnswerStats answerOrdered) $default,) {final _that = this; +switch (_that) { +case _RPCStats(): +return $default(_that.messagesSent,_that.messagesRcvd,_that.questionsInFlight,_that.lastQuestionTs,_that.lastSeenTs,_that.firstConsecutiveSeenTs,_that.recentLostAnswersUnordered,_that.recentLostAnswersOrdered,_that.failedToSend,_that.answerUnordered,_that.answerOrdered);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int messagesSent, int messagesRcvd, int questionsInFlight, Timestamp? lastQuestionTs, Timestamp? lastSeenTs, Timestamp? firstConsecutiveSeenTs, int recentLostAnswersUnordered, int recentLostAnswersOrdered, int failedToSend, AnswerStats answerUnordered, AnswerStats answerOrdered)? $default,) {final _that = this; +switch (_that) { +case _RPCStats() when $default != null: +return $default(_that.messagesSent,_that.messagesRcvd,_that.questionsInFlight,_that.lastQuestionTs,_that.lastSeenTs,_that.firstConsecutiveSeenTs,_that.recentLostAnswersUnordered,_that.recentLostAnswersOrdered,_that.failedToSend,_that.answerUnordered,_that.answerOrdered);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _RPCStats implements RPCStats { - const _RPCStats( - {required this.messagesSent, - required this.messagesRcvd, - required this.questionsInFlight, - required this.lastQuestionTs, - required this.lastSeenTs, - required this.firstConsecutiveSeenTs, - required this.recentLostAnswersUnordered, - required this.recentLostAnswersOrdered, - required this.failedToSend, - required this.answerUnordered, - required this.answerOrdered}); - factory _RPCStats.fromJson(Map json) => - _$RPCStatsFromJson(json); + const _RPCStats({required this.messagesSent, required this.messagesRcvd, required this.questionsInFlight, required this.lastQuestionTs, required this.lastSeenTs, required this.firstConsecutiveSeenTs, required this.recentLostAnswersUnordered, required this.recentLostAnswersOrdered, required this.failedToSend, required this.answerUnordered, required this.answerOrdered}); + factory _RPCStats.fromJson(Map json) => _$RPCStatsFromJson(json); - @override - final int messagesSent; - @override - final int messagesRcvd; - @override - final int questionsInFlight; - @override - final Timestamp? lastQuestionTs; - @override - final Timestamp? lastSeenTs; - @override - final Timestamp? firstConsecutiveSeenTs; - @override - final int recentLostAnswersUnordered; - @override - final int recentLostAnswersOrdered; - @override - final int failedToSend; - @override - final AnswerStats answerUnordered; - @override - final AnswerStats answerOrdered; +@override final int messagesSent; +@override final int messagesRcvd; +@override final int questionsInFlight; +@override final Timestamp? lastQuestionTs; +@override final Timestamp? lastSeenTs; +@override final Timestamp? firstConsecutiveSeenTs; +@override final int recentLostAnswersUnordered; +@override final int recentLostAnswersOrdered; +@override final int failedToSend; +@override final AnswerStats answerUnordered; +@override final AnswerStats answerOrdered; - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$RPCStatsCopyWith<_RPCStats> get copyWith => - __$RPCStatsCopyWithImpl<_RPCStats>(this, _$identity); +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$RPCStatsCopyWith<_RPCStats> get copyWith => __$RPCStatsCopyWithImpl<_RPCStats>(this, _$identity); - @override - Map toJson() { - return _$RPCStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$RPCStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _RPCStats && - (identical(other.messagesSent, messagesSent) || - other.messagesSent == messagesSent) && - (identical(other.messagesRcvd, messagesRcvd) || - other.messagesRcvd == messagesRcvd) && - (identical(other.questionsInFlight, questionsInFlight) || - other.questionsInFlight == questionsInFlight) && - (identical(other.lastQuestionTs, lastQuestionTs) || - other.lastQuestionTs == lastQuestionTs) && - (identical(other.lastSeenTs, lastSeenTs) || - other.lastSeenTs == lastSeenTs) && - (identical(other.firstConsecutiveSeenTs, firstConsecutiveSeenTs) || - other.firstConsecutiveSeenTs == firstConsecutiveSeenTs) && - (identical(other.recentLostAnswersUnordered, - recentLostAnswersUnordered) || - other.recentLostAnswersUnordered == - recentLostAnswersUnordered) && - (identical( - other.recentLostAnswersOrdered, recentLostAnswersOrdered) || - other.recentLostAnswersOrdered == recentLostAnswersOrdered) && - (identical(other.failedToSend, failedToSend) || - other.failedToSend == failedToSend) && - (identical(other.answerUnordered, answerUnordered) || - other.answerUnordered == answerUnordered) && - (identical(other.answerOrdered, answerOrdered) || - other.answerOrdered == answerOrdered)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _RPCStats&&(identical(other.messagesSent, messagesSent) || other.messagesSent == messagesSent)&&(identical(other.messagesRcvd, messagesRcvd) || other.messagesRcvd == messagesRcvd)&&(identical(other.questionsInFlight, questionsInFlight) || other.questionsInFlight == questionsInFlight)&&(identical(other.lastQuestionTs, lastQuestionTs) || other.lastQuestionTs == lastQuestionTs)&&(identical(other.lastSeenTs, lastSeenTs) || other.lastSeenTs == lastSeenTs)&&(identical(other.firstConsecutiveSeenTs, firstConsecutiveSeenTs) || other.firstConsecutiveSeenTs == firstConsecutiveSeenTs)&&(identical(other.recentLostAnswersUnordered, recentLostAnswersUnordered) || other.recentLostAnswersUnordered == recentLostAnswersUnordered)&&(identical(other.recentLostAnswersOrdered, recentLostAnswersOrdered) || other.recentLostAnswersOrdered == recentLostAnswersOrdered)&&(identical(other.failedToSend, failedToSend) || other.failedToSend == failedToSend)&&(identical(other.answerUnordered, answerUnordered) || other.answerUnordered == answerUnordered)&&(identical(other.answerOrdered, answerOrdered) || other.answerOrdered == answerOrdered)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,messagesSent,messagesRcvd,questionsInFlight,lastQuestionTs,lastSeenTs,firstConsecutiveSeenTs,recentLostAnswersUnordered,recentLostAnswersOrdered,failedToSend,answerUnordered,answerOrdered); + +@override +String toString() { + return 'RPCStats(messagesSent: $messagesSent, messagesRcvd: $messagesRcvd, questionsInFlight: $questionsInFlight, lastQuestionTs: $lastQuestionTs, lastSeenTs: $lastSeenTs, firstConsecutiveSeenTs: $firstConsecutiveSeenTs, recentLostAnswersUnordered: $recentLostAnswersUnordered, recentLostAnswersOrdered: $recentLostAnswersOrdered, failedToSend: $failedToSend, answerUnordered: $answerUnordered, answerOrdered: $answerOrdered)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - messagesSent, - messagesRcvd, - questionsInFlight, - lastQuestionTs, - lastSeenTs, - firstConsecutiveSeenTs, - recentLostAnswersUnordered, - recentLostAnswersOrdered, - failedToSend, - answerUnordered, - answerOrdered); - @override - String toString() { - return 'RPCStats(messagesSent: $messagesSent, messagesRcvd: $messagesRcvd, questionsInFlight: $questionsInFlight, lastQuestionTs: $lastQuestionTs, lastSeenTs: $lastSeenTs, firstConsecutiveSeenTs: $firstConsecutiveSeenTs, recentLostAnswersUnordered: $recentLostAnswersUnordered, recentLostAnswersOrdered: $recentLostAnswersOrdered, failedToSend: $failedToSend, answerUnordered: $answerUnordered, answerOrdered: $answerOrdered)'; - } } /// @nodoc -abstract mixin class _$RPCStatsCopyWith<$Res> - implements $RPCStatsCopyWith<$Res> { - factory _$RPCStatsCopyWith(_RPCStats value, $Res Function(_RPCStats) _then) = - __$RPCStatsCopyWithImpl; - @override - @useResult - $Res call( - {int messagesSent, - int messagesRcvd, - int questionsInFlight, - Timestamp? lastQuestionTs, - Timestamp? lastSeenTs, - Timestamp? firstConsecutiveSeenTs, - int recentLostAnswersUnordered, - int recentLostAnswersOrdered, - int failedToSend, - AnswerStats answerUnordered, - AnswerStats answerOrdered}); +abstract mixin class _$RPCStatsCopyWith<$Res> implements $RPCStatsCopyWith<$Res> { + factory _$RPCStatsCopyWith(_RPCStats value, $Res Function(_RPCStats) _then) = __$RPCStatsCopyWithImpl; +@override @useResult +$Res call({ + int messagesSent, int messagesRcvd, int questionsInFlight, Timestamp? lastQuestionTs, Timestamp? lastSeenTs, Timestamp? firstConsecutiveSeenTs, int recentLostAnswersUnordered, int recentLostAnswersOrdered, int failedToSend, AnswerStats answerUnordered, AnswerStats answerOrdered +}); + + +@override $AnswerStatsCopyWith<$Res> get answerUnordered;@override $AnswerStatsCopyWith<$Res> get answerOrdered; - @override - $AnswerStatsCopyWith<$Res> get answerUnordered; - @override - $AnswerStatsCopyWith<$Res> get answerOrdered; } - /// @nodoc -class __$RPCStatsCopyWithImpl<$Res> implements _$RPCStatsCopyWith<$Res> { +class __$RPCStatsCopyWithImpl<$Res> + implements _$RPCStatsCopyWith<$Res> { __$RPCStatsCopyWithImpl(this._self, this._then); final _RPCStats _self; final $Res Function(_RPCStats) _then; - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? messagesSent = null, - Object? messagesRcvd = null, - Object? questionsInFlight = null, - Object? lastQuestionTs = freezed, - Object? lastSeenTs = freezed, - Object? firstConsecutiveSeenTs = freezed, - Object? recentLostAnswersUnordered = null, - Object? recentLostAnswersOrdered = null, - Object? failedToSend = null, - Object? answerUnordered = null, - Object? answerOrdered = null, - }) { - return _then(_RPCStats( - messagesSent: null == messagesSent - ? _self.messagesSent - : messagesSent // ignore: cast_nullable_to_non_nullable - as int, - messagesRcvd: null == messagesRcvd - ? _self.messagesRcvd - : messagesRcvd // ignore: cast_nullable_to_non_nullable - as int, - questionsInFlight: null == questionsInFlight - ? _self.questionsInFlight - : questionsInFlight // ignore: cast_nullable_to_non_nullable - as int, - lastQuestionTs: freezed == lastQuestionTs - ? _self.lastQuestionTs - : lastQuestionTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - lastSeenTs: freezed == lastSeenTs - ? _self.lastSeenTs - : lastSeenTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs - ? _self.firstConsecutiveSeenTs - : firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable - as Timestamp?, - recentLostAnswersUnordered: null == recentLostAnswersUnordered - ? _self.recentLostAnswersUnordered - : recentLostAnswersUnordered // ignore: cast_nullable_to_non_nullable - as int, - recentLostAnswersOrdered: null == recentLostAnswersOrdered - ? _self.recentLostAnswersOrdered - : recentLostAnswersOrdered // ignore: cast_nullable_to_non_nullable - as int, - failedToSend: null == failedToSend - ? _self.failedToSend - : failedToSend // ignore: cast_nullable_to_non_nullable - as int, - answerUnordered: null == answerUnordered - ? _self.answerUnordered - : answerUnordered // ignore: cast_nullable_to_non_nullable - as AnswerStats, - answerOrdered: null == answerOrdered - ? _self.answerOrdered - : answerOrdered // ignore: cast_nullable_to_non_nullable - as AnswerStats, - )); - } - - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AnswerStatsCopyWith<$Res> get answerUnordered { - return $AnswerStatsCopyWith<$Res>(_self.answerUnordered, (value) { - return _then(_self.copyWith(answerUnordered: value)); - }); - } - - /// Create a copy of RPCStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $AnswerStatsCopyWith<$Res> get answerOrdered { - return $AnswerStatsCopyWith<$Res>(_self.answerOrdered, (value) { - return _then(_self.copyWith(answerOrdered: value)); - }); - } +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? messagesSent = null,Object? messagesRcvd = null,Object? questionsInFlight = null,Object? lastQuestionTs = freezed,Object? lastSeenTs = freezed,Object? firstConsecutiveSeenTs = freezed,Object? recentLostAnswersUnordered = null,Object? recentLostAnswersOrdered = null,Object? failedToSend = null,Object? answerUnordered = null,Object? answerOrdered = null,}) { + return _then(_RPCStats( +messagesSent: null == messagesSent ? _self.messagesSent : messagesSent // ignore: cast_nullable_to_non_nullable +as int,messagesRcvd: null == messagesRcvd ? _self.messagesRcvd : messagesRcvd // ignore: cast_nullable_to_non_nullable +as int,questionsInFlight: null == questionsInFlight ? _self.questionsInFlight : questionsInFlight // ignore: cast_nullable_to_non_nullable +as int,lastQuestionTs: freezed == lastQuestionTs ? _self.lastQuestionTs : lastQuestionTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,lastSeenTs: freezed == lastSeenTs ? _self.lastSeenTs : lastSeenTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,firstConsecutiveSeenTs: freezed == firstConsecutiveSeenTs ? _self.firstConsecutiveSeenTs : firstConsecutiveSeenTs // ignore: cast_nullable_to_non_nullable +as Timestamp?,recentLostAnswersUnordered: null == recentLostAnswersUnordered ? _self.recentLostAnswersUnordered : recentLostAnswersUnordered // ignore: cast_nullable_to_non_nullable +as int,recentLostAnswersOrdered: null == recentLostAnswersOrdered ? _self.recentLostAnswersOrdered : recentLostAnswersOrdered // ignore: cast_nullable_to_non_nullable +as int,failedToSend: null == failedToSend ? _self.failedToSend : failedToSend // ignore: cast_nullable_to_non_nullable +as int,answerUnordered: null == answerUnordered ? _self.answerUnordered : answerUnordered // ignore: cast_nullable_to_non_nullable +as AnswerStats,answerOrdered: null == answerOrdered ? _self.answerOrdered : answerOrdered // ignore: cast_nullable_to_non_nullable +as AnswerStats, + )); } +/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AnswerStatsCopyWith<$Res> get answerUnordered { + + return $AnswerStatsCopyWith<$Res>(_self.answerUnordered, (value) { + return _then(_self.copyWith(answerUnordered: value)); + }); +}/// Create a copy of RPCStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AnswerStatsCopyWith<$Res> get answerOrdered { + + return $AnswerStatsCopyWith<$Res>(_self.answerOrdered, (value) { + return _then(_self.copyWith(answerOrdered: value)); + }); +} +} + + /// @nodoc mixin _$PeerStats { - Timestamp get timeAdded; - RPCStats get rpcStats; - TransferStatsDownUp get transfer; - StateStats get state; - LatencyStats? get latency; - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PeerStatsCopyWith get copyWith => - _$PeerStatsCopyWithImpl(this as PeerStats, _$identity); + Timestamp get timeAdded; RPCStats get rpcStats; TransferStatsDownUp get transfer; StateStats get state; LatencyStats? get latency; +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PeerStatsCopyWith get copyWith => _$PeerStatsCopyWithImpl(this as PeerStats, _$identity); /// Serializes this PeerStats to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PeerStats && - (identical(other.timeAdded, timeAdded) || - other.timeAdded == timeAdded) && - (identical(other.rpcStats, rpcStats) || - other.rpcStats == rpcStats) && - (identical(other.transfer, transfer) || - other.transfer == transfer) && - (identical(other.state, state) || other.state == state) && - (identical(other.latency, latency) || other.latency == latency)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, timeAdded, rpcStats, transfer, state, latency); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PeerStats&&(identical(other.timeAdded, timeAdded) || other.timeAdded == timeAdded)&&(identical(other.rpcStats, rpcStats) || other.rpcStats == rpcStats)&&(identical(other.transfer, transfer) || other.transfer == transfer)&&(identical(other.state, state) || other.state == state)&&(identical(other.latency, latency) || other.latency == latency)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timeAdded,rpcStats,transfer,state,latency); + +@override +String toString() { + return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, state: $state, latency: $latency)'; +} + - @override - String toString() { - return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, state: $state, latency: $latency)'; - } } /// @nodoc -abstract mixin class $PeerStatsCopyWith<$Res> { - factory $PeerStatsCopyWith(PeerStats value, $Res Function(PeerStats) _then) = - _$PeerStatsCopyWithImpl; - @useResult - $Res call( - {Timestamp timeAdded, - RPCStats rpcStats, - TransferStatsDownUp transfer, - StateStats state, - LatencyStats? latency}); +abstract mixin class $PeerStatsCopyWith<$Res> { + factory $PeerStatsCopyWith(PeerStats value, $Res Function(PeerStats) _then) = _$PeerStatsCopyWithImpl; +@useResult +$Res call({ + Timestamp timeAdded, RPCStats rpcStats, TransferStatsDownUp transfer, StateStats state, LatencyStats? latency +}); + + +$RPCStatsCopyWith<$Res> get rpcStats;$TransferStatsDownUpCopyWith<$Res> get transfer;$StateStatsCopyWith<$Res> get state;$LatencyStatsCopyWith<$Res>? get latency; - $RPCStatsCopyWith<$Res> get rpcStats; - $TransferStatsDownUpCopyWith<$Res> get transfer; - $StateStatsCopyWith<$Res> get state; - $LatencyStatsCopyWith<$Res>? get latency; } - /// @nodoc -class _$PeerStatsCopyWithImpl<$Res> implements $PeerStatsCopyWith<$Res> { +class _$PeerStatsCopyWithImpl<$Res> + implements $PeerStatsCopyWith<$Res> { _$PeerStatsCopyWithImpl(this._self, this._then); final PeerStats _self; final $Res Function(PeerStats) _then; - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? timeAdded = null, - Object? rpcStats = null, - Object? transfer = null, - Object? state = null, - Object? latency = freezed, - }) { - return _then(_self.copyWith( - timeAdded: null == timeAdded - ? _self.timeAdded - : timeAdded // ignore: cast_nullable_to_non_nullable - as Timestamp, - rpcStats: null == rpcStats - ? _self.rpcStats - : rpcStats // ignore: cast_nullable_to_non_nullable - as RPCStats, - transfer: null == transfer - ? _self.transfer - : transfer // ignore: cast_nullable_to_non_nullable - as TransferStatsDownUp, - state: null == state - ? _self.state - : state // ignore: cast_nullable_to_non_nullable - as StateStats, - latency: freezed == latency - ? _self.latency - : latency // ignore: cast_nullable_to_non_nullable - as LatencyStats?, - )); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $RPCStatsCopyWith<$Res> get rpcStats { - return $RPCStatsCopyWith<$Res>(_self.rpcStats, (value) { - return _then(_self.copyWith(rpcStats: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsDownUpCopyWith<$Res> get transfer { - return $TransferStatsDownUpCopyWith<$Res>(_self.transfer, (value) { - return _then(_self.copyWith(transfer: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $StateStatsCopyWith<$Res> get state { - return $StateStatsCopyWith<$Res>(_self.state, (value) { - return _then(_self.copyWith(state: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LatencyStatsCopyWith<$Res>? get latency { +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? timeAdded = null,Object? rpcStats = null,Object? transfer = null,Object? state = null,Object? latency = freezed,}) { + return _then(_self.copyWith( +timeAdded: null == timeAdded ? _self.timeAdded : timeAdded // ignore: cast_nullable_to_non_nullable +as Timestamp,rpcStats: null == rpcStats ? _self.rpcStats : rpcStats // ignore: cast_nullable_to_non_nullable +as RPCStats,transfer: null == transfer ? _self.transfer : transfer // ignore: cast_nullable_to_non_nullable +as TransferStatsDownUp,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable +as StateStats,latency: freezed == latency ? _self.latency : latency // ignore: cast_nullable_to_non_nullable +as LatencyStats?, + )); +} +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RPCStatsCopyWith<$Res> get rpcStats { + + return $RPCStatsCopyWith<$Res>(_self.rpcStats, (value) { + return _then(_self.copyWith(rpcStats: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsDownUpCopyWith<$Res> get transfer { + + return $TransferStatsDownUpCopyWith<$Res>(_self.transfer, (value) { + return _then(_self.copyWith(transfer: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$StateStatsCopyWith<$Res> get state { + + return $StateStatsCopyWith<$Res>(_self.state, (value) { + return _then(_self.copyWith(state: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LatencyStatsCopyWith<$Res>? get latency { if (_self.latency == null) { - return null; - } - - return $LatencyStatsCopyWith<$Res>(_self.latency!, (value) { - return _then(_self.copyWith(latency: value)); - }); + return null; } + + return $LatencyStatsCopyWith<$Res>(_self.latency!, (value) { + return _then(_self.copyWith(latency: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PeerStats]. +extension PeerStatsPatterns on PeerStats { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PeerStats value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PeerStats() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PeerStats value) $default,){ +final _that = this; +switch (_that) { +case _PeerStats(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PeerStats value)? $default,){ +final _that = this; +switch (_that) { +case _PeerStats() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Timestamp timeAdded, RPCStats rpcStats, TransferStatsDownUp transfer, StateStats state, LatencyStats? latency)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PeerStats() when $default != null: +return $default(_that.timeAdded,_that.rpcStats,_that.transfer,_that.state,_that.latency);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Timestamp timeAdded, RPCStats rpcStats, TransferStatsDownUp transfer, StateStats state, LatencyStats? latency) $default,) {final _that = this; +switch (_that) { +case _PeerStats(): +return $default(_that.timeAdded,_that.rpcStats,_that.transfer,_that.state,_that.latency);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Timestamp timeAdded, RPCStats rpcStats, TransferStatsDownUp transfer, StateStats state, LatencyStats? latency)? $default,) {final _that = this; +switch (_that) { +case _PeerStats() when $default != null: +return $default(_that.timeAdded,_that.rpcStats,_that.transfer,_that.state,_that.latency);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _PeerStats implements PeerStats { - const _PeerStats( - {required this.timeAdded, - required this.rpcStats, - required this.transfer, - required this.state, - this.latency}); - factory _PeerStats.fromJson(Map json) => - _$PeerStatsFromJson(json); + const _PeerStats({required this.timeAdded, required this.rpcStats, required this.transfer, required this.state, this.latency}); + factory _PeerStats.fromJson(Map json) => _$PeerStatsFromJson(json); - @override - final Timestamp timeAdded; - @override - final RPCStats rpcStats; - @override - final TransferStatsDownUp transfer; - @override - final StateStats state; - @override - final LatencyStats? latency; +@override final Timestamp timeAdded; +@override final RPCStats rpcStats; +@override final TransferStatsDownUp transfer; +@override final StateStats state; +@override final LatencyStats? latency; - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$PeerStatsCopyWith<_PeerStats> get copyWith => - __$PeerStatsCopyWithImpl<_PeerStats>(this, _$identity); +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PeerStatsCopyWith<_PeerStats> get copyWith => __$PeerStatsCopyWithImpl<_PeerStats>(this, _$identity); - @override - Map toJson() { - return _$PeerStatsToJson( - this, - ); - } +@override +Map toJson() { + return _$PeerStatsToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _PeerStats && - (identical(other.timeAdded, timeAdded) || - other.timeAdded == timeAdded) && - (identical(other.rpcStats, rpcStats) || - other.rpcStats == rpcStats) && - (identical(other.transfer, transfer) || - other.transfer == transfer) && - (identical(other.state, state) || other.state == state) && - (identical(other.latency, latency) || other.latency == latency)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PeerStats&&(identical(other.timeAdded, timeAdded) || other.timeAdded == timeAdded)&&(identical(other.rpcStats, rpcStats) || other.rpcStats == rpcStats)&&(identical(other.transfer, transfer) || other.transfer == transfer)&&(identical(other.state, state) || other.state == state)&&(identical(other.latency, latency) || other.latency == latency)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,timeAdded,rpcStats,transfer,state,latency); + +@override +String toString() { + return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, state: $state, latency: $latency)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => - Object.hash(runtimeType, timeAdded, rpcStats, transfer, state, latency); - @override - String toString() { - return 'PeerStats(timeAdded: $timeAdded, rpcStats: $rpcStats, transfer: $transfer, state: $state, latency: $latency)'; - } } /// @nodoc -abstract mixin class _$PeerStatsCopyWith<$Res> - implements $PeerStatsCopyWith<$Res> { - factory _$PeerStatsCopyWith( - _PeerStats value, $Res Function(_PeerStats) _then) = - __$PeerStatsCopyWithImpl; - @override - @useResult - $Res call( - {Timestamp timeAdded, - RPCStats rpcStats, - TransferStatsDownUp transfer, - StateStats state, - LatencyStats? latency}); +abstract mixin class _$PeerStatsCopyWith<$Res> implements $PeerStatsCopyWith<$Res> { + factory _$PeerStatsCopyWith(_PeerStats value, $Res Function(_PeerStats) _then) = __$PeerStatsCopyWithImpl; +@override @useResult +$Res call({ + Timestamp timeAdded, RPCStats rpcStats, TransferStatsDownUp transfer, StateStats state, LatencyStats? latency +}); + + +@override $RPCStatsCopyWith<$Res> get rpcStats;@override $TransferStatsDownUpCopyWith<$Res> get transfer;@override $StateStatsCopyWith<$Res> get state;@override $LatencyStatsCopyWith<$Res>? get latency; - @override - $RPCStatsCopyWith<$Res> get rpcStats; - @override - $TransferStatsDownUpCopyWith<$Res> get transfer; - @override - $StateStatsCopyWith<$Res> get state; - @override - $LatencyStatsCopyWith<$Res>? get latency; } - /// @nodoc -class __$PeerStatsCopyWithImpl<$Res> implements _$PeerStatsCopyWith<$Res> { +class __$PeerStatsCopyWithImpl<$Res> + implements _$PeerStatsCopyWith<$Res> { __$PeerStatsCopyWithImpl(this._self, this._then); final _PeerStats _self; final $Res Function(_PeerStats) _then; - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? timeAdded = null, - Object? rpcStats = null, - Object? transfer = null, - Object? state = null, - Object? latency = freezed, - }) { - return _then(_PeerStats( - timeAdded: null == timeAdded - ? _self.timeAdded - : timeAdded // ignore: cast_nullable_to_non_nullable - as Timestamp, - rpcStats: null == rpcStats - ? _self.rpcStats - : rpcStats // ignore: cast_nullable_to_non_nullable - as RPCStats, - transfer: null == transfer - ? _self.transfer - : transfer // ignore: cast_nullable_to_non_nullable - as TransferStatsDownUp, - state: null == state - ? _self.state - : state // ignore: cast_nullable_to_non_nullable - as StateStats, - latency: freezed == latency - ? _self.latency - : latency // ignore: cast_nullable_to_non_nullable - as LatencyStats?, - )); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $RPCStatsCopyWith<$Res> get rpcStats { - return $RPCStatsCopyWith<$Res>(_self.rpcStats, (value) { - return _then(_self.copyWith(rpcStats: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $TransferStatsDownUpCopyWith<$Res> get transfer { - return $TransferStatsDownUpCopyWith<$Res>(_self.transfer, (value) { - return _then(_self.copyWith(transfer: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $StateStatsCopyWith<$Res> get state { - return $StateStatsCopyWith<$Res>(_self.state, (value) { - return _then(_self.copyWith(state: value)); - }); - } - - /// Create a copy of PeerStats - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $LatencyStatsCopyWith<$Res>? get latency { - if (_self.latency == null) { - return null; - } - - return $LatencyStatsCopyWith<$Res>(_self.latency!, (value) { - return _then(_self.copyWith(latency: value)); - }); - } +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? timeAdded = null,Object? rpcStats = null,Object? transfer = null,Object? state = null,Object? latency = freezed,}) { + return _then(_PeerStats( +timeAdded: null == timeAdded ? _self.timeAdded : timeAdded // ignore: cast_nullable_to_non_nullable +as Timestamp,rpcStats: null == rpcStats ? _self.rpcStats : rpcStats // ignore: cast_nullable_to_non_nullable +as RPCStats,transfer: null == transfer ? _self.transfer : transfer // ignore: cast_nullable_to_non_nullable +as TransferStatsDownUp,state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable +as StateStats,latency: freezed == latency ? _self.latency : latency // ignore: cast_nullable_to_non_nullable +as LatencyStats?, + )); } +/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$RPCStatsCopyWith<$Res> get rpcStats { + + return $RPCStatsCopyWith<$Res>(_self.rpcStats, (value) { + return _then(_self.copyWith(rpcStats: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$TransferStatsDownUpCopyWith<$Res> get transfer { + + return $TransferStatsDownUpCopyWith<$Res>(_self.transfer, (value) { + return _then(_self.copyWith(transfer: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$StateStatsCopyWith<$Res> get state { + + return $StateStatsCopyWith<$Res>(_self.state, (value) { + return _then(_self.copyWith(state: value)); + }); +}/// Create a copy of PeerStats +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$LatencyStatsCopyWith<$Res>? get latency { + if (_self.latency == null) { + return null; + } + + return $LatencyStatsCopyWith<$Res>(_self.latency!, (value) { + return _then(_self.copyWith(latency: value)); + }); +} +} + + /// @nodoc mixin _$PeerTableData { - List get nodeIds; - String get peerAddress; - PeerStats get peerStats; - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $PeerTableDataCopyWith get copyWith => - _$PeerTableDataCopyWithImpl( - this as PeerTableData, _$identity); + List get nodeIds; String get peerAddress; PeerStats get peerStats; +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PeerTableDataCopyWith get copyWith => _$PeerTableDataCopyWithImpl(this as PeerTableData, _$identity); /// Serializes this PeerTableData to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is PeerTableData && - const DeepCollectionEquality().equals(other.nodeIds, nodeIds) && - (identical(other.peerAddress, peerAddress) || - other.peerAddress == peerAddress) && - (identical(other.peerStats, peerStats) || - other.peerStats == peerStats)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(nodeIds), peerAddress, peerStats); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PeerTableData&&const DeepCollectionEquality().equals(other.nodeIds, nodeIds)&&(identical(other.peerAddress, peerAddress) || other.peerAddress == peerAddress)&&(identical(other.peerStats, peerStats) || other.peerStats == peerStats)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(nodeIds),peerAddress,peerStats); + +@override +String toString() { + return 'PeerTableData(nodeIds: $nodeIds, peerAddress: $peerAddress, peerStats: $peerStats)'; +} + - @override - String toString() { - return 'PeerTableData(nodeIds: $nodeIds, peerAddress: $peerAddress, peerStats: $peerStats)'; - } } /// @nodoc -abstract mixin class $PeerTableDataCopyWith<$Res> { - factory $PeerTableDataCopyWith( - PeerTableData value, $Res Function(PeerTableData) _then) = - _$PeerTableDataCopyWithImpl; - @useResult - $Res call({List nodeIds, String peerAddress, PeerStats peerStats}); +abstract mixin class $PeerTableDataCopyWith<$Res> { + factory $PeerTableDataCopyWith(PeerTableData value, $Res Function(PeerTableData) _then) = _$PeerTableDataCopyWithImpl; +@useResult +$Res call({ + List nodeIds, String peerAddress, PeerStats peerStats +}); + + +$PeerStatsCopyWith<$Res> get peerStats; - $PeerStatsCopyWith<$Res> get peerStats; } - /// @nodoc class _$PeerTableDataCopyWithImpl<$Res> implements $PeerTableDataCopyWith<$Res> { @@ -2392,118 +2419,210 @@ class _$PeerTableDataCopyWithImpl<$Res> final PeerTableData _self; final $Res Function(PeerTableData) _then; - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? nodeIds = null, - Object? peerAddress = null, - Object? peerStats = null, - }) { - return _then(_self.copyWith( - nodeIds: null == nodeIds - ? _self.nodeIds - : nodeIds // ignore: cast_nullable_to_non_nullable - as List, - peerAddress: null == peerAddress - ? _self.peerAddress - : peerAddress // ignore: cast_nullable_to_non_nullable - as String, - peerStats: null == peerStats - ? _self.peerStats - : peerStats // ignore: cast_nullable_to_non_nullable - as PeerStats, - )); - } +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? nodeIds = null,Object? peerAddress = null,Object? peerStats = null,}) { + return _then(_self.copyWith( +nodeIds: null == nodeIds ? _self.nodeIds : nodeIds // ignore: cast_nullable_to_non_nullable +as List,peerAddress: null == peerAddress ? _self.peerAddress : peerAddress // ignore: cast_nullable_to_non_nullable +as String,peerStats: null == peerStats ? _self.peerStats : peerStats // ignore: cast_nullable_to_non_nullable +as PeerStats, + )); +} +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PeerStatsCopyWith<$Res> get peerStats { + + return $PeerStatsCopyWith<$Res>(_self.peerStats, (value) { + return _then(_self.copyWith(peerStats: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PeerTableData]. +extension PeerTableDataPatterns on PeerTableData { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PeerTableData value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PeerTableData() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PeerTableData value) $default,){ +final _that = this; +switch (_that) { +case _PeerTableData(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PeerTableData value)? $default,){ +final _that = this; +switch (_that) { +case _PeerTableData() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( List nodeIds, String peerAddress, PeerStats peerStats)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PeerTableData() when $default != null: +return $default(_that.nodeIds,_that.peerAddress,_that.peerStats);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( List nodeIds, String peerAddress, PeerStats peerStats) $default,) {final _that = this; +switch (_that) { +case _PeerTableData(): +return $default(_that.nodeIds,_that.peerAddress,_that.peerStats);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( List nodeIds, String peerAddress, PeerStats peerStats)? $default,) {final _that = this; +switch (_that) { +case _PeerTableData() when $default != null: +return $default(_that.nodeIds,_that.peerAddress,_that.peerStats);case _: + return null; + +} +} - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PeerStatsCopyWith<$Res> get peerStats { - return $PeerStatsCopyWith<$Res>(_self.peerStats, (value) { - return _then(_self.copyWith(peerStats: value)); - }); - } } /// @nodoc @JsonSerializable() + class _PeerTableData implements PeerTableData { - const _PeerTableData( - {required final List nodeIds, - required this.peerAddress, - required this.peerStats}) - : _nodeIds = nodeIds; - factory _PeerTableData.fromJson(Map json) => - _$PeerTableDataFromJson(json); + const _PeerTableData({required final List nodeIds, required this.peerAddress, required this.peerStats}): _nodeIds = nodeIds; + factory _PeerTableData.fromJson(Map json) => _$PeerTableDataFromJson(json); - final List _nodeIds; - @override - List get nodeIds { - if (_nodeIds is EqualUnmodifiableListView) return _nodeIds; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_nodeIds); - } + final List _nodeIds; +@override List get nodeIds { + if (_nodeIds is EqualUnmodifiableListView) return _nodeIds; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_nodeIds); +} - @override - final String peerAddress; - @override - final PeerStats peerStats; +@override final String peerAddress; +@override final PeerStats peerStats; - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$PeerTableDataCopyWith<_PeerTableData> get copyWith => - __$PeerTableDataCopyWithImpl<_PeerTableData>(this, _$identity); +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PeerTableDataCopyWith<_PeerTableData> get copyWith => __$PeerTableDataCopyWithImpl<_PeerTableData>(this, _$identity); - @override - Map toJson() { - return _$PeerTableDataToJson( - this, - ); - } +@override +Map toJson() { + return _$PeerTableDataToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _PeerTableData && - const DeepCollectionEquality().equals(other._nodeIds, _nodeIds) && - (identical(other.peerAddress, peerAddress) || - other.peerAddress == peerAddress) && - (identical(other.peerStats, peerStats) || - other.peerStats == peerStats)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PeerTableData&&const DeepCollectionEquality().equals(other._nodeIds, _nodeIds)&&(identical(other.peerAddress, peerAddress) || other.peerAddress == peerAddress)&&(identical(other.peerStats, peerStats) || other.peerStats == peerStats)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_nodeIds),peerAddress,peerStats); + +@override +String toString() { + return 'PeerTableData(nodeIds: $nodeIds, peerAddress: $peerAddress, peerStats: $peerStats)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_nodeIds), peerAddress, peerStats); - @override - String toString() { - return 'PeerTableData(nodeIds: $nodeIds, peerAddress: $peerAddress, peerStats: $peerStats)'; - } } /// @nodoc -abstract mixin class _$PeerTableDataCopyWith<$Res> - implements $PeerTableDataCopyWith<$Res> { - factory _$PeerTableDataCopyWith( - _PeerTableData value, $Res Function(_PeerTableData) _then) = - __$PeerTableDataCopyWithImpl; - @override - @useResult - $Res call({List nodeIds, String peerAddress, PeerStats peerStats}); +abstract mixin class _$PeerTableDataCopyWith<$Res> implements $PeerTableDataCopyWith<$Res> { + factory _$PeerTableDataCopyWith(_PeerTableData value, $Res Function(_PeerTableData) _then) = __$PeerTableDataCopyWithImpl; +@override @useResult +$Res call({ + List nodeIds, String peerAddress, PeerStats peerStats +}); + + +@override $PeerStatsCopyWith<$Res> get peerStats; - @override - $PeerStatsCopyWith<$Res> get peerStats; } - /// @nodoc class __$PeerTableDataCopyWithImpl<$Res> implements _$PeerTableDataCopyWith<$Res> { @@ -2512,257 +2631,407 @@ class __$PeerTableDataCopyWithImpl<$Res> final _PeerTableData _self; final $Res Function(_PeerTableData) _then; - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? nodeIds = null, - Object? peerAddress = null, - Object? peerStats = null, - }) { - return _then(_PeerTableData( - nodeIds: null == nodeIds - ? _self._nodeIds - : nodeIds // ignore: cast_nullable_to_non_nullable - as List, - peerAddress: null == peerAddress - ? _self.peerAddress - : peerAddress // ignore: cast_nullable_to_non_nullable - as String, - peerStats: null == peerStats - ? _self.peerStats - : peerStats // ignore: cast_nullable_to_non_nullable - as PeerStats, - )); - } - - /// Create a copy of PeerTableData - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $PeerStatsCopyWith<$Res> get peerStats { - return $PeerStatsCopyWith<$Res>(_self.peerStats, (value) { - return _then(_self.copyWith(peerStats: value)); - }); - } +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? nodeIds = null,Object? peerAddress = null,Object? peerStats = null,}) { + return _then(_PeerTableData( +nodeIds: null == nodeIds ? _self._nodeIds : nodeIds // ignore: cast_nullable_to_non_nullable +as List,peerAddress: null == peerAddress ? _self.peerAddress : peerAddress // ignore: cast_nullable_to_non_nullable +as String,peerStats: null == peerStats ? _self.peerStats : peerStats // ignore: cast_nullable_to_non_nullable +as PeerStats, + )); } -VeilidUpdate _$VeilidUpdateFromJson(Map 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); +/// Create a copy of PeerTableData +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$PeerStatsCopyWith<$Res> get peerStats { + + return $PeerStatsCopyWith<$Res>(_self.peerStats, (value) { + return _then(_self.copyWith(peerStats: value)); + }); +} +} - default: - throw CheckedFromJsonException(json, 'kind', 'VeilidUpdate', - 'Invalid union type "${json['kind']}"!'); - } +VeilidUpdate _$VeilidUpdateFromJson( + Map 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']}"!' +); + } + } /// @nodoc mixin _$VeilidUpdate { + + + /// Serializes this VeilidUpdate to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is VeilidUpdate); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => runtimeType.hashCode; +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdate); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'VeilidUpdate()'; +} + - @override - String toString() { - return 'VeilidUpdate()'; - } } /// @nodoc -class $VeilidUpdateCopyWith<$Res> { - $VeilidUpdateCopyWith(VeilidUpdate _, $Res Function(VeilidUpdate) __); +class $VeilidUpdateCopyWith<$Res> { +$VeilidUpdateCopyWith(VeilidUpdate _, $Res Function(VeilidUpdate) __); +} + + +/// Adds pattern-matching-related methods to [VeilidUpdate]. +extension VeilidUpdatePatterns on VeilidUpdate { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({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(),}){ +final _that = this; +switch (_that) { +case VeilidLog() when log != null: +return log(_that);case VeilidAppMessage() when appMessage != null: +return appMessage(_that);case VeilidAppCall() when appCall != null: +return appCall(_that);case VeilidUpdateAttachment() when attachment != null: +return attachment(_that);case VeilidUpdateNetwork() when network != null: +return network(_that);case VeilidUpdateConfig() when config != null: +return config(_that);case VeilidUpdateRouteChange() when routeChange != null: +return routeChange(_that);case VeilidUpdateValueChange() when valueChange != null: +return valueChange(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({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,}){ +final _that = this; +switch (_that) { +case VeilidLog(): +return log(_that);case VeilidAppMessage(): +return appMessage(_that);case VeilidAppCall(): +return appCall(_that);case VeilidUpdateAttachment(): +return attachment(_that);case VeilidUpdateNetwork(): +return network(_that);case VeilidUpdateConfig(): +return config(_that);case VeilidUpdateRouteChange(): +return routeChange(_that);case VeilidUpdateValueChange(): +return valueChange(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({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,}){ +final _that = this; +switch (_that) { +case VeilidLog() when log != null: +return log(_that);case VeilidAppMessage() when appMessage != null: +return appMessage(_that);case VeilidAppCall() when appCall != null: +return appCall(_that);case VeilidUpdateAttachment() when attachment != null: +return attachment(_that);case VeilidUpdateNetwork() when network != null: +return network(_that);case VeilidUpdateConfig() when config != null: +return config(_that);case VeilidUpdateRouteChange() when routeChange != null: +return routeChange(_that);case VeilidUpdateValueChange() when valueChange != null: +return valueChange(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function( VeilidLogLevel logLevel, String message, String? backtrace)? log,TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, PublicKey? sender, String? routeId)? appMessage,TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, String callId, PublicKey? sender, String? routeId)? appCall,TResult Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime)? attachment,TResult Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers)? network,TResult Function( VeilidConfig config)? config,TResult Function( List deadRoutes, List deadRemoteRoutes)? routeChange,TResult Function( RecordKey key, List subkeys, int count, ValueData? value)? valueChange,required TResult orElse(),}) {final _that = this; +switch (_that) { +case VeilidLog() when log != null: +return log(_that.logLevel,_that.message,_that.backtrace);case VeilidAppMessage() when appMessage != null: +return appMessage(_that.message,_that.sender,_that.routeId);case VeilidAppCall() when appCall != null: +return appCall(_that.message,_that.callId,_that.sender,_that.routeId);case VeilidUpdateAttachment() when attachment != null: +return attachment(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);case VeilidUpdateNetwork() when network != null: +return network(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);case VeilidUpdateConfig() when config != null: +return config(_that.config);case VeilidUpdateRouteChange() when routeChange != null: +return routeChange(_that.deadRoutes,_that.deadRemoteRoutes);case VeilidUpdateValueChange() when valueChange != null: +return valueChange(_that.key,_that.subkeys,_that.count,_that.value);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function( VeilidLogLevel logLevel, String message, String? backtrace) log,required TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, PublicKey? sender, String? routeId) appMessage,required TResult Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, String callId, PublicKey? sender, String? routeId) appCall,required TResult Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime) attachment,required TResult Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers) network,required TResult Function( VeilidConfig config) config,required TResult Function( List deadRoutes, List deadRemoteRoutes) routeChange,required TResult Function( RecordKey key, List subkeys, int count, ValueData? value) valueChange,}) {final _that = this; +switch (_that) { +case VeilidLog(): +return log(_that.logLevel,_that.message,_that.backtrace);case VeilidAppMessage(): +return appMessage(_that.message,_that.sender,_that.routeId);case VeilidAppCall(): +return appCall(_that.message,_that.callId,_that.sender,_that.routeId);case VeilidUpdateAttachment(): +return attachment(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);case VeilidUpdateNetwork(): +return network(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);case VeilidUpdateConfig(): +return config(_that.config);case VeilidUpdateRouteChange(): +return routeChange(_that.deadRoutes,_that.deadRemoteRoutes);case VeilidUpdateValueChange(): +return valueChange(_that.key,_that.subkeys,_that.count,_that.value);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function( VeilidLogLevel logLevel, String message, String? backtrace)? log,TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, PublicKey? sender, String? routeId)? appMessage,TResult? Function(@Uint8ListJsonConverter.jsIsArray() Uint8List message, String callId, PublicKey? sender, String? routeId)? appCall,TResult? Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime)? attachment,TResult? Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers)? network,TResult? Function( VeilidConfig config)? config,TResult? Function( List deadRoutes, List deadRemoteRoutes)? routeChange,TResult? Function( RecordKey key, List subkeys, int count, ValueData? value)? valueChange,}) {final _that = this; +switch (_that) { +case VeilidLog() when log != null: +return log(_that.logLevel,_that.message,_that.backtrace);case VeilidAppMessage() when appMessage != null: +return appMessage(_that.message,_that.sender,_that.routeId);case VeilidAppCall() when appCall != null: +return appCall(_that.message,_that.callId,_that.sender,_that.routeId);case VeilidUpdateAttachment() when attachment != null: +return attachment(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);case VeilidUpdateNetwork() when network != null: +return network(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);case VeilidUpdateConfig() when config != null: +return config(_that.config);case VeilidUpdateRouteChange() when routeChange != null: +return routeChange(_that.deadRoutes,_that.deadRemoteRoutes);case VeilidUpdateValueChange() when valueChange != null: +return valueChange(_that.key,_that.subkeys,_that.count,_that.value);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class VeilidLog implements VeilidUpdate { - const VeilidLog( - {required this.logLevel, - required this.message, - this.backtrace, - final String? $type}) - : $type = $type ?? 'Log'; - factory VeilidLog.fromJson(Map json) => - _$VeilidLogFromJson(json); + const VeilidLog({required this.logLevel, required this.message, this.backtrace, final String? $type}): $type = $type ?? 'Log'; + factory VeilidLog.fromJson(Map json) => _$VeilidLogFromJson(json); - final VeilidLogLevel logLevel; - final String message; - final String? backtrace; + final VeilidLogLevel logLevel; + final String message; + final String? backtrace; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidLogCopyWith get copyWith => - _$VeilidLogCopyWithImpl(this, _$identity); - @override - Map toJson() { - return _$VeilidLogToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidLogCopyWith get copyWith => _$VeilidLogCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidLog && - (identical(other.logLevel, logLevel) || - other.logLevel == logLevel) && - (identical(other.message, message) || other.message == message) && - (identical(other.backtrace, backtrace) || - other.backtrace == backtrace)); - } +@override +Map toJson() { + return _$VeilidLogToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidLog&&(identical(other.logLevel, logLevel) || other.logLevel == logLevel)&&(identical(other.message, message) || other.message == message)&&(identical(other.backtrace, backtrace) || other.backtrace == backtrace)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,logLevel,message,backtrace); + +@override +String toString() { + return 'VeilidUpdate.log(logLevel: $logLevel, message: $message, backtrace: $backtrace)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, logLevel, message, backtrace); - @override - String toString() { - return 'VeilidUpdate.log(logLevel: $logLevel, message: $message, backtrace: $backtrace)'; - } } /// @nodoc -abstract mixin class $VeilidLogCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidLogCopyWith(VeilidLog value, $Res Function(VeilidLog) _then) = - _$VeilidLogCopyWithImpl; - @useResult - $Res call({VeilidLogLevel logLevel, String message, String? backtrace}); -} +abstract mixin class $VeilidLogCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidLogCopyWith(VeilidLog value, $Res Function(VeilidLog) _then) = _$VeilidLogCopyWithImpl; +@useResult +$Res call({ + VeilidLogLevel logLevel, String message, String? backtrace +}); + + + +} /// @nodoc -class _$VeilidLogCopyWithImpl<$Res> implements $VeilidLogCopyWith<$Res> { +class _$VeilidLogCopyWithImpl<$Res> + implements $VeilidLogCopyWith<$Res> { _$VeilidLogCopyWithImpl(this._self, this._then); final VeilidLog _self; final $Res Function(VeilidLog) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? logLevel = null, - Object? message = null, - Object? backtrace = freezed, - }) { - return _then(VeilidLog( - logLevel: null == logLevel - ? _self.logLevel - : logLevel // ignore: cast_nullable_to_non_nullable - as VeilidLogLevel, - message: null == message - ? _self.message - : message // ignore: cast_nullable_to_non_nullable - as String, - backtrace: freezed == backtrace - ? _self.backtrace - : backtrace // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? logLevel = null,Object? message = null,Object? backtrace = freezed,}) { + return _then(VeilidLog( +logLevel: null == logLevel ? _self.logLevel : logLevel // ignore: cast_nullable_to_non_nullable +as VeilidLogLevel,message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable +as String,backtrace: freezed == backtrace ? _self.backtrace : backtrace // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidAppMessage implements VeilidUpdate { - const VeilidAppMessage( - {@Uint8ListJsonConverter.jsIsArray() required this.message, - this.sender, - this.routeId, - final String? $type}) - : $type = $type ?? 'AppMessage'; - factory VeilidAppMessage.fromJson(Map json) => - _$VeilidAppMessageFromJson(json); + const VeilidAppMessage({@Uint8ListJsonConverter.jsIsArray() required this.message, this.sender, this.routeId, final String? $type}): $type = $type ?? 'AppMessage'; + factory VeilidAppMessage.fromJson(Map json) => _$VeilidAppMessageFromJson(json); - @Uint8ListJsonConverter.jsIsArray() - final Uint8List message; - final PublicKey? sender; - final String? routeId; +@Uint8ListJsonConverter.jsIsArray() final Uint8List message; + final PublicKey? sender; + final String? routeId; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidAppMessageCopyWith get copyWith => - _$VeilidAppMessageCopyWithImpl(this, _$identity); - @override - Map toJson() { - return _$VeilidAppMessageToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidAppMessageCopyWith get copyWith => _$VeilidAppMessageCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidAppMessage && - const DeepCollectionEquality().equals(other.message, message) && - (identical(other.sender, sender) || other.sender == sender) && - (identical(other.routeId, routeId) || other.routeId == routeId)); - } +@override +Map toJson() { + return _$VeilidAppMessageToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidAppMessage&&const DeepCollectionEquality().equals(other.message, message)&&(identical(other.sender, sender) || other.sender == sender)&&(identical(other.routeId, routeId) || other.routeId == routeId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(message),sender,routeId); + +@override +String toString() { + return 'VeilidUpdate.appMessage(message: $message, sender: $sender, routeId: $routeId)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(message), sender, routeId); - @override - String toString() { - return 'VeilidUpdate.appMessage(message: $message, sender: $sender, routeId: $routeId)'; - } } /// @nodoc -abstract mixin class $VeilidAppMessageCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidAppMessageCopyWith( - VeilidAppMessage value, $Res Function(VeilidAppMessage) _then) = - _$VeilidAppMessageCopyWithImpl; - @useResult - $Res call( - {@Uint8ListJsonConverter.jsIsArray() Uint8List message, - PublicKey? sender, - String? routeId}); -} +abstract mixin class $VeilidAppMessageCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidAppMessageCopyWith(VeilidAppMessage value, $Res Function(VeilidAppMessage) _then) = _$VeilidAppMessageCopyWithImpl; +@useResult +$Res call({ +@Uint8ListJsonConverter.jsIsArray() Uint8List message, PublicKey? sender, String? routeId +}); + + + +} /// @nodoc class _$VeilidAppMessageCopyWithImpl<$Res> implements $VeilidAppMessageCopyWith<$Res> { @@ -2771,103 +3040,76 @@ class _$VeilidAppMessageCopyWithImpl<$Res> final VeilidAppMessage _self; final $Res Function(VeilidAppMessage) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? message = null, - Object? sender = freezed, - Object? routeId = freezed, - }) { - return _then(VeilidAppMessage( - message: null == message - ? _self.message - : message // ignore: cast_nullable_to_non_nullable - as Uint8List, - sender: freezed == sender - ? _self.sender - : sender // ignore: cast_nullable_to_non_nullable - as PublicKey?, - routeId: freezed == routeId - ? _self.routeId - : routeId // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? message = null,Object? sender = freezed,Object? routeId = freezed,}) { + return _then(VeilidAppMessage( +message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable +as Uint8List,sender: freezed == sender ? _self.sender : sender // ignore: cast_nullable_to_non_nullable +as PublicKey?,routeId: freezed == routeId ? _self.routeId : routeId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidAppCall implements VeilidUpdate { - const VeilidAppCall( - {@Uint8ListJsonConverter.jsIsArray() required this.message, - required this.callId, - this.sender, - this.routeId, - final String? $type}) - : $type = $type ?? 'AppCall'; - factory VeilidAppCall.fromJson(Map json) => - _$VeilidAppCallFromJson(json); + const VeilidAppCall({@Uint8ListJsonConverter.jsIsArray() required this.message, required this.callId, this.sender, this.routeId, final String? $type}): $type = $type ?? 'AppCall'; + factory VeilidAppCall.fromJson(Map json) => _$VeilidAppCallFromJson(json); - @Uint8ListJsonConverter.jsIsArray() - final Uint8List message; - final String callId; - final PublicKey? sender; - final String? routeId; +@Uint8ListJsonConverter.jsIsArray() final Uint8List message; + final String callId; + final PublicKey? sender; + final String? routeId; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidAppCallCopyWith get copyWith => - _$VeilidAppCallCopyWithImpl(this, _$identity); - @override - Map toJson() { - return _$VeilidAppCallToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidAppCallCopyWith get copyWith => _$VeilidAppCallCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidAppCall && - const DeepCollectionEquality().equals(other.message, message) && - (identical(other.callId, callId) || other.callId == callId) && - (identical(other.sender, sender) || other.sender == sender) && - (identical(other.routeId, routeId) || other.routeId == routeId)); - } +@override +Map toJson() { + return _$VeilidAppCallToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidAppCall&&const DeepCollectionEquality().equals(other.message, message)&&(identical(other.callId, callId) || other.callId == callId)&&(identical(other.sender, sender) || other.sender == sender)&&(identical(other.routeId, routeId) || other.routeId == routeId)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(message),callId,sender,routeId); + +@override +String toString() { + return 'VeilidUpdate.appCall(message: $message, callId: $callId, sender: $sender, routeId: $routeId)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(message), callId, sender, routeId); - @override - String toString() { - return 'VeilidUpdate.appCall(message: $message, callId: $callId, sender: $sender, routeId: $routeId)'; - } } /// @nodoc -abstract mixin class $VeilidAppCallCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidAppCallCopyWith( - VeilidAppCall value, $Res Function(VeilidAppCall) _then) = - _$VeilidAppCallCopyWithImpl; - @useResult - $Res call( - {@Uint8ListJsonConverter.jsIsArray() Uint8List message, - String callId, - PublicKey? sender, - String? routeId}); -} +abstract mixin class $VeilidAppCallCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidAppCallCopyWith(VeilidAppCall value, $Res Function(VeilidAppCall) _then) = _$VeilidAppCallCopyWithImpl; +@useResult +$Res call({ +@Uint8ListJsonConverter.jsIsArray() Uint8List message, String callId, PublicKey? sender, String? routeId +}); + + + +} /// @nodoc class _$VeilidAppCallCopyWithImpl<$Res> implements $VeilidAppCallCopyWith<$Res> { @@ -2876,115 +3118,78 @@ class _$VeilidAppCallCopyWithImpl<$Res> final VeilidAppCall _self; final $Res Function(VeilidAppCall) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? message = null, - Object? callId = null, - Object? sender = freezed, - Object? routeId = freezed, - }) { - return _then(VeilidAppCall( - message: null == message - ? _self.message - : message // ignore: cast_nullable_to_non_nullable - as Uint8List, - callId: null == callId - ? _self.callId - : callId // ignore: cast_nullable_to_non_nullable - as String, - sender: freezed == sender - ? _self.sender - : sender // ignore: cast_nullable_to_non_nullable - as PublicKey?, - routeId: freezed == routeId - ? _self.routeId - : routeId // ignore: cast_nullable_to_non_nullable - as String?, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? message = null,Object? callId = null,Object? sender = freezed,Object? routeId = freezed,}) { + return _then(VeilidAppCall( +message: null == message ? _self.message : message // ignore: cast_nullable_to_non_nullable +as Uint8List,callId: null == callId ? _self.callId : callId // ignore: cast_nullable_to_non_nullable +as String,sender: freezed == sender ? _self.sender : sender // ignore: cast_nullable_to_non_nullable +as PublicKey?,routeId: freezed == routeId ? _self.routeId : routeId // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidUpdateAttachment implements VeilidUpdate { - const VeilidUpdateAttachment( - {required this.state, - required this.publicInternetReady, - required this.localNetworkReady, - required this.uptime, - required this.attachedUptime, - final String? $type}) - : $type = $type ?? 'Attachment'; - factory VeilidUpdateAttachment.fromJson(Map json) => - _$VeilidUpdateAttachmentFromJson(json); + const VeilidUpdateAttachment({required this.state, required this.publicInternetReady, required this.localNetworkReady, required this.uptime, required this.attachedUptime, final String? $type}): $type = $type ?? 'Attachment'; + factory VeilidUpdateAttachment.fromJson(Map json) => _$VeilidUpdateAttachmentFromJson(json); - final AttachmentState state; - final bool publicInternetReady; - final bool localNetworkReady; - final TimestampDuration uptime; - final TimestampDuration? attachedUptime; + final AttachmentState state; + final bool publicInternetReady; + final bool localNetworkReady; + final TimestampDuration uptime; + final TimestampDuration? attachedUptime; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidUpdateAttachmentCopyWith get copyWith => - _$VeilidUpdateAttachmentCopyWithImpl( - this, _$identity); - @override - Map toJson() { - return _$VeilidUpdateAttachmentToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidUpdateAttachmentCopyWith get copyWith => _$VeilidUpdateAttachmentCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidUpdateAttachment && - (identical(other.state, state) || other.state == state) && - (identical(other.publicInternetReady, publicInternetReady) || - other.publicInternetReady == publicInternetReady) && - (identical(other.localNetworkReady, localNetworkReady) || - other.localNetworkReady == localNetworkReady) && - (identical(other.uptime, uptime) || other.uptime == uptime) && - (identical(other.attachedUptime, attachedUptime) || - other.attachedUptime == attachedUptime)); - } +@override +Map toJson() { + return _$VeilidUpdateAttachmentToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdateAttachment&&(identical(other.state, state) || other.state == state)&&(identical(other.publicInternetReady, publicInternetReady) || other.publicInternetReady == publicInternetReady)&&(identical(other.localNetworkReady, localNetworkReady) || other.localNetworkReady == localNetworkReady)&&(identical(other.uptime, uptime) || other.uptime == uptime)&&(identical(other.attachedUptime, attachedUptime) || other.attachedUptime == attachedUptime)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,state,publicInternetReady,localNetworkReady,uptime,attachedUptime); + +@override +String toString() { + return 'VeilidUpdate.attachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, state, publicInternetReady, - localNetworkReady, uptime, attachedUptime); - @override - String toString() { - return 'VeilidUpdate.attachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; - } } /// @nodoc -abstract mixin class $VeilidUpdateAttachmentCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidUpdateAttachmentCopyWith(VeilidUpdateAttachment value, - $Res Function(VeilidUpdateAttachment) _then) = - _$VeilidUpdateAttachmentCopyWithImpl; - @useResult - $Res call( - {AttachmentState state, - bool publicInternetReady, - bool localNetworkReady, - TimestampDuration uptime, - TimestampDuration? attachedUptime}); -} +abstract mixin class $VeilidUpdateAttachmentCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidUpdateAttachmentCopyWith(VeilidUpdateAttachment value, $Res Function(VeilidUpdateAttachment) _then) = _$VeilidUpdateAttachmentCopyWithImpl; +@useResult +$Res call({ + AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime +}); + + + +} /// @nodoc class _$VeilidUpdateAttachmentCopyWithImpl<$Res> implements $VeilidUpdateAttachmentCopyWith<$Res> { @@ -2993,115 +3198,84 @@ class _$VeilidUpdateAttachmentCopyWithImpl<$Res> final VeilidUpdateAttachment _self; final $Res Function(VeilidUpdateAttachment) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? state = null, - Object? publicInternetReady = null, - Object? localNetworkReady = null, - Object? uptime = null, - Object? attachedUptime = freezed, - }) { - return _then(VeilidUpdateAttachment( - state: null == state - ? _self.state - : state // ignore: cast_nullable_to_non_nullable - as AttachmentState, - publicInternetReady: null == publicInternetReady - ? _self.publicInternetReady - : publicInternetReady // ignore: cast_nullable_to_non_nullable - as bool, - localNetworkReady: null == localNetworkReady - ? _self.localNetworkReady - : localNetworkReady // ignore: cast_nullable_to_non_nullable - as bool, - uptime: null == uptime - ? _self.uptime - : uptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - attachedUptime: freezed == attachedUptime - ? _self.attachedUptime - : attachedUptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration?, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? state = null,Object? publicInternetReady = null,Object? localNetworkReady = null,Object? uptime = null,Object? attachedUptime = freezed,}) { + return _then(VeilidUpdateAttachment( +state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable +as AttachmentState,publicInternetReady: null == publicInternetReady ? _self.publicInternetReady : publicInternetReady // ignore: cast_nullable_to_non_nullable +as bool,localNetworkReady: null == localNetworkReady ? _self.localNetworkReady : localNetworkReady // ignore: cast_nullable_to_non_nullable +as bool,uptime: null == uptime ? _self.uptime : uptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration,attachedUptime: freezed == attachedUptime ? _self.attachedUptime : attachedUptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration?, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidUpdateNetwork implements VeilidUpdate { - const VeilidUpdateNetwork( - {required this.started, - required this.bpsDown, - required this.bpsUp, - required final List peers, - final String? $type}) - : _peers = peers, - $type = $type ?? 'Network'; - factory VeilidUpdateNetwork.fromJson(Map json) => - _$VeilidUpdateNetworkFromJson(json); + const VeilidUpdateNetwork({required this.started, required this.bpsDown, required this.bpsUp, required final List peers, final String? $type}): _peers = peers,$type = $type ?? 'Network'; + factory VeilidUpdateNetwork.fromJson(Map json) => _$VeilidUpdateNetworkFromJson(json); - final bool started; - final BigInt bpsDown; - final BigInt bpsUp; - final List _peers; - List get peers { - if (_peers is EqualUnmodifiableListView) return _peers; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_peers); - } + final bool started; + final BigInt bpsDown; + final BigInt bpsUp; + final List _peers; + List get peers { + if (_peers is EqualUnmodifiableListView) return _peers; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_peers); +} - @JsonKey(name: 'kind') - final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidUpdateNetworkCopyWith get copyWith => - _$VeilidUpdateNetworkCopyWithImpl(this, _$identity); +@JsonKey(name: 'kind') +final String $type; - @override - Map toJson() { - return _$VeilidUpdateNetworkToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidUpdateNetwork && - (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)); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidUpdateNetworkCopyWith get copyWith => _$VeilidUpdateNetworkCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$VeilidUpdateNetworkToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdateNetwork&&(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(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,started,bpsDown,bpsUp,const DeepCollectionEquality().hash(_peers)); + +@override +String toString() { + return 'VeilidUpdate.network(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, started, bpsDown, bpsUp, - const DeepCollectionEquality().hash(_peers)); - @override - String toString() { - return 'VeilidUpdate.network(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; - } } /// @nodoc -abstract mixin class $VeilidUpdateNetworkCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidUpdateNetworkCopyWith( - VeilidUpdateNetwork value, $Res Function(VeilidUpdateNetwork) _then) = - _$VeilidUpdateNetworkCopyWithImpl; - @useResult - $Res call( - {bool started, BigInt bpsDown, BigInt bpsUp, List peers}); -} +abstract mixin class $VeilidUpdateNetworkCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidUpdateNetworkCopyWith(VeilidUpdateNetwork value, $Res Function(VeilidUpdateNetwork) _then) = _$VeilidUpdateNetworkCopyWithImpl; +@useResult +$Res call({ + bool started, BigInt bpsDown, BigInt bpsUp, List peers +}); + + + +} /// @nodoc class _$VeilidUpdateNetworkCopyWithImpl<$Res> implements $VeilidUpdateNetworkCopyWith<$Res> { @@ -3110,93 +3284,74 @@ class _$VeilidUpdateNetworkCopyWithImpl<$Res> final VeilidUpdateNetwork _self; final $Res Function(VeilidUpdateNetwork) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? started = null, - Object? bpsDown = null, - Object? bpsUp = null, - Object? peers = null, - }) { - return _then(VeilidUpdateNetwork( - started: null == started - ? _self.started - : started // ignore: cast_nullable_to_non_nullable - as bool, - bpsDown: null == bpsDown - ? _self.bpsDown - : bpsDown // ignore: cast_nullable_to_non_nullable - as BigInt, - bpsUp: null == bpsUp - ? _self.bpsUp - : bpsUp // ignore: cast_nullable_to_non_nullable - as BigInt, - peers: null == peers - ? _self._peers - : peers // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? started = null,Object? bpsDown = null,Object? bpsUp = null,Object? peers = null,}) { + return _then(VeilidUpdateNetwork( +started: null == started ? _self.started : started // ignore: cast_nullable_to_non_nullable +as bool,bpsDown: null == bpsDown ? _self.bpsDown : bpsDown // ignore: cast_nullable_to_non_nullable +as BigInt,bpsUp: null == bpsUp ? _self.bpsUp : bpsUp // ignore: cast_nullable_to_non_nullable +as BigInt,peers: null == peers ? _self._peers : peers // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidUpdateConfig implements VeilidUpdate { - const VeilidUpdateConfig({required this.config, final String? $type}) - : $type = $type ?? 'Config'; - factory VeilidUpdateConfig.fromJson(Map json) => - _$VeilidUpdateConfigFromJson(json); + const VeilidUpdateConfig({required this.config, final String? $type}): $type = $type ?? 'Config'; + factory VeilidUpdateConfig.fromJson(Map json) => _$VeilidUpdateConfigFromJson(json); - final VeilidConfig config; + final VeilidConfig config; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidUpdateConfigCopyWith get copyWith => - _$VeilidUpdateConfigCopyWithImpl(this, _$identity); - @override - Map toJson() { - return _$VeilidUpdateConfigToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidUpdateConfigCopyWith get copyWith => _$VeilidUpdateConfigCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidUpdateConfig && - (identical(other.config, config) || other.config == config)); - } +@override +Map toJson() { + return _$VeilidUpdateConfigToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdateConfig&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,config); + +@override +String toString() { + return 'VeilidUpdate.config(config: $config)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, config); - @override - String toString() { - return 'VeilidUpdate.config(config: $config)'; - } } /// @nodoc -abstract mixin class $VeilidUpdateConfigCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidUpdateConfigCopyWith( - VeilidUpdateConfig value, $Res Function(VeilidUpdateConfig) _then) = - _$VeilidUpdateConfigCopyWithImpl; - @useResult - $Res call({VeilidConfig config}); +abstract mixin class $VeilidUpdateConfigCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidUpdateConfigCopyWith(VeilidUpdateConfig value, $Res Function(VeilidUpdateConfig) _then) = _$VeilidUpdateConfigCopyWithImpl; +@useResult +$Res call({ + VeilidConfig config +}); + + +$VeilidConfigCopyWith<$Res> get config; - $VeilidConfigCopyWith<$Res> get config; } - /// @nodoc class _$VeilidUpdateConfigCopyWithImpl<$Res> implements $VeilidUpdateConfigCopyWith<$Res> { @@ -3205,111 +3360,93 @@ class _$VeilidUpdateConfigCopyWithImpl<$Res> final VeilidUpdateConfig _self; final $Res Function(VeilidUpdateConfig) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? config = null, - }) { - return _then(VeilidUpdateConfig( - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as VeilidConfig, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? config = null,}) { + return _then(VeilidUpdateConfig( +config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as VeilidConfig, + )); +} - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigCopyWith<$Res> get config { - return $VeilidConfigCopyWith<$Res>(_self.config, (value) { - return _then(_self.copyWith(config: value)); - }); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigCopyWith<$Res> get config { + + return $VeilidConfigCopyWith<$Res>(_self.config, (value) { + return _then(_self.copyWith(config: value)); + }); +} } /// @nodoc @JsonSerializable() + class VeilidUpdateRouteChange implements VeilidUpdate { - const VeilidUpdateRouteChange( - {required final List deadRoutes, - required final List deadRemoteRoutes, - final String? $type}) - : _deadRoutes = deadRoutes, - _deadRemoteRoutes = deadRemoteRoutes, - $type = $type ?? 'RouteChange'; - factory VeilidUpdateRouteChange.fromJson(Map json) => - _$VeilidUpdateRouteChangeFromJson(json); + const VeilidUpdateRouteChange({required final List deadRoutes, required final List deadRemoteRoutes, final String? $type}): _deadRoutes = deadRoutes,_deadRemoteRoutes = deadRemoteRoutes,$type = $type ?? 'RouteChange'; + factory VeilidUpdateRouteChange.fromJson(Map json) => _$VeilidUpdateRouteChangeFromJson(json); - final List _deadRoutes; - List get deadRoutes { - if (_deadRoutes is EqualUnmodifiableListView) return _deadRoutes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_deadRoutes); - } + final List _deadRoutes; + List get deadRoutes { + if (_deadRoutes is EqualUnmodifiableListView) return _deadRoutes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_deadRoutes); +} - final List _deadRemoteRoutes; - List get deadRemoteRoutes { - if (_deadRemoteRoutes is EqualUnmodifiableListView) - return _deadRemoteRoutes; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_deadRemoteRoutes); - } + final List _deadRemoteRoutes; + List get deadRemoteRoutes { + if (_deadRemoteRoutes is EqualUnmodifiableListView) return _deadRemoteRoutes; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_deadRemoteRoutes); +} - @JsonKey(name: 'kind') - final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidUpdateRouteChangeCopyWith get copyWith => - _$VeilidUpdateRouteChangeCopyWithImpl( - this, _$identity); +@JsonKey(name: 'kind') +final String $type; - @override - Map toJson() { - return _$VeilidUpdateRouteChangeToJson( - this, - ); - } - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidUpdateRouteChange && - const DeepCollectionEquality() - .equals(other._deadRoutes, _deadRoutes) && - const DeepCollectionEquality() - .equals(other._deadRemoteRoutes, _deadRemoteRoutes)); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidUpdateRouteChangeCopyWith get copyWith => _$VeilidUpdateRouteChangeCopyWithImpl(this, _$identity); + +@override +Map toJson() { + return _$VeilidUpdateRouteChangeToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdateRouteChange&&const DeepCollectionEquality().equals(other._deadRoutes, _deadRoutes)&&const DeepCollectionEquality().equals(other._deadRemoteRoutes, _deadRemoteRoutes)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,const DeepCollectionEquality().hash(_deadRoutes),const DeepCollectionEquality().hash(_deadRemoteRoutes)); + +@override +String toString() { + return 'VeilidUpdate.routeChange(deadRoutes: $deadRoutes, deadRemoteRoutes: $deadRemoteRoutes)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_deadRoutes), - const DeepCollectionEquality().hash(_deadRemoteRoutes)); - @override - String toString() { - return 'VeilidUpdate.routeChange(deadRoutes: $deadRoutes, deadRemoteRoutes: $deadRemoteRoutes)'; - } } /// @nodoc -abstract mixin class $VeilidUpdateRouteChangeCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidUpdateRouteChangeCopyWith(VeilidUpdateRouteChange value, - $Res Function(VeilidUpdateRouteChange) _then) = - _$VeilidUpdateRouteChangeCopyWithImpl; - @useResult - $Res call({List deadRoutes, List deadRemoteRoutes}); -} +abstract mixin class $VeilidUpdateRouteChangeCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidUpdateRouteChangeCopyWith(VeilidUpdateRouteChange value, $Res Function(VeilidUpdateRouteChange) _then) = _$VeilidUpdateRouteChangeCopyWithImpl; +@useResult +$Res call({ + List deadRoutes, List deadRemoteRoutes +}); + + + +} /// @nodoc class _$VeilidUpdateRouteChangeCopyWithImpl<$Res> implements $VeilidUpdateRouteChangeCopyWith<$Res> { @@ -3318,107 +3455,81 @@ class _$VeilidUpdateRouteChangeCopyWithImpl<$Res> final VeilidUpdateRouteChange _self; final $Res Function(VeilidUpdateRouteChange) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? deadRoutes = null, - Object? deadRemoteRoutes = null, - }) { - return _then(VeilidUpdateRouteChange( - deadRoutes: null == deadRoutes - ? _self._deadRoutes - : deadRoutes // ignore: cast_nullable_to_non_nullable - as List, - deadRemoteRoutes: null == deadRemoteRoutes - ? _self._deadRemoteRoutes - : deadRemoteRoutes // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? deadRoutes = null,Object? deadRemoteRoutes = null,}) { + return _then(VeilidUpdateRouteChange( +deadRoutes: null == deadRoutes ? _self._deadRoutes : deadRoutes // ignore: cast_nullable_to_non_nullable +as List,deadRemoteRoutes: null == deadRemoteRoutes ? _self._deadRemoteRoutes : deadRemoteRoutes // ignore: cast_nullable_to_non_nullable +as List, + )); +} + + } /// @nodoc @JsonSerializable() + class VeilidUpdateValueChange implements VeilidUpdate { - const VeilidUpdateValueChange( - {required this.key, - required final List subkeys, - required this.count, - required this.value, - final String? $type}) - : _subkeys = subkeys, - $type = $type ?? 'ValueChange'; - factory VeilidUpdateValueChange.fromJson(Map json) => - _$VeilidUpdateValueChangeFromJson(json); + const VeilidUpdateValueChange({required this.key, required final List subkeys, required this.count, required this.value, final String? $type}): _subkeys = subkeys,$type = $type ?? 'ValueChange'; + factory VeilidUpdateValueChange.fromJson(Map json) => _$VeilidUpdateValueChangeFromJson(json); - final RecordKey key; - final List _subkeys; - List get subkeys { - if (_subkeys is EqualUnmodifiableListView) return _subkeys; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_subkeys); - } + final RecordKey key; + final List _subkeys; + List get subkeys { + if (_subkeys is EqualUnmodifiableListView) return _subkeys; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_subkeys); +} - final int count; - final ValueData? value; + final int count; + final ValueData? value; - @JsonKey(name: 'kind') - final String $type; +@JsonKey(name: 'kind') +final String $type; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidUpdateValueChangeCopyWith get copyWith => - _$VeilidUpdateValueChangeCopyWithImpl( - this, _$identity); - @override - Map toJson() { - return _$VeilidUpdateValueChangeToJson( - this, - ); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidUpdateValueChangeCopyWith get copyWith => _$VeilidUpdateValueChangeCopyWithImpl(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidUpdateValueChange && - (identical(other.key, key) || other.key == key) && - const DeepCollectionEquality().equals(other._subkeys, _subkeys) && - (identical(other.count, count) || other.count == count) && - (identical(other.value, value) || other.value == value)); - } +@override +Map toJson() { + return _$VeilidUpdateValueChangeToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidUpdateValueChange&&(identical(other.key, key) || other.key == key)&&const DeepCollectionEquality().equals(other._subkeys, _subkeys)&&(identical(other.count, count) || other.count == count)&&(identical(other.value, value) || other.value == value)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,const DeepCollectionEquality().hash(_subkeys),count,value); + +@override +String toString() { + return 'VeilidUpdate.valueChange(key: $key, subkeys: $subkeys, count: $count, value: $value)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, key, - const DeepCollectionEquality().hash(_subkeys), count, value); - @override - String toString() { - return 'VeilidUpdate.valueChange(key: $key, subkeys: $subkeys, count: $count, value: $value)'; - } } /// @nodoc -abstract mixin class $VeilidUpdateValueChangeCopyWith<$Res> - implements $VeilidUpdateCopyWith<$Res> { - factory $VeilidUpdateValueChangeCopyWith(VeilidUpdateValueChange value, - $Res Function(VeilidUpdateValueChange) _then) = - _$VeilidUpdateValueChangeCopyWithImpl; - @useResult - $Res call( - {RecordKey key, - List subkeys, - int count, - ValueData? value}); +abstract mixin class $VeilidUpdateValueChangeCopyWith<$Res> implements $VeilidUpdateCopyWith<$Res> { + factory $VeilidUpdateValueChangeCopyWith(VeilidUpdateValueChange value, $Res Function(VeilidUpdateValueChange) _then) = _$VeilidUpdateValueChangeCopyWithImpl; +@useResult +$Res call({ + RecordKey key, List subkeys, int count, ValueData? value +}); + + +$ValueDataCopyWith<$Res>? get value; - $ValueDataCopyWith<$Res>? get value; } - /// @nodoc class _$VeilidUpdateValueChangeCopyWithImpl<$Res> implements $VeilidUpdateValueChangeCopyWith<$Res> { @@ -3427,109 +3538,77 @@ class _$VeilidUpdateValueChangeCopyWithImpl<$Res> final VeilidUpdateValueChange _self; final $Res Function(VeilidUpdateValueChange) _then; - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - $Res call({ - Object? key = null, - Object? subkeys = null, - Object? count = null, - Object? value = freezed, - }) { - return _then(VeilidUpdateValueChange( - key: null == key - ? _self.key - : key // ignore: cast_nullable_to_non_nullable - as RecordKey, - subkeys: null == subkeys - ? _self._subkeys - : subkeys // ignore: cast_nullable_to_non_nullable - as List, - count: null == count - ? _self.count - : count // ignore: cast_nullable_to_non_nullable - as int, - value: freezed == value - ? _self.value - : value // ignore: cast_nullable_to_non_nullable - as ValueData?, - )); - } - - /// Create a copy of VeilidUpdate - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $ValueDataCopyWith<$Res>? get value { - if (_self.value == null) { - return null; - } - - return $ValueDataCopyWith<$Res>(_self.value!, (value) { - return _then(_self.copyWith(value: value)); - }); - } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? key = null,Object? subkeys = null,Object? count = null,Object? value = freezed,}) { + return _then(VeilidUpdateValueChange( +key: null == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as RecordKey,subkeys: null == subkeys ? _self._subkeys : subkeys // ignore: cast_nullable_to_non_nullable +as List,count: null == count ? _self.count : count // ignore: cast_nullable_to_non_nullable +as int,value: freezed == value ? _self.value : value // ignore: cast_nullable_to_non_nullable +as ValueData?, + )); } +/// Create a copy of VeilidUpdate +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ValueDataCopyWith<$Res>? get value { + if (_self.value == null) { + return null; + } + + return $ValueDataCopyWith<$Res>(_self.value!, (value) { + return _then(_self.copyWith(value: value)); + }); +} +} + + /// @nodoc mixin _$VeilidStateAttachment { - AttachmentState get state; - bool get publicInternetReady; - bool get localNetworkReady; - TimestampDuration get uptime; - TimestampDuration? get attachedUptime; - /// Create a copy of VeilidStateAttachment - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidStateAttachmentCopyWith get copyWith => - _$VeilidStateAttachmentCopyWithImpl( - this as VeilidStateAttachment, _$identity); + AttachmentState get state; bool get publicInternetReady; bool get localNetworkReady; TimestampDuration get uptime; TimestampDuration? get attachedUptime; +/// Create a copy of VeilidStateAttachment +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidStateAttachmentCopyWith get copyWith => _$VeilidStateAttachmentCopyWithImpl(this as VeilidStateAttachment, _$identity); /// Serializes this VeilidStateAttachment to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidStateAttachment && - (identical(other.state, state) || other.state == state) && - (identical(other.publicInternetReady, publicInternetReady) || - other.publicInternetReady == publicInternetReady) && - (identical(other.localNetworkReady, localNetworkReady) || - other.localNetworkReady == localNetworkReady) && - (identical(other.uptime, uptime) || other.uptime == uptime) && - (identical(other.attachedUptime, attachedUptime) || - other.attachedUptime == attachedUptime)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, state, publicInternetReady, - localNetworkReady, uptime, attachedUptime); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidStateAttachment&&(identical(other.state, state) || other.state == state)&&(identical(other.publicInternetReady, publicInternetReady) || other.publicInternetReady == publicInternetReady)&&(identical(other.localNetworkReady, localNetworkReady) || other.localNetworkReady == localNetworkReady)&&(identical(other.uptime, uptime) || other.uptime == uptime)&&(identical(other.attachedUptime, attachedUptime) || other.attachedUptime == attachedUptime)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,state,publicInternetReady,localNetworkReady,uptime,attachedUptime); + +@override +String toString() { + return 'VeilidStateAttachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; +} + - @override - String toString() { - return 'VeilidStateAttachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; - } } /// @nodoc -abstract mixin class $VeilidStateAttachmentCopyWith<$Res> { - factory $VeilidStateAttachmentCopyWith(VeilidStateAttachment value, - $Res Function(VeilidStateAttachment) _then) = - _$VeilidStateAttachmentCopyWithImpl; - @useResult - $Res call( - {AttachmentState state, - bool publicInternetReady, - bool localNetworkReady, - TimestampDuration uptime, - TimestampDuration? attachedUptime}); -} +abstract mixin class $VeilidStateAttachmentCopyWith<$Res> { + factory $VeilidStateAttachmentCopyWith(VeilidStateAttachment value, $Res Function(VeilidStateAttachment) _then) = _$VeilidStateAttachmentCopyWithImpl; +@useResult +$Res call({ + AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime +}); + + + +} /// @nodoc class _$VeilidStateAttachmentCopyWithImpl<$Res> implements $VeilidStateAttachmentCopyWith<$Res> { @@ -3538,123 +3617,199 @@ class _$VeilidStateAttachmentCopyWithImpl<$Res> final VeilidStateAttachment _self; final $Res Function(VeilidStateAttachment) _then; - /// Create a copy of VeilidStateAttachment - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? state = null, - Object? publicInternetReady = null, - Object? localNetworkReady = null, - Object? uptime = null, - Object? attachedUptime = freezed, - }) { - return _then(_self.copyWith( - state: null == state - ? _self.state - : state // ignore: cast_nullable_to_non_nullable - as AttachmentState, - publicInternetReady: null == publicInternetReady - ? _self.publicInternetReady - : publicInternetReady // ignore: cast_nullable_to_non_nullable - as bool, - localNetworkReady: null == localNetworkReady - ? _self.localNetworkReady - : localNetworkReady // ignore: cast_nullable_to_non_nullable - as bool, - uptime: null == uptime - ? _self.uptime - : uptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - attachedUptime: freezed == attachedUptime - ? _self.attachedUptime - : attachedUptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration?, - )); - } +/// Create a copy of VeilidStateAttachment +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? state = null,Object? publicInternetReady = null,Object? localNetworkReady = null,Object? uptime = null,Object? attachedUptime = freezed,}) { + return _then(_self.copyWith( +state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable +as AttachmentState,publicInternetReady: null == publicInternetReady ? _self.publicInternetReady : publicInternetReady // ignore: cast_nullable_to_non_nullable +as bool,localNetworkReady: null == localNetworkReady ? _self.localNetworkReady : localNetworkReady // ignore: cast_nullable_to_non_nullable +as bool,uptime: null == uptime ? _self.uptime : uptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration,attachedUptime: freezed == attachedUptime ? _self.attachedUptime : attachedUptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidStateAttachment]. +extension VeilidStateAttachmentPatterns on VeilidStateAttachment { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidStateAttachment value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidStateAttachment() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidStateAttachment value) $default,){ +final _that = this; +switch (_that) { +case _VeilidStateAttachment(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidStateAttachment value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidStateAttachment() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidStateAttachment() when $default != null: +return $default(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime) $default,) {final _that = this; +switch (_that) { +case _VeilidStateAttachment(): +return $default(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime)? $default,) {final _that = this; +switch (_that) { +case _VeilidStateAttachment() when $default != null: +return $default(_that.state,_that.publicInternetReady,_that.localNetworkReady,_that.uptime,_that.attachedUptime);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidStateAttachment implements VeilidStateAttachment { - const _VeilidStateAttachment( - {required this.state, - required this.publicInternetReady, - required this.localNetworkReady, - required this.uptime, - required this.attachedUptime}); - factory _VeilidStateAttachment.fromJson(Map json) => - _$VeilidStateAttachmentFromJson(json); + const _VeilidStateAttachment({required this.state, required this.publicInternetReady, required this.localNetworkReady, required this.uptime, required this.attachedUptime}); + factory _VeilidStateAttachment.fromJson(Map json) => _$VeilidStateAttachmentFromJson(json); - @override - final AttachmentState state; - @override - final bool publicInternetReady; - @override - final bool localNetworkReady; - @override - final TimestampDuration uptime; - @override - final TimestampDuration? attachedUptime; +@override final AttachmentState state; +@override final bool publicInternetReady; +@override final bool localNetworkReady; +@override final TimestampDuration uptime; +@override final TimestampDuration? attachedUptime; - /// Create a copy of VeilidStateAttachment - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidStateAttachmentCopyWith<_VeilidStateAttachment> get copyWith => - __$VeilidStateAttachmentCopyWithImpl<_VeilidStateAttachment>( - this, _$identity); +/// Create a copy of VeilidStateAttachment +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidStateAttachmentCopyWith<_VeilidStateAttachment> get copyWith => __$VeilidStateAttachmentCopyWithImpl<_VeilidStateAttachment>(this, _$identity); - @override - Map toJson() { - return _$VeilidStateAttachmentToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidStateAttachmentToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidStateAttachment && - (identical(other.state, state) || other.state == state) && - (identical(other.publicInternetReady, publicInternetReady) || - other.publicInternetReady == publicInternetReady) && - (identical(other.localNetworkReady, localNetworkReady) || - other.localNetworkReady == localNetworkReady) && - (identical(other.uptime, uptime) || other.uptime == uptime) && - (identical(other.attachedUptime, attachedUptime) || - other.attachedUptime == attachedUptime)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidStateAttachment&&(identical(other.state, state) || other.state == state)&&(identical(other.publicInternetReady, publicInternetReady) || other.publicInternetReady == publicInternetReady)&&(identical(other.localNetworkReady, localNetworkReady) || other.localNetworkReady == localNetworkReady)&&(identical(other.uptime, uptime) || other.uptime == uptime)&&(identical(other.attachedUptime, attachedUptime) || other.attachedUptime == attachedUptime)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,state,publicInternetReady,localNetworkReady,uptime,attachedUptime); + +@override +String toString() { + return 'VeilidStateAttachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, state, publicInternetReady, - localNetworkReady, uptime, attachedUptime); - @override - String toString() { - return 'VeilidStateAttachment(state: $state, publicInternetReady: $publicInternetReady, localNetworkReady: $localNetworkReady, uptime: $uptime, attachedUptime: $attachedUptime)'; - } } /// @nodoc -abstract mixin class _$VeilidStateAttachmentCopyWith<$Res> - implements $VeilidStateAttachmentCopyWith<$Res> { - factory _$VeilidStateAttachmentCopyWith(_VeilidStateAttachment value, - $Res Function(_VeilidStateAttachment) _then) = - __$VeilidStateAttachmentCopyWithImpl; - @override - @useResult - $Res call( - {AttachmentState state, - bool publicInternetReady, - bool localNetworkReady, - TimestampDuration uptime, - TimestampDuration? attachedUptime}); -} +abstract mixin class _$VeilidStateAttachmentCopyWith<$Res> implements $VeilidStateAttachmentCopyWith<$Res> { + factory _$VeilidStateAttachmentCopyWith(_VeilidStateAttachment value, $Res Function(_VeilidStateAttachment) _then) = __$VeilidStateAttachmentCopyWithImpl; +@override @useResult +$Res call({ + AttachmentState state, bool publicInternetReady, bool localNetworkReady, TimestampDuration uptime, TimestampDuration? attachedUptime +}); + + + +} /// @nodoc class __$VeilidStateAttachmentCopyWithImpl<$Res> implements _$VeilidStateAttachmentCopyWith<$Res> { @@ -3663,92 +3818,66 @@ class __$VeilidStateAttachmentCopyWithImpl<$Res> final _VeilidStateAttachment _self; final $Res Function(_VeilidStateAttachment) _then; - /// Create a copy of VeilidStateAttachment - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? state = null, - Object? publicInternetReady = null, - Object? localNetworkReady = null, - Object? uptime = null, - Object? attachedUptime = freezed, - }) { - return _then(_VeilidStateAttachment( - state: null == state - ? _self.state - : state // ignore: cast_nullable_to_non_nullable - as AttachmentState, - publicInternetReady: null == publicInternetReady - ? _self.publicInternetReady - : publicInternetReady // ignore: cast_nullable_to_non_nullable - as bool, - localNetworkReady: null == localNetworkReady - ? _self.localNetworkReady - : localNetworkReady // ignore: cast_nullable_to_non_nullable - as bool, - uptime: null == uptime - ? _self.uptime - : uptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration, - attachedUptime: freezed == attachedUptime - ? _self.attachedUptime - : attachedUptime // ignore: cast_nullable_to_non_nullable - as TimestampDuration?, - )); - } +/// Create a copy of VeilidStateAttachment +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? state = null,Object? publicInternetReady = null,Object? localNetworkReady = null,Object? uptime = null,Object? attachedUptime = freezed,}) { + return _then(_VeilidStateAttachment( +state: null == state ? _self.state : state // ignore: cast_nullable_to_non_nullable +as AttachmentState,publicInternetReady: null == publicInternetReady ? _self.publicInternetReady : publicInternetReady // ignore: cast_nullable_to_non_nullable +as bool,localNetworkReady: null == localNetworkReady ? _self.localNetworkReady : localNetworkReady // ignore: cast_nullable_to_non_nullable +as bool,uptime: null == uptime ? _self.uptime : uptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration,attachedUptime: freezed == attachedUptime ? _self.attachedUptime : attachedUptime // ignore: cast_nullable_to_non_nullable +as TimestampDuration?, + )); } + +} + + /// @nodoc mixin _$VeilidStateNetwork { - bool get started; - BigInt get bpsDown; - BigInt get bpsUp; - List get peers; - /// Create a copy of VeilidStateNetwork - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidStateNetworkCopyWith get copyWith => - _$VeilidStateNetworkCopyWithImpl( - this as VeilidStateNetwork, _$identity); + bool get started; BigInt get bpsDown; BigInt get bpsUp; List get peers; +/// Create a copy of VeilidStateNetwork +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidStateNetworkCopyWith get copyWith => _$VeilidStateNetworkCopyWithImpl(this as VeilidStateNetwork, _$identity); /// Serializes this VeilidStateNetwork to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidStateNetwork && - (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(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, started, bpsDown, bpsUp, - const DeepCollectionEquality().hash(peers)); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidStateNetwork&&(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(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,started,bpsDown,bpsUp,const DeepCollectionEquality().hash(peers)); + +@override +String toString() { + return 'VeilidStateNetwork(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; +} + - @override - String toString() { - return 'VeilidStateNetwork(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; - } } /// @nodoc -abstract mixin class $VeilidStateNetworkCopyWith<$Res> { - factory $VeilidStateNetworkCopyWith( - VeilidStateNetwork value, $Res Function(VeilidStateNetwork) _then) = - _$VeilidStateNetworkCopyWithImpl; - @useResult - $Res call( - {bool started, BigInt bpsDown, BigInt bpsUp, List peers}); -} +abstract mixin class $VeilidStateNetworkCopyWith<$Res> { + factory $VeilidStateNetworkCopyWith(VeilidStateNetwork value, $Res Function(VeilidStateNetwork) _then) = _$VeilidStateNetworkCopyWithImpl; +@useResult +$Res call({ + bool started, BigInt bpsDown, BigInt bpsUp, List peers +}); + + + +} /// @nodoc class _$VeilidStateNetworkCopyWithImpl<$Res> implements $VeilidStateNetworkCopyWith<$Res> { @@ -3757,112 +3886,203 @@ class _$VeilidStateNetworkCopyWithImpl<$Res> final VeilidStateNetwork _self; final $Res Function(VeilidStateNetwork) _then; - /// Create a copy of VeilidStateNetwork - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? started = null, - Object? bpsDown = null, - Object? bpsUp = null, - Object? peers = null, - }) { - return _then(_self.copyWith( - started: null == started - ? _self.started - : started // ignore: cast_nullable_to_non_nullable - as bool, - bpsDown: null == bpsDown - ? _self.bpsDown - : bpsDown // ignore: cast_nullable_to_non_nullable - as BigInt, - bpsUp: null == bpsUp - ? _self.bpsUp - : bpsUp // ignore: cast_nullable_to_non_nullable - as BigInt, - peers: null == peers - ? _self.peers - : peers // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidStateNetwork +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? started = null,Object? bpsDown = null,Object? bpsUp = null,Object? peers = null,}) { + return _then(_self.copyWith( +started: null == started ? _self.started : started // ignore: cast_nullable_to_non_nullable +as bool,bpsDown: null == bpsDown ? _self.bpsDown : bpsDown // ignore: cast_nullable_to_non_nullable +as BigInt,bpsUp: null == bpsUp ? _self.bpsUp : bpsUp // ignore: cast_nullable_to_non_nullable +as BigInt,peers: null == peers ? _self.peers : peers // ignore: cast_nullable_to_non_nullable +as List, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VeilidStateNetwork]. +extension VeilidStateNetworkPatterns on VeilidStateNetwork { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidStateNetwork value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidStateNetwork() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidStateNetwork value) $default,){ +final _that = this; +switch (_that) { +case _VeilidStateNetwork(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidStateNetwork value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidStateNetwork() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidStateNetwork() when $default != null: +return $default(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers) $default,) {final _that = this; +switch (_that) { +case _VeilidStateNetwork(): +return $default(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( bool started, BigInt bpsDown, BigInt bpsUp, List peers)? $default,) {final _that = this; +switch (_that) { +case _VeilidStateNetwork() when $default != null: +return $default(_that.started,_that.bpsDown,_that.bpsUp,_that.peers);case _: + return null; + +} +} + } /// @nodoc @JsonSerializable() + class _VeilidStateNetwork implements VeilidStateNetwork { - const _VeilidStateNetwork( - {required this.started, - required this.bpsDown, - required this.bpsUp, - required final List peers}) - : _peers = peers; - factory _VeilidStateNetwork.fromJson(Map json) => - _$VeilidStateNetworkFromJson(json); + const _VeilidStateNetwork({required this.started, required this.bpsDown, required this.bpsUp, required final List peers}): _peers = peers; + factory _VeilidStateNetwork.fromJson(Map json) => _$VeilidStateNetworkFromJson(json); - @override - final bool started; - @override - final BigInt bpsDown; - @override - final BigInt bpsUp; - final List _peers; - @override - List get peers { - if (_peers is EqualUnmodifiableListView) return _peers; - // ignore: implicit_dynamic_type - return EqualUnmodifiableListView(_peers); - } +@override final bool started; +@override final BigInt bpsDown; +@override final BigInt bpsUp; + final List _peers; +@override List get peers { + if (_peers is EqualUnmodifiableListView) return _peers; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(_peers); +} - /// Create a copy of VeilidStateNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidStateNetworkCopyWith<_VeilidStateNetwork> get copyWith => - __$VeilidStateNetworkCopyWithImpl<_VeilidStateNetwork>(this, _$identity); - @override - Map toJson() { - return _$VeilidStateNetworkToJson( - this, - ); - } +/// Create a copy of VeilidStateNetwork +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidStateNetworkCopyWith<_VeilidStateNetwork> get copyWith => __$VeilidStateNetworkCopyWithImpl<_VeilidStateNetwork>(this, _$identity); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidStateNetwork && - (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)); - } +@override +Map toJson() { + return _$VeilidStateNetworkToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidStateNetwork&&(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(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,started,bpsDown,bpsUp,const DeepCollectionEquality().hash(_peers)); + +@override +String toString() { + return 'VeilidStateNetwork(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, started, bpsDown, bpsUp, - const DeepCollectionEquality().hash(_peers)); - @override - String toString() { - return 'VeilidStateNetwork(started: $started, bpsDown: $bpsDown, bpsUp: $bpsUp, peers: $peers)'; - } } /// @nodoc -abstract mixin class _$VeilidStateNetworkCopyWith<$Res> - implements $VeilidStateNetworkCopyWith<$Res> { - factory _$VeilidStateNetworkCopyWith( - _VeilidStateNetwork value, $Res Function(_VeilidStateNetwork) _then) = - __$VeilidStateNetworkCopyWithImpl; - @override - @useResult - $Res call( - {bool started, BigInt bpsDown, BigInt bpsUp, List peers}); -} +abstract mixin class _$VeilidStateNetworkCopyWith<$Res> implements $VeilidStateNetworkCopyWith<$Res> { + factory _$VeilidStateNetworkCopyWith(_VeilidStateNetwork value, $Res Function(_VeilidStateNetwork) _then) = __$VeilidStateNetworkCopyWithImpl; +@override @useResult +$Res call({ + bool started, BigInt bpsDown, BigInt bpsUp, List peers +}); + + + +} /// @nodoc class __$VeilidStateNetworkCopyWithImpl<$Res> implements _$VeilidStateNetworkCopyWith<$Res> { @@ -3871,81 +4091,65 @@ class __$VeilidStateNetworkCopyWithImpl<$Res> final _VeilidStateNetwork _self; final $Res Function(_VeilidStateNetwork) _then; - /// Create a copy of VeilidStateNetwork - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? started = null, - Object? bpsDown = null, - Object? bpsUp = null, - Object? peers = null, - }) { - return _then(_VeilidStateNetwork( - started: null == started - ? _self.started - : started // ignore: cast_nullable_to_non_nullable - as bool, - bpsDown: null == bpsDown - ? _self.bpsDown - : bpsDown // ignore: cast_nullable_to_non_nullable - as BigInt, - bpsUp: null == bpsUp - ? _self.bpsUp - : bpsUp // ignore: cast_nullable_to_non_nullable - as BigInt, - peers: null == peers - ? _self._peers - : peers // ignore: cast_nullable_to_non_nullable - as List, - )); - } +/// Create a copy of VeilidStateNetwork +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? started = null,Object? bpsDown = null,Object? bpsUp = null,Object? peers = null,}) { + return _then(_VeilidStateNetwork( +started: null == started ? _self.started : started // ignore: cast_nullable_to_non_nullable +as bool,bpsDown: null == bpsDown ? _self.bpsDown : bpsDown // ignore: cast_nullable_to_non_nullable +as BigInt,bpsUp: null == bpsUp ? _self.bpsUp : bpsUp // ignore: cast_nullable_to_non_nullable +as BigInt,peers: null == peers ? _self._peers : peers // ignore: cast_nullable_to_non_nullable +as List, + )); } + +} + + /// @nodoc mixin _$VeilidStateConfig { - VeilidConfig get config; - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidStateConfigCopyWith get copyWith => - _$VeilidStateConfigCopyWithImpl( - this as VeilidStateConfig, _$identity); + VeilidConfig get config; +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidStateConfigCopyWith get copyWith => _$VeilidStateConfigCopyWithImpl(this as VeilidStateConfig, _$identity); /// Serializes this VeilidStateConfig to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidStateConfig && - (identical(other.config, config) || other.config == config)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, config); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidStateConfig&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,config); + +@override +String toString() { + return 'VeilidStateConfig(config: $config)'; +} + - @override - String toString() { - return 'VeilidStateConfig(config: $config)'; - } } /// @nodoc -abstract mixin class $VeilidStateConfigCopyWith<$Res> { - factory $VeilidStateConfigCopyWith( - VeilidStateConfig value, $Res Function(VeilidStateConfig) _then) = - _$VeilidStateConfigCopyWithImpl; - @useResult - $Res call({VeilidConfig config}); +abstract mixin class $VeilidStateConfigCopyWith<$Res> { + factory $VeilidStateConfigCopyWith(VeilidStateConfig value, $Res Function(VeilidStateConfig) _then) = _$VeilidStateConfigCopyWithImpl; +@useResult +$Res call({ + VeilidConfig config +}); + + +$VeilidConfigCopyWith<$Res> get config; - $VeilidConfigCopyWith<$Res> get config; } - /// @nodoc class _$VeilidStateConfigCopyWithImpl<$Res> implements $VeilidStateConfigCopyWith<$Res> { @@ -3954,89 +4158,200 @@ class _$VeilidStateConfigCopyWithImpl<$Res> final VeilidStateConfig _self; final $Res Function(VeilidStateConfig) _then; - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? config = null, - }) { - return _then(_self.copyWith( - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as VeilidConfig, - )); - } +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? config = null,}) { + return _then(_self.copyWith( +config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as VeilidConfig, + )); +} +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigCopyWith<$Res> get config { + + return $VeilidConfigCopyWith<$Res>(_self.config, (value) { + return _then(_self.copyWith(config: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [VeilidStateConfig]. +extension VeilidStateConfigPatterns on VeilidStateConfig { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidStateConfig value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidStateConfig() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidStateConfig value) $default,){ +final _that = this; +switch (_that) { +case _VeilidStateConfig(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidStateConfig value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidStateConfig() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidConfig config)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidStateConfig() when $default != null: +return $default(_that.config);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidConfig config) $default,) {final _that = this; +switch (_that) { +case _VeilidStateConfig(): +return $default(_that.config);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidConfig config)? $default,) {final _that = this; +switch (_that) { +case _VeilidStateConfig() when $default != null: +return $default(_that.config);case _: + return null; + +} +} - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigCopyWith<$Res> get config { - return $VeilidConfigCopyWith<$Res>(_self.config, (value) { - return _then(_self.copyWith(config: value)); - }); - } } /// @nodoc @JsonSerializable() + class _VeilidStateConfig implements VeilidStateConfig { const _VeilidStateConfig({required this.config}); - factory _VeilidStateConfig.fromJson(Map json) => - _$VeilidStateConfigFromJson(json); + factory _VeilidStateConfig.fromJson(Map json) => _$VeilidStateConfigFromJson(json); - @override - final VeilidConfig config; +@override final VeilidConfig config; - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidStateConfigCopyWith<_VeilidStateConfig> get copyWith => - __$VeilidStateConfigCopyWithImpl<_VeilidStateConfig>(this, _$identity); +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidStateConfigCopyWith<_VeilidStateConfig> get copyWith => __$VeilidStateConfigCopyWithImpl<_VeilidStateConfig>(this, _$identity); - @override - Map toJson() { - return _$VeilidStateConfigToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidStateConfigToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidStateConfig && - (identical(other.config, config) || other.config == config)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidStateConfig&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,config); + +@override +String toString() { + return 'VeilidStateConfig(config: $config)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, config); - @override - String toString() { - return 'VeilidStateConfig(config: $config)'; - } } /// @nodoc -abstract mixin class _$VeilidStateConfigCopyWith<$Res> - implements $VeilidStateConfigCopyWith<$Res> { - factory _$VeilidStateConfigCopyWith( - _VeilidStateConfig value, $Res Function(_VeilidStateConfig) _then) = - __$VeilidStateConfigCopyWithImpl; - @override - @useResult - $Res call({VeilidConfig config}); +abstract mixin class _$VeilidStateConfigCopyWith<$Res> implements $VeilidStateConfigCopyWith<$Res> { + factory _$VeilidStateConfigCopyWith(_VeilidStateConfig value, $Res Function(_VeilidStateConfig) _then) = __$VeilidStateConfigCopyWithImpl; +@override @useResult +$Res call({ + VeilidConfig config +}); + + +@override $VeilidConfigCopyWith<$Res> get config; - @override - $VeilidConfigCopyWith<$Res> get config; } - /// @nodoc class __$VeilidStateConfigCopyWithImpl<$Res> implements _$VeilidStateConfigCopyWith<$Res> { @@ -4045,281 +4360,342 @@ class __$VeilidStateConfigCopyWithImpl<$Res> final _VeilidStateConfig _self; final $Res Function(_VeilidStateConfig) _then; - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? config = null, - }) { - return _then(_VeilidStateConfig( - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as VeilidConfig, - )); - } - - /// Create a copy of VeilidStateConfig - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidConfigCopyWith<$Res> get config { - return $VeilidConfigCopyWith<$Res>(_self.config, (value) { - return _then(_self.copyWith(config: value)); - }); - } +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? config = null,}) { + return _then(_VeilidStateConfig( +config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as VeilidConfig, + )); } +/// Create a copy of VeilidStateConfig +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidConfigCopyWith<$Res> get config { + + return $VeilidConfigCopyWith<$Res>(_self.config, (value) { + return _then(_self.copyWith(config: value)); + }); +} +} + + /// @nodoc mixin _$VeilidState { - VeilidStateAttachment get attachment; - VeilidStateNetwork get network; - VeilidStateConfig get config; - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - $VeilidStateCopyWith get copyWith => - _$VeilidStateCopyWithImpl(this as VeilidState, _$identity); + VeilidStateAttachment get attachment; VeilidStateNetwork get network; VeilidStateConfig get config; +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VeilidStateCopyWith get copyWith => _$VeilidStateCopyWithImpl(this as VeilidState, _$identity); /// Serializes this VeilidState to a JSON map. Map toJson(); - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is VeilidState && - (identical(other.attachment, attachment) || - other.attachment == attachment) && - (identical(other.network, network) || other.network == network) && - (identical(other.config, config) || other.config == config)); - } - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, attachment, network, config); +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VeilidState&&(identical(other.attachment, attachment) || other.attachment == attachment)&&(identical(other.network, network) || other.network == network)&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,attachment,network,config); + +@override +String toString() { + return 'VeilidState(attachment: $attachment, network: $network, config: $config)'; +} + - @override - String toString() { - return 'VeilidState(attachment: $attachment, network: $network, config: $config)'; - } } /// @nodoc -abstract mixin class $VeilidStateCopyWith<$Res> { - factory $VeilidStateCopyWith( - VeilidState value, $Res Function(VeilidState) _then) = - _$VeilidStateCopyWithImpl; - @useResult - $Res call( - {VeilidStateAttachment attachment, - VeilidStateNetwork network, - VeilidStateConfig config}); +abstract mixin class $VeilidStateCopyWith<$Res> { + factory $VeilidStateCopyWith(VeilidState value, $Res Function(VeilidState) _then) = _$VeilidStateCopyWithImpl; +@useResult +$Res call({ + VeilidStateAttachment attachment, VeilidStateNetwork network, VeilidStateConfig config +}); + + +$VeilidStateAttachmentCopyWith<$Res> get attachment;$VeilidStateNetworkCopyWith<$Res> get network;$VeilidStateConfigCopyWith<$Res> get config; - $VeilidStateAttachmentCopyWith<$Res> get attachment; - $VeilidStateNetworkCopyWith<$Res> get network; - $VeilidStateConfigCopyWith<$Res> get config; } - /// @nodoc -class _$VeilidStateCopyWithImpl<$Res> implements $VeilidStateCopyWith<$Res> { +class _$VeilidStateCopyWithImpl<$Res> + implements $VeilidStateCopyWith<$Res> { _$VeilidStateCopyWithImpl(this._self, this._then); final VeilidState _self; final $Res Function(VeilidState) _then; - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @pragma('vm:prefer-inline') - @override - $Res call({ - Object? attachment = null, - Object? network = null, - Object? config = null, - }) { - return _then(_self.copyWith( - attachment: null == attachment - ? _self.attachment - : attachment // ignore: cast_nullable_to_non_nullable - as VeilidStateAttachment, - network: null == network - ? _self.network - : network // ignore: cast_nullable_to_non_nullable - as VeilidStateNetwork, - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as VeilidStateConfig, - )); - } +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? attachment = null,Object? network = null,Object? config = null,}) { + return _then(_self.copyWith( +attachment: null == attachment ? _self.attachment : attachment // ignore: cast_nullable_to_non_nullable +as VeilidStateAttachment,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable +as VeilidStateNetwork,config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as VeilidStateConfig, + )); +} +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateAttachmentCopyWith<$Res> get attachment { + + return $VeilidStateAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); + }); +}/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateNetworkCopyWith<$Res> get network { + + return $VeilidStateNetworkCopyWith<$Res>(_self.network, (value) { + return _then(_self.copyWith(network: value)); + }); +}/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateConfigCopyWith<$Res> get config { + + return $VeilidStateConfigCopyWith<$Res>(_self.config, (value) { + return _then(_self.copyWith(config: value)); + }); +} +} - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateAttachmentCopyWith<$Res> get attachment { - return $VeilidStateAttachmentCopyWith<$Res>(_self.attachment, (value) { - return _then(_self.copyWith(attachment: value)); - }); - } - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateNetworkCopyWith<$Res> get network { - return $VeilidStateNetworkCopyWith<$Res>(_self.network, (value) { - return _then(_self.copyWith(network: value)); - }); - } +/// Adds pattern-matching-related methods to [VeilidState]. +extension VeilidStatePatterns on VeilidState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VeilidState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VeilidState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VeilidState value) $default,){ +final _that = this; +switch (_that) { +case _VeilidState(): +return $default(_that);} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VeilidState value)? $default,){ +final _that = this; +switch (_that) { +case _VeilidState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( VeilidStateAttachment attachment, VeilidStateNetwork network, VeilidStateConfig config)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VeilidState() when $default != null: +return $default(_that.attachment,_that.network,_that.config);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( VeilidStateAttachment attachment, VeilidStateNetwork network, VeilidStateConfig config) $default,) {final _that = this; +switch (_that) { +case _VeilidState(): +return $default(_that.attachment,_that.network,_that.config);} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( VeilidStateAttachment attachment, VeilidStateNetwork network, VeilidStateConfig config)? $default,) {final _that = this; +switch (_that) { +case _VeilidState() when $default != null: +return $default(_that.attachment,_that.network,_that.config);case _: + return null; + +} +} - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateConfigCopyWith<$Res> get config { - return $VeilidStateConfigCopyWith<$Res>(_self.config, (value) { - return _then(_self.copyWith(config: value)); - }); - } } /// @nodoc @JsonSerializable() + class _VeilidState implements VeilidState { - const _VeilidState( - {required this.attachment, required this.network, required this.config}); - factory _VeilidState.fromJson(Map json) => - _$VeilidStateFromJson(json); + const _VeilidState({required this.attachment, required this.network, required this.config}); + factory _VeilidState.fromJson(Map json) => _$VeilidStateFromJson(json); - @override - final VeilidStateAttachment attachment; - @override - final VeilidStateNetwork network; - @override - final VeilidStateConfig config; +@override final VeilidStateAttachment attachment; +@override final VeilidStateNetwork network; +@override final VeilidStateConfig config; - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @JsonKey(includeFromJson: false, includeToJson: false) - @pragma('vm:prefer-inline') - _$VeilidStateCopyWith<_VeilidState> get copyWith => - __$VeilidStateCopyWithImpl<_VeilidState>(this, _$identity); +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VeilidStateCopyWith<_VeilidState> get copyWith => __$VeilidStateCopyWithImpl<_VeilidState>(this, _$identity); - @override - Map toJson() { - return _$VeilidStateToJson( - this, - ); - } +@override +Map toJson() { + return _$VeilidStateToJson(this, ); +} - @override - bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _VeilidState && - (identical(other.attachment, attachment) || - other.attachment == attachment) && - (identical(other.network, network) || other.network == network) && - (identical(other.config, config) || other.config == config)); - } +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VeilidState&&(identical(other.attachment, attachment) || other.attachment == attachment)&&(identical(other.network, network) || other.network == network)&&(identical(other.config, config) || other.config == config)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,attachment,network,config); + +@override +String toString() { + return 'VeilidState(attachment: $attachment, network: $network, config: $config)'; +} - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash(runtimeType, attachment, network, config); - @override - String toString() { - return 'VeilidState(attachment: $attachment, network: $network, config: $config)'; - } } /// @nodoc -abstract mixin class _$VeilidStateCopyWith<$Res> - implements $VeilidStateCopyWith<$Res> { - factory _$VeilidStateCopyWith( - _VeilidState value, $Res Function(_VeilidState) _then) = - __$VeilidStateCopyWithImpl; - @override - @useResult - $Res call( - {VeilidStateAttachment attachment, - VeilidStateNetwork network, - VeilidStateConfig config}); +abstract mixin class _$VeilidStateCopyWith<$Res> implements $VeilidStateCopyWith<$Res> { + factory _$VeilidStateCopyWith(_VeilidState value, $Res Function(_VeilidState) _then) = __$VeilidStateCopyWithImpl; +@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; - @override - $VeilidStateAttachmentCopyWith<$Res> get attachment; - @override - $VeilidStateNetworkCopyWith<$Res> get network; - @override - $VeilidStateConfigCopyWith<$Res> get config; } - /// @nodoc -class __$VeilidStateCopyWithImpl<$Res> implements _$VeilidStateCopyWith<$Res> { +class __$VeilidStateCopyWithImpl<$Res> + implements _$VeilidStateCopyWith<$Res> { __$VeilidStateCopyWithImpl(this._self, this._then); final _VeilidState _self; final $Res Function(_VeilidState) _then; - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $Res call({ - Object? attachment = null, - Object? network = null, - Object? config = null, - }) { - return _then(_VeilidState( - attachment: null == attachment - ? _self.attachment - : attachment // ignore: cast_nullable_to_non_nullable - as VeilidStateAttachment, - network: null == network - ? _self.network - : network // ignore: cast_nullable_to_non_nullable - as VeilidStateNetwork, - config: null == config - ? _self.config - : config // ignore: cast_nullable_to_non_nullable - as VeilidStateConfig, - )); - } +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? attachment = null,Object? network = null,Object? config = null,}) { + return _then(_VeilidState( +attachment: null == attachment ? _self.attachment : attachment // ignore: cast_nullable_to_non_nullable +as VeilidStateAttachment,network: null == network ? _self.network : network // ignore: cast_nullable_to_non_nullable +as VeilidStateNetwork,config: null == config ? _self.config : config // ignore: cast_nullable_to_non_nullable +as VeilidStateConfig, + )); +} - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateAttachmentCopyWith<$Res> get attachment { - return $VeilidStateAttachmentCopyWith<$Res>(_self.attachment, (value) { - return _then(_self.copyWith(attachment: value)); - }); - } - - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateNetworkCopyWith<$Res> get network { - return $VeilidStateNetworkCopyWith<$Res>(_self.network, (value) { - return _then(_self.copyWith(network: value)); - }); - } - - /// Create a copy of VeilidState - /// with the given fields replaced by the non-null parameter values. - @override - @pragma('vm:prefer-inline') - $VeilidStateConfigCopyWith<$Res> get config { - return $VeilidStateConfigCopyWith<$Res>(_self.config, (value) { - return _then(_self.copyWith(config: value)); - }); - } +/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateAttachmentCopyWith<$Res> get attachment { + + return $VeilidStateAttachmentCopyWith<$Res>(_self.attachment, (value) { + return _then(_self.copyWith(attachment: value)); + }); +}/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateNetworkCopyWith<$Res> get network { + + return $VeilidStateNetworkCopyWith<$Res>(_self.network, (value) { + return _then(_self.copyWith(network: value)); + }); +}/// Create a copy of VeilidState +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VeilidStateConfigCopyWith<$Res> get config { + + return $VeilidStateConfigCopyWith<$Res>(_self.config, (value) { + return _then(_self.copyWith(config: value)); + }); +} } // dart format on diff --git a/veilid-flutter/lib/veilid_state.g.dart b/veilid-flutter/lib/veilid_state.g.dart index 21ae0158..65bd2d6b 100644 --- a/veilid-flutter/lib/veilid_state.g.dart +++ b/veilid-flutter/lib/veilid_state.g.dart @@ -51,20 +51,20 @@ _TransferStatsDownUp _$TransferStatsDownUpFromJson(Map json) => ); Map _$TransferStatsDownUpToJson( - _TransferStatsDownUp instance) => - { - 'down': instance.down.toJson(), - 'up': instance.up.toJson(), - }; + _TransferStatsDownUp instance, +) => { + 'down': instance.down.toJson(), + 'up': instance.up.toJson(), +}; _StateStats _$StateStatsFromJson(Map json) => _StateStats( - span: TimestampDuration.fromJson(json['span']), - reliable: TimestampDuration.fromJson(json['reliable']), - unreliable: TimestampDuration.fromJson(json['unreliable']), - dead: TimestampDuration.fromJson(json['dead']), - punished: TimestampDuration.fromJson(json['punished']), - reason: StateReasonStats.fromJson(json['reason']), - ); + span: TimestampDuration.fromJson(json['span']), + reliable: TimestampDuration.fromJson(json['reliable']), + unreliable: TimestampDuration.fromJson(json['unreliable']), + dead: TimestampDuration.fromJson(json['dead']), + punished: TimestampDuration.fromJson(json['punished']), + reason: StateReasonStats.fromJson(json['reason']), +); Map _$StateStatsToJson(_StateStats instance) => { @@ -79,15 +79,18 @@ Map _$StateStatsToJson(_StateStats instance) => _StateReasonStats _$StateReasonStatsFromJson(Map json) => _StateReasonStats( canNotSend: TimestampDuration.fromJson(json['can_not_send']), - tooManyLostAnswers: - TimestampDuration.fromJson(json['too_many_lost_answers']), + tooManyLostAnswers: TimestampDuration.fromJson( + json['too_many_lost_answers'], + ), noPingResponse: TimestampDuration.fromJson(json['no_ping_response']), failedToSend: TimestampDuration.fromJson(json['failed_to_send']), lostAnswers: TimestampDuration.fromJson(json['lost_answers']), - notSeenConsecutively: - TimestampDuration.fromJson(json['not_seen_consecutively']), - inUnreliablePingSpan: - TimestampDuration.fromJson(json['in_unreliable_ping_span']), + notSeenConsecutively: TimestampDuration.fromJson( + json['not_seen_consecutively'], + ), + inUnreliablePingSpan: TimestampDuration.fromJson( + json['in_unreliable_ping_span'], + ), ); Map _$StateReasonStatsToJson(_StateReasonStats instance) => @@ -102,86 +105,84 @@ Map _$StateReasonStatsToJson(_StateReasonStats instance) => }; _AnswerStats _$AnswerStatsFromJson(Map json) => _AnswerStats( - span: TimestampDuration.fromJson(json['span']), - questions: (json['questions'] as num).toInt(), - answers: (json['answers'] as num).toInt(), - lostAnswers: (json['lost_answers'] as num).toInt(), - consecutiveAnswersMaximum: - (json['consecutive_answers_maximum'] as num).toInt(), - consecutiveAnswersAverage: - (json['consecutive_answers_average'] as num).toInt(), - consecutiveAnswersMinimum: - (json['consecutive_answers_minimum'] as num).toInt(), - consecutiveLostAnswersMaximum: - (json['consecutive_lost_answers_maximum'] as num).toInt(), - consecutiveLostAnswersAverage: - (json['consecutive_lost_answers_average'] as num).toInt(), - consecutiveLostAnswersMinimum: - (json['consecutive_lost_answers_minimum'] as num).toInt(), - ); + span: TimestampDuration.fromJson(json['span']), + questions: (json['questions'] as num).toInt(), + answers: (json['answers'] as num).toInt(), + lostAnswers: (json['lost_answers'] as num).toInt(), + consecutiveAnswersMaximum: (json['consecutive_answers_maximum'] as num) + .toInt(), + consecutiveAnswersAverage: (json['consecutive_answers_average'] as num) + .toInt(), + consecutiveAnswersMinimum: (json['consecutive_answers_minimum'] as num) + .toInt(), + consecutiveLostAnswersMaximum: + (json['consecutive_lost_answers_maximum'] as num).toInt(), + consecutiveLostAnswersAverage: + (json['consecutive_lost_answers_average'] as num).toInt(), + consecutiveLostAnswersMinimum: + (json['consecutive_lost_answers_minimum'] as num).toInt(), +); -Map _$AnswerStatsToJson(_AnswerStats instance) => - { - 'span': instance.span.toJson(), - 'questions': instance.questions, - 'answers': instance.answers, - 'lost_answers': instance.lostAnswers, - 'consecutive_answers_maximum': instance.consecutiveAnswersMaximum, - 'consecutive_answers_average': instance.consecutiveAnswersAverage, - 'consecutive_answers_minimum': instance.consecutiveAnswersMinimum, - 'consecutive_lost_answers_maximum': - instance.consecutiveLostAnswersMaximum, - 'consecutive_lost_answers_average': - instance.consecutiveLostAnswersAverage, - 'consecutive_lost_answers_minimum': - instance.consecutiveLostAnswersMinimum, - }; +Map _$AnswerStatsToJson( + _AnswerStats instance, +) => { + 'span': instance.span.toJson(), + 'questions': instance.questions, + 'answers': instance.answers, + 'lost_answers': instance.lostAnswers, + 'consecutive_answers_maximum': instance.consecutiveAnswersMaximum, + 'consecutive_answers_average': instance.consecutiveAnswersAverage, + 'consecutive_answers_minimum': instance.consecutiveAnswersMinimum, + 'consecutive_lost_answers_maximum': instance.consecutiveLostAnswersMaximum, + 'consecutive_lost_answers_average': instance.consecutiveLostAnswersAverage, + 'consecutive_lost_answers_minimum': instance.consecutiveLostAnswersMinimum, +}; _RPCStats _$RPCStatsFromJson(Map json) => _RPCStats( - messagesSent: (json['messages_sent'] as num).toInt(), - messagesRcvd: (json['messages_rcvd'] as num).toInt(), - questionsInFlight: (json['questions_in_flight'] as num).toInt(), - lastQuestionTs: json['last_question_ts'] == null - ? null - : Timestamp.fromJson(json['last_question_ts']), - lastSeenTs: json['last_seen_ts'] == null - ? null - : Timestamp.fromJson(json['last_seen_ts']), - firstConsecutiveSeenTs: json['first_consecutive_seen_ts'] == null - ? null - : Timestamp.fromJson(json['first_consecutive_seen_ts']), - recentLostAnswersUnordered: - (json['recent_lost_answers_unordered'] as num).toInt(), - recentLostAnswersOrdered: - (json['recent_lost_answers_ordered'] as num).toInt(), - failedToSend: (json['failed_to_send'] as num).toInt(), - answerUnordered: AnswerStats.fromJson(json['answer_unordered']), - answerOrdered: AnswerStats.fromJson(json['answer_ordered']), - ); + messagesSent: (json['messages_sent'] as num).toInt(), + messagesRcvd: (json['messages_rcvd'] as num).toInt(), + questionsInFlight: (json['questions_in_flight'] as num).toInt(), + lastQuestionTs: json['last_question_ts'] == null + ? null + : Timestamp.fromJson(json['last_question_ts']), + lastSeenTs: json['last_seen_ts'] == null + ? null + : Timestamp.fromJson(json['last_seen_ts']), + firstConsecutiveSeenTs: json['first_consecutive_seen_ts'] == null + ? null + : Timestamp.fromJson(json['first_consecutive_seen_ts']), + recentLostAnswersUnordered: (json['recent_lost_answers_unordered'] as num) + .toInt(), + recentLostAnswersOrdered: (json['recent_lost_answers_ordered'] as num) + .toInt(), + failedToSend: (json['failed_to_send'] as num).toInt(), + answerUnordered: AnswerStats.fromJson(json['answer_unordered']), + answerOrdered: AnswerStats.fromJson(json['answer_ordered']), +); Map _$RPCStatsToJson(_RPCStats instance) => { - 'messages_sent': instance.messagesSent, - 'messages_rcvd': instance.messagesRcvd, - 'questions_in_flight': instance.questionsInFlight, - 'last_question_ts': instance.lastQuestionTs?.toJson(), - 'last_seen_ts': instance.lastSeenTs?.toJson(), - 'first_consecutive_seen_ts': instance.firstConsecutiveSeenTs?.toJson(), - 'recent_lost_answers_unordered': instance.recentLostAnswersUnordered, - 'recent_lost_answers_ordered': instance.recentLostAnswersOrdered, - 'failed_to_send': instance.failedToSend, - 'answer_unordered': instance.answerUnordered.toJson(), - 'answer_ordered': instance.answerOrdered.toJson(), - }; + 'messages_sent': instance.messagesSent, + 'messages_rcvd': instance.messagesRcvd, + 'questions_in_flight': instance.questionsInFlight, + 'last_question_ts': instance.lastQuestionTs?.toJson(), + 'last_seen_ts': instance.lastSeenTs?.toJson(), + 'first_consecutive_seen_ts': instance.firstConsecutiveSeenTs?.toJson(), + 'recent_lost_answers_unordered': instance.recentLostAnswersUnordered, + 'recent_lost_answers_ordered': instance.recentLostAnswersOrdered, + 'failed_to_send': instance.failedToSend, + 'answer_unordered': instance.answerUnordered.toJson(), + 'answer_ordered': instance.answerOrdered.toJson(), +}; _PeerStats _$PeerStatsFromJson(Map json) => _PeerStats( - timeAdded: Timestamp.fromJson(json['time_added']), - rpcStats: RPCStats.fromJson(json['rpc_stats']), - transfer: TransferStatsDownUp.fromJson(json['transfer']), - state: StateStats.fromJson(json['state']), - latency: json['latency'] == null - ? null - : LatencyStats.fromJson(json['latency']), - ); + timeAdded: Timestamp.fromJson(json['time_added']), + rpcStats: RPCStats.fromJson(json['rpc_stats']), + transfer: TransferStatsDownUp.fromJson(json['transfer']), + state: StateStats.fromJson(json['state']), + latency: json['latency'] == null + ? null + : LatencyStats.fromJson(json['latency']), +); Map _$PeerStatsToJson(_PeerStats instance) => { @@ -209,23 +210,24 @@ Map _$PeerTableDataToJson(_PeerTableData instance) => }; VeilidLog _$VeilidLogFromJson(Map json) => VeilidLog( - logLevel: VeilidLogLevel.fromJson(json['log_level']), - message: json['message'] as String, - backtrace: json['backtrace'] as String?, - $type: json['kind'] as String?, - ); + logLevel: VeilidLogLevel.fromJson(json['log_level']), + message: json['message'] as String, + backtrace: json['backtrace'] as String?, + $type: json['kind'] as String?, +); Map _$VeilidLogToJson(VeilidLog instance) => { - 'log_level': instance.logLevel.toJson(), - 'message': instance.message, - 'backtrace': instance.backtrace, - 'kind': instance.$type, - }; + 'log_level': instance.logLevel.toJson(), + 'message': instance.message, + 'backtrace': instance.backtrace, + 'kind': instance.$type, +}; VeilidAppMessage _$VeilidAppMessageFromJson(Map json) => VeilidAppMessage( - message: - const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']), + message: const Uint8ListJsonConverter.jsIsArray().fromJson( + json['message'], + ), sender: json['sender'] == null ? null : Typed.fromJson(json['sender']), @@ -233,19 +235,20 @@ VeilidAppMessage _$VeilidAppMessageFromJson(Map json) => $type: json['kind'] as String?, ); -Map _$VeilidAppMessageToJson(VeilidAppMessage instance) => - { - 'message': - const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), - 'sender': instance.sender?.toJson(), - 'route_id': instance.routeId, - 'kind': instance.$type, - }; +Map _$VeilidAppMessageToJson( + VeilidAppMessage instance, +) => { + 'message': const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), + 'sender': instance.sender?.toJson(), + 'route_id': instance.routeId, + 'kind': instance.$type, +}; VeilidAppCall _$VeilidAppCallFromJson(Map json) => VeilidAppCall( - message: - const Uint8ListJsonConverter.jsIsArray().fromJson(json['message']), + message: const Uint8ListJsonConverter.jsIsArray().fromJson( + json['message'], + ), callId: json['call_id'] as String, sender: json['sender'] == null ? null @@ -254,59 +257,60 @@ VeilidAppCall _$VeilidAppCallFromJson(Map json) => $type: json['kind'] as String?, ); -Map _$VeilidAppCallToJson(VeilidAppCall instance) => - { - 'message': - const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), - 'call_id': instance.callId, - 'sender': instance.sender?.toJson(), - 'route_id': instance.routeId, - 'kind': instance.$type, - }; +Map _$VeilidAppCallToJson( + VeilidAppCall instance, +) => { + 'message': const Uint8ListJsonConverter.jsIsArray().toJson(instance.message), + 'call_id': instance.callId, + 'sender': instance.sender?.toJson(), + 'route_id': instance.routeId, + 'kind': instance.$type, +}; VeilidUpdateAttachment _$VeilidUpdateAttachmentFromJson( - Map json) => - VeilidUpdateAttachment( - state: AttachmentState.fromJson(json['state']), - publicInternetReady: json['public_internet_ready'] as bool, - localNetworkReady: json['local_network_ready'] as bool, - uptime: TimestampDuration.fromJson(json['uptime']), - attachedUptime: json['attached_uptime'] == null - ? null - : TimestampDuration.fromJson(json['attached_uptime']), - $type: json['kind'] as String?, - ); + Map json, +) => VeilidUpdateAttachment( + state: AttachmentState.fromJson(json['state']), + publicInternetReady: json['public_internet_ready'] as bool, + localNetworkReady: json['local_network_ready'] as bool, + uptime: TimestampDuration.fromJson(json['uptime']), + attachedUptime: json['attached_uptime'] == null + ? null + : TimestampDuration.fromJson(json['attached_uptime']), + $type: json['kind'] as String?, +); Map _$VeilidUpdateAttachmentToJson( - VeilidUpdateAttachment instance) => - { - 'state': instance.state.toJson(), - 'public_internet_ready': instance.publicInternetReady, - 'local_network_ready': instance.localNetworkReady, - 'uptime': instance.uptime.toJson(), - 'attached_uptime': instance.attachedUptime?.toJson(), - 'kind': instance.$type, - }; + VeilidUpdateAttachment instance, +) => { + 'state': instance.state.toJson(), + 'public_internet_ready': instance.publicInternetReady, + 'local_network_ready': instance.localNetworkReady, + 'uptime': instance.uptime.toJson(), + 'attached_uptime': instance.attachedUptime?.toJson(), + 'kind': instance.$type, +}; VeilidUpdateNetwork _$VeilidUpdateNetworkFromJson(Map json) => VeilidUpdateNetwork( started: json['started'] as bool, bpsDown: BigInt.parse(json['bps_down'] as String), bpsUp: BigInt.parse(json['bps_up'] as String), - peers: - (json['peers'] as List).map(PeerTableData.fromJson).toList(), + peers: (json['peers'] as List) + .map(PeerTableData.fromJson) + .toList(), $type: json['kind'] as String?, ); Map _$VeilidUpdateNetworkToJson( - VeilidUpdateNetwork instance) => - { - 'started': instance.started, - 'bps_down': instance.bpsDown.toString(), - 'bps_up': instance.bpsUp.toString(), - 'peers': instance.peers.map((e) => e.toJson()).toList(), - 'kind': instance.$type, - }; + VeilidUpdateNetwork instance, +) => { + 'started': instance.started, + 'bps_down': instance.bpsDown.toString(), + 'bps_up': instance.bpsUp.toString(), + 'peers': instance.peers.map((e) => e.toJson()).toList(), + 'kind': instance.$type, +}; VeilidUpdateConfig _$VeilidUpdateConfigFromJson(Map json) => VeilidUpdateConfig( @@ -321,76 +325,77 @@ Map _$VeilidUpdateConfigToJson(VeilidUpdateConfig instance) => }; VeilidUpdateRouteChange _$VeilidUpdateRouteChangeFromJson( - Map json) => - VeilidUpdateRouteChange( - deadRoutes: (json['dead_routes'] as List) - .map((e) => e as String) - .toList(), - deadRemoteRoutes: (json['dead_remote_routes'] as List) - .map((e) => e as String) - .toList(), - $type: json['kind'] as String?, - ); + Map json, +) => VeilidUpdateRouteChange( + deadRoutes: (json['dead_routes'] as List) + .map((e) => e as String) + .toList(), + deadRemoteRoutes: (json['dead_remote_routes'] as List) + .map((e) => e as String) + .toList(), + $type: json['kind'] as String?, +); Map _$VeilidUpdateRouteChangeToJson( - VeilidUpdateRouteChange instance) => - { - 'dead_routes': instance.deadRoutes, - 'dead_remote_routes': instance.deadRemoteRoutes, - 'kind': instance.$type, - }; + VeilidUpdateRouteChange instance, +) => { + 'dead_routes': instance.deadRoutes, + 'dead_remote_routes': instance.deadRemoteRoutes, + 'kind': instance.$type, +}; VeilidUpdateValueChange _$VeilidUpdateValueChangeFromJson( - Map json) => - VeilidUpdateValueChange( - key: RecordKey.fromJson(json['key']), - subkeys: (json['subkeys'] as List) - .map(ValueSubkeyRange.fromJson) - .toList(), - count: (json['count'] as num).toInt(), - value: json['value'] == null ? null : ValueData.fromJson(json['value']), - $type: json['kind'] as String?, - ); + Map json, +) => VeilidUpdateValueChange( + key: RecordKey.fromJson(json['key']), + subkeys: (json['subkeys'] as List) + .map(ValueSubkeyRange.fromJson) + .toList(), + count: (json['count'] as num).toInt(), + value: json['value'] == null ? null : ValueData.fromJson(json['value']), + $type: json['kind'] as String?, +); Map _$VeilidUpdateValueChangeToJson( - VeilidUpdateValueChange instance) => - { - 'key': instance.key.toJson(), - 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), - 'count': instance.count, - 'value': instance.value?.toJson(), - 'kind': instance.$type, - }; + VeilidUpdateValueChange instance, +) => { + 'key': instance.key.toJson(), + 'subkeys': instance.subkeys.map((e) => e.toJson()).toList(), + 'count': instance.count, + 'value': instance.value?.toJson(), + 'kind': instance.$type, +}; _VeilidStateAttachment _$VeilidStateAttachmentFromJson( - Map json) => - _VeilidStateAttachment( - state: AttachmentState.fromJson(json['state']), - publicInternetReady: json['public_internet_ready'] as bool, - localNetworkReady: json['local_network_ready'] as bool, - uptime: TimestampDuration.fromJson(json['uptime']), - attachedUptime: json['attached_uptime'] == null - ? null - : TimestampDuration.fromJson(json['attached_uptime']), - ); + Map json, +) => _VeilidStateAttachment( + state: AttachmentState.fromJson(json['state']), + publicInternetReady: json['public_internet_ready'] as bool, + localNetworkReady: json['local_network_ready'] as bool, + uptime: TimestampDuration.fromJson(json['uptime']), + attachedUptime: json['attached_uptime'] == null + ? null + : TimestampDuration.fromJson(json['attached_uptime']), +); Map _$VeilidStateAttachmentToJson( - _VeilidStateAttachment instance) => - { - 'state': instance.state.toJson(), - 'public_internet_ready': instance.publicInternetReady, - 'local_network_ready': instance.localNetworkReady, - 'uptime': instance.uptime.toJson(), - 'attached_uptime': instance.attachedUptime?.toJson(), - }; + _VeilidStateAttachment instance, +) => { + 'state': instance.state.toJson(), + 'public_internet_ready': instance.publicInternetReady, + 'local_network_ready': instance.localNetworkReady, + 'uptime': instance.uptime.toJson(), + 'attached_uptime': instance.attachedUptime?.toJson(), +}; _VeilidStateNetwork _$VeilidStateNetworkFromJson(Map json) => _VeilidStateNetwork( started: json['started'] as bool, bpsDown: BigInt.parse(json['bps_down'] as String), bpsUp: BigInt.parse(json['bps_up'] as String), - peers: - (json['peers'] as List).map(PeerTableData.fromJson).toList(), + peers: (json['peers'] as List) + .map(PeerTableData.fromJson) + .toList(), ); Map _$VeilidStateNetworkToJson(_VeilidStateNetwork instance) => @@ -402,20 +407,16 @@ Map _$VeilidStateNetworkToJson(_VeilidStateNetwork instance) => }; _VeilidStateConfig _$VeilidStateConfigFromJson(Map json) => - _VeilidStateConfig( - config: VeilidConfig.fromJson(json['config']), - ); + _VeilidStateConfig(config: VeilidConfig.fromJson(json['config'])); Map _$VeilidStateConfigToJson(_VeilidStateConfig instance) => - { - 'config': instance.config.toJson(), - }; + {'config': instance.config.toJson()}; _VeilidState _$VeilidStateFromJson(Map json) => _VeilidState( - attachment: VeilidStateAttachment.fromJson(json['attachment']), - network: VeilidStateNetwork.fromJson(json['network']), - config: VeilidStateConfig.fromJson(json['config']), - ); + attachment: VeilidStateAttachment.fromJson(json['attachment']), + network: VeilidStateNetwork.fromJson(json['network']), + config: VeilidStateConfig.fromJson(json['config']), +); Map _$VeilidStateToJson(_VeilidState instance) => { diff --git a/veilid-flutter/lib/veilid_table_db.dart b/veilid-flutter/lib/veilid_table_db.dart index a78569bb..cca4b902 100644 --- a/veilid-flutter/lib/veilid_table_db.dart +++ b/veilid-flutter/lib/veilid_table_db.dart @@ -12,7 +12,7 @@ abstract class VeilidTableDBTransaction { Future delete(int col, Uint8List key); Future storeJson(int col, Uint8List key, Object? object, - {Object? Function(Object? nonEncodable)? toEncodable}) async => + {Object? Function(Object? nonEncodable)? toEncodable}) => store(col, key, utf8.encoder.convert(jsonEncode(object, toEncodable: toEncodable))); diff --git a/veilid-flutter/packages/veilid_test/lib/src/processor_connection_state.dart b/veilid-flutter/packages/veilid_test/lib/src/processor_connection_state.dart index 1cfc3b54..0b931f95 100644 --- a/veilid-flutter/packages/veilid_test/lib/src/processor_connection_state.dart +++ b/veilid-flutter/packages/veilid_test/lib/src/processor_connection_state.dart @@ -1,9 +1,7 @@ import 'package:veilid/veilid.dart'; class ProcessorConnectionState { - ProcessorConnectionState(); - - VeilidStateAttachment attachment = VeilidStateAttachment( + var attachment = VeilidStateAttachment( localNetworkReady: false, publicInternetReady: false, state: AttachmentState.detached, @@ -11,9 +9,12 @@ class ProcessorConnectionState { value: BigInt.zero, ), attachedUptime: null); - VeilidStateNetwork network = VeilidStateNetwork( + + var network = VeilidStateNetwork( bpsDown: BigInt.zero, bpsUp: BigInt.zero, started: false, peers: []); + ProcessorConnectionState(); + bool get isAttached => !(attachment.state == AttachmentState.detached || attachment.state == AttachmentState.detaching || attachment.state == AttachmentState.attaching); diff --git a/veilid-flutter/packages/veilid_test/lib/src/ticker_fixture.dart b/veilid-flutter/packages/veilid_test/lib/src/ticker_fixture.dart index 62f4675b..7a18da41 100644 --- a/veilid-flutter/packages/veilid_test/lib/src/ticker_fixture.dart +++ b/veilid-flutter/packages/veilid_test/lib/src/ticker_fixture.dart @@ -9,14 +9,16 @@ abstract class TickerFixtureTickable { } class TickerFixture { - TickerFixture({required this.updateProcessorFixture}); - static final _fixtureMutex = Mutex(); UpdateProcessorFixture updateProcessorFixture; + Timer? _tickTimer; + final List _tickables = []; + TickerFixture({required this.updateProcessorFixture}); + Future setUp() async { await _fixtureMutex.acquire(); _tickTimer = Timer.periodic(const Duration(seconds: 1), (timer) { diff --git a/veilid-flutter/packages/veilid_test/lib/src/update_processor_fixture.dart b/veilid-flutter/packages/veilid_test/lib/src/update_processor_fixture.dart index 3566f629..7c1c4a8a 100644 --- a/veilid-flutter/packages/veilid_test/lib/src/update_processor_fixture.dart +++ b/veilid-flutter/packages/veilid_test/lib/src/update_processor_fixture.dart @@ -7,13 +7,13 @@ import 'processor_connection_state.dart'; import 'veilid_fixture.dart'; class UpdateProcessorFixture { - UpdateProcessorFixture({required this.veilidFixture}); - static final _fixtureMutex = Mutex(); + VeilidFixture veilidFixture; - ProcessorConnectionState processorConnectionState = - ProcessorConnectionState(); + final processorConnectionState = ProcessorConnectionState(); + + UpdateProcessorFixture({required this.veilidFixture}); Future setUp() async { await _fixtureMutex.acquire(); diff --git a/veilid-flutter/packages/veilid_test/lib/src/veilid_fixture.dart b/veilid-flutter/packages/veilid_test/lib/src/veilid_fixture.dart index b8397e66..6ce7bab5 100644 --- a/veilid-flutter/packages/veilid_test/lib/src/veilid_fixture.dart +++ b/veilid-flutter/packages/veilid_test/lib/src/veilid_fixture.dart @@ -17,15 +17,18 @@ abstract class VeilidFixture { } class DefaultVeilidFixture implements VeilidFixture { - DefaultVeilidFixture({required this.programName}); - StreamSubscription? _veilidUpdateSubscription; + Stream? _veilidUpdateStream; + late final StreamController _updateStreamController; static final _fixtureMutex = Mutex(); + final String programName; + DefaultVeilidFixture({required this.programName}); + @override Future setUp() async { await _fixtureMutex.acquire(); diff --git a/veilid-flutter/pubspec.yaml b/veilid-flutter/pubspec.yaml index 422a56e6..4bfe54aa 100644 --- a/veilid-flutter/pubspec.yaml +++ b/veilid-flutter/pubspec.yaml @@ -7,7 +7,7 @@ homepage: https://veilid.com publish_to: "none" # Remove this line if you wish to publish to pub.dev environment: - sdk: '>=3.0.0 <4.0.0' + sdk: '>=3.8.0 <4.0.0' flutter: '>=3.19.1' dependencies: @@ -20,7 +20,7 @@ dependencies: sdk: flutter flutter_web_plugins: sdk: flutter - freezed_annotation: ^3.0.0 + freezed_annotation: ^3.1.0 json_annotation: ^4.9.0 path: ^1.9.0 path_provider: ^2.1.3 @@ -31,9 +31,9 @@ dev_dependencies: build_runner: ^2.4.10 flutter_test: sdk: flutter - freezed: ^3.0.4 + freezed: ^3.2.0 json_serializable: ^6.8.0 - lint_hard: ^6.0.0 + lint_hard: ^6.2.1 test: ^1.25.15 # The following section is specific to Flutter.