From dbb8ac8f921127131f1805fbe846c791303d91f6 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Sun, 16 Feb 2025 23:22:05 -0800 Subject: [PATCH 1/6] chore: removed unused files, upgrade dependencies, misc repo cleanup --- .github/workflows/cd.yml | 27 -- .github/workflows/ci.yml | 7 +- .gitignore | 15 +- CHANGELOG.md | 376 +------------------------- LICENSE | 2 +- analysis_options.yaml | 168 +++--------- example/lemmy_api_client_example.dart | 2 + example/lib/main.dart | 10 - example/pubspec.lock | 140 ---------- example/pubspec.yaml | 12 - pubspec.yaml | 22 +- scripts/release.dart | 139 ---------- test/lemmy_api_client_test.dart | 7 + 13 files changed, 61 insertions(+), 866 deletions(-) delete mode 100644 .github/workflows/cd.yml create mode 100644 example/lemmy_api_client_example.dart delete mode 100644 example/lib/main.dart delete mode 100644 example/pubspec.lock delete mode 100644 example/pubspec.yaml delete mode 100755 scripts/release.dart create mode 100644 test/lemmy_api_client_test.dart diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml deleted file mode 100644 index 6ad62ccc..00000000 --- a/.github/workflows/cd.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: cd - -on: - push: - tags: - - "v*.*.*" - -jobs: - publish: - name: Publish - runs-on: ubuntu-latest - steps: - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.17.0 - - - uses: actions/checkout@v2 - - - name: Inject pub.dev credentials - env: - PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }} - run: | - mkdir -p ~/.config/dart/ - echo $PUB_CREDENTIALS > ~/.config/dart/pub-credentials.json - - - name: Publish to pub.dev - run: dart pub publish -f diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff1e02cc..8ad058f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: dart-lang/setup-dart@v1 with: - sdk: 2.17.0 + sdk: 3.7.0 - uses: actions/checkout@v2 @@ -25,8 +25,3 @@ jobs: - name: Run lints run: dart analyze --fatal-warnings --fatal-infos - - - name: Run tests - run: dart test - env: - TEST_JWT: ${{ secrets.TEST_JWT }} diff --git a/.gitignore b/.gitignore index 91486238..3cceda55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,7 @@ -# Flutter/Dart/Pub related -**/doc/api/ +# https://dart.dev/guides/libraries/private-files +# Created by `dart pub` .dart_tool/ -.packages -.pub-cache/ -.pub/ -/build/ -pubspec.lock -# dev -Taskfile.yml -.idea +# Avoid committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a2d26c..0689c357 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,375 +1,3 @@ -## Unreleased -- Add TOTP Login support +## 0.1.0 -## v0.21.0 - 2022-05-12 - -### Changed - -- Upgrade to dart 2.17 - -## v0.20.0 - 2022-04-30 - -### Added - -- Default theme fields -- Add `LeaveAdmin` endpoint (thanks @ilpianista) - -### Removed - -- Remove `TransferSite` endpoint (thanks @ilpianista) -- Remove site creator (thanks @LouisMarotta) - -## v0.19.0 - 2022-01-14 - -### Added/Changed - -- Endpoints related to lemmy `v0.15.0` - -## v0.18.0 - 2021-11-26 - -### Changed - -- Bump `freezed` dependency to `1.0.0` - -### Added - -- Add `GetUnreadCount` endpoint -- Add `honeypot` fields - -## v0.17.0 - 2021-10-24 - -### Added - -- Add reporting API - -### Changed - -- Marked model constructors as `const` - -## v0.16.0 - 2021-09-04 - -### Added - -- Add show post notifs option -- Add `ResolveObject` endpoint -- Add `GetSiteMetadata` endpoint -- Add `ModTransferCommunity` -- Add blocking actions - -### Changed - -- Models with `instanceHost` now take it explicitly in the constructor - -## v0.15.0 - 2021-04-27 - -### Added - -- new stuff from lemmy v0.11.0 - -## v0.14.0 - 2021-04-06 - -### Changed - -- `Jwt` has a different constructor and now provides a `copyWith` method - -## v0.13.0 - 2021-04-03 - -### Added - -- API v3 - -### Breaking change - -- Null safety - -## v0.12.0 - 2021-02-20 - -### Breaking change - -- Removed API v1. It didn't even work properly and lemmy completely removed thus no point in keeping - -### Added - -- Websocket joins! `communityJoin`, `userJoin`, `postJoin`, and `modJoin` can be used to listen to particular events -- `SortType` has now a `newComments` sort -- `PostAggregates` has now a `newestCommentTimeNecro` property and has correctly `DateTime` types instead of `String` - -## 0.11.0 - 2021-02-13 - -### Changed - -- All `DateTime` objects are now explicitly UTC time -- All queries have now constant constructors - -### Fixed - -- `GetReplies.sort` is now of `SortType` type -- `showNsfw` from `Register` query is now correctly a boolean instead of a string - -## 0.10.2 - 2021-02-02 - -### Changed - -- `FullSiteView.federatedInstances` now has a different structure - -### Added - -- Added `MostComments` to `SortType` - -## 0.10.1 - 2021-01-31 - -### Added - -- Added new Lemmy `v0.9.1` fields - -## 0.10.0 - 2021-01-26 - -### Added - -- V2 Lemmy api is now available. The use has changed to make `lemmy_api_client` much easier and less tedious to maintain - -### Breaking change - -- Clients are now split between v1 (`package:lemmy_api_client/v1.dart`) and v2 (`package:lemmy_api_client/v2.dart`) -- `Pictrs` is now in `package:lemmy_api_client/pictrs.dart` - -## 0.9.1 - 2021-01-07 - -### Changed - -- All models are now generated with `freezed` + `json_serializable`. This unlocks a handy `.copyWith()` method on all models and make all models data classes (which means they can be compared with `==` value wise). Models are now more null-safe making `lemmy_api_client` more ready for null-safety - -## 0.9.0 - 2021-01-06 - -### Added - -- `User` model now uses enums for its fields - -## 0.8.5 - 2021-01-02 - -### Fixed - -- Fixed v0.8.4 (third time's the charm?) - -## 0.8.4 - 2021-01-01 - -### Fixed - -- Fixed v0.8.3 - -## 0.8.3 - 2021-01-01 - -### Fixed - -- Fixed v0.8.2 - -## 0.8.2 - 2020-12-31 - -### Added - -- All models are now augmented with a `instanceHost` property that shows where did the response come from. Very useful when dealing with multiple instances at once and not knowing what object belongs to what instance. - -## 0.8.1 - 2020-12-19 - -### Added - -- Added `local` variant to `PostListingType` - -## 0.8.0 - 2020-12-04 - -### Fixed - -- Pict-rs upload requires auth - -## 0.7.3 - 2020-10-24 - -### Fixed - -- Pict-rs v0.2 - -## 0.7.2 - 2020-10-08 - -### Fixed - -- Exporting pictrs models - -### Changed - -- Error handling in pictrs delete method - -## 0.7.1 - 2020-10-07 - -### Added - -- Added `upload` and `delete` pictrs endpoints - -## 0.7.0 - 2020-09-29 - -### Breaking - -- Removed statically typed errors, now every error is forwarded by `LemmyApiException` with a i18n message - -## 0.6.0 - 2020-09-29 - -### Added - -- `GET /comment/list` - -### Fix - -- Added missing auth field in `getPost` -- Correctly decoding utf8 bodies - -### Breaking - -- type on `Search` model is now an enum - -## 0.5.0 - 2020-09-18 - -### Breaking - -- `myVote` is now an enum - -## 0.4.2 - 2020-09-17 - -### Changed - -- `savePost` now uses `PUT` instead of `POST` - -## 0.4.1 - 2020-09-06 - -### Added - -- Added `RateLimitException` - -### Changed - -- Changed `UnknownResponseException` to `UnknownResponseError` and exposed it as a public member - -## 0.4.0 - 2020-09-05 - -### Added - -- Added rest of the user endpoints: - - `POST /user/ban` -- Added rest of the site endpoints: - - `PUT /site/config` - - `POST /site` - - `PUT /site` - - `POST /site/transfer` -- Added rest of the post endpoints: - - `POST /post/sticky` - - `POST /post/locked` -- Added rest of the community endpoints: - - `POST /community` - - `PUT /community` - - `POST /community/ban_user` - - `POST /community/mod` - - `POST /community/delete` - - `POST /community/remove` - - `POST /community/transfer` -- Added rest of the misc endpoints: - - `POST /admin/add` - - `GET /modlog` - -### Breaking - -- Renamed FullPost to FullPostView - -## 0.3.0 - 2020-09-02 - -### Breaking - -- Moved toJson from UserView to User - -## 0.2.2 - 2020-09-02 - -### Added - -- Jwt and User is serializable to json - -## 0.2.1 - 2020-08-29 - -### Fixed - -- Changed examples to reflect changes - -## 0.2.0 - 2020-08-29 - -### Changed - -- Renamed `LemmyAPI` to `LemmyApi` -- Endpoints that return a jwt now return a parsed jwt instead of just a raw one - -## 0.1.4 - 2020-08-28 - -### Changed - -- Exporting all models - -## 0.1.3 - 2020-08-24 - -### Added - -- lowered meta semver range - -## 0.1.2 - 2020-08-23 - -### Added - -- examples for pub.dev - -### Changed - -- Works on the web - -## 0.1.1 - 2020-08-23 - -### Changed - -- Logo now is displayed on pub.dev - -## 0.1.0 - 2020-08-23 - -### Added - -- `POST /comment` -- `PUT /comment` -- `POST /comment/delete` -- `POST /comment/remove` -- `POST /comment/mark_as_read` -- `~~POST~~ PUT /comment/save` -- `POST /comment/like` -- `GET /community` -- `GET /community/list` -- `POST /community/follow` -- `GET /user/followed_communities` -- `GET /categories` -- `POST /post` -- `GET /post` -- `GET /post/list` -- `POST /post/like` -- `PUT /post` -- `POST /post/delete` -- `POST /post/remove` -- `POST /post/save` -- `GET /site` -- `GET /site/config` -- `~~POST~~ GET /search` -- `PUT ~~/save_user_settings~~ /user/save_user_settings` -- `POST /user/login` -- `GET /user` -- `GET /user/replies` -- `GET ~~/user/mentions~~ /user/mention` -- `POST /user/mention/mark_as_read` -- `GET /private_message/list` -- `POST /private_message` -- `PUT /private_message` -- `POST /private_message/delete` -- `POST /private_message/mark_as_read` -- `POST /user/mark_all_as_read` -- `POST /user/delete_account` - -### Changed - -- First release of `lemmy_api_client`. Contains an http interface for the lemmy API for the "core" endpoints (mod/admin endpoints are coming soon) +- Initial version. \ No newline at end of file diff --git a/LICENSE b/LICENSE index 398bc256..ae985043 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Filip Krawczyk (@krawieck), Marcin Wojnarowski (@shilangyu) +Copyright (c) 2025 Thunder (@thunder-app), Filip Krawczyk (@krawieck), Marcin Wojnarowski (@shilangyu) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/analysis_options.yaml b/analysis_options.yaml index c822c903..8fdbd4d8 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,137 +1,33 @@ -linter: - rules: - - always_declare_return_types - - avoid_bool_literals_in_conditional_expressions - - avoid_catches_without_on_clauses - - avoid_catching_errors - - avoid_classes_with_only_static_members - - avoid_equals_and_hash_code_on_mutable_classes - - avoid_escaping_inner_quotes - - avoid_final_parameters - - avoid_function_literals_in_foreach_calls - - avoid_init_to_null - - avoid_null_checks_in_equality_operators - - avoid_positional_boolean_parameters - - avoid_private_typedef_functions - - avoid_redundant_argument_values - - avoid_relative_lib_imports - - avoid_return_types_on_setters - - avoid_returning_null - - avoid_returning_null_for_void - - avoid_returning_this - - avoid_setters_without_getters - - avoid_single_cascade_in_expression_statements - - avoid_type_to_string - - avoid_types_on_closure_parameters - - avoid_unnecessary_containers - - avoid_unused_constructor_parameters - - avoid_void_async - - await_only_futures - - camel_case_extensions - - camel_case_types - - cascade_invocations - - cast_nullable_to_non_nullable - - constant_identifier_names - - conditional_uri_does_not_exist - - curly_braces_in_flow_control_structures - - depend_on_referenced_packages - - directives_ordering - - empty_catches - - empty_constructor_bodies - - eol_at_end_of_file - - exhaustive_cases - - file_names - - hash_and_equals - - implementation_imports - - invariant_booleans - - library_names - - library_prefixes - - literal_only_boolean_expressions - - non_constant_identifier_names - - noop_primitive_operations - - no_leading_underscores_for_library_prefixes - - no_leading_underscores_for_local_identifiers - - null_check_on_nullable_type_parameter - - omit_local_variable_types - - one_member_abstracts - - package_api_docs - - parameter_assignments - - prefer_adjacent_string_concatenation - - prefer_asserts_in_initializer_lists - - prefer_collection_literals - - prefer_conditional_assignment - - prefer_const_constructors - - prefer_const_constructors_in_immutables - - prefer_const_declarations - - prefer_const_literals_to_create_immutables - - prefer_constructors_over_static_methods - - prefer_contains - - prefer_equal_for_default_values - - prefer_final_fields - - prefer_final_in_for_each - - prefer_final_locals - - prefer_for_elements_to_map_fromIterable - - prefer_function_declarations_over_variables - - prefer_generic_function_type_aliases - - prefer_if_elements_to_conditional_expressions - - prefer_if_null_operators - - prefer_initializing_formals - - prefer_int_literals - - prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - - prefer_is_not_operator - - prefer_iterable_whereType - - prefer_mixin - - prefer_null_aware_operators - - prefer_relative_imports - - prefer_single_quotes - - prefer_spread_collections - - prefer_typing_uninitialized_variables - - recursive_getters - - require_trailing_commas - - secure_pubspec_urls - - sized_box_for_whitespace - - sized_box_shrink_expand - - slash_for_doc_comments - - sort_child_properties_last - - sort_unnamed_constructors_first - - tighten_type_of_initializing_formals - - type_annotate_public_apis - - type_init_formals - - unawaited_futures - - unnecessary_brace_in_string_interps - - unnecessary_const - - unnecessary_constructor_name - - unnecessary_getters_setters - - unnecessary_lambdas - - unnecessary_late - - unnecessary_new - - unnecessary_null_aware_assignments - - unnecessary_null_checks - - unnecessary_null_in_if_null_operators - - unnecessary_parenthesis - - unnecessary_raw_strings - - unnecessary_string_escapes - - unnecessary_string_interpolations - - unnecessary_this - - unrelated_type_equality_checks - - use_enums - - use_full_hex_values_for_flutter_colors - - use_is_even_rather_than_modulo - - use_named_constants - - use_raw_strings - - use_rethrow_when_possible - - use_setters_to_change_properties - - use_super_parameters - - use_test_throws_matchers - - use_to_and_as_if_applicable - - void_checks +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. -analyzer: - exclude: - - "**/*.g.dart" - strong-mode: - implicit-dynamic: false - errors: - invalid_annotation_target: ignore +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +formatter: + page_width: 200 + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/example/lemmy_api_client_example.dart b/example/lemmy_api_client_example.dart new file mode 100644 index 00000000..34f46e24 --- /dev/null +++ b/example/lemmy_api_client_example.dart @@ -0,0 +1,2 @@ +void main() { +} diff --git a/example/lib/main.dart b/example/lib/main.dart deleted file mode 100644 index 8bcfa312..00000000 --- a/example/lib/main.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:lemmy_api_client/v3.dart'; - -Future main() async { - // instantiate your lemmy instance with the host uri - const lemmy = LemmyApiV3('voyager.lemmy.ml'); - - final response = await lemmy.run(const GetPosts()); - - print(response); -} diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index 366c1d8f..00000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,140 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" - url: "https://pub.dev" - source: hosted - version: "2.11.0" - collection: - dependency: transitive - description: - name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: "https://pub.dev" - source: hosted - version: "1.18.0" - crypto: - dependency: transitive - description: - name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab - url: "https://pub.dev" - source: hosted - version: "3.0.3" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 - url: "https://pub.dev" - source: hosted - version: "2.4.4" - http: - dependency: transitive - description: - name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 - url: "https://pub.dev" - source: hosted - version: "4.8.1" - lemmy_api_client: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.21.0" - meta: - dependency: transitive - description: - name: meta - sha256: "25dfcaf170a0190f47ca6355bdd4552cb8924b430512ff0cafb8db9bd41fe33b" - url: "https://pub.dev" - source: hosted - version: "1.14.0" - path: - dependency: transitive - description: - name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" - url: "https://pub.dev" - source: hosted - version: "1.9.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" - url: "https://pub.dev" - source: hosted - version: "1.10.0" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: "https://pub.dev" - source: hosted - version: "2.1.2" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - web: - dependency: transitive - description: - name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" - url: "https://pub.dev" - source: hosted - version: "0.5.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" - url: "https://pub.dev" - source: hosted - version: "2.4.5" -sdks: - dart: ">=3.3.0 <4.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index 75b01a5d..00000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: lemmy_api_client_example -version: 0.0.0 -description: A new Flutter project. - -publish_to: none - -environment: - sdk: ">=2.14.0 <3.0.0" - -dependencies: - lemmy_api_client: - path: ../ diff --git a/pubspec.yaml b/pubspec.yaml index 0cfd9ace..08ad73ba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,19 +1,19 @@ name: lemmy_api_client -version: 0.21.0 -homepage: https://github.com/LemmurOrg/lemmy_api_client -description: Future-based http client for the Lemmy API. Provides an easy interface and statically typed responses. +description: Dart client for the Lemmy API. Provides an easy interface and statically typed responses. +version: 0.1.0 +repository: https://github.com/thunder-app/lemmy_api_client environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ^3.7.0 dependencies: - json_annotation: ^4.6.0 - http: ^1.0.0 + json_annotation: ^4.9.0 + http: ^1.3.0 freezed_annotation: ^2.4.4 - web_socket_channel: ^2.0.0 dev_dependencies: - build_runner: ^2.4.6 - freezed: ^2.4.2 - json_serializable: ^6.7.1 - test: ^1.24.6 + build_runner: ^2.4.15 + freezed: ^2.5.8 + json_serializable: ^6.9.4 + lints: ^5.1.1 + test: ^1.25.15 \ No newline at end of file diff --git a/scripts/release.dart b/scripts/release.dart deleted file mode 100755 index c1673f71..00000000 --- a/scripts/release.dart +++ /dev/null @@ -1,139 +0,0 @@ -import 'dart:io'; - -Future main(List args) async { - await assertNoStagedGit(); - - if (args.isEmpty || !{'patch', 'minor', 'major'}.contains(args[0])) { - print('Unknown version bump type'); - exit(1); - } - - final version = await bumpedVersion(args[0]); - - await updatePubspec(version); - - await updateChangelog(version); - - await runGitCommands(version); - - print( - 'Before pushing review the changes with `git show`. ' - 'Once reviewed and pushed, push the new tag with `git push --tags`', - ); -} - -Future assertNoStagedGit() async { - final res = - await Process.run('git', ['diff-index', '--cached', '--quiet', 'HEAD']); - - if (res.exitCode != 0) { - print('You have staged files, commit or unstage them.'); - exit(1); - } -} - -class Version { - final int major, minor, patch; - const Version(this.major, this.minor, this.patch); - String toString() => '$major.$minor.$patch'; -} - -Future bumpedVersion(String versionBumpType) async { - final pubspecFile = File('pubspec.yaml'); - final pubspecContents = await pubspecFile.readAsString(); - - final versionMatch = - RegExp(r'version: (\d+)\.(\d+)\.(\d+)').firstMatch(pubspecContents); - - if (versionMatch == null) throw Exception('Failed to find pubspec version'); - - var major = int.parse(versionMatch.group(1)!); - var minor = int.parse(versionMatch.group(2)!); - var patch = int.parse(versionMatch.group(3)!); - - switch (versionBumpType) { - case 'patch': - patch++; - break; - case 'minor': - patch = 0; - minor++; - break; - case 'major': - patch = 0; - minor = 0; - major++; - break; - } - - return Version(major, minor, patch); -} - -Future updatePubspec(Version version) async { - final pubspecFile = File('pubspec.yaml'); - final pubspecContents = await pubspecFile.readAsString(); - - confirm('Version looks good? $version'); - - final updatedPubspec = - pubspecContents.replaceFirst(RegExp('version: .+'), 'version: $version'); - await pubspecFile.writeAsString(updatedPubspec); -} - -Future updateChangelog(Version version) async { - final changelogFile = File('CHANGELOG.md'); - final changelogContents = await changelogFile.readAsString(); - - var currentChangelog = - RegExp(r'^## Unreleased$.+?^##[^#]', multiLine: true, dotAll: true) - .stringMatch(changelogContents); - if (currentChangelog == null) { - throw Exception('Failed to find changelog'); - } - - currentChangelog = currentChangelog.substring(0, currentChangelog.length - 4); - - final date = DateTime.now(); - final dateString = '${date.year}-${date.month.toString().padLeft(2, '0')}' - '-${date.day.toString().padLeft(2, '0')}'; - - currentChangelog = - currentChangelog.replaceFirst('Unreleased', 'v$version - $dateString'); - - confirm('Changelog looks good?\n$currentChangelog\n'); - - await changelogFile.writeAsString( - changelogContents.replaceFirst('Unreleased', 'v$version - $dateString'), - ); -} - -Future runGitCommands(Version version) async { - stdout.write('Running git add... '); - await Process.run('git', [ - 'add', - 'CHANGELOG.md', - 'pubspec.yaml', - ]); - print('done'); - - stdout.write('Running git commit... '); - await Process.run('git', ['commit', '-m', 'Release v$version']); - print('done'); - - stdout.write('Running git tag... '); - await Process.run('git', ['tag', 'v$version']); - print('done'); -} - -void confirm(String message) { - stdout.write('$message [y/n] '); - - switch (stdin.readLineSync()) { - case 'y': - case 'yes': - break; - default: - print('Exiting'); - exit(1); - } -} diff --git a/test/lemmy_api_client_test.dart b/test/lemmy_api_client_test.dart new file mode 100644 index 00000000..2f1eb34f --- /dev/null +++ b/test/lemmy_api_client_test.dart @@ -0,0 +1,7 @@ +import 'package:test/test.dart'; + +void main() { + group('', () { + test('', () {}); + }); +} From 0dea65a837b102e8353cab78fd245fbc24e5ca63 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Sun, 16 Feb 2025 23:24:05 -0800 Subject: [PATCH 2/6] chore: re-run build_runner, dart format --- example/lemmy_api_client_example.dart | 3 +- lib/src/pictrs.dart | 41 +- lib/src/pictrs.freezed.dart | 252 +- lib/src/pictrs.g.dart | 38 +- lib/src/utils/force_utc_datetime.dart | 3 +- lib/src/utils/serde.dart | 10 +- lib/src/v3/api/admin/admin.dart | 118 +- lib/src/v3/api/admin/admin.freezed.dart | 1388 ++--- lib/src/v3/api/admin/admin.g.dart | 298 +- lib/src/v3/api/comment/comment.dart | 148 +- lib/src/v3/api/comment/comment.freezed.dart | 2681 ++++----- lib/src/v3/api/comment/comment.g.dart | 531 +- lib/src/v3/api/community/community.dart | 130 +- .../v3/api/community/community.freezed.dart | 2529 ++++----- lib/src/v3/api/community/community.g.dart | 503 +- lib/src/v3/api/custom_emoji/custom_emoji.dart | 32 +- .../custom_emoji/custom_emoji.freezed.dart | 607 +-- .../v3/api/custom_emoji/custom_emoji.g.dart | 125 +- .../federated_instances.dart | 16 +- .../federated_instances.freezed.dart | 98 +- .../federated_instances.g.dart | 20 +- lib/src/v3/api/modlog/modlog.dart | 10 +- lib/src/v3/api/modlog/modlog.freezed.dart | 307 +- lib/src/v3/api/modlog/modlog.g.dart | 56 +- lib/src/v3/api/post/post.dart | 180 +- lib/src/v3/api/post/post.freezed.dart | 3406 ++++++------ lib/src/v3/api/post/post.g.dart | 646 +-- .../api/private_message/private_message.dart | 98 +- .../private_message.freezed.dart | 1264 ++--- .../private_message/private_message.g.dart | 290 +- .../v3/api/resolve_object/resolve_object.dart | 12 +- .../resolve_object.freezed.dart | 113 +- .../api/resolve_object/resolve_object.g.dart | 21 +- lib/src/v3/api/search/search.dart | 7 +- lib/src/v3/api/search/search.freezed.dart | 343 +- lib/src/v3/api/search/search.g.dart | 60 +- lib/src/v3/api/site/site.dart | 46 +- lib/src/v3/api/site/site.freezed.dart | 3387 ++++++------ lib/src/v3/api/site/site.g.dart | 506 +- lib/src/v3/api/user/user.dart | 307 +- lib/src/v3/api/user/user.freezed.dart | 4797 ++++++++--------- lib/src/v3/api/user/user.g.dart | 925 +--- lib/src/v3/enums/comment_sort_type.dart | 4 +- .../v3/enums/community_visibility_type.dart | 4 +- lib/src/v3/enums/listing_type.dart | 4 +- lib/src/v3/enums/modlog_action_type.dart | 3 +- lib/src/v3/enums/post_feature_type.dart | 5 +- lib/src/v3/enums/registration_mode.dart | 3 +- lib/src/v3/enums/search_type.dart | 3 +- lib/src/v3/enums/sort_type.dart | 6 +- lib/src/v3/enums/subscribed_type.dart | 3 +- lib/src/v3/main.dart | 36 +- .../v3/models/admin/add_admin_response.dart | 3 +- .../admin/add_admin_response.freezed.dart | 99 +- .../v3/models/admin/add_admin_response.g.dart | 15 +- .../v3/models/admin/admin_purge_comment.dart | 3 +- .../admin/admin_purge_comment.freezed.dart | 207 +- .../models/admin/admin_purge_comment.g.dart | 32 +- .../models/admin/admin_purge_community.dart | 3 +- .../admin/admin_purge_community.freezed.dart | 179 +- .../models/admin/admin_purge_community.g.dart | 24 +- .../v3/models/admin/admin_purge_person.dart | 3 +- .../admin/admin_purge_person.freezed.dart | 179 +- .../v3/models/admin/admin_purge_person.g.dart | 24 +- lib/src/v3/models/admin/admin_purge_post.dart | 3 +- .../admin/admin_purge_post.freezed.dart | 210 +- .../v3/models/admin/admin_purge_post.g.dart | 31 +- ...gistration_application_count_response.dart | 8 +- ...on_application_count_response.freezed.dart | 128 +- ...stration_application_count_response.g.dart | 17 +- ...st_registration_applications_response.dart | 11 +- ...tration_applications_response.freezed.dart | 131 +- ..._registration_applications_response.g.dart | 22 +- .../v3/models/admin/purge_item_response.dart | 3 +- .../admin/purge_item_response.freezed.dart | 92 +- .../models/admin/purge_item_response.g.dart | 12 +- .../admin/registration_application.dart | 3 +- .../registration_application.freezed.dart | 253 +- .../admin/registration_application.g.dart | 36 +- .../registration_application_response.dart | 3 +- ...stration_application_response.freezed.dart | 120 +- .../registration_application_response.g.dart | 16 +- lib/src/v3/models/comment/comment.dart | 3 +- .../v3/models/comment/comment.freezed.dart | 450 +- lib/src/v3/models/comment/comment.g.dart | 76 +- .../v3/models/comment/comment_aggregates.dart | 3 +- .../comment/comment_aggregates.freezed.dart | 293 +- .../models/comment/comment_aggregates.g.dart | 44 +- lib/src/v3/models/comment/comment_reply.dart | 3 +- .../models/comment/comment_reply.freezed.dart | 204 +- .../v3/models/comment/comment_reply.g.dart | 30 +- .../comment/comment_reply_response.dart | 3 +- .../comment_reply_response.freezed.dart | 98 +- .../comment/comment_reply_response.g.dart | 14 +- lib/src/v3/models/comment/comment_report.dart | 3 +- .../comment/comment_report.freezed.dart | 324 +- .../v3/models/comment/comment_report.g.dart | 60 +- .../comment/comment_report_response.dart | 3 +- .../comment_report_response.freezed.dart | 102 +- .../comment/comment_report_response.g.dart | 14 +- .../v3/models/comment/comment_response.dart | 3 +- .../comment/comment_response.freezed.dart | 161 +- .../v3/models/comment/comment_response.g.dart | 27 +- .../models/comment/get_comments_response.dart | 3 +- .../get_comments_response.freezed.dart | 99 +- .../comment/get_comments_response.g.dart | 15 +- .../comment/list_comment_likes_response.dart | 3 +- .../list_comment_likes_response.freezed.dart | 109 +- .../list_comment_likes_response.g.dart | 15 +- .../list_comment_reports_response.dart | 3 +- ...list_comment_reports_response.freezed.dart | 113 +- .../list_comment_reports_response.g.dart | 18 +- .../add_mod_to_community_response.dart | 3 +- ...add_mod_to_community_response.freezed.dart | 111 +- .../add_mod_to_community_response.g.dart | 16 +- .../ban_from_community_response.dart | 3 +- .../ban_from_community_response.freezed.dart | 124 +- .../ban_from_community_response.g.dart | 16 +- .../community/block_community_response.dart | 3 +- .../block_community_response.freezed.dart | 127 +- .../community/block_community_response.g.dart | 16 +- lib/src/v3/models/community/community.dart | 3 +- .../models/community/community.freezed.dart | 672 +-- lib/src/v3/models/community/community.g.dart | 102 +- .../community/community_aggregates.dart | 3 +- .../community_aggregates.freezed.dart | 454 +- .../community/community_aggregates.g.dart | 60 +- .../models/community/community_response.dart | 3 +- .../community/community_response.freezed.dart | 133 +- .../community/community_response.g.dart | 23 +- .../community/get_community_response.dart | 3 +- .../get_community_response.freezed.dart | 219 +- .../community/get_community_response.g.dart | 36 +- .../community/hide_community_response.dart | 3 +- .../hide_community_response.freezed.dart | 164 +- .../community/hide_community_response.g.dart | 29 +- .../community/list_communities_response.dart | 3 +- .../list_communities_response.freezed.dart | 109 +- .../list_communities_response.g.dart | 15 +- .../v3/models/custom_emoji/custom_emoji.dart | 3 +- .../custom_emoji/custom_emoji.freezed.dart | 292 +- .../models/custom_emoji/custom_emoji.g.dart | 56 +- .../custom_emoji/custom_emoji_keyword.dart | 3 +- .../custom_emoji_keyword.freezed.dart | 143 +- .../custom_emoji/custom_emoji_keyword.g.dart | 17 +- .../custom_emoji/custom_emoji_response.dart | 3 +- .../custom_emoji_response.freezed.dart | 93 +- .../custom_emoji/custom_emoji_response.g.dart | 14 +- .../delete_custom_emoji_response.dart | 3 +- .../delete_custom_emoji_response.freezed.dart | 123 +- .../delete_custom_emoji_response.g.dart | 15 +- .../federated_instances.dart | 3 +- .../federated_instances.freezed.dart | 185 +- .../federated_instances.g.dart | 33 +- .../get_federated_instances_response.dart | 3 +- ..._federated_instances_response.freezed.dart | 118 +- .../get_federated_instances_response.g.dart | 16 +- .../models/federated_instances/instance.dart | 3 +- .../federated_instances/instance.freezed.dart | 235 +- .../federated_instances/instance.g.dart | 48 +- .../instance_with_federation_state.dart | 3 +- ...nstance_with_federation_state.freezed.dart | 306 +- .../instance_with_federation_state.g.dart | 57 +- .../readable_federation_state.dart | 3 +- .../readable_federation_state.freezed.dart | 258 +- .../readable_federation_state.g.dart | 56 +- lib/src/v3/models/image/image_details.dart | 3 +- .../models/image/image_details.freezed.dart | 168 +- lib/src/v3/models/image/image_details.g.dart | 20 +- lib/src/v3/models/image/local_image.dart | 3 +- .../v3/models/image/local_image.freezed.dart | 192 +- lib/src/v3/models/image/local_image.g.dart | 26 +- lib/src/v3/models/image/local_image_view.dart | 3 +- .../image/local_image_view.freezed.dart | 116 +- .../v3/models/image/local_image_view.g.dart | 13 +- lib/src/v3/models/language/language.dart | 3 +- .../v3/models/language/language.freezed.dart | 135 +- lib/src/v3/models/language/language.g.dart | 14 +- lib/src/v3/models/local_user/local_user.dart | 3 +- .../models/local_user/local_user.freezed.dart | 1015 ++-- .../v3/models/local_user/local_user.g.dart | 122 +- .../local_user_vote_display_mode.dart | 3 +- .../local_user_vote_display_mode.freezed.dart | 226 +- .../local_user_vote_display_mode.g.dart | 32 +- lib/src/v3/models/mod/mod_add.freezed.dart | 200 +- lib/src/v3/models/mod/mod_add.g.dart | 27 +- lib/src/v3/models/mod/mod_add_community.dart | 3 +- .../models/mod/mod_add_community.freezed.dart | 248 +- .../v3/models/mod/mod_add_community.g.dart | 36 +- lib/src/v3/models/mod/mod_ban.freezed.dart | 260 +- lib/src/v3/models/mod/mod_ban.g.dart | 35 +- .../v3/models/mod/mod_ban_from_community.dart | 3 +- .../mod/mod_ban_from_community.freezed.dart | 288 +- .../models/mod/mod_ban_from_community.g.dart | 44 +- lib/src/v3/models/mod/mod_feature_post.dart | 3 +- .../models/mod/mod_feature_post.freezed.dart | 247 +- lib/src/v3/models/mod/mod_feature_post.g.dart | 35 +- lib/src/v3/models/mod/mod_hide_community.dart | 3 +- .../mod/mod_hide_community.freezed.dart | 243 +- .../v3/models/mod/mod_hide_community.g.dart | 36 +- lib/src/v3/models/mod/mod_lock_post.dart | 3 +- .../v3/models/mod/mod_lock_post.freezed.dart | 207 +- lib/src/v3/models/mod/mod_lock_post.g.dart | 30 +- lib/src/v3/models/mod/mod_remove_comment.dart | 3 +- .../mod/mod_remove_comment.freezed.dart | 244 +- .../v3/models/mod/mod_remove_comment.g.dart | 36 +- .../v3/models/mod/mod_remove_community.dart | 3 +- .../mod/mod_remove_community.freezed.dart | 282 +- .../v3/models/mod/mod_remove_community.g.dart | 40 +- lib/src/v3/models/mod/mod_remove_post.dart | 3 +- .../models/mod/mod_remove_post.freezed.dart | 240 +- lib/src/v3/models/mod/mod_remove_post.g.dart | 34 +- .../v3/models/mod/mod_transfer_community.dart | 3 +- .../mod/mod_transfer_community.freezed.dart | 222 +- .../models/mod/mod_transfer_community.g.dart | 32 +- .../v3/models/modlog/get_modlog_response.dart | 3 +- .../modlog/get_modlog_response.freezed.dart | 688 ++- .../models/modlog/get_modlog_response.g.dart | 118 +- .../v3/models/my_user_info/my_user_info.dart | 3 +- .../my_user_info/my_user_info.freezed.dart | 346 +- .../models/my_user_info/my_user_info.g.dart | 54 +- lib/src/v3/models/person/person.freezed.dart | 611 +-- lib/src/v3/models/person/person.g.dart | 93 +- .../v3/models/person/person_aggregates.dart | 3 +- .../person/person_aggregates.freezed.dart | 259 +- .../v3/models/person/person_aggregates.g.dart | 36 +- lib/src/v3/models/person/person_mention.dart | 3 +- .../models/person/person_mention.freezed.dart | 205 +- .../v3/models/person/person_mention.g.dart | 30 +- lib/src/v3/models/post/get_post_response.dart | 3 +- .../post/get_post_response.freezed.dart | 216 +- .../v3/models/post/get_post_response.g.dart | 34 +- .../v3/models/post/get_posts_response.dart | 3 +- .../post/get_posts_response.freezed.dart | 121 +- .../v3/models/post/get_posts_response.g.dart | 17 +- .../post/get_site_metadata_response.dart | 3 +- .../get_site_metadata_response.freezed.dart | 100 +- .../post/get_site_metadata_response.g.dart | 13 +- .../models/post/list_post_likes_response.dart | 3 +- .../list_post_likes_response.freezed.dart | 106 +- .../post/list_post_likes_response.g.dart | 15 +- .../post/list_post_reports_response.dart | 3 +- .../list_post_reports_response.freezed.dart | 109 +- .../post/list_post_reports_response.g.dart | 15 +- .../post/mark_post_as_read_response.dart | 3 +- .../mark_post_as_read_response.freezed.dart | 121 +- .../post/mark_post_as_read_response.g.dart | 17 +- lib/src/v3/models/post/post.freezed.dart | 787 +-- lib/src/v3/models/post/post.g.dart | 113 +- lib/src/v3/models/post/post_aggregates.dart | 9 +- .../models/post/post_aggregates.freezed.dart | 495 +- lib/src/v3/models/post/post_aggregates.g.dart | 63 +- lib/src/v3/models/post/post_report.dart | 3 +- .../v3/models/post/post_report.freezed.dart | 411 +- lib/src/v3/models/post/post_report.g.dart | 68 +- .../v3/models/post/post_report_response.dart | 3 +- .../post/post_report_response.freezed.dart | 93 +- .../models/post/post_report_response.g.dart | 14 +- lib/src/v3/models/post/post_response.dart | 3 +- .../v3/models/post/post_response.freezed.dart | 92 +- lib/src/v3/models/post/post_response.g.dart | 10 +- ...list_private_message_reports_response.dart | 8 +- ...vate_message_reports_response.freezed.dart | 126 +- ...st_private_message_reports_response.g.dart | 22 +- .../private_message/private_message.dart | 3 +- .../private_message.freezed.dart | 339 +- .../private_message/private_message.g.dart | 65 +- .../private_message_report.dart | 3 +- .../private_message_report.freezed.dart | 324 +- .../private_message_report.g.dart | 62 +- .../private_message_report_response.dart | 3 +- ...ivate_message_report_response.freezed.dart | 117 +- .../private_message_report_response.g.dart | 16 +- .../private_message_response.dart | 3 +- .../private_message_response.freezed.dart | 109 +- .../private_message_response.g.dart | 14 +- .../private_messages_response.dart | 3 +- .../private_messages_response.freezed.dart | 112 +- .../private_messages_response.g.dart | 16 +- .../resolve_object_response.dart | 3 +- .../resolve_object_response.freezed.dart | 184 +- .../resolve_object_response.g.dart | 36 +- lib/src/v3/models/search/search_response.dart | 3 +- .../search/search_response.freezed.dart | 251 +- .../v3/models/search/search_response.g.dart | 39 +- .../models/site/block_instance_response.dart | 3 +- .../site/block_instance_response.freezed.dart | 98 +- .../site/block_instance_response.g.dart | 12 +- lib/src/v3/models/site/get_site_response.dart | 3 +- .../site/get_site_response.freezed.dart | 398 +- .../v3/models/site/get_site_response.g.dart | 63 +- lib/src/v3/models/site/link_metadata.dart | 3 +- .../v3/models/site/link_metadata.freezed.dart | 212 +- lib/src/v3/models/site/link_metadata.g.dart | 30 +- lib/src/v3/models/site/local_site.dart | 3 +- .../v3/models/site/local_site.freezed.dart | 982 ++-- lib/src/v3/models/site/local_site.g.dart | 136 +- .../v3/models/site/local_site_rate_limit.dart | 3 +- .../site/local_site_rate_limit.freezed.dart | 653 +-- .../models/site/local_site_rate_limit.g.dart | 99 +- .../models/site/local_site_url_blocklist.dart | 3 +- .../local_site_url_blocklist.freezed.dart | 172 +- .../site/local_site_url_blocklist.g.dart | 44 +- lib/src/v3/models/site/site.freezed.dart | 525 +- lib/src/v3/models/site/site.g.dart | 83 +- lib/src/v3/models/site/site_aggregates.dart | 3 +- .../models/site/site_aggregates.freezed.dart | 361 +- lib/src/v3/models/site/site_aggregates.g.dart | 51 +- lib/src/v3/models/site/site_response.dart | 3 +- .../v3/models/site/site_response.freezed.dart | 122 +- lib/src/v3/models/site/site_response.g.dart | 20 +- lib/src/v3/models/site/site_view.dart | 3 +- lib/src/v3/models/site/site_view.freezed.dart | 188 +- lib/src/v3/models/site/site_view.g.dart | 27 +- lib/src/v3/models/tagline/tagline.dart | 3 +- .../v3/models/tagline/tagline.freezed.dart | 199 +- lib/src/v3/models/tagline/tagline.g.dart | 44 +- .../v3/models/user/ban_person_response.dart | 3 +- .../user/ban_person_response.freezed.dart | 117 +- .../v3/models/user/ban_person_response.g.dart | 16 +- .../models/user/banned_persons_response.dart | 3 +- .../user/banned_persons_response.freezed.dart | 105 +- .../user/banned_persons_response.g.dart | 15 +- .../v3/models/user/block_person_response.dart | 3 +- .../user/block_person_response.freezed.dart | 117 +- .../models/user/block_person_response.g.dart | 16 +- lib/src/v3/models/user/captcha_response.dart | 3 +- .../models/user/captcha_response.freezed.dart | 137 +- .../v3/models/user/captcha_response.g.dart | 16 +- .../models/user/delete_account_response.dart | 3 +- .../user/delete_account_response.freezed.dart | 98 +- .../user/delete_account_response.g.dart | 12 +- .../user/generate_totp_secret_response.dart | 3 +- ...generate_totp_secret_response.freezed.dart | 103 +- .../user/generate_totp_secret_response.g.dart | 12 +- .../v3/models/user/get_captcha_response.dart | 3 +- .../user/get_captcha_response.freezed.dart | 92 +- .../models/user/get_captcha_response.g.dart | 15 +- .../user/get_person_details_response.dart | 3 +- .../get_person_details_response.freezed.dart | 256 +- .../user/get_person_details_response.g.dart | 42 +- .../user/get_person_mentions_response.dart | 3 +- .../get_person_mentions_response.freezed.dart | 107 +- .../user/get_person_mentions_response.g.dart | 15 +- .../v3/models/user/get_replies_response.dart | 3 +- .../user/get_replies_response.freezed.dart | 101 +- .../models/user/get_replies_response.g.dart | 15 +- .../user/get_report_count_response.dart | 3 +- .../get_report_count_response.freezed.dart | 197 +- .../user/get_report_count_response.g.dart | 28 +- .../user/get_unread_count_response.dart | 3 +- .../get_unread_count_response.freezed.dart | 155 +- .../user/get_unread_count_response.g.dart | 21 +- .../v3/models/user/list_media_response.dart | 7 +- .../user/list_media_response.freezed.dart | 99 +- .../v3/models/user/list_media_response.g.dart | 15 +- lib/src/v3/models/user/login_response.dart | 3 +- .../models/user/login_response.freezed.dart | 147 +- lib/src/v3/models/user/login_response.g.dart | 17 +- .../password_change_after_reset_response.dart | 5 +- ...d_change_after_reset_response.freezed.dart | 198 +- ...assword_change_after_reset_response.g.dart | 29 +- .../models/user/password_reset_response.dart | 3 +- .../user/password_reset_response.freezed.dart | 98 +- .../user/password_reset_response.g.dart | 12 +- .../models/user/person_mention_response.dart | 3 +- .../user/person_mention_response.freezed.dart | 102 +- .../user/person_mention_response.g.dart | 14 +- .../user/save_user_settings_response.dart | 3 +- .../save_user_settings_response.freezed.dart | 186 +- .../user/save_user_settings_response.g.dart | 28 +- lib/src/v3/models/user/success_response.dart | 7 +- .../models/user/success_response.freezed.dart | 92 +- .../v3/models/user/success_response.g.dart | 12 +- .../v3/models/user/update_totp_response.dart | 3 +- .../user/update_totp_response.freezed.dart | 92 +- .../models/user/update_totp_response.g.dart | 12 +- .../v3/models/user/verify_email_response.dart | 3 +- .../user/verify_email_response.freezed.dart | 92 +- .../models/user/verify_email_response.g.dart | 12 +- .../v3/views/admin_purge_comment_view.dart | 3 +- .../admin_purge_comment_view.freezed.dart | 149 +- .../v3/views/admin_purge_comment_view.g.dart | 27 +- .../v3/views/admin_purge_community_view.dart | 3 +- .../admin_purge_community_view.freezed.dart | 130 +- .../views/admin_purge_community_view.g.dart | 23 +- lib/src/v3/views/admin_purge_person_view.dart | 3 +- .../admin_purge_person_view.freezed.dart | 121 +- .../v3/views/admin_purge_person_view.g.dart | 23 +- lib/src/v3/views/admin_purge_post_view.dart | 3 +- .../views/admin_purge_post_view.freezed.dart | 155 +- lib/src/v3/views/admin_purge_post_view.g.dart | 27 +- lib/src/v3/views/comment_reply_view.dart | 3 +- .../v3/views/comment_reply_view.freezed.dart | 571 +- lib/src/v3/views/comment_reply_view.g.dart | 74 +- lib/src/v3/views/comment_report_view.dart | 3 +- .../v3/views/comment_report_view.freezed.dart | 571 +- lib/src/v3/views/comment_report_view.g.dart | 79 +- lib/src/v3/views/comment_view.dart | 3 +- lib/src/v3/views/comment_view.freezed.dart | 501 +- lib/src/v3/views/comment_view.g.dart | 63 +- lib/src/v3/views/community_block_view.dart | 3 +- .../views/community_block_view.freezed.dart | 117 +- lib/src/v3/views/community_block_view.g.dart | 15 +- lib/src/v3/views/community_follower_view.dart | 3 +- .../community_follower_view.freezed.dart | 126 +- .../v3/views/community_follower_view.g.dart | 15 +- .../v3/views/community_moderator_view.dart | 3 +- .../community_moderator_view.freezed.dart | 127 +- .../v3/views/community_moderator_view.g.dart | 18 +- lib/src/v3/views/community_view.dart | 3 +- lib/src/v3/views/community_view.freezed.dart | 224 +- lib/src/v3/views/community_view.g.dart | 31 +- lib/src/v3/views/custom_emoji_view.dart | 3 +- .../v3/views/custom_emoji_view.freezed.dart | 125 +- lib/src/v3/views/custom_emoji_view.g.dart | 23 +- lib/src/v3/views/instance_block_view.dart | 3 +- .../v3/views/instance_block_view.freezed.dart | 143 +- lib/src/v3/views/instance_block_view.g.dart | 26 +- lib/src/v3/views/local_user_view.dart | 3 +- lib/src/v3/views/local_user_view.freezed.dart | 191 +- lib/src/v3/views/local_user_view.g.dart | 30 +- lib/src/v3/views/mod_add_community_view.dart | 3 +- .../views/mod_add_community_view.freezed.dart | 194 +- .../v3/views/mod_add_community_view.g.dart | 32 +- lib/src/v3/views/mod_add_view.dart | 3 +- lib/src/v3/views/mod_add_view.freezed.dart | 142 +- lib/src/v3/views/mod_add_view.g.dart | 25 +- .../v3/views/mod_ban_from_community_view.dart | 3 +- .../mod_ban_from_community_view.freezed.dart | 204 +- .../views/mod_ban_from_community_view.g.dart | 32 +- lib/src/v3/views/mod_ban_view.dart | 3 +- lib/src/v3/views/mod_ban_view.freezed.dart | 142 +- lib/src/v3/views/mod_ban_view.g.dart | 25 +- lib/src/v3/views/mod_feature_post_view.dart | 3 +- .../views/mod_feature_post_view.freezed.dart | 190 +- lib/src/v3/views/mod_feature_post_view.g.dart | 31 +- lib/src/v3/views/mod_hide_community_view.dart | 3 +- .../mod_hide_community_view.freezed.dart | 157 +- .../v3/views/mod_hide_community_view.g.dart | 27 +- lib/src/v3/views/mod_lock_post_view.dart | 3 +- .../v3/views/mod_lock_post_view.freezed.dart | 187 +- lib/src/v3/views/mod_lock_post_view.g.dart | 31 +- lib/src/v3/views/mod_remove_comment_view.dart | 3 +- .../mod_remove_comment_view.freezed.dart | 254 +- .../v3/views/mod_remove_comment_view.g.dart | 39 +- .../v3/views/mod_remove_community_view.dart | 3 +- .../mod_remove_community_view.freezed.dart | 174 +- .../v3/views/mod_remove_community_view.g.dart | 27 +- lib/src/v3/views/mod_remove_post_view.dart | 3 +- .../views/mod_remove_post_view.freezed.dart | 190 +- lib/src/v3/views/mod_remove_post_view.g.dart | 31 +- .../v3/views/mod_transfer_community_view.dart | 3 +- .../mod_transfer_community_view.freezed.dart | 204 +- .../views/mod_transfer_community_view.g.dart | 32 +- lib/src/v3/views/person_block_view.dart | 3 +- .../v3/views/person_block_view.freezed.dart | 113 +- lib/src/v3/views/person_block_view.g.dart | 15 +- lib/src/v3/views/person_mention_view.dart | 3 +- .../v3/views/person_mention_view.freezed.dart | 571 +- lib/src/v3/views/person_mention_view.g.dart | 74 +- lib/src/v3/views/person_view.dart | 3 +- lib/src/v3/views/person_view.freezed.dart | 136 +- lib/src/v3/views/person_view.g.dart | 13 +- lib/src/v3/views/post_report_view.dart | 3 +- .../v3/views/post_report_view.freezed.dart | 634 +-- lib/src/v3/views/post_report_view.g.dart | 85 +- lib/src/v3/views/post_view.dart | 3 +- lib/src/v3/views/post_view.freezed.dart | 599 +- lib/src/v3/views/post_view.g.dart | 77 +- .../v3/views/private_message_report_view.dart | 3 +- .../private_message_report_view.freezed.dart | 241 +- .../views/private_message_report_view.g.dart | 37 +- lib/src/v3/views/private_message_view.dart | 3 +- .../views/private_message_view.freezed.dart | 151 +- lib/src/v3/views/private_message_view.g.dart | 25 +- .../views/registration_application_view.dart | 3 +- ...registration_application_view.freezed.dart | 211 +- .../registration_application_view.g.dart | 32 +- lib/src/v3/views/vote_view.dart | 3 +- lib/src/v3/views/vote_view.freezed.dart | 151 +- lib/src/v3/views/vote_view.g.dart | 23 +- 482 files changed, 27885 insertions(+), 36890 deletions(-) diff --git a/example/lemmy_api_client_example.dart b/example/lemmy_api_client_example.dart index 34f46e24..ab73b3a2 100644 --- a/example/lemmy_api_client_example.dart +++ b/example/lemmy_api_client_example.dart @@ -1,2 +1 @@ -void main() { -} +void main() {} diff --git a/lib/src/pictrs.dart b/lib/src/pictrs.dart index 0dd28b6a..c2728f06 100644 --- a/lib/src/pictrs.dart +++ b/lib/src/pictrs.dart @@ -15,33 +15,19 @@ class PictrsApi { const PictrsApi(this.host); - Future upload({ - required String filePath, - String? auth, - }) async { - final req = http.MultipartRequest('POST', Uri.https(host, extraPath)) - ..files.add(await http.MultipartFile.fromPath('images[]', filePath)); + Future upload({required String filePath, String? auth}) async { + final req = http.MultipartRequest('POST', Uri.https(host, extraPath))..files.add(await http.MultipartFile.fromPath('images[]', filePath)); req.headers['Cookie'] = 'jwt=$auth'; final res = await req.send(); - final Map body = - jsonDecode(utf8.decode(await res.stream.toBytes())); + final Map body = jsonDecode(utf8.decode(await res.stream.toBytes())); body['instance_host'] = host; return PictrsUpload.fromJson(body); } - Future delete( - PictrsUploadFile pictrsFile, - String? auth, - ) async { - final res = await http.get( - Uri.https( - host, - '$extraPath/delete/${pictrsFile.deleteToken}/${pictrsFile.file}', - ), - headers: {'Authorization': 'Bearer $auth'}, - ); + Future delete(PictrsUploadFile pictrsFile, String? auth) async { + final res = await http.get(Uri.https(host, '$extraPath/delete/${pictrsFile.deleteToken}/${pictrsFile.file}'), headers: {'Authorization': 'Bearer $auth'}); if (!res.ok) { switch (res.statusCode) { @@ -61,26 +47,17 @@ class PictrsApi { @freezed class PictrsUploadFile with _$PictrsUploadFile { @JsonSerializable(fieldRename: FieldRename.snake) - const factory PictrsUploadFile({ - required String deleteToken, - required String file, - }) = _PictrsUploadFile; + const factory PictrsUploadFile({required String deleteToken, required String file}) = _PictrsUploadFile; const PictrsUploadFile._(); - factory PictrsUploadFile.fromJson(Map json) => - _$PictrsUploadFileFromJson(json); + factory PictrsUploadFile.fromJson(Map json) => _$PictrsUploadFileFromJson(json); } @freezed class PictrsUpload with _$PictrsUpload { @JsonSerializable(fieldRename: FieldRename.snake) - const factory PictrsUpload({ - required String msg, - required List files, - required String instanceHost, - }) = _PictrsUpload; + const factory PictrsUpload({required String msg, required List files, required String instanceHost}) = _PictrsUpload; const PictrsUpload._(); - factory PictrsUpload.fromJson(Map json) => - _$PictrsUploadFromJson(json); + factory PictrsUpload.fromJson(Map json) => _$PictrsUploadFromJson(json); } diff --git a/lib/src/pictrs.freezed.dart b/lib/src/pictrs.freezed.dart index 85ac28bf..13dabb3c 100644 --- a/lib/src/pictrs.freezed.dart +++ b/lib/src/pictrs.freezed.dart @@ -12,7 +12,8 @@ part of 'pictrs.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PictrsUploadFile _$PictrsUploadFileFromJson(Map json) { return _PictrsUploadFile.fromJson(json); @@ -29,22 +30,18 @@ mixin _$PictrsUploadFile { /// Create a copy of PictrsUploadFile /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PictrsUploadFileCopyWith get copyWith => - throw _privateConstructorUsedError; + $PictrsUploadFileCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PictrsUploadFileCopyWith<$Res> { - factory $PictrsUploadFileCopyWith( - PictrsUploadFile value, $Res Function(PictrsUploadFile) then) = - _$PictrsUploadFileCopyWithImpl<$Res, PictrsUploadFile>; + factory $PictrsUploadFileCopyWith(PictrsUploadFile value, $Res Function(PictrsUploadFile) then) = _$PictrsUploadFileCopyWithImpl<$Res, PictrsUploadFile>; @useResult $Res call({String deleteToken, String file}); } /// @nodoc -class _$PictrsUploadFileCopyWithImpl<$Res, $Val extends PictrsUploadFile> - implements $PictrsUploadFileCopyWith<$Res> { +class _$PictrsUploadFileCopyWithImpl<$Res, $Val extends PictrsUploadFile> implements $PictrsUploadFileCopyWith<$Res> { _$PictrsUploadFileCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -56,60 +53,56 @@ class _$PictrsUploadFileCopyWithImpl<$Res, $Val extends PictrsUploadFile> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? deleteToken = null, - Object? file = null, - }) { - return _then(_value.copyWith( - deleteToken: null == deleteToken - ? _value.deleteToken - : deleteToken // ignore: cast_nullable_to_non_nullable - as String, - file: null == file - ? _value.file - : file // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? deleteToken = null, Object? file = null}) { + return _then( + _value.copyWith( + deleteToken: + null == deleteToken + ? _value.deleteToken + : deleteToken // ignore: cast_nullable_to_non_nullable + as String, + file: + null == file + ? _value.file + : file // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PictrsUploadFileImplCopyWith<$Res> - implements $PictrsUploadFileCopyWith<$Res> { - factory _$$PictrsUploadFileImplCopyWith(_$PictrsUploadFileImpl value, - $Res Function(_$PictrsUploadFileImpl) then) = - __$$PictrsUploadFileImplCopyWithImpl<$Res>; +abstract class _$$PictrsUploadFileImplCopyWith<$Res> implements $PictrsUploadFileCopyWith<$Res> { + factory _$$PictrsUploadFileImplCopyWith(_$PictrsUploadFileImpl value, $Res Function(_$PictrsUploadFileImpl) then) = __$$PictrsUploadFileImplCopyWithImpl<$Res>; @override @useResult $Res call({String deleteToken, String file}); } /// @nodoc -class __$$PictrsUploadFileImplCopyWithImpl<$Res> - extends _$PictrsUploadFileCopyWithImpl<$Res, _$PictrsUploadFileImpl> - implements _$$PictrsUploadFileImplCopyWith<$Res> { - __$$PictrsUploadFileImplCopyWithImpl(_$PictrsUploadFileImpl _value, - $Res Function(_$PictrsUploadFileImpl) _then) - : super(_value, _then); +class __$$PictrsUploadFileImplCopyWithImpl<$Res> extends _$PictrsUploadFileCopyWithImpl<$Res, _$PictrsUploadFileImpl> implements _$$PictrsUploadFileImplCopyWith<$Res> { + __$$PictrsUploadFileImplCopyWithImpl(_$PictrsUploadFileImpl _value, $Res Function(_$PictrsUploadFileImpl) _then) : super(_value, _then); /// Create a copy of PictrsUploadFile /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? deleteToken = null, - Object? file = null, - }) { - return _then(_$PictrsUploadFileImpl( - deleteToken: null == deleteToken - ? _value.deleteToken - : deleteToken // ignore: cast_nullable_to_non_nullable - as String, - file: null == file - ? _value.file - : file // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? deleteToken = null, Object? file = null}) { + return _then( + _$PictrsUploadFileImpl( + deleteToken: + null == deleteToken + ? _value.deleteToken + : deleteToken // ignore: cast_nullable_to_non_nullable + as String, + file: + null == file + ? _value.file + : file // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -117,11 +110,9 @@ class __$$PictrsUploadFileImplCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake) class _$PictrsUploadFileImpl extends _PictrsUploadFile { - const _$PictrsUploadFileImpl({required this.deleteToken, required this.file}) - : super._(); + const _$PictrsUploadFileImpl({required this.deleteToken, required this.file}) : super._(); - factory _$PictrsUploadFileImpl.fromJson(Map json) => - _$$PictrsUploadFileImplFromJson(json); + factory _$PictrsUploadFileImpl.fromJson(Map json) => _$$PictrsUploadFileImplFromJson(json); @override final String deleteToken; @@ -138,8 +129,7 @@ class _$PictrsUploadFileImpl extends _PictrsUploadFile { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PictrsUploadFileImpl && - (identical(other.deleteToken, deleteToken) || - other.deleteToken == deleteToken) && + (identical(other.deleteToken, deleteToken) || other.deleteToken == deleteToken) && (identical(other.file, file) || other.file == file)); } @@ -152,26 +142,19 @@ class _$PictrsUploadFileImpl extends _PictrsUploadFile { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PictrsUploadFileImplCopyWith<_$PictrsUploadFileImpl> get copyWith => - __$$PictrsUploadFileImplCopyWithImpl<_$PictrsUploadFileImpl>( - this, _$identity); + _$$PictrsUploadFileImplCopyWith<_$PictrsUploadFileImpl> get copyWith => __$$PictrsUploadFileImplCopyWithImpl<_$PictrsUploadFileImpl>(this, _$identity); @override Map toJson() { - return _$$PictrsUploadFileImplToJson( - this, - ); + return _$$PictrsUploadFileImplToJson(this); } } abstract class _PictrsUploadFile extends PictrsUploadFile { - const factory _PictrsUploadFile( - {required final String deleteToken, - required final String file}) = _$PictrsUploadFileImpl; + const factory _PictrsUploadFile({required final String deleteToken, required final String file}) = _$PictrsUploadFileImpl; const _PictrsUploadFile._() : super._(); - factory _PictrsUploadFile.fromJson(Map json) = - _$PictrsUploadFileImpl.fromJson; + factory _PictrsUploadFile.fromJson(Map json) = _$PictrsUploadFileImpl.fromJson; @override String get deleteToken; @@ -182,8 +165,7 @@ abstract class _PictrsUploadFile extends PictrsUploadFile { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PictrsUploadFileImplCopyWith<_$PictrsUploadFileImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PictrsUploadFileImplCopyWith<_$PictrsUploadFileImpl> get copyWith => throw _privateConstructorUsedError; } PictrsUpload _$PictrsUploadFromJson(Map json) { @@ -202,22 +184,18 @@ mixin _$PictrsUpload { /// Create a copy of PictrsUpload /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PictrsUploadCopyWith get copyWith => - throw _privateConstructorUsedError; + $PictrsUploadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PictrsUploadCopyWith<$Res> { - factory $PictrsUploadCopyWith( - PictrsUpload value, $Res Function(PictrsUpload) then) = - _$PictrsUploadCopyWithImpl<$Res, PictrsUpload>; + factory $PictrsUploadCopyWith(PictrsUpload value, $Res Function(PictrsUpload) then) = _$PictrsUploadCopyWithImpl<$Res, PictrsUpload>; @useResult $Res call({String msg, List files, String instanceHost}); } /// @nodoc -class _$PictrsUploadCopyWithImpl<$Res, $Val extends PictrsUpload> - implements $PictrsUploadCopyWith<$Res> { +class _$PictrsUploadCopyWithImpl<$Res, $Val extends PictrsUpload> implements $PictrsUploadCopyWith<$Res> { _$PictrsUploadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -229,70 +207,66 @@ class _$PictrsUploadCopyWithImpl<$Res, $Val extends PictrsUpload> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? msg = null, - Object? files = null, - Object? instanceHost = null, - }) { - return _then(_value.copyWith( - msg: null == msg - ? _value.msg - : msg // ignore: cast_nullable_to_non_nullable - as String, - files: null == files - ? _value.files - : files // ignore: cast_nullable_to_non_nullable - as List, - instanceHost: null == instanceHost - ? _value.instanceHost - : instanceHost // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? msg = null, Object? files = null, Object? instanceHost = null}) { + return _then( + _value.copyWith( + msg: + null == msg + ? _value.msg + : msg // ignore: cast_nullable_to_non_nullable + as String, + files: + null == files + ? _value.files + : files // ignore: cast_nullable_to_non_nullable + as List, + instanceHost: + null == instanceHost + ? _value.instanceHost + : instanceHost // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PictrsUploadImplCopyWith<$Res> - implements $PictrsUploadCopyWith<$Res> { - factory _$$PictrsUploadImplCopyWith( - _$PictrsUploadImpl value, $Res Function(_$PictrsUploadImpl) then) = - __$$PictrsUploadImplCopyWithImpl<$Res>; +abstract class _$$PictrsUploadImplCopyWith<$Res> implements $PictrsUploadCopyWith<$Res> { + factory _$$PictrsUploadImplCopyWith(_$PictrsUploadImpl value, $Res Function(_$PictrsUploadImpl) then) = __$$PictrsUploadImplCopyWithImpl<$Res>; @override @useResult $Res call({String msg, List files, String instanceHost}); } /// @nodoc -class __$$PictrsUploadImplCopyWithImpl<$Res> - extends _$PictrsUploadCopyWithImpl<$Res, _$PictrsUploadImpl> - implements _$$PictrsUploadImplCopyWith<$Res> { - __$$PictrsUploadImplCopyWithImpl( - _$PictrsUploadImpl _value, $Res Function(_$PictrsUploadImpl) _then) - : super(_value, _then); +class __$$PictrsUploadImplCopyWithImpl<$Res> extends _$PictrsUploadCopyWithImpl<$Res, _$PictrsUploadImpl> implements _$$PictrsUploadImplCopyWith<$Res> { + __$$PictrsUploadImplCopyWithImpl(_$PictrsUploadImpl _value, $Res Function(_$PictrsUploadImpl) _then) : super(_value, _then); /// Create a copy of PictrsUpload /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? msg = null, - Object? files = null, - Object? instanceHost = null, - }) { - return _then(_$PictrsUploadImpl( - msg: null == msg - ? _value.msg - : msg // ignore: cast_nullable_to_non_nullable - as String, - files: null == files - ? _value._files - : files // ignore: cast_nullable_to_non_nullable - as List, - instanceHost: null == instanceHost - ? _value.instanceHost - : instanceHost // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? msg = null, Object? files = null, Object? instanceHost = null}) { + return _then( + _$PictrsUploadImpl( + msg: + null == msg + ? _value.msg + : msg // ignore: cast_nullable_to_non_nullable + as String, + files: + null == files + ? _value._files + : files // ignore: cast_nullable_to_non_nullable + as List, + instanceHost: + null == instanceHost + ? _value.instanceHost + : instanceHost // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -300,15 +274,9 @@ class __$$PictrsUploadImplCopyWithImpl<$Res> @JsonSerializable(fieldRename: FieldRename.snake) class _$PictrsUploadImpl extends _PictrsUpload { - const _$PictrsUploadImpl( - {required this.msg, - required final List files, - required this.instanceHost}) - : _files = files, - super._(); + const _$PictrsUploadImpl({required this.msg, required final List files, required this.instanceHost}) : _files = files, super._(); - factory _$PictrsUploadImpl.fromJson(Map json) => - _$$PictrsUploadImplFromJson(json); + factory _$PictrsUploadImpl.fromJson(Map json) => _$$PictrsUploadImplFromJson(json); @override final String msg; @@ -335,40 +303,31 @@ class _$PictrsUploadImpl extends _PictrsUpload { other is _$PictrsUploadImpl && (identical(other.msg, msg) || other.msg == msg) && const DeepCollectionEquality().equals(other._files, _files) && - (identical(other.instanceHost, instanceHost) || - other.instanceHost == instanceHost)); + (identical(other.instanceHost, instanceHost) || other.instanceHost == instanceHost)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, msg, - const DeepCollectionEquality().hash(_files), instanceHost); + int get hashCode => Object.hash(runtimeType, msg, const DeepCollectionEquality().hash(_files), instanceHost); /// Create a copy of PictrsUpload /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PictrsUploadImplCopyWith<_$PictrsUploadImpl> get copyWith => - __$$PictrsUploadImplCopyWithImpl<_$PictrsUploadImpl>(this, _$identity); + _$$PictrsUploadImplCopyWith<_$PictrsUploadImpl> get copyWith => __$$PictrsUploadImplCopyWithImpl<_$PictrsUploadImpl>(this, _$identity); @override Map toJson() { - return _$$PictrsUploadImplToJson( - this, - ); + return _$$PictrsUploadImplToJson(this); } } abstract class _PictrsUpload extends PictrsUpload { - const factory _PictrsUpload( - {required final String msg, - required final List files, - required final String instanceHost}) = _$PictrsUploadImpl; + const factory _PictrsUpload({required final String msg, required final List files, required final String instanceHost}) = _$PictrsUploadImpl; const _PictrsUpload._() : super._(); - factory _PictrsUpload.fromJson(Map json) = - _$PictrsUploadImpl.fromJson; + factory _PictrsUpload.fromJson(Map json) = _$PictrsUploadImpl.fromJson; @override String get msg; @@ -381,6 +340,5 @@ abstract class _PictrsUpload extends PictrsUpload { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PictrsUploadImplCopyWith<_$PictrsUploadImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PictrsUploadImplCopyWith<_$PictrsUploadImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/pictrs.g.dart b/lib/src/pictrs.g.dart index a0619115..5190fbd8 100644 --- a/lib/src/pictrs.g.dart +++ b/lib/src/pictrs.g.dart @@ -6,32 +6,18 @@ part of 'pictrs.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PictrsUploadFileImpl _$$PictrsUploadFileImplFromJson( - Map json) => - _$PictrsUploadFileImpl( - deleteToken: json['delete_token'] as String, - file: json['file'] as String, - ); +_$PictrsUploadFileImpl _$$PictrsUploadFileImplFromJson(Map json) => _$PictrsUploadFileImpl(deleteToken: json['delete_token'] as String, file: json['file'] as String); -Map _$$PictrsUploadFileImplToJson( - _$PictrsUploadFileImpl instance) => - { - 'delete_token': instance.deleteToken, - 'file': instance.file, - }; +Map _$$PictrsUploadFileImplToJson(_$PictrsUploadFileImpl instance) => {'delete_token': instance.deleteToken, 'file': instance.file}; -_$PictrsUploadImpl _$$PictrsUploadImplFromJson(Map json) => - _$PictrsUploadImpl( - msg: json['msg'] as String, - files: (json['files'] as List) - .map((e) => PictrsUploadFile.fromJson(e as Map)) - .toList(), - instanceHost: json['instance_host'] as String, - ); +_$PictrsUploadImpl _$$PictrsUploadImplFromJson(Map json) => _$PictrsUploadImpl( + msg: json['msg'] as String, + files: (json['files'] as List).map((e) => PictrsUploadFile.fromJson(e as Map)).toList(), + instanceHost: json['instance_host'] as String, +); -Map _$$PictrsUploadImplToJson(_$PictrsUploadImpl instance) => - { - 'msg': instance.msg, - 'files': instance.files.map((e) => e.toJson()).toList(), - 'instance_host': instance.instanceHost, - }; +Map _$$PictrsUploadImplToJson(_$PictrsUploadImpl instance) => { + 'msg': instance.msg, + 'files': instance.files.map((e) => e.toJson()).toList(), + 'instance_host': instance.instanceHost, +}; diff --git a/lib/src/utils/force_utc_datetime.dart b/lib/src/utils/force_utc_datetime.dart index 78cd41c4..c678a798 100644 --- a/lib/src/utils/force_utc_datetime.dart +++ b/lib/src/utils/force_utc_datetime.dart @@ -4,8 +4,7 @@ class ForceUtcDateTime implements JsonConverter { const ForceUtcDateTime(); @override - DateTime fromJson(String json) => - DateTime.parse('$json${json.endsWith('Z') ? '' : 'Z'}'); + DateTime fromJson(String json) => DateTime.parse('$json${json.endsWith('Z') ? '' : 'Z'}'); @override String toJson(DateTime json) => json.toIso8601String(); diff --git a/lib/src/utils/serde.dart b/lib/src/utils/serde.dart index 0be8d62d..d4a76a02 100644 --- a/lib/src/utils/serde.dart +++ b/lib/src/utils/serde.dart @@ -2,12 +2,6 @@ import 'package:json_annotation/json_annotation.dart'; import 'force_utc_datetime.dart'; -const modelSerde = JsonSerializable( - fieldRename: FieldRename.snake, - converters: [ForceUtcDateTime()], -); +const modelSerde = JsonSerializable(fieldRename: FieldRename.snake, converters: [ForceUtcDateTime()]); -const apiSerde = JsonSerializable( - fieldRename: FieldRename.snake, - includeIfNull: false, -); +const apiSerde = JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false); diff --git a/lib/src/v3/api/admin/admin.dart b/lib/src/v3/api/admin/admin.dart index 1d4fb5d4..e1bccd05 100644 --- a/lib/src/v3/api/admin/admin.dart +++ b/lib/src/v3/api/admin/admin.dart @@ -10,9 +10,7 @@ part 'admin.g.dart'; /// /// `HTTP.POST /admin/add` @freezed -class AddAdmin - with _$AddAdmin - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class AddAdmin with _$AddAdmin implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory AddAdmin({ required int personId, // v0.18.0 @@ -21,58 +19,40 @@ class AddAdmin }) = _AddAdmin; const AddAdmin._(); - factory AddAdmin.fromJson(Map json) => - _$AddAdminFromJson(json); + factory AddAdmin.fromJson(Map json) => _$AddAdminFromJson(json); final path = '/admin/add'; final httpMethod = HttpMethod.post; @override - AddAdminResponse responseFactory(Map json) => - AddAdminResponse.fromJson(json); + AddAdminResponse responseFactory(Map json) => AddAdminResponse.fromJson(json); } /// Get the unread registration applications count. /// /// `HTTP.GET /admin/registration_application/count` @freezed -class GetUnreadRegistrationApplicationCount - with _$GetUnreadRegistrationApplicationCount - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetUnreadRegistrationApplicationCount with _$GetUnreadRegistrationApplicationCount implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetUnreadRegistrationApplicationCount({ - String? auth, - }) = _GetUnreadRegistrationApplicationCount; + const factory GetUnreadRegistrationApplicationCount({String? auth}) = _GetUnreadRegistrationApplicationCount; const GetUnreadRegistrationApplicationCount._(); - factory GetUnreadRegistrationApplicationCount.fromJson( - Map json, - ) => - _$GetUnreadRegistrationApplicationCountFromJson(json); + factory GetUnreadRegistrationApplicationCount.fromJson(Map json) => _$GetUnreadRegistrationApplicationCountFromJson(json); final path = '/admin/registration_application/count'; final httpMethod = HttpMethod.get; @override - GetUnreadRegistrationApplicationCountResponse responseFactory( - Map json, - ) => - GetUnreadRegistrationApplicationCountResponse.fromJson(json); + GetUnreadRegistrationApplicationCountResponse responseFactory(Map json) => GetUnreadRegistrationApplicationCountResponse.fromJson(json); } /// List the registration applications. /// /// `HTTP.GET /admin/registration_application/list` @freezed -class ListRegistrationApplications - with _$ListRegistrationApplications - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListRegistrationApplications with _$ListRegistrationApplications implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListRegistrationApplications({ bool? unreadOnly, // v0.18.0 @@ -82,29 +62,21 @@ class ListRegistrationApplications }) = _ListRegistrationApplications; const ListRegistrationApplications._(); - factory ListRegistrationApplications.fromJson(Map json) => - _$ListRegistrationApplicationsFromJson(json); + factory ListRegistrationApplications.fromJson(Map json) => _$ListRegistrationApplicationsFromJson(json); final path = '/admin/registration_application/list'; final httpMethod = HttpMethod.get; @override - ListRegistrationApplicationsResponse responseFactory( - Map json, - ) => - ListRegistrationApplicationsResponse.fromJson(json); + ListRegistrationApplicationsResponse responseFactory(Map json) => ListRegistrationApplicationsResponse.fromJson(json); } /// Approve a registration application /// /// `HTTP.PUT /admin/registration_application/approve` @freezed -class ApproveRegistrationApplication - with _$ApproveRegistrationApplication - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ApproveRegistrationApplication with _$ApproveRegistrationApplication implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ApproveRegistrationApplication({ required int id, // v0.18.0 @@ -114,27 +86,21 @@ class ApproveRegistrationApplication }) = _ApproveRegistrationApplication; const ApproveRegistrationApplication._(); - factory ApproveRegistrationApplication.fromJson(Map json) => - _$ApproveRegistrationApplicationFromJson(json); + factory ApproveRegistrationApplication.fromJson(Map json) => _$ApproveRegistrationApplicationFromJson(json); final path = '/admin/registration_application/approve'; final httpMethod = HttpMethod.put; @override - RegistrationApplicationResponse responseFactory(Map json) => - RegistrationApplicationResponse.fromJson(json); + RegistrationApplicationResponse responseFactory(Map json) => RegistrationApplicationResponse.fromJson(json); } /// Get the application a user submitted when they first registered their account /// /// `HTTP.GET /admin/registration_application` @freezed -class GetRegistrationApplication - with _$GetRegistrationApplication - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetRegistrationApplication with _$GetRegistrationApplication implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetRegistrationApplication({ required int personId, // v0.19.6 (required) @@ -142,25 +108,21 @@ class GetRegistrationApplication }) = _GetRegistrationApplication; const GetRegistrationApplication._(); - factory GetRegistrationApplication.fromJson(Map json) => - _$GetRegistrationApplicationFromJson(json); + factory GetRegistrationApplication.fromJson(Map json) => _$GetRegistrationApplicationFromJson(json); final path = '/admin/registration_application'; final httpMethod = HttpMethod.get; @override - RegistrationApplicationResponse responseFactory(Map json) => - RegistrationApplicationResponse.fromJson(json); + RegistrationApplicationResponse responseFactory(Map json) => RegistrationApplicationResponse.fromJson(json); } /// Purge / Delete a person from the database. /// /// `HTTP.POST /admin/purge/person` @freezed -class PurgePerson - with _$PurgePerson - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class PurgePerson with _$PurgePerson implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory PurgePerson({ required int personId, // v0.18.0 @@ -169,25 +131,21 @@ class PurgePerson }) = _PurgePerson; const PurgePerson._(); - factory PurgePerson.fromJson(Map json) => - _$PurgePersonFromJson(json); + factory PurgePerson.fromJson(Map json) => _$PurgePersonFromJson(json); final path = '/admin/purge/person'; final httpMethod = HttpMethod.post; @override - PurgeItemResponse responseFactory(Map json) => - PurgeItemResponse.fromJson(json); + PurgeItemResponse responseFactory(Map json) => PurgeItemResponse.fromJson(json); } /// Purge / Delete a community from the database. /// /// `HTTP.POST /admin/purge/community` @freezed -class PurgeCommunity - with _$PurgeCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class PurgeCommunity with _$PurgeCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory PurgeCommunity({ required int communityId, // v0.18.0 @@ -196,25 +154,21 @@ class PurgeCommunity }) = _PurgeCommunity; const PurgeCommunity._(); - factory PurgeCommunity.fromJson(Map json) => - _$PurgeCommunityFromJson(json); + factory PurgeCommunity.fromJson(Map json) => _$PurgeCommunityFromJson(json); final path = '/admin/purge/community'; final httpMethod = HttpMethod.post; @override - PurgeItemResponse responseFactory(Map json) => - PurgeItemResponse.fromJson(json); + PurgeItemResponse responseFactory(Map json) => PurgeItemResponse.fromJson(json); } /// Purge / Delete a post from the database. /// /// `HTTP.POST /admin/purge/post` @freezed -class PurgePost - with _$PurgePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class PurgePost with _$PurgePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory PurgePost({ required int postId, // v0.18.0 @@ -223,25 +177,21 @@ class PurgePost }) = _PurgePost; const PurgePost._(); - factory PurgePost.fromJson(Map json) => - _$PurgePostFromJson(json); + factory PurgePost.fromJson(Map json) => _$PurgePostFromJson(json); final path = '/admin/purge/post'; final httpMethod = HttpMethod.post; @override - PurgeItemResponse responseFactory(Map json) => - PurgeItemResponse.fromJson(json); + PurgeItemResponse responseFactory(Map json) => PurgeItemResponse.fromJson(json); } /// Purge / Delete a comment from the database. /// /// `HTTP.POST /admin/purge/comment` @freezed -class PurgeComment - with _$PurgeComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class PurgeComment with _$PurgeComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory PurgeComment({ required int commentId, // v0.18.0 @@ -250,25 +200,21 @@ class PurgeComment }) = _PurgeComment; const PurgeComment._(); - factory PurgeComment.fromJson(Map json) => - _$PurgeCommentFromJson(json); + factory PurgeComment.fromJson(Map json) => _$PurgeCommentFromJson(json); final path = '/admin/purge/comment'; final httpMethod = HttpMethod.post; @override - PurgeItemResponse responseFactory(Map json) => - PurgeItemResponse.fromJson(json); + PurgeItemResponse responseFactory(Map json) => PurgeItemResponse.fromJson(json); } /// List all the media known to your instance. /// /// `HTTP.GET /admin/list_all_media` @freezed -class ListAllMedia - with _$ListAllMedia - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ListAllMedia with _$ListAllMedia implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListAllMedia({ int? page, // v0.19.4 (optional) @@ -277,14 +223,12 @@ class ListAllMedia }) = _ListAllMedia; const ListAllMedia._(); - factory ListAllMedia.fromJson(Map json) => - _$ListAllMediaFromJson(json); + factory ListAllMedia.fromJson(Map json) => _$ListAllMediaFromJson(json); final path = '/admin/list_all_media'; final httpMethod = HttpMethod.get; @override - ListMediaResponse responseFactory(Map json) => - ListMediaResponse.fromJson(json); + ListMediaResponse responseFactory(Map json) => ListMediaResponse.fromJson(json); } diff --git a/lib/src/v3/api/admin/admin.freezed.dart b/lib/src/v3/api/admin/admin.freezed.dart index c30bd259..5fac4c7d 100644 --- a/lib/src/v3/api/admin/admin.freezed.dart +++ b/lib/src/v3/api/admin/admin.freezed.dart @@ -12,7 +12,8 @@ part of 'admin.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AddAdmin _$AddAdminFromJson(Map json) { return _AddAdmin.fromJson(json); @@ -30,21 +31,18 @@ mixin _$AddAdmin { /// Create a copy of AddAdmin /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AddAdminCopyWith get copyWith => - throw _privateConstructorUsedError; + $AddAdminCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AddAdminCopyWith<$Res> { - factory $AddAdminCopyWith(AddAdmin value, $Res Function(AddAdmin) then) = - _$AddAdminCopyWithImpl<$Res, AddAdmin>; + factory $AddAdminCopyWith(AddAdmin value, $Res Function(AddAdmin) then) = _$AddAdminCopyWithImpl<$Res, AddAdmin>; @useResult $Res call({int personId, bool added, String? auth}); } /// @nodoc -class _$AddAdminCopyWithImpl<$Res, $Val extends AddAdmin> - implements $AddAdminCopyWith<$Res> { +class _$AddAdminCopyWithImpl<$Res, $Val extends AddAdmin> implements $AddAdminCopyWith<$Res> { _$AddAdminCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -56,70 +54,66 @@ class _$AddAdminCopyWithImpl<$Res, $Val extends AddAdmin> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? added = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - added: null == added - ? _value.added - : added // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? personId = null, Object? added = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + added: + null == added + ? _value.added + : added // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AddAdminImplCopyWith<$Res> - implements $AddAdminCopyWith<$Res> { - factory _$$AddAdminImplCopyWith( - _$AddAdminImpl value, $Res Function(_$AddAdminImpl) then) = - __$$AddAdminImplCopyWithImpl<$Res>; +abstract class _$$AddAdminImplCopyWith<$Res> implements $AddAdminCopyWith<$Res> { + factory _$$AddAdminImplCopyWith(_$AddAdminImpl value, $Res Function(_$AddAdminImpl) then) = __$$AddAdminImplCopyWithImpl<$Res>; @override @useResult $Res call({int personId, bool added, String? auth}); } /// @nodoc -class __$$AddAdminImplCopyWithImpl<$Res> - extends _$AddAdminCopyWithImpl<$Res, _$AddAdminImpl> - implements _$$AddAdminImplCopyWith<$Res> { - __$$AddAdminImplCopyWithImpl( - _$AddAdminImpl _value, $Res Function(_$AddAdminImpl) _then) - : super(_value, _then); +class __$$AddAdminImplCopyWithImpl<$Res> extends _$AddAdminCopyWithImpl<$Res, _$AddAdminImpl> implements _$$AddAdminImplCopyWith<$Res> { + __$$AddAdminImplCopyWithImpl(_$AddAdminImpl _value, $Res Function(_$AddAdminImpl) _then) : super(_value, _then); /// Create a copy of AddAdmin /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? added = null, - Object? auth = freezed, - }) { - return _then(_$AddAdminImpl( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - added: null == added - ? _value.added - : added // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personId = null, Object? added = null, Object? auth = freezed}) { + return _then( + _$AddAdminImpl( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + added: + null == added + ? _value.added + : added // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -127,18 +121,16 @@ class __$$AddAdminImplCopyWithImpl<$Res> @apiSerde class _$AddAdminImpl extends _AddAdmin { - const _$AddAdminImpl({required this.personId, required this.added, this.auth}) - : super._(); + const _$AddAdminImpl({required this.personId, required this.added, this.auth}) : super._(); - factory _$AddAdminImpl.fromJson(Map json) => - _$$AddAdminImplFromJson(json); + factory _$AddAdminImpl.fromJson(Map json) => _$$AddAdminImplFromJson(json); @override final int personId; -// v0.18.0 + // v0.18.0 @override final bool added; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -152,8 +144,7 @@ class _$AddAdminImpl extends _AddAdmin { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddAdminImpl && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.added, added) || other.added == added) && (identical(other.auth, auth) || other.auth == auth)); } @@ -167,26 +158,19 @@ class _$AddAdminImpl extends _AddAdmin { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AddAdminImplCopyWith<_$AddAdminImpl> get copyWith => - __$$AddAdminImplCopyWithImpl<_$AddAdminImpl>(this, _$identity); + _$$AddAdminImplCopyWith<_$AddAdminImpl> get copyWith => __$$AddAdminImplCopyWithImpl<_$AddAdminImpl>(this, _$identity); @override Map toJson() { - return _$$AddAdminImplToJson( - this, - ); + return _$$AddAdminImplToJson(this); } } abstract class _AddAdmin extends AddAdmin { - const factory _AddAdmin( - {required final int personId, - required final bool added, - final String? auth}) = _$AddAdminImpl; + const factory _AddAdmin({required final int personId, required final bool added, final String? auth}) = _$AddAdminImpl; const _AddAdmin._() : super._(); - factory _AddAdmin.fromJson(Map json) = - _$AddAdminImpl.fromJson; + factory _AddAdmin.fromJson(Map json) = _$AddAdminImpl.fromJson; @override int get personId; // v0.18.0 @@ -199,12 +183,10 @@ abstract class _AddAdmin extends AddAdmin { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AddAdminImplCopyWith<_$AddAdminImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AddAdminImplCopyWith<_$AddAdminImpl> get copyWith => throw _privateConstructorUsedError; } -GetUnreadRegistrationApplicationCount - _$GetUnreadRegistrationApplicationCountFromJson(Map json) { +GetUnreadRegistrationApplicationCount _$GetUnreadRegistrationApplicationCountFromJson(Map json) { return _GetUnreadRegistrationApplicationCount.fromJson(json); } @@ -218,26 +200,19 @@ mixin _$GetUnreadRegistrationApplicationCount { /// Create a copy of GetUnreadRegistrationApplicationCount /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetUnreadRegistrationApplicationCountCopyWith< - GetUnreadRegistrationApplicationCount> - get copyWith => throw _privateConstructorUsedError; + $GetUnreadRegistrationApplicationCountCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetUnreadRegistrationApplicationCountCopyWith<$Res> { - factory $GetUnreadRegistrationApplicationCountCopyWith( - GetUnreadRegistrationApplicationCount value, - $Res Function(GetUnreadRegistrationApplicationCount) then) = - _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, - GetUnreadRegistrationApplicationCount>; + factory $GetUnreadRegistrationApplicationCountCopyWith(GetUnreadRegistrationApplicationCount value, $Res Function(GetUnreadRegistrationApplicationCount) then) = + _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, GetUnreadRegistrationApplicationCount>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, - $Val extends GetUnreadRegistrationApplicationCount> - implements $GetUnreadRegistrationApplicationCountCopyWith<$Res> { +class _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, $Val extends GetUnreadRegistrationApplicationCount> implements $GetUnreadRegistrationApplicationCountCopyWith<$Res> { _$GetUnreadRegistrationApplicationCountCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -249,24 +224,23 @@ class _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetUnreadRegistrationApplicationCountImplCopyWith<$Res> - implements $GetUnreadRegistrationApplicationCountCopyWith<$Res> { - factory _$$GetUnreadRegistrationApplicationCountImplCopyWith( - _$GetUnreadRegistrationApplicationCountImpl value, - $Res Function(_$GetUnreadRegistrationApplicationCountImpl) then) = +abstract class _$$GetUnreadRegistrationApplicationCountImplCopyWith<$Res> implements $GetUnreadRegistrationApplicationCountCopyWith<$Res> { + factory _$$GetUnreadRegistrationApplicationCountImplCopyWith(_$GetUnreadRegistrationApplicationCountImpl value, $Res Function(_$GetUnreadRegistrationApplicationCountImpl) then) = __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl<$Res>; @override @useResult @@ -274,41 +248,35 @@ abstract class _$$GetUnreadRegistrationApplicationCountImplCopyWith<$Res> } /// @nodoc -class __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl<$Res> - extends _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, - _$GetUnreadRegistrationApplicationCountImpl> +class __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl<$Res> extends _$GetUnreadRegistrationApplicationCountCopyWithImpl<$Res, _$GetUnreadRegistrationApplicationCountImpl> implements _$$GetUnreadRegistrationApplicationCountImplCopyWith<$Res> { - __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl( - _$GetUnreadRegistrationApplicationCountImpl _value, - $Res Function(_$GetUnreadRegistrationApplicationCountImpl) _then) - : super(_value, _then); + __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl(_$GetUnreadRegistrationApplicationCountImpl _value, $Res Function(_$GetUnreadRegistrationApplicationCountImpl) _then) + : super(_value, _then); /// Create a copy of GetUnreadRegistrationApplicationCount /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetUnreadRegistrationApplicationCountImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetUnreadRegistrationApplicationCountImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @apiSerde -class _$GetUnreadRegistrationApplicationCountImpl - extends _GetUnreadRegistrationApplicationCount { +class _$GetUnreadRegistrationApplicationCountImpl extends _GetUnreadRegistrationApplicationCount { const _$GetUnreadRegistrationApplicationCountImpl({this.auth}) : super._(); - factory _$GetUnreadRegistrationApplicationCountImpl.fromJson( - Map json) => - _$$GetUnreadRegistrationApplicationCountImplFromJson(json); + factory _$GetUnreadRegistrationApplicationCountImpl.fromJson(Map json) => _$$GetUnreadRegistrationApplicationCountImplFromJson(json); @override final String? auth; @@ -320,10 +288,7 @@ class _$GetUnreadRegistrationApplicationCountImpl @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetUnreadRegistrationApplicationCountImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetUnreadRegistrationApplicationCountImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -335,28 +300,20 @@ class _$GetUnreadRegistrationApplicationCountImpl @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetUnreadRegistrationApplicationCountImplCopyWith< - _$GetUnreadRegistrationApplicationCountImpl> - get copyWith => __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl< - _$GetUnreadRegistrationApplicationCountImpl>(this, _$identity); + _$$GetUnreadRegistrationApplicationCountImplCopyWith<_$GetUnreadRegistrationApplicationCountImpl> get copyWith => + __$$GetUnreadRegistrationApplicationCountImplCopyWithImpl<_$GetUnreadRegistrationApplicationCountImpl>(this, _$identity); @override Map toJson() { - return _$$GetUnreadRegistrationApplicationCountImplToJson( - this, - ); + return _$$GetUnreadRegistrationApplicationCountImplToJson(this); } } -abstract class _GetUnreadRegistrationApplicationCount - extends GetUnreadRegistrationApplicationCount { - const factory _GetUnreadRegistrationApplicationCount({final String? auth}) = - _$GetUnreadRegistrationApplicationCountImpl; +abstract class _GetUnreadRegistrationApplicationCount extends GetUnreadRegistrationApplicationCount { + const factory _GetUnreadRegistrationApplicationCount({final String? auth}) = _$GetUnreadRegistrationApplicationCountImpl; const _GetUnreadRegistrationApplicationCount._() : super._(); - factory _GetUnreadRegistrationApplicationCount.fromJson( - Map json) = - _$GetUnreadRegistrationApplicationCountImpl.fromJson; + factory _GetUnreadRegistrationApplicationCount.fromJson(Map json) = _$GetUnreadRegistrationApplicationCountImpl.fromJson; @override String? get auth; @@ -365,13 +322,10 @@ abstract class _GetUnreadRegistrationApplicationCount /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetUnreadRegistrationApplicationCountImplCopyWith< - _$GetUnreadRegistrationApplicationCountImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetUnreadRegistrationApplicationCountImplCopyWith<_$GetUnreadRegistrationApplicationCountImpl> get copyWith => throw _privateConstructorUsedError; } -ListRegistrationApplications _$ListRegistrationApplicationsFromJson( - Map json) { +ListRegistrationApplications _$ListRegistrationApplicationsFromJson(Map json) { return _ListRegistrationApplications.fromJson(json); } @@ -388,25 +342,19 @@ mixin _$ListRegistrationApplications { /// Create a copy of ListRegistrationApplications /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListRegistrationApplicationsCopyWith - get copyWith => throw _privateConstructorUsedError; + $ListRegistrationApplicationsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListRegistrationApplicationsCopyWith<$Res> { - factory $ListRegistrationApplicationsCopyWith( - ListRegistrationApplications value, - $Res Function(ListRegistrationApplications) then) = - _$ListRegistrationApplicationsCopyWithImpl<$Res, - ListRegistrationApplications>; + factory $ListRegistrationApplicationsCopyWith(ListRegistrationApplications value, $Res Function(ListRegistrationApplications) then) = + _$ListRegistrationApplicationsCopyWithImpl<$Res, ListRegistrationApplications>; @useResult $Res call({bool? unreadOnly, int? page, int? limit, String? auth}); } /// @nodoc -class _$ListRegistrationApplicationsCopyWithImpl<$Res, - $Val extends ListRegistrationApplications> - implements $ListRegistrationApplicationsCopyWith<$Res> { +class _$ListRegistrationApplicationsCopyWithImpl<$Res, $Val extends ListRegistrationApplications> implements $ListRegistrationApplicationsCopyWith<$Res> { _$ListRegistrationApplicationsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -418,39 +366,38 @@ class _$ListRegistrationApplicationsCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? unreadOnly = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? unreadOnly = freezed, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListRegistrationApplicationsImplCopyWith<$Res> - implements $ListRegistrationApplicationsCopyWith<$Res> { - factory _$$ListRegistrationApplicationsImplCopyWith( - _$ListRegistrationApplicationsImpl value, - $Res Function(_$ListRegistrationApplicationsImpl) then) = +abstract class _$$ListRegistrationApplicationsImplCopyWith<$Res> implements $ListRegistrationApplicationsCopyWith<$Res> { + factory _$$ListRegistrationApplicationsImplCopyWith(_$ListRegistrationApplicationsImpl value, $Res Function(_$ListRegistrationApplicationsImpl) then) = __$$ListRegistrationApplicationsImplCopyWithImpl<$Res>; @override @useResult @@ -458,43 +405,39 @@ abstract class _$$ListRegistrationApplicationsImplCopyWith<$Res> } /// @nodoc -class __$$ListRegistrationApplicationsImplCopyWithImpl<$Res> - extends _$ListRegistrationApplicationsCopyWithImpl<$Res, - _$ListRegistrationApplicationsImpl> +class __$$ListRegistrationApplicationsImplCopyWithImpl<$Res> extends _$ListRegistrationApplicationsCopyWithImpl<$Res, _$ListRegistrationApplicationsImpl> implements _$$ListRegistrationApplicationsImplCopyWith<$Res> { - __$$ListRegistrationApplicationsImplCopyWithImpl( - _$ListRegistrationApplicationsImpl _value, - $Res Function(_$ListRegistrationApplicationsImpl) _then) - : super(_value, _then); + __$$ListRegistrationApplicationsImplCopyWithImpl(_$ListRegistrationApplicationsImpl _value, $Res Function(_$ListRegistrationApplicationsImpl) _then) : super(_value, _then); /// Create a copy of ListRegistrationApplications /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? unreadOnly = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_$ListRegistrationApplicationsImpl( - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? unreadOnly = freezed, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _$ListRegistrationApplicationsImpl( + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -502,23 +445,19 @@ class __$$ListRegistrationApplicationsImplCopyWithImpl<$Res> @apiSerde class _$ListRegistrationApplicationsImpl extends _ListRegistrationApplications { - const _$ListRegistrationApplicationsImpl( - {this.unreadOnly, this.page, this.limit, this.auth}) - : super._(); + const _$ListRegistrationApplicationsImpl({this.unreadOnly, this.page, this.limit, this.auth}) : super._(); - factory _$ListRegistrationApplicationsImpl.fromJson( - Map json) => - _$$ListRegistrationApplicationsImplFromJson(json); + factory _$ListRegistrationApplicationsImpl.fromJson(Map json) => _$$ListRegistrationApplicationsImplFromJson(json); @override final bool? unreadOnly; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -532,8 +471,7 @@ class _$ListRegistrationApplicationsImpl extends _ListRegistrationApplications { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListRegistrationApplicationsImpl && - (identical(other.unreadOnly, unreadOnly) || - other.unreadOnly == unreadOnly) && + (identical(other.unreadOnly, unreadOnly) || other.unreadOnly == unreadOnly) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.auth, auth) || other.auth == auth)); @@ -548,30 +486,20 @@ class _$ListRegistrationApplicationsImpl extends _ListRegistrationApplications { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListRegistrationApplicationsImplCopyWith< - _$ListRegistrationApplicationsImpl> - get copyWith => __$$ListRegistrationApplicationsImplCopyWithImpl< - _$ListRegistrationApplicationsImpl>(this, _$identity); + _$$ListRegistrationApplicationsImplCopyWith<_$ListRegistrationApplicationsImpl> get copyWith => + __$$ListRegistrationApplicationsImplCopyWithImpl<_$ListRegistrationApplicationsImpl>(this, _$identity); @override Map toJson() { - return _$$ListRegistrationApplicationsImplToJson( - this, - ); + return _$$ListRegistrationApplicationsImplToJson(this); } } -abstract class _ListRegistrationApplications - extends ListRegistrationApplications { - const factory _ListRegistrationApplications( - {final bool? unreadOnly, - final int? page, - final int? limit, - final String? auth}) = _$ListRegistrationApplicationsImpl; +abstract class _ListRegistrationApplications extends ListRegistrationApplications { + const factory _ListRegistrationApplications({final bool? unreadOnly, final int? page, final int? limit, final String? auth}) = _$ListRegistrationApplicationsImpl; const _ListRegistrationApplications._() : super._(); - factory _ListRegistrationApplications.fromJson(Map json) = - _$ListRegistrationApplicationsImpl.fromJson; + factory _ListRegistrationApplications.fromJson(Map json) = _$ListRegistrationApplicationsImpl.fromJson; @override bool? get unreadOnly; // v0.18.0 @@ -586,13 +514,10 @@ abstract class _ListRegistrationApplications /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListRegistrationApplicationsImplCopyWith< - _$ListRegistrationApplicationsImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListRegistrationApplicationsImplCopyWith<_$ListRegistrationApplicationsImpl> get copyWith => throw _privateConstructorUsedError; } -ApproveRegistrationApplication _$ApproveRegistrationApplicationFromJson( - Map json) { +ApproveRegistrationApplication _$ApproveRegistrationApplicationFromJson(Map json) { return _ApproveRegistrationApplication.fromJson(json); } @@ -609,25 +534,19 @@ mixin _$ApproveRegistrationApplication { /// Create a copy of ApproveRegistrationApplication /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ApproveRegistrationApplicationCopyWith - get copyWith => throw _privateConstructorUsedError; + $ApproveRegistrationApplicationCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ApproveRegistrationApplicationCopyWith<$Res> { - factory $ApproveRegistrationApplicationCopyWith( - ApproveRegistrationApplication value, - $Res Function(ApproveRegistrationApplication) then) = - _$ApproveRegistrationApplicationCopyWithImpl<$Res, - ApproveRegistrationApplication>; + factory $ApproveRegistrationApplicationCopyWith(ApproveRegistrationApplication value, $Res Function(ApproveRegistrationApplication) then) = + _$ApproveRegistrationApplicationCopyWithImpl<$Res, ApproveRegistrationApplication>; @useResult $Res call({int id, bool approve, String? denyReason, String? auth}); } /// @nodoc -class _$ApproveRegistrationApplicationCopyWithImpl<$Res, - $Val extends ApproveRegistrationApplication> - implements $ApproveRegistrationApplicationCopyWith<$Res> { +class _$ApproveRegistrationApplicationCopyWithImpl<$Res, $Val extends ApproveRegistrationApplication> implements $ApproveRegistrationApplicationCopyWith<$Res> { _$ApproveRegistrationApplicationCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -639,39 +558,38 @@ class _$ApproveRegistrationApplicationCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? approve = null, - Object? denyReason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - approve: null == approve - ? _value.approve - : approve // ignore: cast_nullable_to_non_nullable - as bool, - denyReason: freezed == denyReason - ? _value.denyReason - : denyReason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = null, Object? approve = null, Object? denyReason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + approve: + null == approve + ? _value.approve + : approve // ignore: cast_nullable_to_non_nullable + as bool, + denyReason: + freezed == denyReason + ? _value.denyReason + : denyReason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ApproveRegistrationApplicationImplCopyWith<$Res> - implements $ApproveRegistrationApplicationCopyWith<$Res> { - factory _$$ApproveRegistrationApplicationImplCopyWith( - _$ApproveRegistrationApplicationImpl value, - $Res Function(_$ApproveRegistrationApplicationImpl) then) = +abstract class _$$ApproveRegistrationApplicationImplCopyWith<$Res> implements $ApproveRegistrationApplicationCopyWith<$Res> { + factory _$$ApproveRegistrationApplicationImplCopyWith(_$ApproveRegistrationApplicationImpl value, $Res Function(_$ApproveRegistrationApplicationImpl) then) = __$$ApproveRegistrationApplicationImplCopyWithImpl<$Res>; @override @useResult @@ -679,68 +597,59 @@ abstract class _$$ApproveRegistrationApplicationImplCopyWith<$Res> } /// @nodoc -class __$$ApproveRegistrationApplicationImplCopyWithImpl<$Res> - extends _$ApproveRegistrationApplicationCopyWithImpl<$Res, - _$ApproveRegistrationApplicationImpl> +class __$$ApproveRegistrationApplicationImplCopyWithImpl<$Res> extends _$ApproveRegistrationApplicationCopyWithImpl<$Res, _$ApproveRegistrationApplicationImpl> implements _$$ApproveRegistrationApplicationImplCopyWith<$Res> { - __$$ApproveRegistrationApplicationImplCopyWithImpl( - _$ApproveRegistrationApplicationImpl _value, - $Res Function(_$ApproveRegistrationApplicationImpl) _then) - : super(_value, _then); + __$$ApproveRegistrationApplicationImplCopyWithImpl(_$ApproveRegistrationApplicationImpl _value, $Res Function(_$ApproveRegistrationApplicationImpl) _then) : super(_value, _then); /// Create a copy of ApproveRegistrationApplication /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? approve = null, - Object? denyReason = freezed, - Object? auth = freezed, - }) { - return _then(_$ApproveRegistrationApplicationImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - approve: null == approve - ? _value.approve - : approve // ignore: cast_nullable_to_non_nullable - as bool, - denyReason: freezed == denyReason - ? _value.denyReason - : denyReason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = null, Object? approve = null, Object? denyReason = freezed, Object? auth = freezed}) { + return _then( + _$ApproveRegistrationApplicationImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + approve: + null == approve + ? _value.approve + : approve // ignore: cast_nullable_to_non_nullable + as bool, + denyReason: + freezed == denyReason + ? _value.denyReason + : denyReason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @apiSerde -class _$ApproveRegistrationApplicationImpl - extends _ApproveRegistrationApplication { - const _$ApproveRegistrationApplicationImpl( - {required this.id, required this.approve, this.denyReason, this.auth}) - : super._(); +class _$ApproveRegistrationApplicationImpl extends _ApproveRegistrationApplication { + const _$ApproveRegistrationApplicationImpl({required this.id, required this.approve, this.denyReason, this.auth}) : super._(); - factory _$ApproveRegistrationApplicationImpl.fromJson( - Map json) => - _$$ApproveRegistrationApplicationImplFromJson(json); + factory _$ApproveRegistrationApplicationImpl.fromJson(Map json) => _$$ApproveRegistrationApplicationImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final bool approve; -// v0.18.0 + // v0.18.0 @override final String? denyReason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -756,8 +665,7 @@ class _$ApproveRegistrationApplicationImpl other is _$ApproveRegistrationApplicationImpl && (identical(other.id, id) || other.id == id) && (identical(other.approve, approve) || other.approve == approve) && - (identical(other.denyReason, denyReason) || - other.denyReason == denyReason) && + (identical(other.denyReason, denyReason) || other.denyReason == denyReason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -770,30 +678,20 @@ class _$ApproveRegistrationApplicationImpl @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ApproveRegistrationApplicationImplCopyWith< - _$ApproveRegistrationApplicationImpl> - get copyWith => __$$ApproveRegistrationApplicationImplCopyWithImpl< - _$ApproveRegistrationApplicationImpl>(this, _$identity); + _$$ApproveRegistrationApplicationImplCopyWith<_$ApproveRegistrationApplicationImpl> get copyWith => + __$$ApproveRegistrationApplicationImplCopyWithImpl<_$ApproveRegistrationApplicationImpl>(this, _$identity); @override Map toJson() { - return _$$ApproveRegistrationApplicationImplToJson( - this, - ); + return _$$ApproveRegistrationApplicationImplToJson(this); } } -abstract class _ApproveRegistrationApplication - extends ApproveRegistrationApplication { - const factory _ApproveRegistrationApplication( - {required final int id, - required final bool approve, - final String? denyReason, - final String? auth}) = _$ApproveRegistrationApplicationImpl; +abstract class _ApproveRegistrationApplication extends ApproveRegistrationApplication { + const factory _ApproveRegistrationApplication({required final int id, required final bool approve, final String? denyReason, final String? auth}) = _$ApproveRegistrationApplicationImpl; const _ApproveRegistrationApplication._() : super._(); - factory _ApproveRegistrationApplication.fromJson(Map json) = - _$ApproveRegistrationApplicationImpl.fromJson; + factory _ApproveRegistrationApplication.fromJson(Map json) = _$ApproveRegistrationApplicationImpl.fromJson; @override int get id; // v0.18.0 @@ -808,13 +706,10 @@ abstract class _ApproveRegistrationApplication /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ApproveRegistrationApplicationImplCopyWith< - _$ApproveRegistrationApplicationImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ApproveRegistrationApplicationImplCopyWith<_$ApproveRegistrationApplicationImpl> get copyWith => throw _privateConstructorUsedError; } -GetRegistrationApplication _$GetRegistrationApplicationFromJson( - Map json) { +GetRegistrationApplication _$GetRegistrationApplicationFromJson(Map json) { return _GetRegistrationApplication.fromJson(json); } @@ -829,24 +724,19 @@ mixin _$GetRegistrationApplication { /// Create a copy of GetRegistrationApplication /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetRegistrationApplicationCopyWith - get copyWith => throw _privateConstructorUsedError; + $GetRegistrationApplicationCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetRegistrationApplicationCopyWith<$Res> { - factory $GetRegistrationApplicationCopyWith(GetRegistrationApplication value, - $Res Function(GetRegistrationApplication) then) = - _$GetRegistrationApplicationCopyWithImpl<$Res, - GetRegistrationApplication>; + factory $GetRegistrationApplicationCopyWith(GetRegistrationApplication value, $Res Function(GetRegistrationApplication) then) = + _$GetRegistrationApplicationCopyWithImpl<$Res, GetRegistrationApplication>; @useResult $Res call({int personId, String? auth}); } /// @nodoc -class _$GetRegistrationApplicationCopyWithImpl<$Res, - $Val extends GetRegistrationApplication> - implements $GetRegistrationApplicationCopyWith<$Res> { +class _$GetRegistrationApplicationCopyWithImpl<$Res, $Val extends GetRegistrationApplication> implements $GetRegistrationApplicationCopyWith<$Res> { _$GetRegistrationApplicationCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -858,29 +748,28 @@ class _$GetRegistrationApplicationCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? personId = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetRegistrationApplicationImplCopyWith<$Res> - implements $GetRegistrationApplicationCopyWith<$Res> { - factory _$$GetRegistrationApplicationImplCopyWith( - _$GetRegistrationApplicationImpl value, - $Res Function(_$GetRegistrationApplicationImpl) then) = +abstract class _$$GetRegistrationApplicationImplCopyWith<$Res> implements $GetRegistrationApplicationCopyWith<$Res> { + factory _$$GetRegistrationApplicationImplCopyWith(_$GetRegistrationApplicationImpl value, $Res Function(_$GetRegistrationApplicationImpl) then) = __$$GetRegistrationApplicationImplCopyWithImpl<$Res>; @override @useResult @@ -888,33 +777,29 @@ abstract class _$$GetRegistrationApplicationImplCopyWith<$Res> } /// @nodoc -class __$$GetRegistrationApplicationImplCopyWithImpl<$Res> - extends _$GetRegistrationApplicationCopyWithImpl<$Res, - _$GetRegistrationApplicationImpl> +class __$$GetRegistrationApplicationImplCopyWithImpl<$Res> extends _$GetRegistrationApplicationCopyWithImpl<$Res, _$GetRegistrationApplicationImpl> implements _$$GetRegistrationApplicationImplCopyWith<$Res> { - __$$GetRegistrationApplicationImplCopyWithImpl( - _$GetRegistrationApplicationImpl _value, - $Res Function(_$GetRegistrationApplicationImpl) _then) - : super(_value, _then); + __$$GetRegistrationApplicationImplCopyWithImpl(_$GetRegistrationApplicationImpl _value, $Res Function(_$GetRegistrationApplicationImpl) _then) : super(_value, _then); /// Create a copy of GetRegistrationApplication /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? auth = freezed, - }) { - return _then(_$GetRegistrationApplicationImpl( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personId = null, Object? auth = freezed}) { + return _then( + _$GetRegistrationApplicationImpl( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -922,16 +807,13 @@ class __$$GetRegistrationApplicationImplCopyWithImpl<$Res> @apiSerde class _$GetRegistrationApplicationImpl extends _GetRegistrationApplication { - const _$GetRegistrationApplicationImpl({required this.personId, this.auth}) - : super._(); + const _$GetRegistrationApplicationImpl({required this.personId, this.auth}) : super._(); - factory _$GetRegistrationApplicationImpl.fromJson( - Map json) => - _$$GetRegistrationApplicationImplFromJson(json); + factory _$GetRegistrationApplicationImpl.fromJson(Map json) => _$$GetRegistrationApplicationImplFromJson(json); @override final int personId; -// v0.19.6 (required) + // v0.19.6 (required) @override final String? auth; @@ -945,8 +827,7 @@ class _$GetRegistrationApplicationImpl extends _GetRegistrationApplication { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetRegistrationApplicationImpl && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.auth, auth) || other.auth == auth)); } @@ -959,26 +840,19 @@ class _$GetRegistrationApplicationImpl extends _GetRegistrationApplication { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetRegistrationApplicationImplCopyWith<_$GetRegistrationApplicationImpl> - get copyWith => __$$GetRegistrationApplicationImplCopyWithImpl< - _$GetRegistrationApplicationImpl>(this, _$identity); + _$$GetRegistrationApplicationImplCopyWith<_$GetRegistrationApplicationImpl> get copyWith => __$$GetRegistrationApplicationImplCopyWithImpl<_$GetRegistrationApplicationImpl>(this, _$identity); @override Map toJson() { - return _$$GetRegistrationApplicationImplToJson( - this, - ); + return _$$GetRegistrationApplicationImplToJson(this); } } abstract class _GetRegistrationApplication extends GetRegistrationApplication { - const factory _GetRegistrationApplication( - {required final int personId, - final String? auth}) = _$GetRegistrationApplicationImpl; + const factory _GetRegistrationApplication({required final int personId, final String? auth}) = _$GetRegistrationApplicationImpl; const _GetRegistrationApplication._() : super._(); - factory _GetRegistrationApplication.fromJson(Map json) = - _$GetRegistrationApplicationImpl.fromJson; + factory _GetRegistrationApplication.fromJson(Map json) = _$GetRegistrationApplicationImpl.fromJson; @override int get personId; // v0.19.6 (required) @@ -989,8 +863,7 @@ abstract class _GetRegistrationApplication extends GetRegistrationApplication { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetRegistrationApplicationImplCopyWith<_$GetRegistrationApplicationImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetRegistrationApplicationImplCopyWith<_$GetRegistrationApplicationImpl> get copyWith => throw _privateConstructorUsedError; } PurgePerson _$PurgePersonFromJson(Map json) { @@ -1009,22 +882,18 @@ mixin _$PurgePerson { /// Create a copy of PurgePerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PurgePersonCopyWith get copyWith => - throw _privateConstructorUsedError; + $PurgePersonCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PurgePersonCopyWith<$Res> { - factory $PurgePersonCopyWith( - PurgePerson value, $Res Function(PurgePerson) then) = - _$PurgePersonCopyWithImpl<$Res, PurgePerson>; + factory $PurgePersonCopyWith(PurgePerson value, $Res Function(PurgePerson) then) = _$PurgePersonCopyWithImpl<$Res, PurgePerson>; @useResult $Res call({int personId, String? reason, String? auth}); } /// @nodoc -class _$PurgePersonCopyWithImpl<$Res, $Val extends PurgePerson> - implements $PurgePersonCopyWith<$Res> { +class _$PurgePersonCopyWithImpl<$Res, $Val extends PurgePerson> implements $PurgePersonCopyWith<$Res> { _$PurgePersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1036,70 +905,66 @@ class _$PurgePersonCopyWithImpl<$Res, $Val extends PurgePerson> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? personId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PurgePersonImplCopyWith<$Res> - implements $PurgePersonCopyWith<$Res> { - factory _$$PurgePersonImplCopyWith( - _$PurgePersonImpl value, $Res Function(_$PurgePersonImpl) then) = - __$$PurgePersonImplCopyWithImpl<$Res>; +abstract class _$$PurgePersonImplCopyWith<$Res> implements $PurgePersonCopyWith<$Res> { + factory _$$PurgePersonImplCopyWith(_$PurgePersonImpl value, $Res Function(_$PurgePersonImpl) then) = __$$PurgePersonImplCopyWithImpl<$Res>; @override @useResult $Res call({int personId, String? reason, String? auth}); } /// @nodoc -class __$$PurgePersonImplCopyWithImpl<$Res> - extends _$PurgePersonCopyWithImpl<$Res, _$PurgePersonImpl> - implements _$$PurgePersonImplCopyWith<$Res> { - __$$PurgePersonImplCopyWithImpl( - _$PurgePersonImpl _value, $Res Function(_$PurgePersonImpl) _then) - : super(_value, _then); +class __$$PurgePersonImplCopyWithImpl<$Res> extends _$PurgePersonCopyWithImpl<$Res, _$PurgePersonImpl> implements _$$PurgePersonImplCopyWith<$Res> { + __$$PurgePersonImplCopyWithImpl(_$PurgePersonImpl _value, $Res Function(_$PurgePersonImpl) _then) : super(_value, _then); /// Create a copy of PurgePerson /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$PurgePersonImpl( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$PurgePersonImpl( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1107,18 +972,16 @@ class __$$PurgePersonImplCopyWithImpl<$Res> @apiSerde class _$PurgePersonImpl extends _PurgePerson { - const _$PurgePersonImpl({required this.personId, this.reason, this.auth}) - : super._(); + const _$PurgePersonImpl({required this.personId, this.reason, this.auth}) : super._(); - factory _$PurgePersonImpl.fromJson(Map json) => - _$$PurgePersonImplFromJson(json); + factory _$PurgePersonImpl.fromJson(Map json) => _$$PurgePersonImplFromJson(json); @override final int personId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1132,8 +995,7 @@ class _$PurgePersonImpl extends _PurgePerson { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PurgePersonImpl && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1147,26 +1009,19 @@ class _$PurgePersonImpl extends _PurgePerson { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PurgePersonImplCopyWith<_$PurgePersonImpl> get copyWith => - __$$PurgePersonImplCopyWithImpl<_$PurgePersonImpl>(this, _$identity); + _$$PurgePersonImplCopyWith<_$PurgePersonImpl> get copyWith => __$$PurgePersonImplCopyWithImpl<_$PurgePersonImpl>(this, _$identity); @override Map toJson() { - return _$$PurgePersonImplToJson( - this, - ); + return _$$PurgePersonImplToJson(this); } } abstract class _PurgePerson extends PurgePerson { - const factory _PurgePerson( - {required final int personId, - final String? reason, - final String? auth}) = _$PurgePersonImpl; + const factory _PurgePerson({required final int personId, final String? reason, final String? auth}) = _$PurgePersonImpl; const _PurgePerson._() : super._(); - factory _PurgePerson.fromJson(Map json) = - _$PurgePersonImpl.fromJson; + factory _PurgePerson.fromJson(Map json) = _$PurgePersonImpl.fromJson; @override int get personId; // v0.18.0 @@ -1179,8 +1034,7 @@ abstract class _PurgePerson extends PurgePerson { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PurgePersonImplCopyWith<_$PurgePersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PurgePersonImplCopyWith<_$PurgePersonImpl> get copyWith => throw _privateConstructorUsedError; } PurgeCommunity _$PurgeCommunityFromJson(Map json) { @@ -1199,22 +1053,18 @@ mixin _$PurgeCommunity { /// Create a copy of PurgeCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PurgeCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $PurgeCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PurgeCommunityCopyWith<$Res> { - factory $PurgeCommunityCopyWith( - PurgeCommunity value, $Res Function(PurgeCommunity) then) = - _$PurgeCommunityCopyWithImpl<$Res, PurgeCommunity>; + factory $PurgeCommunityCopyWith(PurgeCommunity value, $Res Function(PurgeCommunity) then) = _$PurgeCommunityCopyWithImpl<$Res, PurgeCommunity>; @useResult $Res call({int communityId, String? reason, String? auth}); } /// @nodoc -class _$PurgeCommunityCopyWithImpl<$Res, $Val extends PurgeCommunity> - implements $PurgeCommunityCopyWith<$Res> { +class _$PurgeCommunityCopyWithImpl<$Res, $Val extends PurgeCommunity> implements $PurgeCommunityCopyWith<$Res> { _$PurgeCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1226,70 +1076,66 @@ class _$PurgeCommunityCopyWithImpl<$Res, $Val extends PurgeCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PurgeCommunityImplCopyWith<$Res> - implements $PurgeCommunityCopyWith<$Res> { - factory _$$PurgeCommunityImplCopyWith(_$PurgeCommunityImpl value, - $Res Function(_$PurgeCommunityImpl) then) = - __$$PurgeCommunityImplCopyWithImpl<$Res>; +abstract class _$$PurgeCommunityImplCopyWith<$Res> implements $PurgeCommunityCopyWith<$Res> { + factory _$$PurgeCommunityImplCopyWith(_$PurgeCommunityImpl value, $Res Function(_$PurgeCommunityImpl) then) = __$$PurgeCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, String? reason, String? auth}); } /// @nodoc -class __$$PurgeCommunityImplCopyWithImpl<$Res> - extends _$PurgeCommunityCopyWithImpl<$Res, _$PurgeCommunityImpl> - implements _$$PurgeCommunityImplCopyWith<$Res> { - __$$PurgeCommunityImplCopyWithImpl( - _$PurgeCommunityImpl _value, $Res Function(_$PurgeCommunityImpl) _then) - : super(_value, _then); +class __$$PurgeCommunityImplCopyWithImpl<$Res> extends _$PurgeCommunityCopyWithImpl<$Res, _$PurgeCommunityImpl> implements _$$PurgeCommunityImplCopyWith<$Res> { + __$$PurgeCommunityImplCopyWithImpl(_$PurgeCommunityImpl _value, $Res Function(_$PurgeCommunityImpl) _then) : super(_value, _then); /// Create a copy of PurgeCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$PurgeCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$PurgeCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1297,19 +1143,16 @@ class __$$PurgeCommunityImplCopyWithImpl<$Res> @apiSerde class _$PurgeCommunityImpl extends _PurgeCommunity { - const _$PurgeCommunityImpl( - {required this.communityId, this.reason, this.auth}) - : super._(); + const _$PurgeCommunityImpl({required this.communityId, this.reason, this.auth}) : super._(); - factory _$PurgeCommunityImpl.fromJson(Map json) => - _$$PurgeCommunityImplFromJson(json); + factory _$PurgeCommunityImpl.fromJson(Map json) => _$$PurgeCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1323,8 +1166,7 @@ class _$PurgeCommunityImpl extends _PurgeCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PurgeCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1338,27 +1180,19 @@ class _$PurgeCommunityImpl extends _PurgeCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PurgeCommunityImplCopyWith<_$PurgeCommunityImpl> get copyWith => - __$$PurgeCommunityImplCopyWithImpl<_$PurgeCommunityImpl>( - this, _$identity); + _$$PurgeCommunityImplCopyWith<_$PurgeCommunityImpl> get copyWith => __$$PurgeCommunityImplCopyWithImpl<_$PurgeCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$PurgeCommunityImplToJson( - this, - ); + return _$$PurgeCommunityImplToJson(this); } } abstract class _PurgeCommunity extends PurgeCommunity { - const factory _PurgeCommunity( - {required final int communityId, - final String? reason, - final String? auth}) = _$PurgeCommunityImpl; + const factory _PurgeCommunity({required final int communityId, final String? reason, final String? auth}) = _$PurgeCommunityImpl; const _PurgeCommunity._() : super._(); - factory _PurgeCommunity.fromJson(Map json) = - _$PurgeCommunityImpl.fromJson; + factory _PurgeCommunity.fromJson(Map json) = _$PurgeCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -1371,8 +1205,7 @@ abstract class _PurgeCommunity extends PurgeCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PurgeCommunityImplCopyWith<_$PurgeCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PurgeCommunityImplCopyWith<_$PurgeCommunityImpl> get copyWith => throw _privateConstructorUsedError; } PurgePost _$PurgePostFromJson(Map json) { @@ -1391,21 +1224,18 @@ mixin _$PurgePost { /// Create a copy of PurgePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PurgePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $PurgePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PurgePostCopyWith<$Res> { - factory $PurgePostCopyWith(PurgePost value, $Res Function(PurgePost) then) = - _$PurgePostCopyWithImpl<$Res, PurgePost>; + factory $PurgePostCopyWith(PurgePost value, $Res Function(PurgePost) then) = _$PurgePostCopyWithImpl<$Res, PurgePost>; @useResult $Res call({int postId, String? reason, String? auth}); } /// @nodoc -class _$PurgePostCopyWithImpl<$Res, $Val extends PurgePost> - implements $PurgePostCopyWith<$Res> { +class _$PurgePostCopyWithImpl<$Res, $Val extends PurgePost> implements $PurgePostCopyWith<$Res> { _$PurgePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1417,70 +1247,66 @@ class _$PurgePostCopyWithImpl<$Res, $Val extends PurgePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? postId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PurgePostImplCopyWith<$Res> - implements $PurgePostCopyWith<$Res> { - factory _$$PurgePostImplCopyWith( - _$PurgePostImpl value, $Res Function(_$PurgePostImpl) then) = - __$$PurgePostImplCopyWithImpl<$Res>; +abstract class _$$PurgePostImplCopyWith<$Res> implements $PurgePostCopyWith<$Res> { + factory _$$PurgePostImplCopyWith(_$PurgePostImpl value, $Res Function(_$PurgePostImpl) then) = __$$PurgePostImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, String? reason, String? auth}); } /// @nodoc -class __$$PurgePostImplCopyWithImpl<$Res> - extends _$PurgePostCopyWithImpl<$Res, _$PurgePostImpl> - implements _$$PurgePostImplCopyWith<$Res> { - __$$PurgePostImplCopyWithImpl( - _$PurgePostImpl _value, $Res Function(_$PurgePostImpl) _then) - : super(_value, _then); +class __$$PurgePostImplCopyWithImpl<$Res> extends _$PurgePostCopyWithImpl<$Res, _$PurgePostImpl> implements _$$PurgePostImplCopyWith<$Res> { + __$$PurgePostImplCopyWithImpl(_$PurgePostImpl _value, $Res Function(_$PurgePostImpl) _then) : super(_value, _then); /// Create a copy of PurgePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$PurgePostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$PurgePostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1488,18 +1314,16 @@ class __$$PurgePostImplCopyWithImpl<$Res> @apiSerde class _$PurgePostImpl extends _PurgePost { - const _$PurgePostImpl({required this.postId, this.reason, this.auth}) - : super._(); + const _$PurgePostImpl({required this.postId, this.reason, this.auth}) : super._(); - factory _$PurgePostImpl.fromJson(Map json) => - _$$PurgePostImplFromJson(json); + factory _$PurgePostImpl.fromJson(Map json) => _$$PurgePostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1527,26 +1351,19 @@ class _$PurgePostImpl extends _PurgePost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PurgePostImplCopyWith<_$PurgePostImpl> get copyWith => - __$$PurgePostImplCopyWithImpl<_$PurgePostImpl>(this, _$identity); + _$$PurgePostImplCopyWith<_$PurgePostImpl> get copyWith => __$$PurgePostImplCopyWithImpl<_$PurgePostImpl>(this, _$identity); @override Map toJson() { - return _$$PurgePostImplToJson( - this, - ); + return _$$PurgePostImplToJson(this); } } abstract class _PurgePost extends PurgePost { - const factory _PurgePost( - {required final int postId, - final String? reason, - final String? auth}) = _$PurgePostImpl; + const factory _PurgePost({required final int postId, final String? reason, final String? auth}) = _$PurgePostImpl; const _PurgePost._() : super._(); - factory _PurgePost.fromJson(Map json) = - _$PurgePostImpl.fromJson; + factory _PurgePost.fromJson(Map json) = _$PurgePostImpl.fromJson; @override int get postId; // v0.18.0 @@ -1559,8 +1376,7 @@ abstract class _PurgePost extends PurgePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PurgePostImplCopyWith<_$PurgePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PurgePostImplCopyWith<_$PurgePostImpl> get copyWith => throw _privateConstructorUsedError; } PurgeComment _$PurgeCommentFromJson(Map json) { @@ -1579,22 +1395,18 @@ mixin _$PurgeComment { /// Create a copy of PurgeComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PurgeCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $PurgeCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PurgeCommentCopyWith<$Res> { - factory $PurgeCommentCopyWith( - PurgeComment value, $Res Function(PurgeComment) then) = - _$PurgeCommentCopyWithImpl<$Res, PurgeComment>; + factory $PurgeCommentCopyWith(PurgeComment value, $Res Function(PurgeComment) then) = _$PurgeCommentCopyWithImpl<$Res, PurgeComment>; @useResult $Res call({int commentId, String? reason, String? auth}); } /// @nodoc -class _$PurgeCommentCopyWithImpl<$Res, $Val extends PurgeComment> - implements $PurgeCommentCopyWith<$Res> { +class _$PurgeCommentCopyWithImpl<$Res, $Val extends PurgeComment> implements $PurgeCommentCopyWith<$Res> { _$PurgeCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1606,70 +1418,66 @@ class _$PurgeCommentCopyWithImpl<$Res, $Val extends PurgeComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? commentId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PurgeCommentImplCopyWith<$Res> - implements $PurgeCommentCopyWith<$Res> { - factory _$$PurgeCommentImplCopyWith( - _$PurgeCommentImpl value, $Res Function(_$PurgeCommentImpl) then) = - __$$PurgeCommentImplCopyWithImpl<$Res>; +abstract class _$$PurgeCommentImplCopyWith<$Res> implements $PurgeCommentCopyWith<$Res> { + factory _$$PurgeCommentImplCopyWith(_$PurgeCommentImpl value, $Res Function(_$PurgeCommentImpl) then) = __$$PurgeCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, String? reason, String? auth}); } /// @nodoc -class __$$PurgeCommentImplCopyWithImpl<$Res> - extends _$PurgeCommentCopyWithImpl<$Res, _$PurgeCommentImpl> - implements _$$PurgeCommentImplCopyWith<$Res> { - __$$PurgeCommentImplCopyWithImpl( - _$PurgeCommentImpl _value, $Res Function(_$PurgeCommentImpl) _then) - : super(_value, _then); +class __$$PurgeCommentImplCopyWithImpl<$Res> extends _$PurgeCommentCopyWithImpl<$Res, _$PurgeCommentImpl> implements _$$PurgeCommentImplCopyWith<$Res> { + __$$PurgeCommentImplCopyWithImpl(_$PurgeCommentImpl _value, $Res Function(_$PurgeCommentImpl) _then) : super(_value, _then); /// Create a copy of PurgeComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$PurgeCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$PurgeCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1677,18 +1485,16 @@ class __$$PurgeCommentImplCopyWithImpl<$Res> @apiSerde class _$PurgeCommentImpl extends _PurgeComment { - const _$PurgeCommentImpl({required this.commentId, this.reason, this.auth}) - : super._(); + const _$PurgeCommentImpl({required this.commentId, this.reason, this.auth}) : super._(); - factory _$PurgeCommentImpl.fromJson(Map json) => - _$$PurgeCommentImplFromJson(json); + factory _$PurgeCommentImpl.fromJson(Map json) => _$$PurgeCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1702,8 +1508,7 @@ class _$PurgeCommentImpl extends _PurgeComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PurgeCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1717,26 +1522,19 @@ class _$PurgeCommentImpl extends _PurgeComment { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PurgeCommentImplCopyWith<_$PurgeCommentImpl> get copyWith => - __$$PurgeCommentImplCopyWithImpl<_$PurgeCommentImpl>(this, _$identity); + _$$PurgeCommentImplCopyWith<_$PurgeCommentImpl> get copyWith => __$$PurgeCommentImplCopyWithImpl<_$PurgeCommentImpl>(this, _$identity); @override Map toJson() { - return _$$PurgeCommentImplToJson( - this, - ); + return _$$PurgeCommentImplToJson(this); } } abstract class _PurgeComment extends PurgeComment { - const factory _PurgeComment( - {required final int commentId, - final String? reason, - final String? auth}) = _$PurgeCommentImpl; + const factory _PurgeComment({required final int commentId, final String? reason, final String? auth}) = _$PurgeCommentImpl; const _PurgeComment._() : super._(); - factory _PurgeComment.fromJson(Map json) = - _$PurgeCommentImpl.fromJson; + factory _PurgeComment.fromJson(Map json) = _$PurgeCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -1749,8 +1547,7 @@ abstract class _PurgeComment extends PurgeComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PurgeCommentImplCopyWith<_$PurgeCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PurgeCommentImplCopyWith<_$PurgeCommentImpl> get copyWith => throw _privateConstructorUsedError; } ListAllMedia _$ListAllMediaFromJson(Map json) { @@ -1769,22 +1566,18 @@ mixin _$ListAllMedia { /// Create a copy of ListAllMedia /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListAllMediaCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListAllMediaCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListAllMediaCopyWith<$Res> { - factory $ListAllMediaCopyWith( - ListAllMedia value, $Res Function(ListAllMedia) then) = - _$ListAllMediaCopyWithImpl<$Res, ListAllMedia>; + factory $ListAllMediaCopyWith(ListAllMedia value, $Res Function(ListAllMedia) then) = _$ListAllMediaCopyWithImpl<$Res, ListAllMedia>; @useResult $Res call({int? page, int? limit, String? auth}); } /// @nodoc -class _$ListAllMediaCopyWithImpl<$Res, $Val extends ListAllMedia> - implements $ListAllMediaCopyWith<$Res> { +class _$ListAllMediaCopyWithImpl<$Res, $Val extends ListAllMedia> implements $ListAllMediaCopyWith<$Res> { _$ListAllMediaCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1796,70 +1589,66 @@ class _$ListAllMediaCopyWithImpl<$Res, $Val extends ListAllMedia> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListAllMediaImplCopyWith<$Res> - implements $ListAllMediaCopyWith<$Res> { - factory _$$ListAllMediaImplCopyWith( - _$ListAllMediaImpl value, $Res Function(_$ListAllMediaImpl) then) = - __$$ListAllMediaImplCopyWithImpl<$Res>; +abstract class _$$ListAllMediaImplCopyWith<$Res> implements $ListAllMediaCopyWith<$Res> { + factory _$$ListAllMediaImplCopyWith(_$ListAllMediaImpl value, $Res Function(_$ListAllMediaImpl) then) = __$$ListAllMediaImplCopyWithImpl<$Res>; @override @useResult $Res call({int? page, int? limit, String? auth}); } /// @nodoc -class __$$ListAllMediaImplCopyWithImpl<$Res> - extends _$ListAllMediaCopyWithImpl<$Res, _$ListAllMediaImpl> - implements _$$ListAllMediaImplCopyWith<$Res> { - __$$ListAllMediaImplCopyWithImpl( - _$ListAllMediaImpl _value, $Res Function(_$ListAllMediaImpl) _then) - : super(_value, _then); +class __$$ListAllMediaImplCopyWithImpl<$Res> extends _$ListAllMediaCopyWithImpl<$Res, _$ListAllMediaImpl> implements _$$ListAllMediaImplCopyWith<$Res> { + __$$ListAllMediaImplCopyWithImpl(_$ListAllMediaImpl _value, $Res Function(_$ListAllMediaImpl) _then) : super(_value, _then); /// Create a copy of ListAllMedia /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_$ListAllMediaImpl( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _$ListAllMediaImpl( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1869,15 +1658,14 @@ class __$$ListAllMediaImplCopyWithImpl<$Res> class _$ListAllMediaImpl extends _ListAllMedia { const _$ListAllMediaImpl({this.page, this.limit, this.auth}) : super._(); - factory _$ListAllMediaImpl.fromJson(Map json) => - _$$ListAllMediaImplFromJson(json); + factory _$ListAllMediaImpl.fromJson(Map json) => _$$ListAllMediaImplFromJson(json); @override final int? page; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final int? limit; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -1905,26 +1693,19 @@ class _$ListAllMediaImpl extends _ListAllMedia { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListAllMediaImplCopyWith<_$ListAllMediaImpl> get copyWith => - __$$ListAllMediaImplCopyWithImpl<_$ListAllMediaImpl>(this, _$identity); + _$$ListAllMediaImplCopyWith<_$ListAllMediaImpl> get copyWith => __$$ListAllMediaImplCopyWithImpl<_$ListAllMediaImpl>(this, _$identity); @override Map toJson() { - return _$$ListAllMediaImplToJson( - this, - ); + return _$$ListAllMediaImplToJson(this); } } abstract class _ListAllMedia extends ListAllMedia { - const factory _ListAllMedia( - {final int? page, - final int? limit, - final String? auth}) = _$ListAllMediaImpl; + const factory _ListAllMedia({final int? page, final int? limit, final String? auth}) = _$ListAllMediaImpl; const _ListAllMedia._() : super._(); - factory _ListAllMedia.fromJson(Map json) = - _$ListAllMediaImpl.fromJson; + factory _ListAllMedia.fromJson(Map json) = _$ListAllMediaImpl.fromJson; @override int? get page; // v0.19.4 (optional) @@ -1937,6 +1718,5 @@ abstract class _ListAllMedia extends ListAllMedia { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListAllMediaImplCopyWith<_$ListAllMediaImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListAllMediaImplCopyWith<_$ListAllMediaImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/admin/admin.g.dart b/lib/src/v3/api/admin/admin.g.dart index 1c385b2f..7bb04645 100644 --- a/lib/src/v3/api/admin/admin.g.dart +++ b/lib/src/v3/api/admin/admin.g.dart @@ -6,237 +6,83 @@ part of 'admin.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AddAdminImpl _$$AddAdminImplFromJson(Map json) => - _$AddAdminImpl( - personId: (json['person_id'] as num).toInt(), - added: json['added'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$AddAdminImplToJson(_$AddAdminImpl instance) { - final val = { - 'person_id': instance.personId, - 'added': instance.added, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetUnreadRegistrationApplicationCountImpl - _$$GetUnreadRegistrationApplicationCountImplFromJson( - Map json) => - _$GetUnreadRegistrationApplicationCountImpl( - auth: json['auth'] as String?, - ); - -Map _$$GetUnreadRegistrationApplicationCountImplToJson( - _$GetUnreadRegistrationApplicationCountImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListRegistrationApplicationsImpl _$$ListRegistrationApplicationsImplFromJson( - Map json) => - _$ListRegistrationApplicationsImpl( - unreadOnly: json['unread_only'] as bool?, - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListRegistrationApplicationsImplToJson( - _$ListRegistrationApplicationsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('unread_only', instance.unreadOnly); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} - -_$ApproveRegistrationApplicationImpl - _$$ApproveRegistrationApplicationImplFromJson(Map json) => - _$ApproveRegistrationApplicationImpl( - id: (json['id'] as num).toInt(), - approve: json['approve'] as bool, - denyReason: json['deny_reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$ApproveRegistrationApplicationImplToJson( - _$ApproveRegistrationApplicationImpl instance) { - final val = { - 'id': instance.id, - 'approve': instance.approve, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('deny_reason', instance.denyReason); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetRegistrationApplicationImpl _$$GetRegistrationApplicationImplFromJson( - Map json) => - _$GetRegistrationApplicationImpl( - personId: (json['person_id'] as num).toInt(), - auth: json['auth'] as String?, - ); - -Map _$$GetRegistrationApplicationImplToJson( - _$GetRegistrationApplicationImpl instance) { - final val = { - 'person_id': instance.personId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +_$AddAdminImpl _$$AddAdminImplFromJson(Map json) => _$AddAdminImpl(personId: (json['person_id'] as num).toInt(), added: json['added'] as bool, auth: json['auth'] as String?); + +Map _$$AddAdminImplToJson(_$AddAdminImpl instance) => {'person_id': instance.personId, 'added': instance.added, if (instance.auth case final value?) 'auth': value}; + +_$GetUnreadRegistrationApplicationCountImpl _$$GetUnreadRegistrationApplicationCountImplFromJson(Map json) => + _$GetUnreadRegistrationApplicationCountImpl(auth: json['auth'] as String?); + +Map _$$GetUnreadRegistrationApplicationCountImplToJson(_$GetUnreadRegistrationApplicationCountImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$ListRegistrationApplicationsImpl _$$ListRegistrationApplicationsImplFromJson(Map json) => + _$ListRegistrationApplicationsImpl(unreadOnly: json['unread_only'] as bool?, page: (json['page'] as num?)?.toInt(), limit: (json['limit'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$ListRegistrationApplicationsImplToJson(_$ListRegistrationApplicationsImpl instance) => { + if (instance.unreadOnly case final value?) 'unread_only': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$ApproveRegistrationApplicationImpl _$$ApproveRegistrationApplicationImplFromJson(Map json) => + _$ApproveRegistrationApplicationImpl(id: (json['id'] as num).toInt(), approve: json['approve'] as bool, denyReason: json['deny_reason'] as String?, auth: json['auth'] as String?); + +Map _$$ApproveRegistrationApplicationImplToJson(_$ApproveRegistrationApplicationImpl instance) => { + 'id': instance.id, + 'approve': instance.approve, + if (instance.denyReason case final value?) 'deny_reason': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetRegistrationApplicationImpl _$$GetRegistrationApplicationImplFromJson(Map json) => + _$GetRegistrationApplicationImpl(personId: (json['person_id'] as num).toInt(), auth: json['auth'] as String?); + +Map _$$GetRegistrationApplicationImplToJson(_$GetRegistrationApplicationImpl instance) => { + 'person_id': instance.personId, + if (instance.auth case final value?) 'auth': value, +}; _$PurgePersonImpl _$$PurgePersonImplFromJson(Map json) => - _$PurgePersonImpl( - personId: (json['person_id'] as num).toInt(), - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$PurgePersonImplToJson(_$PurgePersonImpl instance) { - final val = { - 'person_id': instance.personId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} + _$PurgePersonImpl(personId: (json['person_id'] as num).toInt(), reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$PurgePersonImplToJson(_$PurgePersonImpl instance) => { + 'person_id': instance.personId, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; _$PurgeCommunityImpl _$$PurgeCommunityImplFromJson(Map json) => - _$PurgeCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$PurgeCommunityImplToJson( - _$PurgeCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} - -_$PurgePostImpl _$$PurgePostImplFromJson(Map json) => - _$PurgePostImpl( - postId: (json['post_id'] as num).toInt(), - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$PurgePostImplToJson(_$PurgePostImpl instance) { - final val = { - 'post_id': instance.postId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} + _$PurgeCommunityImpl(communityId: (json['community_id'] as num).toInt(), reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$PurgeCommunityImplToJson(_$PurgeCommunityImpl instance) => { + 'community_id': instance.communityId, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$PurgePostImpl _$$PurgePostImplFromJson(Map json) => _$PurgePostImpl(postId: (json['post_id'] as num).toInt(), reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$PurgePostImplToJson(_$PurgePostImpl instance) => { + 'post_id': instance.postId, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; _$PurgeCommentImpl _$$PurgeCommentImplFromJson(Map json) => - _$PurgeCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$PurgeCommentImplToJson(_$PurgeCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} + _$PurgeCommentImpl(commentId: (json['comment_id'] as num).toInt(), reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$PurgeCommentImplToJson(_$PurgeCommentImpl instance) => { + 'comment_id': instance.commentId, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; _$ListAllMediaImpl _$$ListAllMediaImplFromJson(Map json) => - _$ListAllMediaImpl( - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListAllMediaImplToJson(_$ListAllMediaImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} + _$ListAllMediaImpl(page: (json['page'] as num?)?.toInt(), limit: (json['limit'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$ListAllMediaImplToJson(_$ListAllMediaImpl instance) => { + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/comment/comment.dart b/lib/src/v3/api/comment/comment.dart index ca9e3028..fdef0cb5 100644 --- a/lib/src/v3/api/comment/comment.dart +++ b/lib/src/v3/api/comment/comment.dart @@ -12,9 +12,7 @@ part 'comment.g.dart'; /// /// `HTTP.POST /comment` @freezed -class CreateComment - with _$CreateComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreateComment with _$CreateComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateComment({ required String content, // v0.18.0 @@ -26,25 +24,21 @@ class CreateComment }) = _CreateComment; const CreateComment._(); - factory CreateComment.fromJson(Map json) => - _$CreateCommentFromJson(json); + factory CreateComment.fromJson(Map json) => _$CreateCommentFromJson(json); final path = '/comment'; final httpMethod = HttpMethod.post; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Edit a comment. /// /// `HTTP.PUT /comment` @freezed -class EditComment - with _$EditComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class EditComment with _$EditComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditComment({ required int commentId, // v0.18.0 @@ -55,25 +49,21 @@ class EditComment }) = _EditComment; const EditComment._(); - factory EditComment.fromJson(Map json) => - _$EditCommentFromJson(json); + factory EditComment.fromJson(Map json) => _$EditCommentFromJson(json); final path = '/comment'; final httpMethod = HttpMethod.put; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Delete a comment. /// /// `HTTP.POST /comment/delete` @freezed -class DeleteComment - with _$DeleteComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class DeleteComment with _$DeleteComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeleteComment({ required int commentId, // v0.18.0 @@ -82,25 +72,21 @@ class DeleteComment }) = _DeleteComment; const DeleteComment._(); - factory DeleteComment.fromJson(Map json) => - _$DeleteCommentFromJson(json); + factory DeleteComment.fromJson(Map json) => _$DeleteCommentFromJson(json); final path = '/comment/delete'; final httpMethod = HttpMethod.post; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// A moderator remove for a comment. /// /// `HTTP.POST /comment/remove` @freezed -class RemoveComment - with _$RemoveComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class RemoveComment with _$RemoveComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory RemoveComment({ required int commentId, // v0.18.0 @@ -110,25 +96,21 @@ class RemoveComment }) = _RemoveComment; const RemoveComment._(); - factory RemoveComment.fromJson(Map json) => - _$RemoveCommentFromJson(json); + factory RemoveComment.fromJson(Map json) => _$RemoveCommentFromJson(json); final path = '/comment/remove'; final httpMethod = HttpMethod.post; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Mark a comment as read. /// /// `HTTP.POST /comment/mark_as_read` @freezed -class MarkCommentReplyAsRead - with _$MarkCommentReplyAsRead - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class MarkCommentReplyAsRead with _$MarkCommentReplyAsRead implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory MarkCommentReplyAsRead({ required int commentReplyId, // v0.18.0 @@ -137,25 +119,21 @@ class MarkCommentReplyAsRead }) = _MarkCommentReplyAsRead; const MarkCommentReplyAsRead._(); - factory MarkCommentReplyAsRead.fromJson(Map json) => - _$MarkCommentReplyAsReadFromJson(json); + factory MarkCommentReplyAsRead.fromJson(Map json) => _$MarkCommentReplyAsReadFromJson(json); final path = '/comment/mark_as_read'; final httpMethod = HttpMethod.post; @override - CommentReplyResponse responseFactory(Map json) => - CommentReplyResponse.fromJson(json); + CommentReplyResponse responseFactory(Map json) => CommentReplyResponse.fromJson(json); } /// Like / vote on a comment. /// /// `HTTP.POST /comment/like` @freezed -class CreateCommentLike - with _$CreateCommentLike - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreateCommentLike with _$CreateCommentLike implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateCommentLike({ required int commentId, // v0.18.0 @@ -164,16 +142,14 @@ class CreateCommentLike }) = _CreateCommentLike; const CreateCommentLike._(); - factory CreateCommentLike.fromJson(Map json) => - _$CreateCommentLikeFromJson(json); + factory CreateCommentLike.fromJson(Map json) => _$CreateCommentLikeFromJson(json); final path = '/comment/like'; final httpMethod = HttpMethod.post; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Only available in lemmy v0.19.2 and above @@ -182,11 +158,7 @@ class CreateCommentLike /// /// `HTTP.GET /comment/like/list` @freezed -class ListCommentLikes - with _$ListCommentLikes - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListCommentLikes with _$ListCommentLikes implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListCommentLikes({ required int commentId, // v0.19.2 (required) @@ -196,25 +168,21 @@ class ListCommentLikes }) = _ListCommentLikes; const ListCommentLikes._(); - factory ListCommentLikes.fromJson(Map json) => - _$ListCommentLikesFromJson(json); + factory ListCommentLikes.fromJson(Map json) => _$ListCommentLikesFromJson(json); final path = '/comment/like/list'; final httpMethod = HttpMethod.get; @override - ListCommentLikesResponse responseFactory(Map json) => - ListCommentLikesResponse.fromJson(json); + ListCommentLikesResponse responseFactory(Map json) => ListCommentLikesResponse.fromJson(json); } /// Save a comment. /// /// `HTTP.PUT /comment/save` @freezed -class SaveComment - with _$SaveComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class SaveComment with _$SaveComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory SaveComment({ required int commentId, // v0.18.0 @@ -223,25 +191,21 @@ class SaveComment }) = _SaveComment; const SaveComment._(); - factory SaveComment.fromJson(Map json) => - _$SaveCommentFromJson(json); + factory SaveComment.fromJson(Map json) => _$SaveCommentFromJson(json); final path = '/comment/save'; final httpMethod = HttpMethod.put; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Distinguishes a comment (speak as moderator) /// /// `HTTP.POST /comment/distinguish` @freezed -class DistinguishComment - with _$DistinguishComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class DistinguishComment with _$DistinguishComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DistinguishComment({ required int commentId, // v0.18.0 @@ -250,25 +214,21 @@ class DistinguishComment }) = _DistinguishComment; const DistinguishComment._(); - factory DistinguishComment.fromJson(Map json) => - _$DistinguishCommentFromJson(json); + factory DistinguishComment.fromJson(Map json) => _$DistinguishCommentFromJson(json); final path = '/comment/distinguish'; final httpMethod = HttpMethod.post; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Get / fetch comments. /// /// `HTTP.GET /comment/list` @freezed -class GetComments - with _$GetComments - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetComments with _$GetComments implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetComments({ @JsonKey(name: 'type_') ListingType? type, // v0.18.0 @@ -287,25 +247,21 @@ class GetComments }) = _GetComments; const GetComments._(); - factory GetComments.fromJson(Map json) => - _$GetCommentsFromJson(json); + factory GetComments.fromJson(Map json) => _$GetCommentsFromJson(json); final path = '/comment/list'; final httpMethod = HttpMethod.get; @override - GetCommentsResponse responseFactory(Map json) => - GetCommentsResponse.fromJson(json); + GetCommentsResponse responseFactory(Map json) => GetCommentsResponse.fromJson(json); } /// Get / fetch a comment. /// /// `HTTP.GET /comment` @freezed -class GetComment - with _$GetComment - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetComment with _$GetComment implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetComment({ required int id, // v0.18.0 @@ -313,27 +269,21 @@ class GetComment }) = _GetComment; const GetComment._(); - factory GetComment.fromJson(Map json) => - _$GetCommentFromJson(json); + factory GetComment.fromJson(Map json) => _$GetCommentFromJson(json); final path = '/comment'; final httpMethod = HttpMethod.get; @override - CommentResponse responseFactory(Map json) => - CommentResponse.fromJson(json); + CommentResponse responseFactory(Map json) => CommentResponse.fromJson(json); } /// Report a comment. /// /// `HTTP.POST /comment/report` @freezed -class CreateCommentReport - with _$CreateCommentReport - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class CreateCommentReport with _$CreateCommentReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateCommentReport({ required int commentId, // v0.18.0 @@ -342,27 +292,21 @@ class CreateCommentReport }) = _CreateCommentReport; const CreateCommentReport._(); - factory CreateCommentReport.fromJson(Map json) => - _$CreateCommentReportFromJson(json); + factory CreateCommentReport.fromJson(Map json) => _$CreateCommentReportFromJson(json); final path = '/comment/report'; final httpMethod = HttpMethod.post; @override - CommentReportResponse responseFactory(Map json) => - CommentReportResponse.fromJson(json); + CommentReportResponse responseFactory(Map json) => CommentReportResponse.fromJson(json); } /// Resolve a comment report. Only a mod can do this. /// /// `HTTP.PUT /comment/report/resolve` @freezed -class ResolveCommentReport - with _$ResolveCommentReport - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ResolveCommentReport with _$ResolveCommentReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ResolveCommentReport({ required int reportId, // v0.18.0 @@ -371,27 +315,21 @@ class ResolveCommentReport }) = _ResolveCommentReport; const ResolveCommentReport._(); - factory ResolveCommentReport.fromJson(Map json) => - _$ResolveCommentReportFromJson(json); + factory ResolveCommentReport.fromJson(Map json) => _$ResolveCommentReportFromJson(json); final path = '/comment/report/resolve'; final httpMethod = HttpMethod.put; @override - CommentReportResponse responseFactory(Map json) => - CommentReportResponse.fromJson(json); + CommentReportResponse responseFactory(Map json) => CommentReportResponse.fromJson(json); } /// List comment reports. /// /// `HTTP.GET /comment/report/list` @freezed -class ListCommentReports - with _$ListCommentReports - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListCommentReports with _$ListCommentReports implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListCommentReports({ int? commentId, // v0.19.4 (optional) @@ -403,14 +341,12 @@ class ListCommentReports }) = _ListCommentReports; const ListCommentReports._(); - factory ListCommentReports.fromJson(Map json) => - _$ListCommentReportsFromJson(json); + factory ListCommentReports.fromJson(Map json) => _$ListCommentReportsFromJson(json); final path = '/comment/report/list'; final httpMethod = HttpMethod.get; @override - ListCommentReportsResponse responseFactory(Map json) => - ListCommentReportsResponse.fromJson(json); + ListCommentReportsResponse responseFactory(Map json) => ListCommentReportsResponse.fromJson(json); } diff --git a/lib/src/v3/api/comment/comment.freezed.dart b/lib/src/v3/api/comment/comment.freezed.dart index 6be6747c..281ef91d 100644 --- a/lib/src/v3/api/comment/comment.freezed.dart +++ b/lib/src/v3/api/comment/comment.freezed.dart @@ -12,7 +12,8 @@ part of 'comment.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CreateComment _$CreateCommentFromJson(Map json) { return _CreateComment.fromJson(json); @@ -25,8 +26,7 @@ mixin _$CreateComment { int? get parentId => throw _privateConstructorUsedError; // v0.18.0 int? get languageId => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get formId => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get formId => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] String? get auth => throw _privateConstructorUsedError; /// Serializes this CreateComment to a JSON map. @@ -35,28 +35,18 @@ mixin _$CreateComment { /// Create a copy of CreateComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateCommentCopyWith<$Res> { - factory $CreateCommentCopyWith( - CreateComment value, $Res Function(CreateComment) then) = - _$CreateCommentCopyWithImpl<$Res, CreateComment>; + factory $CreateCommentCopyWith(CreateComment value, $Res Function(CreateComment) then) = _$CreateCommentCopyWithImpl<$Res, CreateComment>; @useResult - $Res call( - {String content, - int postId, - int? parentId, - int? languageId, - @deprecated String? formId, - String? auth}); + $Res call({String content, int postId, int? parentId, int? languageId, @deprecated String? formId, String? auth}); } /// @nodoc -class _$CreateCommentCopyWithImpl<$Res, $Val extends CreateComment> - implements $CreateCommentCopyWith<$Res> { +class _$CreateCommentCopyWithImpl<$Res, $Val extends CreateComment> implements $CreateCommentCopyWith<$Res> { _$CreateCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,106 +58,96 @@ class _$CreateCommentCopyWithImpl<$Res, $Val extends CreateComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? content = null, - Object? postId = null, - Object? parentId = freezed, - Object? languageId = freezed, - Object? formId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - parentId: freezed == parentId - ? _value.parentId - : parentId // ignore: cast_nullable_to_non_nullable - as int?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreateCommentImplCopyWith<$Res> - implements $CreateCommentCopyWith<$Res> { - factory _$$CreateCommentImplCopyWith( - _$CreateCommentImpl value, $Res Function(_$CreateCommentImpl) then) = - __$$CreateCommentImplCopyWithImpl<$Res>; + $Res call({Object? content = null, Object? postId = null, Object? parentId = freezed, Object? languageId = freezed, Object? formId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + parentId: + freezed == parentId + ? _value.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as int?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreateCommentImplCopyWith<$Res> implements $CreateCommentCopyWith<$Res> { + factory _$$CreateCommentImplCopyWith(_$CreateCommentImpl value, $Res Function(_$CreateCommentImpl) then) = __$$CreateCommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String content, - int postId, - int? parentId, - int? languageId, - @deprecated String? formId, - String? auth}); + $Res call({String content, int postId, int? parentId, int? languageId, @deprecated String? formId, String? auth}); } /// @nodoc -class __$$CreateCommentImplCopyWithImpl<$Res> - extends _$CreateCommentCopyWithImpl<$Res, _$CreateCommentImpl> - implements _$$CreateCommentImplCopyWith<$Res> { - __$$CreateCommentImplCopyWithImpl( - _$CreateCommentImpl _value, $Res Function(_$CreateCommentImpl) _then) - : super(_value, _then); +class __$$CreateCommentImplCopyWithImpl<$Res> extends _$CreateCommentCopyWithImpl<$Res, _$CreateCommentImpl> implements _$$CreateCommentImplCopyWith<$Res> { + __$$CreateCommentImplCopyWithImpl(_$CreateCommentImpl _value, $Res Function(_$CreateCommentImpl) _then) : super(_value, _then); /// Create a copy of CreateComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? content = null, - Object? postId = null, - Object? parentId = freezed, - Object? languageId = freezed, - Object? formId = freezed, - Object? auth = freezed, - }) { - return _then(_$CreateCommentImpl( - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - parentId: freezed == parentId - ? _value.parentId - : parentId // ignore: cast_nullable_to_non_nullable - as int?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? content = null, Object? postId = null, Object? parentId = freezed, Object? languageId = freezed, Object? formId = freezed, Object? auth = freezed}) { + return _then( + _$CreateCommentImpl( + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + parentId: + freezed == parentId + ? _value.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as int?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -175,34 +155,26 @@ class __$$CreateCommentImplCopyWithImpl<$Res> @apiSerde class _$CreateCommentImpl extends _CreateComment { - const _$CreateCommentImpl( - {required this.content, - required this.postId, - this.parentId, - this.languageId, - @deprecated this.formId, - this.auth}) - : super._(); + const _$CreateCommentImpl({required this.content, required this.postId, this.parentId, this.languageId, @deprecated this.formId, this.auth}) : super._(); - factory _$CreateCommentImpl.fromJson(Map json) => - _$$CreateCommentImplFromJson(json); + factory _$CreateCommentImpl.fromJson(Map json) => _$$CreateCommentImplFromJson(json); @override final String content; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final int? parentId; -// v0.18.0 + // v0.18.0 @override final int? languageId; -// v0.18.0 + // v0.18.0 @override @deprecated final String? formId; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final String? auth; @@ -218,47 +190,35 @@ class _$CreateCommentImpl extends _CreateComment { other is _$CreateCommentImpl && (identical(other.content, content) || other.content == content) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.parentId, parentId) || - other.parentId == parentId) && - (identical(other.languageId, languageId) || - other.languageId == languageId) && + (identical(other.parentId, parentId) || other.parentId == parentId) && + (identical(other.languageId, languageId) || other.languageId == languageId) && (identical(other.formId, formId) || other.formId == formId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, content, postId, parentId, languageId, formId, auth); + int get hashCode => Object.hash(runtimeType, content, postId, parentId, languageId, formId, auth); /// Create a copy of CreateComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateCommentImplCopyWith<_$CreateCommentImpl> get copyWith => - __$$CreateCommentImplCopyWithImpl<_$CreateCommentImpl>(this, _$identity); + _$$CreateCommentImplCopyWith<_$CreateCommentImpl> get copyWith => __$$CreateCommentImplCopyWithImpl<_$CreateCommentImpl>(this, _$identity); @override Map toJson() { - return _$$CreateCommentImplToJson( - this, - ); + return _$$CreateCommentImplToJson(this); } } abstract class _CreateComment extends CreateComment { - const factory _CreateComment( - {required final String content, - required final int postId, - final int? parentId, - final int? languageId, - @deprecated final String? formId, - final String? auth}) = _$CreateCommentImpl; + const factory _CreateComment({required final String content, required final int postId, final int? parentId, final int? languageId, @deprecated final String? formId, final String? auth}) = + _$CreateCommentImpl; const _CreateComment._() : super._(); - factory _CreateComment.fromJson(Map json) = - _$CreateCommentImpl.fromJson; + factory _CreateComment.fromJson(Map json) = _$CreateCommentImpl.fromJson; @override String get content; // v0.18.0 @@ -278,8 +238,7 @@ abstract class _CreateComment extends CreateComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateCommentImplCopyWith<_$CreateCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateCommentImplCopyWith<_$CreateCommentImpl> get copyWith => throw _privateConstructorUsedError; } EditComment _$EditCommentFromJson(Map json) { @@ -292,8 +251,7 @@ mixin _$EditComment { String? get content => throw _privateConstructorUsedError; // v0.18.0 int? get languageId => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get formId => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get formId => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] String? get auth => throw _privateConstructorUsedError; /// Serializes this EditComment to a JSON map. @@ -302,27 +260,18 @@ mixin _$EditComment { /// Create a copy of EditComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditCommentCopyWith<$Res> { - factory $EditCommentCopyWith( - EditComment value, $Res Function(EditComment) then) = - _$EditCommentCopyWithImpl<$Res, EditComment>; + factory $EditCommentCopyWith(EditComment value, $Res Function(EditComment) then) = _$EditCommentCopyWithImpl<$Res, EditComment>; @useResult - $Res call( - {int commentId, - String? content, - int? languageId, - @deprecated String? formId, - String? auth}); + $Res call({int commentId, String? content, int? languageId, @deprecated String? formId, String? auth}); } /// @nodoc -class _$EditCommentCopyWithImpl<$Res, $Val extends EditComment> - implements $EditCommentCopyWith<$Res> { +class _$EditCommentCopyWithImpl<$Res, $Val extends EditComment> implements $EditCommentCopyWith<$Res> { _$EditCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -334,95 +283,86 @@ class _$EditCommentCopyWithImpl<$Res, $Val extends EditComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? content = freezed, - Object? languageId = freezed, - Object? formId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - content: freezed == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$EditCommentImplCopyWith<$Res> - implements $EditCommentCopyWith<$Res> { - factory _$$EditCommentImplCopyWith( - _$EditCommentImpl value, $Res Function(_$EditCommentImpl) then) = - __$$EditCommentImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? content = freezed, Object? languageId = freezed, Object? formId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + content: + freezed == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$EditCommentImplCopyWith<$Res> implements $EditCommentCopyWith<$Res> { + factory _$$EditCommentImplCopyWith(_$EditCommentImpl value, $Res Function(_$EditCommentImpl) then) = __$$EditCommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int commentId, - String? content, - int? languageId, - @deprecated String? formId, - String? auth}); + $Res call({int commentId, String? content, int? languageId, @deprecated String? formId, String? auth}); } /// @nodoc -class __$$EditCommentImplCopyWithImpl<$Res> - extends _$EditCommentCopyWithImpl<$Res, _$EditCommentImpl> - implements _$$EditCommentImplCopyWith<$Res> { - __$$EditCommentImplCopyWithImpl( - _$EditCommentImpl _value, $Res Function(_$EditCommentImpl) _then) - : super(_value, _then); +class __$$EditCommentImplCopyWithImpl<$Res> extends _$EditCommentCopyWithImpl<$Res, _$EditCommentImpl> implements _$$EditCommentImplCopyWith<$Res> { + __$$EditCommentImplCopyWithImpl(_$EditCommentImpl _value, $Res Function(_$EditCommentImpl) _then) : super(_value, _then); /// Create a copy of EditComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? content = freezed, - Object? languageId = freezed, - Object? formId = freezed, - Object? auth = freezed, - }) { - return _then(_$EditCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - content: freezed == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? content = freezed, Object? languageId = freezed, Object? formId = freezed, Object? auth = freezed}) { + return _then( + _$EditCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + content: + freezed == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -430,30 +370,23 @@ class __$$EditCommentImplCopyWithImpl<$Res> @apiSerde class _$EditCommentImpl extends _EditComment { - const _$EditCommentImpl( - {required this.commentId, - this.content, - this.languageId, - @deprecated this.formId, - this.auth}) - : super._(); + const _$EditCommentImpl({required this.commentId, this.content, this.languageId, @deprecated this.formId, this.auth}) : super._(); - factory _$EditCommentImpl.fromJson(Map json) => - _$$EditCommentImplFromJson(json); + factory _$EditCommentImpl.fromJson(Map json) => _$$EditCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final String? content; -// v0.18.0 + // v0.18.0 @override final int? languageId; -// v0.18.0 + // v0.18.0 @override @deprecated final String? formId; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final String? auth; @@ -467,47 +400,35 @@ class _$EditCommentImpl extends _EditComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$EditCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.content, content) || other.content == content) && - (identical(other.languageId, languageId) || - other.languageId == languageId) && + (identical(other.languageId, languageId) || other.languageId == languageId) && (identical(other.formId, formId) || other.formId == formId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, commentId, content, languageId, formId, auth); + int get hashCode => Object.hash(runtimeType, commentId, content, languageId, formId, auth); /// Create a copy of EditComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditCommentImplCopyWith<_$EditCommentImpl> get copyWith => - __$$EditCommentImplCopyWithImpl<_$EditCommentImpl>(this, _$identity); + _$$EditCommentImplCopyWith<_$EditCommentImpl> get copyWith => __$$EditCommentImplCopyWithImpl<_$EditCommentImpl>(this, _$identity); @override Map toJson() { - return _$$EditCommentImplToJson( - this, - ); + return _$$EditCommentImplToJson(this); } } abstract class _EditComment extends EditComment { - const factory _EditComment( - {required final int commentId, - final String? content, - final int? languageId, - @deprecated final String? formId, - final String? auth}) = _$EditCommentImpl; + const factory _EditComment({required final int commentId, final String? content, final int? languageId, @deprecated final String? formId, final String? auth}) = _$EditCommentImpl; const _EditComment._() : super._(); - factory _EditComment.fromJson(Map json) = - _$EditCommentImpl.fromJson; + factory _EditComment.fromJson(Map json) = _$EditCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -525,8 +446,7 @@ abstract class _EditComment extends EditComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditCommentImplCopyWith<_$EditCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditCommentImplCopyWith<_$EditCommentImpl> get copyWith => throw _privateConstructorUsedError; } DeleteComment _$DeleteCommentFromJson(Map json) { @@ -545,22 +465,18 @@ mixin _$DeleteComment { /// Create a copy of DeleteComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteCommentCopyWith<$Res> { - factory $DeleteCommentCopyWith( - DeleteComment value, $Res Function(DeleteComment) then) = - _$DeleteCommentCopyWithImpl<$Res, DeleteComment>; + factory $DeleteCommentCopyWith(DeleteComment value, $Res Function(DeleteComment) then) = _$DeleteCommentCopyWithImpl<$Res, DeleteComment>; @useResult $Res call({int commentId, bool deleted, String? auth}); } /// @nodoc -class _$DeleteCommentCopyWithImpl<$Res, $Val extends DeleteComment> - implements $DeleteCommentCopyWith<$Res> { +class _$DeleteCommentCopyWithImpl<$Res, $Val extends DeleteComment> implements $DeleteCommentCopyWith<$Res> { _$DeleteCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -572,70 +488,66 @@ class _$DeleteCommentCopyWithImpl<$Res, $Val extends DeleteComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$DeleteCommentImplCopyWith<$Res> - implements $DeleteCommentCopyWith<$Res> { - factory _$$DeleteCommentImplCopyWith( - _$DeleteCommentImpl value, $Res Function(_$DeleteCommentImpl) then) = - __$$DeleteCommentImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$DeleteCommentImplCopyWith<$Res> implements $DeleteCommentCopyWith<$Res> { + factory _$$DeleteCommentImplCopyWith(_$DeleteCommentImpl value, $Res Function(_$DeleteCommentImpl) then) = __$$DeleteCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, bool deleted, String? auth}); } /// @nodoc -class __$$DeleteCommentImplCopyWithImpl<$Res> - extends _$DeleteCommentCopyWithImpl<$Res, _$DeleteCommentImpl> - implements _$$DeleteCommentImplCopyWith<$Res> { - __$$DeleteCommentImplCopyWithImpl( - _$DeleteCommentImpl _value, $Res Function(_$DeleteCommentImpl) _then) - : super(_value, _then); +class __$$DeleteCommentImplCopyWithImpl<$Res> extends _$DeleteCommentCopyWithImpl<$Res, _$DeleteCommentImpl> implements _$$DeleteCommentImplCopyWith<$Res> { + __$$DeleteCommentImplCopyWithImpl(_$DeleteCommentImpl _value, $Res Function(_$DeleteCommentImpl) _then) : super(_value, _then); /// Create a copy of DeleteComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_$DeleteCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _$DeleteCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -643,19 +555,16 @@ class __$$DeleteCommentImplCopyWithImpl<$Res> @apiSerde class _$DeleteCommentImpl extends _DeleteComment { - const _$DeleteCommentImpl( - {required this.commentId, required this.deleted, this.auth}) - : super._(); + const _$DeleteCommentImpl({required this.commentId, required this.deleted, this.auth}) : super._(); - factory _$DeleteCommentImpl.fromJson(Map json) => - _$$DeleteCommentImplFromJson(json); + factory _$DeleteCommentImpl.fromJson(Map json) => _$$DeleteCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -669,8 +578,7 @@ class _$DeleteCommentImpl extends _DeleteComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeleteCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.auth, auth) || other.auth == auth)); } @@ -684,26 +592,19 @@ class _$DeleteCommentImpl extends _DeleteComment { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteCommentImplCopyWith<_$DeleteCommentImpl> get copyWith => - __$$DeleteCommentImplCopyWithImpl<_$DeleteCommentImpl>(this, _$identity); + _$$DeleteCommentImplCopyWith<_$DeleteCommentImpl> get copyWith => __$$DeleteCommentImplCopyWithImpl<_$DeleteCommentImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteCommentImplToJson( - this, - ); + return _$$DeleteCommentImplToJson(this); } } abstract class _DeleteComment extends DeleteComment { - const factory _DeleteComment( - {required final int commentId, - required final bool deleted, - final String? auth}) = _$DeleteCommentImpl; + const factory _DeleteComment({required final int commentId, required final bool deleted, final String? auth}) = _$DeleteCommentImpl; const _DeleteComment._() : super._(); - factory _DeleteComment.fromJson(Map json) = - _$DeleteCommentImpl.fromJson; + factory _DeleteComment.fromJson(Map json) = _$DeleteCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -716,8 +617,7 @@ abstract class _DeleteComment extends DeleteComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteCommentImplCopyWith<_$DeleteCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DeleteCommentImplCopyWith<_$DeleteCommentImpl> get copyWith => throw _privateConstructorUsedError; } RemoveComment _$RemoveCommentFromJson(Map json) { @@ -737,22 +637,18 @@ mixin _$RemoveComment { /// Create a copy of RemoveComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RemoveCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $RemoveCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RemoveCommentCopyWith<$Res> { - factory $RemoveCommentCopyWith( - RemoveComment value, $Res Function(RemoveComment) then) = - _$RemoveCommentCopyWithImpl<$Res, RemoveComment>; + factory $RemoveCommentCopyWith(RemoveComment value, $Res Function(RemoveComment) then) = _$RemoveCommentCopyWithImpl<$Res, RemoveComment>; @useResult $Res call({int commentId, bool removed, String? reason, String? auth}); } /// @nodoc -class _$RemoveCommentCopyWithImpl<$Res, $Val extends RemoveComment> - implements $RemoveCommentCopyWith<$Res> { +class _$RemoveCommentCopyWithImpl<$Res, $Val extends RemoveComment> implements $RemoveCommentCopyWith<$Res> { _$RemoveCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -764,80 +660,76 @@ class _$RemoveCommentCopyWithImpl<$Res, $Val extends RemoveComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? removed = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$RemoveCommentImplCopyWith<$Res> - implements $RemoveCommentCopyWith<$Res> { - factory _$$RemoveCommentImplCopyWith( - _$RemoveCommentImpl value, $Res Function(_$RemoveCommentImpl) then) = - __$$RemoveCommentImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? removed = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$RemoveCommentImplCopyWith<$Res> implements $RemoveCommentCopyWith<$Res> { + factory _$$RemoveCommentImplCopyWith(_$RemoveCommentImpl value, $Res Function(_$RemoveCommentImpl) then) = __$$RemoveCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, bool removed, String? reason, String? auth}); } /// @nodoc -class __$$RemoveCommentImplCopyWithImpl<$Res> - extends _$RemoveCommentCopyWithImpl<$Res, _$RemoveCommentImpl> - implements _$$RemoveCommentImplCopyWith<$Res> { - __$$RemoveCommentImplCopyWithImpl( - _$RemoveCommentImpl _value, $Res Function(_$RemoveCommentImpl) _then) - : super(_value, _then); +class __$$RemoveCommentImplCopyWithImpl<$Res> extends _$RemoveCommentCopyWithImpl<$Res, _$RemoveCommentImpl> implements _$$RemoveCommentImplCopyWith<$Res> { + __$$RemoveCommentImplCopyWithImpl(_$RemoveCommentImpl _value, $Res Function(_$RemoveCommentImpl) _then) : super(_value, _then); /// Create a copy of RemoveComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? removed = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$RemoveCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? removed = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$RemoveCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -845,22 +737,19 @@ class __$$RemoveCommentImplCopyWithImpl<$Res> @apiSerde class _$RemoveCommentImpl extends _RemoveComment { - const _$RemoveCommentImpl( - {required this.commentId, required this.removed, this.reason, this.auth}) - : super._(); + const _$RemoveCommentImpl({required this.commentId, required this.removed, this.reason, this.auth}) : super._(); - factory _$RemoveCommentImpl.fromJson(Map json) => - _$$RemoveCommentImplFromJson(json); + factory _$RemoveCommentImpl.fromJson(Map json) => _$$RemoveCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -874,8 +763,7 @@ class _$RemoveCommentImpl extends _RemoveComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RemoveCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); @@ -883,35 +771,26 @@ class _$RemoveCommentImpl extends _RemoveComment { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, commentId, removed, reason, auth); + int get hashCode => Object.hash(runtimeType, commentId, removed, reason, auth); /// Create a copy of RemoveComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RemoveCommentImplCopyWith<_$RemoveCommentImpl> get copyWith => - __$$RemoveCommentImplCopyWithImpl<_$RemoveCommentImpl>(this, _$identity); + _$$RemoveCommentImplCopyWith<_$RemoveCommentImpl> get copyWith => __$$RemoveCommentImplCopyWithImpl<_$RemoveCommentImpl>(this, _$identity); @override Map toJson() { - return _$$RemoveCommentImplToJson( - this, - ); + return _$$RemoveCommentImplToJson(this); } } abstract class _RemoveComment extends RemoveComment { - const factory _RemoveComment( - {required final int commentId, - required final bool removed, - final String? reason, - final String? auth}) = _$RemoveCommentImpl; + const factory _RemoveComment({required final int commentId, required final bool removed, final String? reason, final String? auth}) = _$RemoveCommentImpl; const _RemoveComment._() : super._(); - factory _RemoveComment.fromJson(Map json) = - _$RemoveCommentImpl.fromJson; + factory _RemoveComment.fromJson(Map json) = _$RemoveCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -926,12 +805,10 @@ abstract class _RemoveComment extends RemoveComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RemoveCommentImplCopyWith<_$RemoveCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$RemoveCommentImplCopyWith<_$RemoveCommentImpl> get copyWith => throw _privateConstructorUsedError; } -MarkCommentReplyAsRead _$MarkCommentReplyAsReadFromJson( - Map json) { +MarkCommentReplyAsRead _$MarkCommentReplyAsReadFromJson(Map json) { return _MarkCommentReplyAsRead.fromJson(json); } @@ -947,23 +824,18 @@ mixin _$MarkCommentReplyAsRead { /// Create a copy of MarkCommentReplyAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkCommentReplyAsReadCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkCommentReplyAsReadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkCommentReplyAsReadCopyWith<$Res> { - factory $MarkCommentReplyAsReadCopyWith(MarkCommentReplyAsRead value, - $Res Function(MarkCommentReplyAsRead) then) = - _$MarkCommentReplyAsReadCopyWithImpl<$Res, MarkCommentReplyAsRead>; + factory $MarkCommentReplyAsReadCopyWith(MarkCommentReplyAsRead value, $Res Function(MarkCommentReplyAsRead) then) = _$MarkCommentReplyAsReadCopyWithImpl<$Res, MarkCommentReplyAsRead>; @useResult $Res call({int commentReplyId, bool read, String? auth}); } /// @nodoc -class _$MarkCommentReplyAsReadCopyWithImpl<$Res, - $Val extends MarkCommentReplyAsRead> - implements $MarkCommentReplyAsReadCopyWith<$Res> { +class _$MarkCommentReplyAsReadCopyWithImpl<$Res, $Val extends MarkCommentReplyAsRead> implements $MarkCommentReplyAsReadCopyWith<$Res> { _$MarkCommentReplyAsReadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -975,73 +847,66 @@ class _$MarkCommentReplyAsReadCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReplyId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentReplyId: null == commentReplyId - ? _value.commentReplyId - : commentReplyId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$MarkCommentReplyAsReadImplCopyWith<$Res> - implements $MarkCommentReplyAsReadCopyWith<$Res> { - factory _$$MarkCommentReplyAsReadImplCopyWith( - _$MarkCommentReplyAsReadImpl value, - $Res Function(_$MarkCommentReplyAsReadImpl) then) = - __$$MarkCommentReplyAsReadImplCopyWithImpl<$Res>; + $Res call({Object? commentReplyId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentReplyId: + null == commentReplyId + ? _value.commentReplyId + : commentReplyId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$MarkCommentReplyAsReadImplCopyWith<$Res> implements $MarkCommentReplyAsReadCopyWith<$Res> { + factory _$$MarkCommentReplyAsReadImplCopyWith(_$MarkCommentReplyAsReadImpl value, $Res Function(_$MarkCommentReplyAsReadImpl) then) = __$$MarkCommentReplyAsReadImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentReplyId, bool read, String? auth}); } /// @nodoc -class __$$MarkCommentReplyAsReadImplCopyWithImpl<$Res> - extends _$MarkCommentReplyAsReadCopyWithImpl<$Res, - _$MarkCommentReplyAsReadImpl> - implements _$$MarkCommentReplyAsReadImplCopyWith<$Res> { - __$$MarkCommentReplyAsReadImplCopyWithImpl( - _$MarkCommentReplyAsReadImpl _value, - $Res Function(_$MarkCommentReplyAsReadImpl) _then) - : super(_value, _then); +class __$$MarkCommentReplyAsReadImplCopyWithImpl<$Res> extends _$MarkCommentReplyAsReadCopyWithImpl<$Res, _$MarkCommentReplyAsReadImpl> implements _$$MarkCommentReplyAsReadImplCopyWith<$Res> { + __$$MarkCommentReplyAsReadImplCopyWithImpl(_$MarkCommentReplyAsReadImpl _value, $Res Function(_$MarkCommentReplyAsReadImpl) _then) : super(_value, _then); /// Create a copy of MarkCommentReplyAsRead /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReplyId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_$MarkCommentReplyAsReadImpl( - commentReplyId: null == commentReplyId - ? _value.commentReplyId - : commentReplyId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentReplyId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _$MarkCommentReplyAsReadImpl( + commentReplyId: + null == commentReplyId + ? _value.commentReplyId + : commentReplyId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1049,19 +914,16 @@ class __$$MarkCommentReplyAsReadImplCopyWithImpl<$Res> @apiSerde class _$MarkCommentReplyAsReadImpl extends _MarkCommentReplyAsRead { - const _$MarkCommentReplyAsReadImpl( - {required this.commentReplyId, required this.read, this.auth}) - : super._(); + const _$MarkCommentReplyAsReadImpl({required this.commentReplyId, required this.read, this.auth}) : super._(); - factory _$MarkCommentReplyAsReadImpl.fromJson(Map json) => - _$$MarkCommentReplyAsReadImplFromJson(json); + factory _$MarkCommentReplyAsReadImpl.fromJson(Map json) => _$$MarkCommentReplyAsReadImplFromJson(json); @override final int commentReplyId; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1075,8 +937,7 @@ class _$MarkCommentReplyAsReadImpl extends _MarkCommentReplyAsRead { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MarkCommentReplyAsReadImpl && - (identical(other.commentReplyId, commentReplyId) || - other.commentReplyId == commentReplyId) && + (identical(other.commentReplyId, commentReplyId) || other.commentReplyId == commentReplyId) && (identical(other.read, read) || other.read == read) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1090,27 +951,19 @@ class _$MarkCommentReplyAsReadImpl extends _MarkCommentReplyAsRead { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkCommentReplyAsReadImplCopyWith<_$MarkCommentReplyAsReadImpl> - get copyWith => __$$MarkCommentReplyAsReadImplCopyWithImpl< - _$MarkCommentReplyAsReadImpl>(this, _$identity); + _$$MarkCommentReplyAsReadImplCopyWith<_$MarkCommentReplyAsReadImpl> get copyWith => __$$MarkCommentReplyAsReadImplCopyWithImpl<_$MarkCommentReplyAsReadImpl>(this, _$identity); @override Map toJson() { - return _$$MarkCommentReplyAsReadImplToJson( - this, - ); + return _$$MarkCommentReplyAsReadImplToJson(this); } } abstract class _MarkCommentReplyAsRead extends MarkCommentReplyAsRead { - const factory _MarkCommentReplyAsRead( - {required final int commentReplyId, - required final bool read, - final String? auth}) = _$MarkCommentReplyAsReadImpl; + const factory _MarkCommentReplyAsRead({required final int commentReplyId, required final bool read, final String? auth}) = _$MarkCommentReplyAsReadImpl; const _MarkCommentReplyAsRead._() : super._(); - factory _MarkCommentReplyAsRead.fromJson(Map json) = - _$MarkCommentReplyAsReadImpl.fromJson; + factory _MarkCommentReplyAsRead.fromJson(Map json) = _$MarkCommentReplyAsReadImpl.fromJson; @override int get commentReplyId; // v0.18.0 @@ -1123,8 +976,7 @@ abstract class _MarkCommentReplyAsRead extends MarkCommentReplyAsRead { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkCommentReplyAsReadImplCopyWith<_$MarkCommentReplyAsReadImpl> - get copyWith => throw _privateConstructorUsedError; + _$$MarkCommentReplyAsReadImplCopyWith<_$MarkCommentReplyAsReadImpl> get copyWith => throw _privateConstructorUsedError; } CreateCommentLike _$CreateCommentLikeFromJson(Map json) { @@ -1143,22 +995,18 @@ mixin _$CreateCommentLike { /// Create a copy of CreateCommentLike /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateCommentLikeCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateCommentLikeCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateCommentLikeCopyWith<$Res> { - factory $CreateCommentLikeCopyWith( - CreateCommentLike value, $Res Function(CreateCommentLike) then) = - _$CreateCommentLikeCopyWithImpl<$Res, CreateCommentLike>; + factory $CreateCommentLikeCopyWith(CreateCommentLike value, $Res Function(CreateCommentLike) then) = _$CreateCommentLikeCopyWithImpl<$Res, CreateCommentLike>; @useResult $Res call({int commentId, num score, String? auth}); } /// @nodoc -class _$CreateCommentLikeCopyWithImpl<$Res, $Val extends CreateCommentLike> - implements $CreateCommentLikeCopyWith<$Res> { +class _$CreateCommentLikeCopyWithImpl<$Res, $Val extends CreateCommentLike> implements $CreateCommentLikeCopyWith<$Res> { _$CreateCommentLikeCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1170,70 +1018,66 @@ class _$CreateCommentLikeCopyWithImpl<$Res, $Val extends CreateCommentLike> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? score = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as num, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreateCommentLikeImplCopyWith<$Res> - implements $CreateCommentLikeCopyWith<$Res> { - factory _$$CreateCommentLikeImplCopyWith(_$CreateCommentLikeImpl value, - $Res Function(_$CreateCommentLikeImpl) then) = - __$$CreateCommentLikeImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? score = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as num, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreateCommentLikeImplCopyWith<$Res> implements $CreateCommentLikeCopyWith<$Res> { + factory _$$CreateCommentLikeImplCopyWith(_$CreateCommentLikeImpl value, $Res Function(_$CreateCommentLikeImpl) then) = __$$CreateCommentLikeImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, num score, String? auth}); } /// @nodoc -class __$$CreateCommentLikeImplCopyWithImpl<$Res> - extends _$CreateCommentLikeCopyWithImpl<$Res, _$CreateCommentLikeImpl> - implements _$$CreateCommentLikeImplCopyWith<$Res> { - __$$CreateCommentLikeImplCopyWithImpl(_$CreateCommentLikeImpl _value, - $Res Function(_$CreateCommentLikeImpl) _then) - : super(_value, _then); +class __$$CreateCommentLikeImplCopyWithImpl<$Res> extends _$CreateCommentLikeCopyWithImpl<$Res, _$CreateCommentLikeImpl> implements _$$CreateCommentLikeImplCopyWith<$Res> { + __$$CreateCommentLikeImplCopyWithImpl(_$CreateCommentLikeImpl _value, $Res Function(_$CreateCommentLikeImpl) _then) : super(_value, _then); /// Create a copy of CreateCommentLike /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? score = null, - Object? auth = freezed, - }) { - return _then(_$CreateCommentLikeImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as num, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? score = null, Object? auth = freezed}) { + return _then( + _$CreateCommentLikeImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as num, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1241,19 +1085,16 @@ class __$$CreateCommentLikeImplCopyWithImpl<$Res> @apiSerde class _$CreateCommentLikeImpl extends _CreateCommentLike { - const _$CreateCommentLikeImpl( - {required this.commentId, required this.score, this.auth}) - : super._(); + const _$CreateCommentLikeImpl({required this.commentId, required this.score, this.auth}) : super._(); - factory _$CreateCommentLikeImpl.fromJson(Map json) => - _$$CreateCommentLikeImplFromJson(json); + factory _$CreateCommentLikeImpl.fromJson(Map json) => _$$CreateCommentLikeImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final num score; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1267,8 +1108,7 @@ class _$CreateCommentLikeImpl extends _CreateCommentLike { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateCommentLikeImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.score, score) || other.score == score) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1282,27 +1122,19 @@ class _$CreateCommentLikeImpl extends _CreateCommentLike { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateCommentLikeImplCopyWith<_$CreateCommentLikeImpl> get copyWith => - __$$CreateCommentLikeImplCopyWithImpl<_$CreateCommentLikeImpl>( - this, _$identity); + _$$CreateCommentLikeImplCopyWith<_$CreateCommentLikeImpl> get copyWith => __$$CreateCommentLikeImplCopyWithImpl<_$CreateCommentLikeImpl>(this, _$identity); @override Map toJson() { - return _$$CreateCommentLikeImplToJson( - this, - ); + return _$$CreateCommentLikeImplToJson(this); } } abstract class _CreateCommentLike extends CreateCommentLike { - const factory _CreateCommentLike( - {required final int commentId, - required final num score, - final String? auth}) = _$CreateCommentLikeImpl; + const factory _CreateCommentLike({required final int commentId, required final num score, final String? auth}) = _$CreateCommentLikeImpl; const _CreateCommentLike._() : super._(); - factory _CreateCommentLike.fromJson(Map json) = - _$CreateCommentLikeImpl.fromJson; + factory _CreateCommentLike.fromJson(Map json) = _$CreateCommentLikeImpl.fromJson; @override int get commentId; // v0.18.0 @@ -1315,8 +1147,7 @@ abstract class _CreateCommentLike extends CreateCommentLike { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateCommentLikeImplCopyWith<_$CreateCommentLikeImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateCommentLikeImplCopyWith<_$CreateCommentLikeImpl> get copyWith => throw _privateConstructorUsedError; } ListCommentLikes _$ListCommentLikesFromJson(Map json) { @@ -1336,22 +1167,18 @@ mixin _$ListCommentLikes { /// Create a copy of ListCommentLikes /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommentLikesCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListCommentLikesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommentLikesCopyWith<$Res> { - factory $ListCommentLikesCopyWith( - ListCommentLikes value, $Res Function(ListCommentLikes) then) = - _$ListCommentLikesCopyWithImpl<$Res, ListCommentLikes>; + factory $ListCommentLikesCopyWith(ListCommentLikes value, $Res Function(ListCommentLikes) then) = _$ListCommentLikesCopyWithImpl<$Res, ListCommentLikes>; @useResult $Res call({int commentId, int? page, int? limit, String? auth}); } /// @nodoc -class _$ListCommentLikesCopyWithImpl<$Res, $Val extends ListCommentLikes> - implements $ListCommentLikesCopyWith<$Res> { +class _$ListCommentLikesCopyWithImpl<$Res, $Val extends ListCommentLikes> implements $ListCommentLikesCopyWith<$Res> { _$ListCommentLikesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1363,80 +1190,76 @@ class _$ListCommentLikesCopyWithImpl<$Res, $Val extends ListCommentLikes> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ListCommentLikesImplCopyWith<$Res> - implements $ListCommentLikesCopyWith<$Res> { - factory _$$ListCommentLikesImplCopyWith(_$ListCommentLikesImpl value, - $Res Function(_$ListCommentLikesImpl) then) = - __$$ListCommentLikesImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ListCommentLikesImplCopyWith<$Res> implements $ListCommentLikesCopyWith<$Res> { + factory _$$ListCommentLikesImplCopyWith(_$ListCommentLikesImpl value, $Res Function(_$ListCommentLikesImpl) then) = __$$ListCommentLikesImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, int? page, int? limit, String? auth}); } /// @nodoc -class __$$ListCommentLikesImplCopyWithImpl<$Res> - extends _$ListCommentLikesCopyWithImpl<$Res, _$ListCommentLikesImpl> - implements _$$ListCommentLikesImplCopyWith<$Res> { - __$$ListCommentLikesImplCopyWithImpl(_$ListCommentLikesImpl _value, - $Res Function(_$ListCommentLikesImpl) _then) - : super(_value, _then); +class __$$ListCommentLikesImplCopyWithImpl<$Res> extends _$ListCommentLikesCopyWithImpl<$Res, _$ListCommentLikesImpl> implements _$$ListCommentLikesImplCopyWith<$Res> { + __$$ListCommentLikesImplCopyWithImpl(_$ListCommentLikesImpl _value, $Res Function(_$ListCommentLikesImpl) _then) : super(_value, _then); /// Create a copy of ListCommentLikes /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_$ListCommentLikesImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _$ListCommentLikesImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1444,22 +1267,19 @@ class __$$ListCommentLikesImplCopyWithImpl<$Res> @apiSerde class _$ListCommentLikesImpl extends _ListCommentLikes { - const _$ListCommentLikesImpl( - {required this.commentId, this.page, this.limit, this.auth}) - : super._(); + const _$ListCommentLikesImpl({required this.commentId, this.page, this.limit, this.auth}) : super._(); - factory _$ListCommentLikesImpl.fromJson(Map json) => - _$$ListCommentLikesImplFromJson(json); + factory _$ListCommentLikesImpl.fromJson(Map json) => _$$ListCommentLikesImplFromJson(json); @override final int commentId; -// v0.19.2 (required) + // v0.19.2 (required) @override final int? page; -// v0.19.2 (optional) + // v0.19.2 (optional) @override final int? limit; -// v0.19.2 (optional) + // v0.19.2 (optional) @override final String? auth; @@ -1473,8 +1293,7 @@ class _$ListCommentLikesImpl extends _ListCommentLikes { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListCommentLikesImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.auth, auth) || other.auth == auth)); @@ -1489,28 +1308,19 @@ class _$ListCommentLikesImpl extends _ListCommentLikes { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommentLikesImplCopyWith<_$ListCommentLikesImpl> get copyWith => - __$$ListCommentLikesImplCopyWithImpl<_$ListCommentLikesImpl>( - this, _$identity); + _$$ListCommentLikesImplCopyWith<_$ListCommentLikesImpl> get copyWith => __$$ListCommentLikesImplCopyWithImpl<_$ListCommentLikesImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommentLikesImplToJson( - this, - ); + return _$$ListCommentLikesImplToJson(this); } } abstract class _ListCommentLikes extends ListCommentLikes { - const factory _ListCommentLikes( - {required final int commentId, - final int? page, - final int? limit, - final String? auth}) = _$ListCommentLikesImpl; + const factory _ListCommentLikes({required final int commentId, final int? page, final int? limit, final String? auth}) = _$ListCommentLikesImpl; const _ListCommentLikes._() : super._(); - factory _ListCommentLikes.fromJson(Map json) = - _$ListCommentLikesImpl.fromJson; + factory _ListCommentLikes.fromJson(Map json) = _$ListCommentLikesImpl.fromJson; @override int get commentId; // v0.19.2 (required) @@ -1525,8 +1335,7 @@ abstract class _ListCommentLikes extends ListCommentLikes { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommentLikesImplCopyWith<_$ListCommentLikesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListCommentLikesImplCopyWith<_$ListCommentLikesImpl> get copyWith => throw _privateConstructorUsedError; } SaveComment _$SaveCommentFromJson(Map json) { @@ -1545,22 +1354,18 @@ mixin _$SaveComment { /// Create a copy of SaveComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SaveCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $SaveCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SaveCommentCopyWith<$Res> { - factory $SaveCommentCopyWith( - SaveComment value, $Res Function(SaveComment) then) = - _$SaveCommentCopyWithImpl<$Res, SaveComment>; + factory $SaveCommentCopyWith(SaveComment value, $Res Function(SaveComment) then) = _$SaveCommentCopyWithImpl<$Res, SaveComment>; @useResult $Res call({int commentId, bool save, String? auth}); } /// @nodoc -class _$SaveCommentCopyWithImpl<$Res, $Val extends SaveComment> - implements $SaveCommentCopyWith<$Res> { +class _$SaveCommentCopyWithImpl<$Res, $Val extends SaveComment> implements $SaveCommentCopyWith<$Res> { _$SaveCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1572,70 +1377,66 @@ class _$SaveCommentCopyWithImpl<$Res, $Val extends SaveComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? save = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - save: null == save - ? _value.save - : save // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SaveCommentImplCopyWith<$Res> - implements $SaveCommentCopyWith<$Res> { - factory _$$SaveCommentImplCopyWith( - _$SaveCommentImpl value, $Res Function(_$SaveCommentImpl) then) = - __$$SaveCommentImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? save = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + save: + null == save + ? _value.save + : save // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$SaveCommentImplCopyWith<$Res> implements $SaveCommentCopyWith<$Res> { + factory _$$SaveCommentImplCopyWith(_$SaveCommentImpl value, $Res Function(_$SaveCommentImpl) then) = __$$SaveCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, bool save, String? auth}); } /// @nodoc -class __$$SaveCommentImplCopyWithImpl<$Res> - extends _$SaveCommentCopyWithImpl<$Res, _$SaveCommentImpl> - implements _$$SaveCommentImplCopyWith<$Res> { - __$$SaveCommentImplCopyWithImpl( - _$SaveCommentImpl _value, $Res Function(_$SaveCommentImpl) _then) - : super(_value, _then); +class __$$SaveCommentImplCopyWithImpl<$Res> extends _$SaveCommentCopyWithImpl<$Res, _$SaveCommentImpl> implements _$$SaveCommentImplCopyWith<$Res> { + __$$SaveCommentImplCopyWithImpl(_$SaveCommentImpl _value, $Res Function(_$SaveCommentImpl) _then) : super(_value, _then); /// Create a copy of SaveComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? save = null, - Object? auth = freezed, - }) { - return _then(_$SaveCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - save: null == save - ? _value.save - : save // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? save = null, Object? auth = freezed}) { + return _then( + _$SaveCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + save: + null == save + ? _value.save + : save // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1643,19 +1444,16 @@ class __$$SaveCommentImplCopyWithImpl<$Res> @apiSerde class _$SaveCommentImpl extends _SaveComment { - const _$SaveCommentImpl( - {required this.commentId, required this.save, this.auth}) - : super._(); + const _$SaveCommentImpl({required this.commentId, required this.save, this.auth}) : super._(); - factory _$SaveCommentImpl.fromJson(Map json) => - _$$SaveCommentImplFromJson(json); + factory _$SaveCommentImpl.fromJson(Map json) => _$$SaveCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool save; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1669,8 +1467,7 @@ class _$SaveCommentImpl extends _SaveComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SaveCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.save, save) || other.save == save) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1684,26 +1481,19 @@ class _$SaveCommentImpl extends _SaveComment { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SaveCommentImplCopyWith<_$SaveCommentImpl> get copyWith => - __$$SaveCommentImplCopyWithImpl<_$SaveCommentImpl>(this, _$identity); + _$$SaveCommentImplCopyWith<_$SaveCommentImpl> get copyWith => __$$SaveCommentImplCopyWithImpl<_$SaveCommentImpl>(this, _$identity); @override Map toJson() { - return _$$SaveCommentImplToJson( - this, - ); + return _$$SaveCommentImplToJson(this); } } abstract class _SaveComment extends SaveComment { - const factory _SaveComment( - {required final int commentId, - required final bool save, - final String? auth}) = _$SaveCommentImpl; + const factory _SaveComment({required final int commentId, required final bool save, final String? auth}) = _$SaveCommentImpl; const _SaveComment._() : super._(); - factory _SaveComment.fromJson(Map json) = - _$SaveCommentImpl.fromJson; + factory _SaveComment.fromJson(Map json) = _$SaveCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -1716,8 +1506,7 @@ abstract class _SaveComment extends SaveComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SaveCommentImplCopyWith<_$SaveCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SaveCommentImplCopyWith<_$SaveCommentImpl> get copyWith => throw _privateConstructorUsedError; } DistinguishComment _$DistinguishCommentFromJson(Map json) { @@ -1736,22 +1525,18 @@ mixin _$DistinguishComment { /// Create a copy of DistinguishComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DistinguishCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $DistinguishCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DistinguishCommentCopyWith<$Res> { - factory $DistinguishCommentCopyWith( - DistinguishComment value, $Res Function(DistinguishComment) then) = - _$DistinguishCommentCopyWithImpl<$Res, DistinguishComment>; + factory $DistinguishCommentCopyWith(DistinguishComment value, $Res Function(DistinguishComment) then) = _$DistinguishCommentCopyWithImpl<$Res, DistinguishComment>; @useResult $Res call({int commentId, bool distinguished, String? auth}); } /// @nodoc -class _$DistinguishCommentCopyWithImpl<$Res, $Val extends DistinguishComment> - implements $DistinguishCommentCopyWith<$Res> { +class _$DistinguishCommentCopyWithImpl<$Res, $Val extends DistinguishComment> implements $DistinguishCommentCopyWith<$Res> { _$DistinguishCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1763,70 +1548,66 @@ class _$DistinguishCommentCopyWithImpl<$Res, $Val extends DistinguishComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? distinguished = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - distinguished: null == distinguished - ? _value.distinguished - : distinguished // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$DistinguishCommentImplCopyWith<$Res> - implements $DistinguishCommentCopyWith<$Res> { - factory _$$DistinguishCommentImplCopyWith(_$DistinguishCommentImpl value, - $Res Function(_$DistinguishCommentImpl) then) = - __$$DistinguishCommentImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? distinguished = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + distinguished: + null == distinguished + ? _value.distinguished + : distinguished // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$DistinguishCommentImplCopyWith<$Res> implements $DistinguishCommentCopyWith<$Res> { + factory _$$DistinguishCommentImplCopyWith(_$DistinguishCommentImpl value, $Res Function(_$DistinguishCommentImpl) then) = __$$DistinguishCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, bool distinguished, String? auth}); } /// @nodoc -class __$$DistinguishCommentImplCopyWithImpl<$Res> - extends _$DistinguishCommentCopyWithImpl<$Res, _$DistinguishCommentImpl> - implements _$$DistinguishCommentImplCopyWith<$Res> { - __$$DistinguishCommentImplCopyWithImpl(_$DistinguishCommentImpl _value, - $Res Function(_$DistinguishCommentImpl) _then) - : super(_value, _then); +class __$$DistinguishCommentImplCopyWithImpl<$Res> extends _$DistinguishCommentCopyWithImpl<$Res, _$DistinguishCommentImpl> implements _$$DistinguishCommentImplCopyWith<$Res> { + __$$DistinguishCommentImplCopyWithImpl(_$DistinguishCommentImpl _value, $Res Function(_$DistinguishCommentImpl) _then) : super(_value, _then); /// Create a copy of DistinguishComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? distinguished = null, - Object? auth = freezed, - }) { - return _then(_$DistinguishCommentImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - distinguished: null == distinguished - ? _value.distinguished - : distinguished // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? distinguished = null, Object? auth = freezed}) { + return _then( + _$DistinguishCommentImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + distinguished: + null == distinguished + ? _value.distinguished + : distinguished // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1834,19 +1615,16 @@ class __$$DistinguishCommentImplCopyWithImpl<$Res> @apiSerde class _$DistinguishCommentImpl extends _DistinguishComment { - const _$DistinguishCommentImpl( - {required this.commentId, required this.distinguished, this.auth}) - : super._(); + const _$DistinguishCommentImpl({required this.commentId, required this.distinguished, this.auth}) : super._(); - factory _$DistinguishCommentImpl.fromJson(Map json) => - _$$DistinguishCommentImplFromJson(json); + factory _$DistinguishCommentImpl.fromJson(Map json) => _$$DistinguishCommentImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool distinguished; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1860,10 +1638,8 @@ class _$DistinguishCommentImpl extends _DistinguishComment { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DistinguishCommentImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && - (identical(other.distinguished, distinguished) || - other.distinguished == distinguished) && + (identical(other.commentId, commentId) || other.commentId == commentId) && + (identical(other.distinguished, distinguished) || other.distinguished == distinguished) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1876,27 +1652,19 @@ class _$DistinguishCommentImpl extends _DistinguishComment { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DistinguishCommentImplCopyWith<_$DistinguishCommentImpl> get copyWith => - __$$DistinguishCommentImplCopyWithImpl<_$DistinguishCommentImpl>( - this, _$identity); + _$$DistinguishCommentImplCopyWith<_$DistinguishCommentImpl> get copyWith => __$$DistinguishCommentImplCopyWithImpl<_$DistinguishCommentImpl>(this, _$identity); @override Map toJson() { - return _$$DistinguishCommentImplToJson( - this, - ); + return _$$DistinguishCommentImplToJson(this); } } abstract class _DistinguishComment extends DistinguishComment { - const factory _DistinguishComment( - {required final int commentId, - required final bool distinguished, - final String? auth}) = _$DistinguishCommentImpl; + const factory _DistinguishComment({required final int commentId, required final bool distinguished, final String? auth}) = _$DistinguishCommentImpl; const _DistinguishComment._() : super._(); - factory _DistinguishComment.fromJson(Map json) = - _$DistinguishCommentImpl.fromJson; + factory _DistinguishComment.fromJson(Map json) = _$DistinguishCommentImpl.fromJson; @override int get commentId; // v0.18.0 @@ -1909,8 +1677,7 @@ abstract class _DistinguishComment extends DistinguishComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DistinguishCommentImplCopyWith<_$DistinguishCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DistinguishCommentImplCopyWith<_$DistinguishCommentImpl> get copyWith => throw _privateConstructorUsedError; } GetComments _$GetCommentsFromJson(Map json) { @@ -1930,10 +1697,8 @@ mixin _$GetComments { int? get postId => throw _privateConstructorUsedError; // v0.18.0 int? get parentId => throw _privateConstructorUsedError; // v0.18.0 bool? get savedOnly => throw _privateConstructorUsedError; // v0.18.0 - bool? get likedOnly => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get dislikedOnly => - throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get likedOnly => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get dislikedOnly => throw _privateConstructorUsedError; // v0.19.0 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this GetComments to a JSON map. @@ -1942,35 +1707,32 @@ mixin _$GetComments { /// Create a copy of GetComments /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCommentsCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCommentsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCommentsCopyWith<$Res> { - factory $GetCommentsCopyWith( - GetComments value, $Res Function(GetComments) then) = - _$GetCommentsCopyWithImpl<$Res, GetComments>; + factory $GetCommentsCopyWith(GetComments value, $Res Function(GetComments) then) = _$GetCommentsCopyWithImpl<$Res, GetComments>; @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - CommentSortType? sort, - int? maxDepth, - int? page, - int? limit, - int? communityId, - String? communityName, - int? postId, - int? parentId, - bool? savedOnly, - bool? likedOnly, - bool? dislikedOnly, - String? auth}); -} - -/// @nodoc -class _$GetCommentsCopyWithImpl<$Res, $Val extends GetComments> - implements $GetCommentsCopyWith<$Res> { + $Res call({ + @JsonKey(name: 'type_') ListingType? type, + CommentSortType? sort, + int? maxDepth, + int? page, + int? limit, + int? communityId, + String? communityName, + int? postId, + int? parentId, + bool? savedOnly, + bool? likedOnly, + bool? dislikedOnly, + String? auth, + }); +} + +/// @nodoc +class _$GetCommentsCopyWithImpl<$Res, $Val extends GetComments> implements $GetCommentsCopyWith<$Res> { _$GetCommentsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1997,94 +1759,104 @@ class _$GetCommentsCopyWithImpl<$Res, $Val extends GetComments> Object? dislikedOnly = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - maxDepth: freezed == maxDepth - ? _value.maxDepth - : maxDepth // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - parentId: freezed == parentId - ? _value.parentId - : parentId // ignore: cast_nullable_to_non_nullable - as int?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - likedOnly: freezed == likedOnly - ? _value.likedOnly - : likedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - dislikedOnly: freezed == dislikedOnly - ? _value.dislikedOnly - : dislikedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$GetCommentsImplCopyWith<$Res> - implements $GetCommentsCopyWith<$Res> { - factory _$$GetCommentsImplCopyWith( - _$GetCommentsImpl value, $Res Function(_$GetCommentsImpl) then) = - __$$GetCommentsImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + maxDepth: + freezed == maxDepth + ? _value.maxDepth + : maxDepth // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + parentId: + freezed == parentId + ? _value.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as int?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + likedOnly: + freezed == likedOnly + ? _value.likedOnly + : likedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + dislikedOnly: + freezed == dislikedOnly + ? _value.dislikedOnly + : dislikedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$GetCommentsImplCopyWith<$Res> implements $GetCommentsCopyWith<$Res> { + factory _$$GetCommentsImplCopyWith(_$GetCommentsImpl value, $Res Function(_$GetCommentsImpl) then) = __$$GetCommentsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - CommentSortType? sort, - int? maxDepth, - int? page, - int? limit, - int? communityId, - String? communityName, - int? postId, - int? parentId, - bool? savedOnly, - bool? likedOnly, - bool? dislikedOnly, - String? auth}); -} - -/// @nodoc -class __$$GetCommentsImplCopyWithImpl<$Res> - extends _$GetCommentsCopyWithImpl<$Res, _$GetCommentsImpl> - implements _$$GetCommentsImplCopyWith<$Res> { - __$$GetCommentsImplCopyWithImpl( - _$GetCommentsImpl _value, $Res Function(_$GetCommentsImpl) _then) - : super(_value, _then); + $Res call({ + @JsonKey(name: 'type_') ListingType? type, + CommentSortType? sort, + int? maxDepth, + int? page, + int? limit, + int? communityId, + String? communityName, + int? postId, + int? parentId, + bool? savedOnly, + bool? likedOnly, + bool? dislikedOnly, + String? auth, + }); +} + +/// @nodoc +class __$$GetCommentsImplCopyWithImpl<$Res> extends _$GetCommentsCopyWithImpl<$Res, _$GetCommentsImpl> implements _$$GetCommentsImplCopyWith<$Res> { + __$$GetCommentsImplCopyWithImpl(_$GetCommentsImpl _value, $Res Function(_$GetCommentsImpl) _then) : super(_value, _then); /// Create a copy of GetComments /// with the given fields replaced by the non-null parameter values. @@ -2105,60 +1877,75 @@ class __$$GetCommentsImplCopyWithImpl<$Res> Object? dislikedOnly = freezed, Object? auth = freezed, }) { - return _then(_$GetCommentsImpl( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - maxDepth: freezed == maxDepth - ? _value.maxDepth - : maxDepth // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - parentId: freezed == parentId - ? _value.parentId - : parentId // ignore: cast_nullable_to_non_nullable - as int?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - likedOnly: freezed == likedOnly - ? _value.likedOnly - : likedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - dislikedOnly: freezed == dislikedOnly - ? _value.dislikedOnly - : dislikedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$GetCommentsImpl( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + maxDepth: + freezed == maxDepth + ? _value.maxDepth + : maxDepth // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + parentId: + freezed == parentId + ? _value.parentId + : parentId // ignore: cast_nullable_to_non_nullable + as int?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + likedOnly: + freezed == likedOnly + ? _value.likedOnly + : likedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + dislikedOnly: + freezed == dislikedOnly + ? _value.dislikedOnly + : dislikedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2166,62 +1953,61 @@ class __$$GetCommentsImplCopyWithImpl<$Res> @apiSerde class _$GetCommentsImpl extends _GetComments { - const _$GetCommentsImpl( - {@JsonKey(name: 'type_') this.type, - this.sort, - this.maxDepth, - this.page, - this.limit, - this.communityId, - this.communityName, - this.postId, - this.parentId, - this.savedOnly, - this.likedOnly, - this.dislikedOnly, - this.auth}) - : super._(); - - factory _$GetCommentsImpl.fromJson(Map json) => - _$$GetCommentsImplFromJson(json); + const _$GetCommentsImpl({ + @JsonKey(name: 'type_') this.type, + this.sort, + this.maxDepth, + this.page, + this.limit, + this.communityId, + this.communityName, + this.postId, + this.parentId, + this.savedOnly, + this.likedOnly, + this.dislikedOnly, + this.auth, + }) : super._(); + + factory _$GetCommentsImpl.fromJson(Map json) => _$$GetCommentsImplFromJson(json); @override @JsonKey(name: 'type_') final ListingType? type; -// v0.18.0 + // v0.18.0 @override final CommentSortType? sort; -// v0.18.0 + // v0.18.0 @override final int? maxDepth; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final String? communityName; -// v0.18.0 + // v0.18.0 @override final int? postId; -// v0.18.0 + // v0.18.0 @override final int? parentId; -// v0.18.0 + // v0.18.0 @override final bool? savedOnly; -// v0.18.0 + // v0.18.0 @override final bool? likedOnly; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? dislikedOnly; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String? auth; @@ -2237,79 +2023,55 @@ class _$GetCommentsImpl extends _GetComments { other is _$GetCommentsImpl && (identical(other.type, type) || other.type == type) && (identical(other.sort, sort) || other.sort == sort) && - (identical(other.maxDepth, maxDepth) || - other.maxDepth == maxDepth) && + (identical(other.maxDepth, maxDepth) || other.maxDepth == maxDepth) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.communityName, communityName) || - other.communityName == communityName) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.communityName, communityName) || other.communityName == communityName) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.parentId, parentId) || - other.parentId == parentId) && - (identical(other.savedOnly, savedOnly) || - other.savedOnly == savedOnly) && - (identical(other.likedOnly, likedOnly) || - other.likedOnly == likedOnly) && - (identical(other.dislikedOnly, dislikedOnly) || - other.dislikedOnly == dislikedOnly) && + (identical(other.parentId, parentId) || other.parentId == parentId) && + (identical(other.savedOnly, savedOnly) || other.savedOnly == savedOnly) && + (identical(other.likedOnly, likedOnly) || other.likedOnly == likedOnly) && + (identical(other.dislikedOnly, dislikedOnly) || other.dislikedOnly == dislikedOnly) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - type, - sort, - maxDepth, - page, - limit, - communityId, - communityName, - postId, - parentId, - savedOnly, - likedOnly, - dislikedOnly, - auth); + int get hashCode => Object.hash(runtimeType, type, sort, maxDepth, page, limit, communityId, communityName, postId, parentId, savedOnly, likedOnly, dislikedOnly, auth); /// Create a copy of GetComments /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCommentsImplCopyWith<_$GetCommentsImpl> get copyWith => - __$$GetCommentsImplCopyWithImpl<_$GetCommentsImpl>(this, _$identity); + _$$GetCommentsImplCopyWith<_$GetCommentsImpl> get copyWith => __$$GetCommentsImplCopyWithImpl<_$GetCommentsImpl>(this, _$identity); @override Map toJson() { - return _$$GetCommentsImplToJson( - this, - ); + return _$$GetCommentsImplToJson(this); } } abstract class _GetComments extends GetComments { - const factory _GetComments( - {@JsonKey(name: 'type_') final ListingType? type, - final CommentSortType? sort, - final int? maxDepth, - final int? page, - final int? limit, - final int? communityId, - final String? communityName, - final int? postId, - final int? parentId, - final bool? savedOnly, - final bool? likedOnly, - final bool? dislikedOnly, - final String? auth}) = _$GetCommentsImpl; + const factory _GetComments({ + @JsonKey(name: 'type_') final ListingType? type, + final CommentSortType? sort, + final int? maxDepth, + final int? page, + final int? limit, + final int? communityId, + final String? communityName, + final int? postId, + final int? parentId, + final bool? savedOnly, + final bool? likedOnly, + final bool? dislikedOnly, + final String? auth, + }) = _$GetCommentsImpl; const _GetComments._() : super._(); - factory _GetComments.fromJson(Map json) = - _$GetCommentsImpl.fromJson; + factory _GetComments.fromJson(Map json) = _$GetCommentsImpl.fromJson; @override @JsonKey(name: 'type_') @@ -2343,8 +2105,7 @@ abstract class _GetComments extends GetComments { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCommentsImplCopyWith<_$GetCommentsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCommentsImplCopyWith<_$GetCommentsImpl> get copyWith => throw _privateConstructorUsedError; } GetComment _$GetCommentFromJson(Map json) { @@ -2362,22 +2123,18 @@ mixin _$GetComment { /// Create a copy of GetComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCommentCopyWith<$Res> { - factory $GetCommentCopyWith( - GetComment value, $Res Function(GetComment) then) = - _$GetCommentCopyWithImpl<$Res, GetComment>; + factory $GetCommentCopyWith(GetComment value, $Res Function(GetComment) then) = _$GetCommentCopyWithImpl<$Res, GetComment>; @useResult $Res call({int id, String? auth}); } /// @nodoc -class _$GetCommentCopyWithImpl<$Res, $Val extends GetComment> - implements $GetCommentCopyWith<$Res> { +class _$GetCommentCopyWithImpl<$Res, $Val extends GetComment> implements $GetCommentCopyWith<$Res> { _$GetCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2389,60 +2146,56 @@ class _$GetCommentCopyWithImpl<$Res, $Val extends GetComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetCommentImplCopyWith<$Res> - implements $GetCommentCopyWith<$Res> { - factory _$$GetCommentImplCopyWith( - _$GetCommentImpl value, $Res Function(_$GetCommentImpl) then) = - __$$GetCommentImplCopyWithImpl<$Res>; +abstract class _$$GetCommentImplCopyWith<$Res> implements $GetCommentCopyWith<$Res> { + factory _$$GetCommentImplCopyWith(_$GetCommentImpl value, $Res Function(_$GetCommentImpl) then) = __$$GetCommentImplCopyWithImpl<$Res>; @override @useResult $Res call({int id, String? auth}); } /// @nodoc -class __$$GetCommentImplCopyWithImpl<$Res> - extends _$GetCommentCopyWithImpl<$Res, _$GetCommentImpl> - implements _$$GetCommentImplCopyWith<$Res> { - __$$GetCommentImplCopyWithImpl( - _$GetCommentImpl _value, $Res Function(_$GetCommentImpl) _then) - : super(_value, _then); +class __$$GetCommentImplCopyWithImpl<$Res> extends _$GetCommentCopyWithImpl<$Res, _$GetCommentImpl> implements _$$GetCommentImplCopyWith<$Res> { + __$$GetCommentImplCopyWithImpl(_$GetCommentImpl _value, $Res Function(_$GetCommentImpl) _then) : super(_value, _then); /// Create a copy of GetComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? auth = freezed, - }) { - return _then(_$GetCommentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = null, Object? auth = freezed}) { + return _then( + _$GetCommentImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2452,12 +2205,11 @@ class __$$GetCommentImplCopyWithImpl<$Res> class _$GetCommentImpl extends _GetComment { const _$GetCommentImpl({required this.id, this.auth}) : super._(); - factory _$GetCommentImpl.fromJson(Map json) => - _$$GetCommentImplFromJson(json); + factory _$GetCommentImpl.fromJson(Map json) => _$$GetCommentImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2469,10 +2221,7 @@ class _$GetCommentImpl extends _GetComment { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetCommentImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.auth, auth) || other.auth == auth)); + (other.runtimeType == runtimeType && other is _$GetCommentImpl && (identical(other.id, id) || other.id == id) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -2484,24 +2233,19 @@ class _$GetCommentImpl extends _GetComment { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCommentImplCopyWith<_$GetCommentImpl> get copyWith => - __$$GetCommentImplCopyWithImpl<_$GetCommentImpl>(this, _$identity); + _$$GetCommentImplCopyWith<_$GetCommentImpl> get copyWith => __$$GetCommentImplCopyWithImpl<_$GetCommentImpl>(this, _$identity); @override Map toJson() { - return _$$GetCommentImplToJson( - this, - ); + return _$$GetCommentImplToJson(this); } } abstract class _GetComment extends GetComment { - const factory _GetComment({required final int id, final String? auth}) = - _$GetCommentImpl; + const factory _GetComment({required final int id, final String? auth}) = _$GetCommentImpl; const _GetComment._() : super._(); - factory _GetComment.fromJson(Map json) = - _$GetCommentImpl.fromJson; + factory _GetComment.fromJson(Map json) = _$GetCommentImpl.fromJson; @override int get id; // v0.18.0 @@ -2512,8 +2256,7 @@ abstract class _GetComment extends GetComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCommentImplCopyWith<_$GetCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCommentImplCopyWith<_$GetCommentImpl> get copyWith => throw _privateConstructorUsedError; } CreateCommentReport _$CreateCommentReportFromJson(Map json) { @@ -2532,22 +2275,18 @@ mixin _$CreateCommentReport { /// Create a copy of CreateCommentReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateCommentReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateCommentReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateCommentReportCopyWith<$Res> { - factory $CreateCommentReportCopyWith( - CreateCommentReport value, $Res Function(CreateCommentReport) then) = - _$CreateCommentReportCopyWithImpl<$Res, CreateCommentReport>; + factory $CreateCommentReportCopyWith(CreateCommentReport value, $Res Function(CreateCommentReport) then) = _$CreateCommentReportCopyWithImpl<$Res, CreateCommentReport>; @useResult $Res call({int commentId, String reason, String? auth}); } /// @nodoc -class _$CreateCommentReportCopyWithImpl<$Res, $Val extends CreateCommentReport> - implements $CreateCommentReportCopyWith<$Res> { +class _$CreateCommentReportCopyWithImpl<$Res, $Val extends CreateCommentReport> implements $CreateCommentReportCopyWith<$Res> { _$CreateCommentReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2559,70 +2298,66 @@ class _$CreateCommentReportCopyWithImpl<$Res, $Val extends CreateCommentReport> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreateCommentReportImplCopyWith<$Res> - implements $CreateCommentReportCopyWith<$Res> { - factory _$$CreateCommentReportImplCopyWith(_$CreateCommentReportImpl value, - $Res Function(_$CreateCommentReportImpl) then) = - __$$CreateCommentReportImplCopyWithImpl<$Res>; + $Res call({Object? commentId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreateCommentReportImplCopyWith<$Res> implements $CreateCommentReportCopyWith<$Res> { + factory _$$CreateCommentReportImplCopyWith(_$CreateCommentReportImpl value, $Res Function(_$CreateCommentReportImpl) then) = __$$CreateCommentReportImplCopyWithImpl<$Res>; @override @useResult $Res call({int commentId, String reason, String? auth}); } /// @nodoc -class __$$CreateCommentReportImplCopyWithImpl<$Res> - extends _$CreateCommentReportCopyWithImpl<$Res, _$CreateCommentReportImpl> - implements _$$CreateCommentReportImplCopyWith<$Res> { - __$$CreateCommentReportImplCopyWithImpl(_$CreateCommentReportImpl _value, - $Res Function(_$CreateCommentReportImpl) _then) - : super(_value, _then); +class __$$CreateCommentReportImplCopyWithImpl<$Res> extends _$CreateCommentReportCopyWithImpl<$Res, _$CreateCommentReportImpl> implements _$$CreateCommentReportImplCopyWith<$Res> { + __$$CreateCommentReportImplCopyWithImpl(_$CreateCommentReportImpl _value, $Res Function(_$CreateCommentReportImpl) _then) : super(_value, _then); /// Create a copy of CreateCommentReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_$CreateCommentReportImpl( - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _$CreateCommentReportImpl( + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2630,19 +2365,16 @@ class __$$CreateCommentReportImplCopyWithImpl<$Res> @apiSerde class _$CreateCommentReportImpl extends _CreateCommentReport { - const _$CreateCommentReportImpl( - {required this.commentId, required this.reason, this.auth}) - : super._(); + const _$CreateCommentReportImpl({required this.commentId, required this.reason, this.auth}) : super._(); - factory _$CreateCommentReportImpl.fromJson(Map json) => - _$$CreateCommentReportImplFromJson(json); + factory _$CreateCommentReportImpl.fromJson(Map json) => _$$CreateCommentReportImplFromJson(json); @override final int commentId; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2656,8 +2388,7 @@ class _$CreateCommentReportImpl extends _CreateCommentReport { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateCommentReportImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -2671,27 +2402,19 @@ class _$CreateCommentReportImpl extends _CreateCommentReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateCommentReportImplCopyWith<_$CreateCommentReportImpl> get copyWith => - __$$CreateCommentReportImplCopyWithImpl<_$CreateCommentReportImpl>( - this, _$identity); + _$$CreateCommentReportImplCopyWith<_$CreateCommentReportImpl> get copyWith => __$$CreateCommentReportImplCopyWithImpl<_$CreateCommentReportImpl>(this, _$identity); @override Map toJson() { - return _$$CreateCommentReportImplToJson( - this, - ); + return _$$CreateCommentReportImplToJson(this); } } abstract class _CreateCommentReport extends CreateCommentReport { - const factory _CreateCommentReport( - {required final int commentId, - required final String reason, - final String? auth}) = _$CreateCommentReportImpl; + const factory _CreateCommentReport({required final int commentId, required final String reason, final String? auth}) = _$CreateCommentReportImpl; const _CreateCommentReport._() : super._(); - factory _CreateCommentReport.fromJson(Map json) = - _$CreateCommentReportImpl.fromJson; + factory _CreateCommentReport.fromJson(Map json) = _$CreateCommentReportImpl.fromJson; @override int get commentId; // v0.18.0 @@ -2704,8 +2427,7 @@ abstract class _CreateCommentReport extends CreateCommentReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateCommentReportImplCopyWith<_$CreateCommentReportImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateCommentReportImplCopyWith<_$CreateCommentReportImpl> get copyWith => throw _privateConstructorUsedError; } ResolveCommentReport _$ResolveCommentReportFromJson(Map json) { @@ -2724,23 +2446,18 @@ mixin _$ResolveCommentReport { /// Create a copy of ResolveCommentReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ResolveCommentReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $ResolveCommentReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ResolveCommentReportCopyWith<$Res> { - factory $ResolveCommentReportCopyWith(ResolveCommentReport value, - $Res Function(ResolveCommentReport) then) = - _$ResolveCommentReportCopyWithImpl<$Res, ResolveCommentReport>; + factory $ResolveCommentReportCopyWith(ResolveCommentReport value, $Res Function(ResolveCommentReport) then) = _$ResolveCommentReportCopyWithImpl<$Res, ResolveCommentReport>; @useResult $Res call({int reportId, bool resolved, String? auth}); } /// @nodoc -class _$ResolveCommentReportCopyWithImpl<$Res, - $Val extends ResolveCommentReport> - implements $ResolveCommentReportCopyWith<$Res> { +class _$ResolveCommentReportCopyWithImpl<$Res, $Val extends ResolveCommentReport> implements $ResolveCommentReportCopyWith<$Res> { _$ResolveCommentReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2752,70 +2469,66 @@ class _$ResolveCommentReportCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ResolveCommentReportImplCopyWith<$Res> - implements $ResolveCommentReportCopyWith<$Res> { - factory _$$ResolveCommentReportImplCopyWith(_$ResolveCommentReportImpl value, - $Res Function(_$ResolveCommentReportImpl) then) = - __$$ResolveCommentReportImplCopyWithImpl<$Res>; + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ResolveCommentReportImplCopyWith<$Res> implements $ResolveCommentReportCopyWith<$Res> { + factory _$$ResolveCommentReportImplCopyWith(_$ResolveCommentReportImpl value, $Res Function(_$ResolveCommentReportImpl) then) = __$$ResolveCommentReportImplCopyWithImpl<$Res>; @override @useResult $Res call({int reportId, bool resolved, String? auth}); } /// @nodoc -class __$$ResolveCommentReportImplCopyWithImpl<$Res> - extends _$ResolveCommentReportCopyWithImpl<$Res, _$ResolveCommentReportImpl> - implements _$$ResolveCommentReportImplCopyWith<$Res> { - __$$ResolveCommentReportImplCopyWithImpl(_$ResolveCommentReportImpl _value, - $Res Function(_$ResolveCommentReportImpl) _then) - : super(_value, _then); +class __$$ResolveCommentReportImplCopyWithImpl<$Res> extends _$ResolveCommentReportCopyWithImpl<$Res, _$ResolveCommentReportImpl> implements _$$ResolveCommentReportImplCopyWith<$Res> { + __$$ResolveCommentReportImplCopyWithImpl(_$ResolveCommentReportImpl _value, $Res Function(_$ResolveCommentReportImpl) _then) : super(_value, _then); /// Create a copy of ResolveCommentReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_$ResolveCommentReportImpl( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _$ResolveCommentReportImpl( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2823,19 +2536,16 @@ class __$$ResolveCommentReportImplCopyWithImpl<$Res> @apiSerde class _$ResolveCommentReportImpl extends _ResolveCommentReport { - const _$ResolveCommentReportImpl( - {required this.reportId, required this.resolved, this.auth}) - : super._(); + const _$ResolveCommentReportImpl({required this.reportId, required this.resolved, this.auth}) : super._(); - factory _$ResolveCommentReportImpl.fromJson(Map json) => - _$$ResolveCommentReportImplFromJson(json); + factory _$ResolveCommentReportImpl.fromJson(Map json) => _$$ResolveCommentReportImplFromJson(json); @override final int reportId; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2849,10 +2559,8 @@ class _$ResolveCommentReportImpl extends _ResolveCommentReport { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ResolveCommentReportImpl && - (identical(other.reportId, reportId) || - other.reportId == reportId) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && + (identical(other.reportId, reportId) || other.reportId == reportId) && + (identical(other.resolved, resolved) || other.resolved == resolved) && (identical(other.auth, auth) || other.auth == auth)); } @@ -2865,28 +2573,19 @@ class _$ResolveCommentReportImpl extends _ResolveCommentReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ResolveCommentReportImplCopyWith<_$ResolveCommentReportImpl> - get copyWith => - __$$ResolveCommentReportImplCopyWithImpl<_$ResolveCommentReportImpl>( - this, _$identity); + _$$ResolveCommentReportImplCopyWith<_$ResolveCommentReportImpl> get copyWith => __$$ResolveCommentReportImplCopyWithImpl<_$ResolveCommentReportImpl>(this, _$identity); @override Map toJson() { - return _$$ResolveCommentReportImplToJson( - this, - ); + return _$$ResolveCommentReportImplToJson(this); } } abstract class _ResolveCommentReport extends ResolveCommentReport { - const factory _ResolveCommentReport( - {required final int reportId, - required final bool resolved, - final String? auth}) = _$ResolveCommentReportImpl; + const factory _ResolveCommentReport({required final int reportId, required final bool resolved, final String? auth}) = _$ResolveCommentReportImpl; const _ResolveCommentReport._() : super._(); - factory _ResolveCommentReport.fromJson(Map json) = - _$ResolveCommentReportImpl.fromJson; + factory _ResolveCommentReport.fromJson(Map json) = _$ResolveCommentReportImpl.fromJson; @override int get reportId; // v0.18.0 @@ -2899,8 +2598,7 @@ abstract class _ResolveCommentReport extends ResolveCommentReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ResolveCommentReportImplCopyWith<_$ResolveCommentReportImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ResolveCommentReportImplCopyWith<_$ResolveCommentReportImpl> get copyWith => throw _privateConstructorUsedError; } ListCommentReports _$ListCommentReportsFromJson(Map json) { @@ -2909,8 +2607,7 @@ ListCommentReports _$ListCommentReportsFromJson(Map json) { /// @nodoc mixin _$ListCommentReports { - int? get commentId => - throw _privateConstructorUsedError; // v0.19.4 (optional) + int? get commentId => throw _privateConstructorUsedError; // v0.19.4 (optional) int? get page => throw _privateConstructorUsedError; // v0.18.0 int? get limit => throw _privateConstructorUsedError; // v0.18.0 bool? get unresolvedOnly => throw _privateConstructorUsedError; // v0.18.0 @@ -2923,28 +2620,18 @@ mixin _$ListCommentReports { /// Create a copy of ListCommentReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommentReportsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListCommentReportsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommentReportsCopyWith<$Res> { - factory $ListCommentReportsCopyWith( - ListCommentReports value, $Res Function(ListCommentReports) then) = - _$ListCommentReportsCopyWithImpl<$Res, ListCommentReports>; + factory $ListCommentReportsCopyWith(ListCommentReports value, $Res Function(ListCommentReports) then) = _$ListCommentReportsCopyWithImpl<$Res, ListCommentReports>; @useResult - $Res call( - {int? commentId, - int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - String? auth}); + $Res call({int? commentId, int? page, int? limit, bool? unresolvedOnly, int? communityId, String? auth}); } /// @nodoc -class _$ListCommentReportsCopyWithImpl<$Res, $Val extends ListCommentReports> - implements $ListCommentReportsCopyWith<$Res> { +class _$ListCommentReportsCopyWithImpl<$Res, $Val extends ListCommentReports> implements $ListCommentReportsCopyWith<$Res> { _$ListCommentReportsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2956,106 +2643,96 @@ class _$ListCommentReportsCopyWithImpl<$Res, $Val extends ListCommentReports> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ListCommentReportsImplCopyWith<$Res> - implements $ListCommentReportsCopyWith<$Res> { - factory _$$ListCommentReportsImplCopyWith(_$ListCommentReportsImpl value, - $Res Function(_$ListCommentReportsImpl) then) = - __$$ListCommentReportsImplCopyWithImpl<$Res>; + $Res call({Object? commentId = freezed, Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ListCommentReportsImplCopyWith<$Res> implements $ListCommentReportsCopyWith<$Res> { + factory _$$ListCommentReportsImplCopyWith(_$ListCommentReportsImpl value, $Res Function(_$ListCommentReportsImpl) then) = __$$ListCommentReportsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? commentId, - int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - String? auth}); + $Res call({int? commentId, int? page, int? limit, bool? unresolvedOnly, int? communityId, String? auth}); } /// @nodoc -class __$$ListCommentReportsImplCopyWithImpl<$Res> - extends _$ListCommentReportsCopyWithImpl<$Res, _$ListCommentReportsImpl> - implements _$$ListCommentReportsImplCopyWith<$Res> { - __$$ListCommentReportsImplCopyWithImpl(_$ListCommentReportsImpl _value, - $Res Function(_$ListCommentReportsImpl) _then) - : super(_value, _then); +class __$$ListCommentReportsImplCopyWithImpl<$Res> extends _$ListCommentReportsCopyWithImpl<$Res, _$ListCommentReportsImpl> implements _$$ListCommentReportsImplCopyWith<$Res> { + __$$ListCommentReportsImplCopyWithImpl(_$ListCommentReportsImpl _value, $Res Function(_$ListCommentReportsImpl) _then) : super(_value, _then); /// Create a copy of ListCommentReports /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentId = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_$ListCommentReportsImpl( - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentId = freezed, Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _$ListCommentReportsImpl( + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3063,33 +2740,25 @@ class __$$ListCommentReportsImplCopyWithImpl<$Res> @apiSerde class _$ListCommentReportsImpl extends _ListCommentReports { - const _$ListCommentReportsImpl( - {this.commentId, - this.page, - this.limit, - this.unresolvedOnly, - this.communityId, - this.auth}) - : super._(); + const _$ListCommentReportsImpl({this.commentId, this.page, this.limit, this.unresolvedOnly, this.communityId, this.auth}) : super._(); - factory _$ListCommentReportsImpl.fromJson(Map json) => - _$$ListCommentReportsImplFromJson(json); + factory _$ListCommentReportsImpl.fromJson(Map json) => _$$ListCommentReportsImplFromJson(json); @override final int? commentId; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? unresolvedOnly; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -3103,51 +2772,36 @@ class _$ListCommentReportsImpl extends _ListCommentReports { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListCommentReportsImpl && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.unresolvedOnly, unresolvedOnly) || - other.unresolvedOnly == unresolvedOnly) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.unresolvedOnly, unresolvedOnly) || other.unresolvedOnly == unresolvedOnly) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, commentId, page, limit, unresolvedOnly, communityId, auth); + int get hashCode => Object.hash(runtimeType, commentId, page, limit, unresolvedOnly, communityId, auth); /// Create a copy of ListCommentReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommentReportsImplCopyWith<_$ListCommentReportsImpl> get copyWith => - __$$ListCommentReportsImplCopyWithImpl<_$ListCommentReportsImpl>( - this, _$identity); + _$$ListCommentReportsImplCopyWith<_$ListCommentReportsImpl> get copyWith => __$$ListCommentReportsImplCopyWithImpl<_$ListCommentReportsImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommentReportsImplToJson( - this, - ); + return _$$ListCommentReportsImplToJson(this); } } abstract class _ListCommentReports extends ListCommentReports { - const factory _ListCommentReports( - {final int? commentId, - final int? page, - final int? limit, - final bool? unresolvedOnly, - final int? communityId, - final String? auth}) = _$ListCommentReportsImpl; + const factory _ListCommentReports({final int? commentId, final int? page, final int? limit, final bool? unresolvedOnly, final int? communityId, final String? auth}) = _$ListCommentReportsImpl; const _ListCommentReports._() : super._(); - factory _ListCommentReports.fromJson(Map json) = - _$ListCommentReportsImpl.fromJson; + factory _ListCommentReports.fromJson(Map json) = _$ListCommentReportsImpl.fromJson; @override int? get commentId; // v0.19.4 (optional) @@ -3166,6 +2820,5 @@ abstract class _ListCommentReports extends ListCommentReports { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommentReportsImplCopyWith<_$ListCommentReportsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListCommentReportsImplCopyWith<_$ListCommentReportsImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/comment/comment.g.dart b/lib/src/v3/api/comment/comment.g.dart index ffde10bc..b3cda3b0 100644 --- a/lib/src/v3/api/comment/comment.g.dart +++ b/lib/src/v3/api/comment/comment.g.dart @@ -6,375 +6,172 @@ part of 'comment.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CreateCommentImpl _$$CreateCommentImplFromJson(Map json) => - _$CreateCommentImpl( - content: json['content'] as String, - postId: (json['post_id'] as num).toInt(), - parentId: (json['parent_id'] as num?)?.toInt(), - languageId: (json['language_id'] as num?)?.toInt(), - formId: json['form_id'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$CreateCommentImplToJson(_$CreateCommentImpl instance) { - final val = { - 'content': instance.content, - 'post_id': instance.postId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('parent_id', instance.parentId); - writeNotNull('language_id', instance.languageId); - writeNotNull('form_id', instance.formId); - writeNotNull('auth', instance.auth); - return val; -} - -_$EditCommentImpl _$$EditCommentImplFromJson(Map json) => - _$EditCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - content: json['content'] as String?, - languageId: (json['language_id'] as num?)?.toInt(), - formId: json['form_id'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$EditCommentImplToJson(_$EditCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('content', instance.content); - writeNotNull('language_id', instance.languageId); - writeNotNull('form_id', instance.formId); - writeNotNull('auth', instance.auth); - return val; -} +_$CreateCommentImpl _$$CreateCommentImplFromJson(Map json) => _$CreateCommentImpl( + content: json['content'] as String, + postId: (json['post_id'] as num).toInt(), + parentId: (json['parent_id'] as num?)?.toInt(), + languageId: (json['language_id'] as num?)?.toInt(), + formId: json['form_id'] as String?, + auth: json['auth'] as String?, +); + +Map _$$CreateCommentImplToJson(_$CreateCommentImpl instance) => { + 'content': instance.content, + 'post_id': instance.postId, + if (instance.parentId case final value?) 'parent_id': value, + if (instance.languageId case final value?) 'language_id': value, + if (instance.formId case final value?) 'form_id': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditCommentImpl _$$EditCommentImplFromJson(Map json) => _$EditCommentImpl( + commentId: (json['comment_id'] as num).toInt(), + content: json['content'] as String?, + languageId: (json['language_id'] as num?)?.toInt(), + formId: json['form_id'] as String?, + auth: json['auth'] as String?, +); + +Map _$$EditCommentImplToJson(_$EditCommentImpl instance) => { + 'comment_id': instance.commentId, + if (instance.content case final value?) 'content': value, + if (instance.languageId case final value?) 'language_id': value, + if (instance.formId case final value?) 'form_id': value, + if (instance.auth case final value?) 'auth': value, +}; _$DeleteCommentImpl _$$DeleteCommentImplFromJson(Map json) => - _$DeleteCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - deleted: json['deleted'] as bool, - auth: json['auth'] as String?, - ); + _$DeleteCommentImpl(commentId: (json['comment_id'] as num).toInt(), deleted: json['deleted'] as bool, auth: json['auth'] as String?); -Map _$$DeleteCommentImplToJson(_$DeleteCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'deleted': instance.deleted, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +Map _$$DeleteCommentImplToJson(_$DeleteCommentImpl instance) => { + 'comment_id': instance.commentId, + 'deleted': instance.deleted, + if (instance.auth case final value?) 'auth': value, +}; _$RemoveCommentImpl _$$RemoveCommentImplFromJson(Map json) => - _$RemoveCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - removed: json['removed'] as bool, - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$RemoveCommentImplToJson(_$RemoveCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'removed': instance.removed, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} - -_$MarkCommentReplyAsReadImpl _$$MarkCommentReplyAsReadImplFromJson( - Map json) => - _$MarkCommentReplyAsReadImpl( - commentReplyId: (json['comment_reply_id'] as num).toInt(), - read: json['read'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$MarkCommentReplyAsReadImplToJson( - _$MarkCommentReplyAsReadImpl instance) { - final val = { - 'comment_reply_id': instance.commentReplyId, - 'read': instance.read, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$CreateCommentLikeImpl _$$CreateCommentLikeImplFromJson( - Map json) => - _$CreateCommentLikeImpl( - commentId: (json['comment_id'] as num).toInt(), - score: json['score'] as num, - auth: json['auth'] as String?, - ); - -Map _$$CreateCommentLikeImplToJson( - _$CreateCommentLikeImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'score': instance.score, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListCommentLikesImpl _$$ListCommentLikesImplFromJson( - Map json) => - _$ListCommentLikesImpl( - commentId: (json['comment_id'] as num).toInt(), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListCommentLikesImplToJson( - _$ListCommentLikesImpl instance) { - final val = { - 'comment_id': instance.commentId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} - -_$SaveCommentImpl _$$SaveCommentImplFromJson(Map json) => - _$SaveCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - save: json['save'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$SaveCommentImplToJson(_$SaveCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'save': instance.save, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$DistinguishCommentImpl _$$DistinguishCommentImplFromJson( - Map json) => - _$DistinguishCommentImpl( - commentId: (json['comment_id'] as num).toInt(), - distinguished: json['distinguished'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$DistinguishCommentImplToJson( - _$DistinguishCommentImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'distinguished': instance.distinguished, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetCommentsImpl _$$GetCommentsImplFromJson(Map json) => - _$GetCommentsImpl( - type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), - sort: - json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), - maxDepth: (json['max_depth'] as num?)?.toInt(), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - communityId: (json['community_id'] as num?)?.toInt(), - communityName: json['community_name'] as String?, - postId: (json['post_id'] as num?)?.toInt(), - parentId: (json['parent_id'] as num?)?.toInt(), - savedOnly: json['saved_only'] as bool?, - likedOnly: json['liked_only'] as bool?, - dislikedOnly: json['disliked_only'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$GetCommentsImplToJson(_$GetCommentsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('type_', instance.type?.toJson()); - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('max_depth', instance.maxDepth); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('community_id', instance.communityId); - writeNotNull('community_name', instance.communityName); - writeNotNull('post_id', instance.postId); - writeNotNull('parent_id', instance.parentId); - writeNotNull('saved_only', instance.savedOnly); - writeNotNull('liked_only', instance.likedOnly); - writeNotNull('disliked_only', instance.dislikedOnly); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetCommentImpl _$$GetCommentImplFromJson(Map json) => - _$GetCommentImpl( - id: (json['id'] as num).toInt(), - auth: json['auth'] as String?, - ); - -Map _$$GetCommentImplToJson(_$GetCommentImpl instance) { - final val = { - 'id': instance.id, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$CreateCommentReportImpl _$$CreateCommentReportImplFromJson( - Map json) => - _$CreateCommentReportImpl( - commentId: (json['comment_id'] as num).toInt(), - reason: json['reason'] as String, - auth: json['auth'] as String?, - ); - -Map _$$CreateCommentReportImplToJson( - _$CreateCommentReportImpl instance) { - final val = { - 'comment_id': instance.commentId, - 'reason': instance.reason, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ResolveCommentReportImpl _$$ResolveCommentReportImplFromJson( - Map json) => - _$ResolveCommentReportImpl( - reportId: (json['report_id'] as num).toInt(), - resolved: json['resolved'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$ResolveCommentReportImplToJson( - _$ResolveCommentReportImpl instance) { - final val = { - 'report_id': instance.reportId, - 'resolved': instance.resolved, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListCommentReportsImpl _$$ListCommentReportsImplFromJson( - Map json) => - _$ListCommentReportsImpl( - commentId: (json['comment_id'] as num?)?.toInt(), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - unresolvedOnly: json['unresolved_only'] as bool?, - communityId: (json['community_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListCommentReportsImplToJson( - _$ListCommentReportsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('comment_id', instance.commentId); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('unresolved_only', instance.unresolvedOnly); - writeNotNull('community_id', instance.communityId); - writeNotNull('auth', instance.auth); - return val; -} + _$RemoveCommentImpl(commentId: (json['comment_id'] as num).toInt(), removed: json['removed'] as bool, reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$RemoveCommentImplToJson(_$RemoveCommentImpl instance) => { + 'comment_id': instance.commentId, + 'removed': instance.removed, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$MarkCommentReplyAsReadImpl _$$MarkCommentReplyAsReadImplFromJson(Map json) => + _$MarkCommentReplyAsReadImpl(commentReplyId: (json['comment_reply_id'] as num).toInt(), read: json['read'] as bool, auth: json['auth'] as String?); + +Map _$$MarkCommentReplyAsReadImplToJson(_$MarkCommentReplyAsReadImpl instance) => { + 'comment_reply_id': instance.commentReplyId, + 'read': instance.read, + if (instance.auth case final value?) 'auth': value, +}; + +_$CreateCommentLikeImpl _$$CreateCommentLikeImplFromJson(Map json) => + _$CreateCommentLikeImpl(commentId: (json['comment_id'] as num).toInt(), score: json['score'] as num, auth: json['auth'] as String?); + +Map _$$CreateCommentLikeImplToJson(_$CreateCommentLikeImpl instance) => { + 'comment_id': instance.commentId, + 'score': instance.score, + if (instance.auth case final value?) 'auth': value, +}; + +_$ListCommentLikesImpl _$$ListCommentLikesImplFromJson(Map json) => + _$ListCommentLikesImpl(commentId: (json['comment_id'] as num).toInt(), page: (json['page'] as num?)?.toInt(), limit: (json['limit'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$ListCommentLikesImplToJson(_$ListCommentLikesImpl instance) => { + 'comment_id': instance.commentId, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$SaveCommentImpl _$$SaveCommentImplFromJson(Map json) => _$SaveCommentImpl(commentId: (json['comment_id'] as num).toInt(), save: json['save'] as bool, auth: json['auth'] as String?); + +Map _$$SaveCommentImplToJson(_$SaveCommentImpl instance) => { + 'comment_id': instance.commentId, + 'save': instance.save, + if (instance.auth case final value?) 'auth': value, +}; + +_$DistinguishCommentImpl _$$DistinguishCommentImplFromJson(Map json) => + _$DistinguishCommentImpl(commentId: (json['comment_id'] as num).toInt(), distinguished: json['distinguished'] as bool, auth: json['auth'] as String?); + +Map _$$DistinguishCommentImplToJson(_$DistinguishCommentImpl instance) => { + 'comment_id': instance.commentId, + 'distinguished': instance.distinguished, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetCommentsImpl _$$GetCommentsImplFromJson(Map json) => _$GetCommentsImpl( + type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), + sort: json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), + maxDepth: (json['max_depth'] as num?)?.toInt(), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + communityId: (json['community_id'] as num?)?.toInt(), + communityName: json['community_name'] as String?, + postId: (json['post_id'] as num?)?.toInt(), + parentId: (json['parent_id'] as num?)?.toInt(), + savedOnly: json['saved_only'] as bool?, + likedOnly: json['liked_only'] as bool?, + dislikedOnly: json['disliked_only'] as bool?, + auth: json['auth'] as String?, +); + +Map _$$GetCommentsImplToJson(_$GetCommentsImpl instance) => { + if (instance.type?.toJson() case final value?) 'type_': value, + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.maxDepth case final value?) 'max_depth': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.communityName case final value?) 'community_name': value, + if (instance.postId case final value?) 'post_id': value, + if (instance.parentId case final value?) 'parent_id': value, + if (instance.savedOnly case final value?) 'saved_only': value, + if (instance.likedOnly case final value?) 'liked_only': value, + if (instance.dislikedOnly case final value?) 'disliked_only': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetCommentImpl _$$GetCommentImplFromJson(Map json) => _$GetCommentImpl(id: (json['id'] as num).toInt(), auth: json['auth'] as String?); + +Map _$$GetCommentImplToJson(_$GetCommentImpl instance) => {'id': instance.id, if (instance.auth case final value?) 'auth': value}; + +_$CreateCommentReportImpl _$$CreateCommentReportImplFromJson(Map json) => + _$CreateCommentReportImpl(commentId: (json['comment_id'] as num).toInt(), reason: json['reason'] as String, auth: json['auth'] as String?); + +Map _$$CreateCommentReportImplToJson(_$CreateCommentReportImpl instance) => { + 'comment_id': instance.commentId, + 'reason': instance.reason, + if (instance.auth case final value?) 'auth': value, +}; + +_$ResolveCommentReportImpl _$$ResolveCommentReportImplFromJson(Map json) => + _$ResolveCommentReportImpl(reportId: (json['report_id'] as num).toInt(), resolved: json['resolved'] as bool, auth: json['auth'] as String?); + +Map _$$ResolveCommentReportImplToJson(_$ResolveCommentReportImpl instance) => { + 'report_id': instance.reportId, + 'resolved': instance.resolved, + if (instance.auth case final value?) 'auth': value, +}; + +_$ListCommentReportsImpl _$$ListCommentReportsImplFromJson(Map json) => _$ListCommentReportsImpl( + commentId: (json['comment_id'] as num?)?.toInt(), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + unresolvedOnly: json['unresolved_only'] as bool?, + communityId: (json['community_id'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$ListCommentReportsImplToJson(_$ListCommentReportsImpl instance) => { + if (instance.commentId case final value?) 'comment_id': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.unresolvedOnly case final value?) 'unresolved_only': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/community/community.dart b/lib/src/v3/api/community/community.dart index e0512aa7..57d6857c 100644 --- a/lib/src/v3/api/community/community.dart +++ b/lib/src/v3/api/community/community.dart @@ -12,9 +12,7 @@ part 'community.g.dart'; /// /// `HTTP.GET /community` @freezed -class GetCommunity - with _$GetCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetCommunity with _$GetCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetCommunity({ int? id, // v0.18.0 @@ -23,25 +21,21 @@ class GetCommunity }) = _GetCommunity; const GetCommunity._(); - factory GetCommunity.fromJson(Map json) => - _$GetCommunityFromJson(json); + factory GetCommunity.fromJson(Map json) => _$GetCommunityFromJson(json); final path = '/community'; final httpMethod = HttpMethod.get; @override - GetCommunityResponse responseFactory(Map json) => - GetCommunityResponse.fromJson(json); + GetCommunityResponse responseFactory(Map json) => GetCommunityResponse.fromJson(json); } /// Create a new community. /// /// `HTTP.POST /community` @freezed -class CreateCommunity - with _$CreateCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreateCommunity with _$CreateCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateCommunity({ required String name, // v0.18.0 @@ -57,25 +51,21 @@ class CreateCommunity }) = _CreateCommunity; const CreateCommunity._(); - factory CreateCommunity.fromJson(Map json) => - _$CreateCommunityFromJson(json); + factory CreateCommunity.fromJson(Map json) => _$CreateCommunityFromJson(json); final path = '/community'; final httpMethod = HttpMethod.post; @override - CommunityResponse responseFactory(Map json) => - CommunityResponse.fromJson(json); + CommunityResponse responseFactory(Map json) => CommunityResponse.fromJson(json); } /// Edit a community. /// /// `HTTP.PUT /community` @freezed -class EditCommunity - with _$EditCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class EditCommunity with _$EditCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditCommunity({ required int communityId, // v0.18.0 @@ -91,27 +81,21 @@ class EditCommunity }) = _EditCommunity; const EditCommunity._(); - factory EditCommunity.fromJson(Map json) => - _$EditCommunityFromJson(json); + factory EditCommunity.fromJson(Map json) => _$EditCommunityFromJson(json); final path = '/community'; final httpMethod = HttpMethod.put; @override - CommunityResponse responseFactory(Map json) => - CommunityResponse.fromJson(json); + CommunityResponse responseFactory(Map json) => CommunityResponse.fromJson(json); } /// List communities, with various filters. /// /// `HTTP.GET /community/list` @freezed -class ListCommunities - with _$ListCommunities - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListCommunities with _$ListCommunities implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListCommunities({ @JsonKey(name: 'type_') ListingType? type, // v0.18.0 @@ -123,25 +107,21 @@ class ListCommunities }) = _ListCommunities; const ListCommunities._(); - factory ListCommunities.fromJson(Map json) => - _$ListCommunitiesFromJson(json); + factory ListCommunities.fromJson(Map json) => _$ListCommunitiesFromJson(json); final path = '/community/list'; final httpMethod = HttpMethod.get; @override - ListCommunitiesResponse responseFactory(Map json) => - ListCommunitiesResponse.fromJson(json); + ListCommunitiesResponse responseFactory(Map json) => ListCommunitiesResponse.fromJson(json); } /// Follow / subscribe to a community. /// /// `HTTP.POST /community/follow` @freezed -class FollowCommunity - with _$FollowCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class FollowCommunity with _$FollowCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory FollowCommunity({ required int communityId, // v0.18.0 @@ -150,27 +130,21 @@ class FollowCommunity }) = _FollowCommunity; const FollowCommunity._(); - factory FollowCommunity.fromJson(Map json) => - _$FollowCommunityFromJson(json); + factory FollowCommunity.fromJson(Map json) => _$FollowCommunityFromJson(json); final path = '/community/follow'; final httpMethod = HttpMethod.post; @override - CommunityResponse responseFactory(Map json) => - CommunityResponse.fromJson(json); + CommunityResponse responseFactory(Map json) => CommunityResponse.fromJson(json); } /// Block a community. /// /// `HTTP.POST /community/block` @freezed -class BlockCommunity - with _$BlockCommunity - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class BlockCommunity with _$BlockCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory BlockCommunity({ required int communityId, // v0.18.0 @@ -179,25 +153,21 @@ class BlockCommunity }) = _BlockCommunity; const BlockCommunity._(); - factory BlockCommunity.fromJson(Map json) => - _$BlockCommunityFromJson(json); + factory BlockCommunity.fromJson(Map json) => _$BlockCommunityFromJson(json); final path = '/community/block'; final httpMethod = HttpMethod.post; @override - BlockCommunityResponse responseFactory(Map json) => - BlockCommunityResponse.fromJson(json); + BlockCommunityResponse responseFactory(Map json) => BlockCommunityResponse.fromJson(json); } /// Delete a community. /// /// `HTTP.POST /community/delete` @freezed -class DeleteCommunity - with _$DeleteCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class DeleteCommunity with _$DeleteCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeleteCommunity({ required int communityId, // v0.18.0 @@ -206,16 +176,14 @@ class DeleteCommunity }) = _DeleteCommunity; const DeleteCommunity._(); - factory DeleteCommunity.fromJson(Map json) => - _$DeleteCommunityFromJson(json); + factory DeleteCommunity.fromJson(Map json) => _$DeleteCommunityFromJson(json); final path = '/community/delete'; final httpMethod = HttpMethod.post; @override - CommunityResponse responseFactory(Map json) => - CommunityResponse.fromJson(json); + CommunityResponse responseFactory(Map json) => CommunityResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -224,11 +192,7 @@ class DeleteCommunity /// /// `HTTP.PUT /community/hide` @freezed -class HideCommunity - with _$HideCommunity - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class HideCommunity with _$HideCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory HideCommunity({ required int communityId, // v0.18.0 @@ -238,25 +202,21 @@ class HideCommunity }) = _HideCommunity; const HideCommunity._(); - factory HideCommunity.fromJson(Map json) => - _$HideCommunityFromJson(json); + factory HideCommunity.fromJson(Map json) => _$HideCommunityFromJson(json); final path = '/community/hide'; final httpMethod = HttpMethod.put; @override - HideCommunityResponse responseFactory(Map json) => - HideCommunityResponse.fromJson(json); + HideCommunityResponse responseFactory(Map json) => HideCommunityResponse.fromJson(json); } /// A moderator remove for a community. /// /// `HTTP.POST /community/remove` @freezed -class RemoveCommunity - with _$RemoveCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class RemoveCommunity with _$RemoveCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory RemoveCommunity({ required int communityId, // v0.18.0 @@ -267,25 +227,21 @@ class RemoveCommunity }) = _RemoveCommunity; const RemoveCommunity._(); - factory RemoveCommunity.fromJson(Map json) => - _$RemoveCommunityFromJson(json); + factory RemoveCommunity.fromJson(Map json) => _$RemoveCommunityFromJson(json); final path = '/community/remove'; final httpMethod = HttpMethod.post; @override - CommunityResponse responseFactory(Map json) => - CommunityResponse.fromJson(json); + CommunityResponse responseFactory(Map json) => CommunityResponse.fromJson(json); } /// Transfer your community to an existing moderator. /// /// `HTTP.POST /community/transfer` @freezed -class TransferCommunity - with _$TransferCommunity - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class TransferCommunity with _$TransferCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory TransferCommunity({ required int communityId, // v0.18.0 @@ -294,27 +250,21 @@ class TransferCommunity }) = _TransferCommunity; const TransferCommunity._(); - factory TransferCommunity.fromJson(Map json) => - _$TransferCommunityFromJson(json); + factory TransferCommunity.fromJson(Map json) => _$TransferCommunityFromJson(json); final path = '/community/transfer'; final httpMethod = HttpMethod.post; @override - GetCommunityResponse responseFactory(Map json) => - GetCommunityResponse.fromJson(json); + GetCommunityResponse responseFactory(Map json) => GetCommunityResponse.fromJson(json); } /// Ban a user from a community. /// /// `HTTP.POST /community/ban_user` @freezed -class BanFromCommunity - with _$BanFromCommunity - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class BanFromCommunity with _$BanFromCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory BanFromCommunity({ required int communityId, // v0.18.0 @@ -327,27 +277,21 @@ class BanFromCommunity }) = _BanFromCommunity; const BanFromCommunity._(); - factory BanFromCommunity.fromJson(Map json) => - _$BanFromCommunityFromJson(json); + factory BanFromCommunity.fromJson(Map json) => _$BanFromCommunityFromJson(json); final path = '/community/ban_user'; final httpMethod = HttpMethod.post; @override - BanFromCommunityResponse responseFactory(Map json) => - BanFromCommunityResponse.fromJson(json); + BanFromCommunityResponse responseFactory(Map json) => BanFromCommunityResponse.fromJson(json); } /// Add a moderator to your community. /// /// `HTTP.POST /community/mod` @freezed -class AddModToCommunity - with _$AddModToCommunity - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class AddModToCommunity with _$AddModToCommunity implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory AddModToCommunity({ required int communityId, // v0.18.0 @@ -357,14 +301,12 @@ class AddModToCommunity }) = _AddModToCommunity; const AddModToCommunity._(); - factory AddModToCommunity.fromJson(Map json) => - _$AddModToCommunityFromJson(json); + factory AddModToCommunity.fromJson(Map json) => _$AddModToCommunityFromJson(json); final path = '/community/mod'; final httpMethod = HttpMethod.post; @override - AddModToCommunityResponse responseFactory(Map json) => - AddModToCommunityResponse.fromJson(json); + AddModToCommunityResponse responseFactory(Map json) => AddModToCommunityResponse.fromJson(json); } diff --git a/lib/src/v3/api/community/community.freezed.dart b/lib/src/v3/api/community/community.freezed.dart index 0e6a2aa1..d4b192cc 100644 --- a/lib/src/v3/api/community/community.freezed.dart +++ b/lib/src/v3/api/community/community.freezed.dart @@ -12,7 +12,8 @@ part of 'community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetCommunity _$GetCommunityFromJson(Map json) { return _GetCommunity.fromJson(json); @@ -30,22 +31,18 @@ mixin _$GetCommunity { /// Create a copy of GetCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCommunityCopyWith<$Res> { - factory $GetCommunityCopyWith( - GetCommunity value, $Res Function(GetCommunity) then) = - _$GetCommunityCopyWithImpl<$Res, GetCommunity>; + factory $GetCommunityCopyWith(GetCommunity value, $Res Function(GetCommunity) then) = _$GetCommunityCopyWithImpl<$Res, GetCommunity>; @useResult $Res call({int? id, String? name, String? auth}); } /// @nodoc -class _$GetCommunityCopyWithImpl<$Res, $Val extends GetCommunity> - implements $GetCommunityCopyWith<$Res> { +class _$GetCommunityCopyWithImpl<$Res, $Val extends GetCommunity> implements $GetCommunityCopyWith<$Res> { _$GetCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,70 +54,66 @@ class _$GetCommunityCopyWithImpl<$Res, $Val extends GetCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? name = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = freezed, Object? name = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetCommunityImplCopyWith<$Res> - implements $GetCommunityCopyWith<$Res> { - factory _$$GetCommunityImplCopyWith( - _$GetCommunityImpl value, $Res Function(_$GetCommunityImpl) then) = - __$$GetCommunityImplCopyWithImpl<$Res>; +abstract class _$$GetCommunityImplCopyWith<$Res> implements $GetCommunityCopyWith<$Res> { + factory _$$GetCommunityImplCopyWith(_$GetCommunityImpl value, $Res Function(_$GetCommunityImpl) then) = __$$GetCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, String? name, String? auth}); } /// @nodoc -class __$$GetCommunityImplCopyWithImpl<$Res> - extends _$GetCommunityCopyWithImpl<$Res, _$GetCommunityImpl> - implements _$$GetCommunityImplCopyWith<$Res> { - __$$GetCommunityImplCopyWithImpl( - _$GetCommunityImpl _value, $Res Function(_$GetCommunityImpl) _then) - : super(_value, _then); +class __$$GetCommunityImplCopyWithImpl<$Res> extends _$GetCommunityCopyWithImpl<$Res, _$GetCommunityImpl> implements _$$GetCommunityImplCopyWith<$Res> { + __$$GetCommunityImplCopyWithImpl(_$GetCommunityImpl _value, $Res Function(_$GetCommunityImpl) _then) : super(_value, _then); /// Create a copy of GetCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? name = freezed, - Object? auth = freezed, - }) { - return _then(_$GetCommunityImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = freezed, Object? name = freezed, Object? auth = freezed}) { + return _then( + _$GetCommunityImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -130,15 +123,14 @@ class __$$GetCommunityImplCopyWithImpl<$Res> class _$GetCommunityImpl extends _GetCommunity { const _$GetCommunityImpl({this.id, this.name, this.auth}) : super._(); - factory _$GetCommunityImpl.fromJson(Map json) => - _$$GetCommunityImplFromJson(json); + factory _$GetCommunityImpl.fromJson(Map json) => _$$GetCommunityImplFromJson(json); @override final int? id; -// v0.18.0 + // v0.18.0 @override final String? name; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -166,26 +158,19 @@ class _$GetCommunityImpl extends _GetCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCommunityImplCopyWith<_$GetCommunityImpl> get copyWith => - __$$GetCommunityImplCopyWithImpl<_$GetCommunityImpl>(this, _$identity); + _$$GetCommunityImplCopyWith<_$GetCommunityImpl> get copyWith => __$$GetCommunityImplCopyWithImpl<_$GetCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$GetCommunityImplToJson( - this, - ); + return _$$GetCommunityImplToJson(this); } } abstract class _GetCommunity extends GetCommunity { - const factory _GetCommunity( - {final int? id, - final String? name, - final String? auth}) = _$GetCommunityImpl; + const factory _GetCommunity({final int? id, final String? name, final String? auth}) = _$GetCommunityImpl; const _GetCommunity._() : super._(); - factory _GetCommunity.fromJson(Map json) = - _$GetCommunityImpl.fromJson; + factory _GetCommunity.fromJson(Map json) = _$GetCommunityImpl.fromJson; @override int? get id; // v0.18.0 @@ -198,8 +183,7 @@ abstract class _GetCommunity extends GetCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCommunityImplCopyWith<_$GetCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCommunityImplCopyWith<_$GetCommunityImpl> get copyWith => throw _privateConstructorUsedError; } CreateCommunity _$CreateCommunityFromJson(Map json) { @@ -214,12 +198,9 @@ mixin _$CreateCommunity { String? get icon => throw _privateConstructorUsedError; // v0.18.0 String? get banner => throw _privateConstructorUsedError; // v0.18.0 bool? get nsfw => throw _privateConstructorUsedError; // v0.18.0 - bool? get postingRestrictedToMods => - throw _privateConstructorUsedError; // v0.18.0 - List? get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 - CommunityVisibility? get visibility => - throw _privateConstructorUsedError; // v0.19.4 (optional) + bool? get postingRestrictedToMods => throw _privateConstructorUsedError; // v0.18.0 + List? get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 + CommunityVisibility? get visibility => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this CreateCommunity to a JSON map. @@ -228,32 +209,29 @@ mixin _$CreateCommunity { /// Create a copy of CreateCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateCommunityCopyWith<$Res> { - factory $CreateCommunityCopyWith( - CreateCommunity value, $Res Function(CreateCommunity) then) = - _$CreateCommunityCopyWithImpl<$Res, CreateCommunity>; + factory $CreateCommunityCopyWith(CreateCommunity value, $Res Function(CreateCommunity) then) = _$CreateCommunityCopyWithImpl<$Res, CreateCommunity>; @useResult - $Res call( - {String name, - String title, - String? description, - String? icon, - String? banner, - bool? nsfw, - bool? postingRestrictedToMods, - List? discussionLanguages, - CommunityVisibility? visibility, - String? auth}); -} - -/// @nodoc -class _$CreateCommunityCopyWithImpl<$Res, $Val extends CreateCommunity> - implements $CreateCommunityCopyWith<$Res> { + $Res call({ + String name, + String title, + String? description, + String? icon, + String? banner, + bool? nsfw, + bool? postingRestrictedToMods, + List? discussionLanguages, + CommunityVisibility? visibility, + String? auth, + }); +} + +/// @nodoc +class _$CreateCommunityCopyWithImpl<$Res, $Val extends CreateCommunity> implements $CreateCommunityCopyWith<$Res> { _$CreateCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -277,79 +255,86 @@ class _$CreateCommunityCopyWithImpl<$Res, $Val extends CreateCommunity> Object? visibility = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - postingRestrictedToMods: freezed == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + postingRestrictedToMods: + freezed == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CreateCommunityImplCopyWith<$Res> - implements $CreateCommunityCopyWith<$Res> { - factory _$$CreateCommunityImplCopyWith(_$CreateCommunityImpl value, - $Res Function(_$CreateCommunityImpl) then) = - __$$CreateCommunityImplCopyWithImpl<$Res>; +abstract class _$$CreateCommunityImplCopyWith<$Res> implements $CreateCommunityCopyWith<$Res> { + factory _$$CreateCommunityImplCopyWith(_$CreateCommunityImpl value, $Res Function(_$CreateCommunityImpl) then) = __$$CreateCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String name, - String title, - String? description, - String? icon, - String? banner, - bool? nsfw, - bool? postingRestrictedToMods, - List? discussionLanguages, - CommunityVisibility? visibility, - String? auth}); -} - -/// @nodoc -class __$$CreateCommunityImplCopyWithImpl<$Res> - extends _$CreateCommunityCopyWithImpl<$Res, _$CreateCommunityImpl> - implements _$$CreateCommunityImplCopyWith<$Res> { - __$$CreateCommunityImplCopyWithImpl( - _$CreateCommunityImpl _value, $Res Function(_$CreateCommunityImpl) _then) - : super(_value, _then); + $Res call({ + String name, + String title, + String? description, + String? icon, + String? banner, + bool? nsfw, + bool? postingRestrictedToMods, + List? discussionLanguages, + CommunityVisibility? visibility, + String? auth, + }); +} + +/// @nodoc +class __$$CreateCommunityImplCopyWithImpl<$Res> extends _$CreateCommunityCopyWithImpl<$Res, _$CreateCommunityImpl> implements _$$CreateCommunityImplCopyWith<$Res> { + __$$CreateCommunityImplCopyWithImpl(_$CreateCommunityImpl _value, $Res Function(_$CreateCommunityImpl) _then) : super(_value, _then); /// Create a copy of CreateCommunity /// with the given fields replaced by the non-null parameter values. @@ -367,48 +352,60 @@ class __$$CreateCommunityImplCopyWithImpl<$Res> Object? visibility = freezed, Object? auth = freezed, }) { - return _then(_$CreateCommunityImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - postingRestrictedToMods: freezed == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$CreateCommunityImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + postingRestrictedToMods: + freezed == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -416,60 +413,58 @@ class __$$CreateCommunityImplCopyWithImpl<$Res> @apiSerde class _$CreateCommunityImpl extends _CreateCommunity { - const _$CreateCommunityImpl( - {required this.name, - required this.title, - this.description, - this.icon, - this.banner, - this.nsfw, - this.postingRestrictedToMods, - final List? discussionLanguages, - this.visibility, - this.auth}) - : _discussionLanguages = discussionLanguages, - super._(); - - factory _$CreateCommunityImpl.fromJson(Map json) => - _$$CreateCommunityImplFromJson(json); + const _$CreateCommunityImpl({ + required this.name, + required this.title, + this.description, + this.icon, + this.banner, + this.nsfw, + this.postingRestrictedToMods, + final List? discussionLanguages, + this.visibility, + this.auth, + }) : _discussionLanguages = discussionLanguages, + super._(); + + factory _$CreateCommunityImpl.fromJson(Map json) => _$$CreateCommunityImplFromJson(json); @override final String name; -// v0.18.0 + // v0.18.0 @override final String title; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final bool? nsfw; -// v0.18.0 + // v0.18.0 @override final bool? postingRestrictedToMods; -// v0.18.0 + // v0.18.0 final List? _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final CommunityVisibility? visibility; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -485,69 +480,49 @@ class _$CreateCommunityImpl extends _CreateCommunity { other is _$CreateCommunityImpl && (identical(other.name, name) || other.name == name) && (identical(other.title, title) || other.title == title) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && - (identical( - other.postingRestrictedToMods, postingRestrictedToMods) || - other.postingRestrictedToMods == postingRestrictedToMods) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && - (identical(other.visibility, visibility) || - other.visibility == visibility) && + (identical(other.postingRestrictedToMods, postingRestrictedToMods) || other.postingRestrictedToMods == postingRestrictedToMods) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.visibility, visibility) || other.visibility == visibility) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - name, - title, - description, - icon, - banner, - nsfw, - postingRestrictedToMods, - const DeepCollectionEquality().hash(_discussionLanguages), - visibility, - auth); + int get hashCode => Object.hash(runtimeType, name, title, description, icon, banner, nsfw, postingRestrictedToMods, const DeepCollectionEquality().hash(_discussionLanguages), visibility, auth); /// Create a copy of CreateCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateCommunityImplCopyWith<_$CreateCommunityImpl> get copyWith => - __$$CreateCommunityImplCopyWithImpl<_$CreateCommunityImpl>( - this, _$identity); + _$$CreateCommunityImplCopyWith<_$CreateCommunityImpl> get copyWith => __$$CreateCommunityImplCopyWithImpl<_$CreateCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$CreateCommunityImplToJson( - this, - ); + return _$$CreateCommunityImplToJson(this); } } abstract class _CreateCommunity extends CreateCommunity { - const factory _CreateCommunity( - {required final String name, - required final String title, - final String? description, - final String? icon, - final String? banner, - final bool? nsfw, - final bool? postingRestrictedToMods, - final List? discussionLanguages, - final CommunityVisibility? visibility, - final String? auth}) = _$CreateCommunityImpl; + const factory _CreateCommunity({ + required final String name, + required final String title, + final String? description, + final String? icon, + final String? banner, + final bool? nsfw, + final bool? postingRestrictedToMods, + final List? discussionLanguages, + final CommunityVisibility? visibility, + final String? auth, + }) = _$CreateCommunityImpl; const _CreateCommunity._() : super._(); - factory _CreateCommunity.fromJson(Map json) = - _$CreateCommunityImpl.fromJson; + factory _CreateCommunity.fromJson(Map json) = _$CreateCommunityImpl.fromJson; @override String get name; // v0.18.0 @@ -574,8 +549,7 @@ abstract class _CreateCommunity extends CreateCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateCommunityImplCopyWith<_$CreateCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateCommunityImplCopyWith<_$CreateCommunityImpl> get copyWith => throw _privateConstructorUsedError; } EditCommunity _$EditCommunityFromJson(Map json) { @@ -590,12 +564,9 @@ mixin _$EditCommunity { String? get icon => throw _privateConstructorUsedError; // v0.18.0 String? get banner => throw _privateConstructorUsedError; // v0.18.0 bool? get nsfw => throw _privateConstructorUsedError; // v0.18.0 - bool? get postingRestrictedToMods => - throw _privateConstructorUsedError; // v0.18.0 - List? get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 - CommunityVisibility? get visibility => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get postingRestrictedToMods => throw _privateConstructorUsedError; // v0.18.0 + List? get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 + CommunityVisibility? get visibility => throw _privateConstructorUsedError; // v0.19.4 (required) String? get auth => throw _privateConstructorUsedError; /// Serializes this EditCommunity to a JSON map. @@ -604,32 +575,29 @@ mixin _$EditCommunity { /// Create a copy of EditCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditCommunityCopyWith<$Res> { - factory $EditCommunityCopyWith( - EditCommunity value, $Res Function(EditCommunity) then) = - _$EditCommunityCopyWithImpl<$Res, EditCommunity>; + factory $EditCommunityCopyWith(EditCommunity value, $Res Function(EditCommunity) then) = _$EditCommunityCopyWithImpl<$Res, EditCommunity>; @useResult - $Res call( - {int communityId, - String? title, - String? description, - String? icon, - String? banner, - bool? nsfw, - bool? postingRestrictedToMods, - List? discussionLanguages, - CommunityVisibility? visibility, - String? auth}); -} - -/// @nodoc -class _$EditCommunityCopyWithImpl<$Res, $Val extends EditCommunity> - implements $EditCommunityCopyWith<$Res> { + $Res call({ + int communityId, + String? title, + String? description, + String? icon, + String? banner, + bool? nsfw, + bool? postingRestrictedToMods, + List? discussionLanguages, + CommunityVisibility? visibility, + String? auth, + }); +} + +/// @nodoc +class _$EditCommunityCopyWithImpl<$Res, $Val extends EditCommunity> implements $EditCommunityCopyWith<$Res> { _$EditCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -653,79 +621,86 @@ class _$EditCommunityCopyWithImpl<$Res, $Val extends EditCommunity> Object? visibility = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - postingRestrictedToMods: freezed == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + postingRestrictedToMods: + freezed == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$EditCommunityImplCopyWith<$Res> - implements $EditCommunityCopyWith<$Res> { - factory _$$EditCommunityImplCopyWith( - _$EditCommunityImpl value, $Res Function(_$EditCommunityImpl) then) = - __$$EditCommunityImplCopyWithImpl<$Res>; +abstract class _$$EditCommunityImplCopyWith<$Res> implements $EditCommunityCopyWith<$Res> { + factory _$$EditCommunityImplCopyWith(_$EditCommunityImpl value, $Res Function(_$EditCommunityImpl) then) = __$$EditCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int communityId, - String? title, - String? description, - String? icon, - String? banner, - bool? nsfw, - bool? postingRestrictedToMods, - List? discussionLanguages, - CommunityVisibility? visibility, - String? auth}); -} - -/// @nodoc -class __$$EditCommunityImplCopyWithImpl<$Res> - extends _$EditCommunityCopyWithImpl<$Res, _$EditCommunityImpl> - implements _$$EditCommunityImplCopyWith<$Res> { - __$$EditCommunityImplCopyWithImpl( - _$EditCommunityImpl _value, $Res Function(_$EditCommunityImpl) _then) - : super(_value, _then); + $Res call({ + int communityId, + String? title, + String? description, + String? icon, + String? banner, + bool? nsfw, + bool? postingRestrictedToMods, + List? discussionLanguages, + CommunityVisibility? visibility, + String? auth, + }); +} + +/// @nodoc +class __$$EditCommunityImplCopyWithImpl<$Res> extends _$EditCommunityCopyWithImpl<$Res, _$EditCommunityImpl> implements _$$EditCommunityImplCopyWith<$Res> { + __$$EditCommunityImplCopyWithImpl(_$EditCommunityImpl _value, $Res Function(_$EditCommunityImpl) _then) : super(_value, _then); /// Create a copy of EditCommunity /// with the given fields replaced by the non-null parameter values. @@ -743,48 +718,60 @@ class __$$EditCommunityImplCopyWithImpl<$Res> Object? visibility = freezed, Object? auth = freezed, }) { - return _then(_$EditCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - postingRestrictedToMods: freezed == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$EditCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + postingRestrictedToMods: + freezed == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -792,60 +779,58 @@ class __$$EditCommunityImplCopyWithImpl<$Res> @apiSerde class _$EditCommunityImpl extends _EditCommunity { - const _$EditCommunityImpl( - {required this.communityId, - this.title, - this.description, - this.icon, - this.banner, - this.nsfw, - this.postingRestrictedToMods, - final List? discussionLanguages, - this.visibility, - this.auth}) - : _discussionLanguages = discussionLanguages, - super._(); - - factory _$EditCommunityImpl.fromJson(Map json) => - _$$EditCommunityImplFromJson(json); + const _$EditCommunityImpl({ + required this.communityId, + this.title, + this.description, + this.icon, + this.banner, + this.nsfw, + this.postingRestrictedToMods, + final List? discussionLanguages, + this.visibility, + this.auth, + }) : _discussionLanguages = discussionLanguages, + super._(); + + factory _$EditCommunityImpl.fromJson(Map json) => _$$EditCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? title; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final bool? nsfw; -// v0.18.0 + // v0.18.0 @override final bool? postingRestrictedToMods; -// v0.18.0 + // v0.18.0 final List? _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final CommunityVisibility? visibility; -// v0.19.4 (required) + // v0.19.4 (required) @override final String? auth; @@ -859,71 +844,52 @@ class _$EditCommunityImpl extends _EditCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$EditCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.title, title) || other.title == title) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && - (identical( - other.postingRestrictedToMods, postingRestrictedToMods) || - other.postingRestrictedToMods == postingRestrictedToMods) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && - (identical(other.visibility, visibility) || - other.visibility == visibility) && + (identical(other.postingRestrictedToMods, postingRestrictedToMods) || other.postingRestrictedToMods == postingRestrictedToMods) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.visibility, visibility) || other.visibility == visibility) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - communityId, - title, - description, - icon, - banner, - nsfw, - postingRestrictedToMods, - const DeepCollectionEquality().hash(_discussionLanguages), - visibility, - auth); + int get hashCode => + Object.hash(runtimeType, communityId, title, description, icon, banner, nsfw, postingRestrictedToMods, const DeepCollectionEquality().hash(_discussionLanguages), visibility, auth); /// Create a copy of EditCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditCommunityImplCopyWith<_$EditCommunityImpl> get copyWith => - __$$EditCommunityImplCopyWithImpl<_$EditCommunityImpl>(this, _$identity); + _$$EditCommunityImplCopyWith<_$EditCommunityImpl> get copyWith => __$$EditCommunityImplCopyWithImpl<_$EditCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$EditCommunityImplToJson( - this, - ); + return _$$EditCommunityImplToJson(this); } } abstract class _EditCommunity extends EditCommunity { - const factory _EditCommunity( - {required final int communityId, - final String? title, - final String? description, - final String? icon, - final String? banner, - final bool? nsfw, - final bool? postingRestrictedToMods, - final List? discussionLanguages, - final CommunityVisibility? visibility, - final String? auth}) = _$EditCommunityImpl; + const factory _EditCommunity({ + required final int communityId, + final String? title, + final String? description, + final String? icon, + final String? banner, + final bool? nsfw, + final bool? postingRestrictedToMods, + final List? discussionLanguages, + final CommunityVisibility? visibility, + final String? auth, + }) = _$EditCommunityImpl; const _EditCommunity._() : super._(); - factory _EditCommunity.fromJson(Map json) = - _$EditCommunityImpl.fromJson; + factory _EditCommunity.fromJson(Map json) = _$EditCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -950,8 +916,7 @@ abstract class _EditCommunity extends EditCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditCommunityImplCopyWith<_$EditCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditCommunityImplCopyWith<_$EditCommunityImpl> get copyWith => throw _privateConstructorUsedError; } ListCommunities _$ListCommunitiesFromJson(Map json) { @@ -974,28 +939,18 @@ mixin _$ListCommunities { /// Create a copy of ListCommunities /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommunitiesCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListCommunitiesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommunitiesCopyWith<$Res> { - factory $ListCommunitiesCopyWith( - ListCommunities value, $Res Function(ListCommunities) then) = - _$ListCommunitiesCopyWithImpl<$Res, ListCommunities>; + factory $ListCommunitiesCopyWith(ListCommunities value, $Res Function(ListCommunities) then) = _$ListCommunitiesCopyWithImpl<$Res, ListCommunities>; @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - SortType? sort, - int? page, - int? limit, - bool? showNsfw, - String? auth}); + $Res call({@JsonKey(name: 'type_') ListingType? type, SortType? sort, int? page, int? limit, bool? showNsfw, String? auth}); } /// @nodoc -class _$ListCommunitiesCopyWithImpl<$Res, $Val extends ListCommunities> - implements $ListCommunitiesCopyWith<$Res> { +class _$ListCommunitiesCopyWithImpl<$Res, $Val extends ListCommunities> implements $ListCommunitiesCopyWith<$Res> { _$ListCommunitiesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1007,106 +962,96 @@ class _$ListCommunitiesCopyWithImpl<$Res, $Val extends ListCommunities> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = freezed, - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? showNsfw = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? type = freezed, Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? showNsfw = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListCommunitiesImplCopyWith<$Res> - implements $ListCommunitiesCopyWith<$Res> { - factory _$$ListCommunitiesImplCopyWith(_$ListCommunitiesImpl value, - $Res Function(_$ListCommunitiesImpl) then) = - __$$ListCommunitiesImplCopyWithImpl<$Res>; +abstract class _$$ListCommunitiesImplCopyWith<$Res> implements $ListCommunitiesCopyWith<$Res> { + factory _$$ListCommunitiesImplCopyWith(_$ListCommunitiesImpl value, $Res Function(_$ListCommunitiesImpl) then) = __$$ListCommunitiesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - SortType? sort, - int? page, - int? limit, - bool? showNsfw, - String? auth}); + $Res call({@JsonKey(name: 'type_') ListingType? type, SortType? sort, int? page, int? limit, bool? showNsfw, String? auth}); } /// @nodoc -class __$$ListCommunitiesImplCopyWithImpl<$Res> - extends _$ListCommunitiesCopyWithImpl<$Res, _$ListCommunitiesImpl> - implements _$$ListCommunitiesImplCopyWith<$Res> { - __$$ListCommunitiesImplCopyWithImpl( - _$ListCommunitiesImpl _value, $Res Function(_$ListCommunitiesImpl) _then) - : super(_value, _then); +class __$$ListCommunitiesImplCopyWithImpl<$Res> extends _$ListCommunitiesCopyWithImpl<$Res, _$ListCommunitiesImpl> implements _$$ListCommunitiesImplCopyWith<$Res> { + __$$ListCommunitiesImplCopyWithImpl(_$ListCommunitiesImpl _value, $Res Function(_$ListCommunitiesImpl) _then) : super(_value, _then); /// Create a copy of ListCommunities /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = freezed, - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? showNsfw = freezed, - Object? auth = freezed, - }) { - return _then(_$ListCommunitiesImpl( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? type = freezed, Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? showNsfw = freezed, Object? auth = freezed}) { + return _then( + _$ListCommunitiesImpl( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1114,34 +1059,26 @@ class __$$ListCommunitiesImplCopyWithImpl<$Res> @apiSerde class _$ListCommunitiesImpl extends _ListCommunities { - const _$ListCommunitiesImpl( - {@JsonKey(name: 'type_') this.type, - this.sort, - this.page, - this.limit, - this.showNsfw, - this.auth}) - : super._(); + const _$ListCommunitiesImpl({@JsonKey(name: 'type_') this.type, this.sort, this.page, this.limit, this.showNsfw, this.auth}) : super._(); - factory _$ListCommunitiesImpl.fromJson(Map json) => - _$$ListCommunitiesImplFromJson(json); + factory _$ListCommunitiesImpl.fromJson(Map json) => _$$ListCommunitiesImplFromJson(json); @override @JsonKey(name: 'type_') final ListingType? type; -// v0.18.0 + // v0.18.0 @override final SortType? sort; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? showNsfw; -// v0.18.1 + // v0.18.1 @override final String? auth; @@ -1159,45 +1096,33 @@ class _$ListCommunitiesImpl extends _ListCommunities { (identical(other.sort, sort) || other.sort == sort) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.showNsfw, showNsfw) || - other.showNsfw == showNsfw) && + (identical(other.showNsfw, showNsfw) || other.showNsfw == showNsfw) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, type, sort, page, limit, showNsfw, auth); + int get hashCode => Object.hash(runtimeType, type, sort, page, limit, showNsfw, auth); /// Create a copy of ListCommunities /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommunitiesImplCopyWith<_$ListCommunitiesImpl> get copyWith => - __$$ListCommunitiesImplCopyWithImpl<_$ListCommunitiesImpl>( - this, _$identity); + _$$ListCommunitiesImplCopyWith<_$ListCommunitiesImpl> get copyWith => __$$ListCommunitiesImplCopyWithImpl<_$ListCommunitiesImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommunitiesImplToJson( - this, - ); + return _$$ListCommunitiesImplToJson(this); } } abstract class _ListCommunities extends ListCommunities { - const factory _ListCommunities( - {@JsonKey(name: 'type_') final ListingType? type, - final SortType? sort, - final int? page, - final int? limit, - final bool? showNsfw, - final String? auth}) = _$ListCommunitiesImpl; + const factory _ListCommunities({@JsonKey(name: 'type_') final ListingType? type, final SortType? sort, final int? page, final int? limit, final bool? showNsfw, final String? auth}) = + _$ListCommunitiesImpl; const _ListCommunities._() : super._(); - factory _ListCommunities.fromJson(Map json) = - _$ListCommunitiesImpl.fromJson; + factory _ListCommunities.fromJson(Map json) = _$ListCommunitiesImpl.fromJson; @override @JsonKey(name: 'type_') @@ -1217,8 +1142,7 @@ abstract class _ListCommunities extends ListCommunities { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommunitiesImplCopyWith<_$ListCommunitiesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListCommunitiesImplCopyWith<_$ListCommunitiesImpl> get copyWith => throw _privateConstructorUsedError; } FollowCommunity _$FollowCommunityFromJson(Map json) { @@ -1237,22 +1161,18 @@ mixin _$FollowCommunity { /// Create a copy of FollowCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $FollowCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $FollowCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $FollowCommunityCopyWith<$Res> { - factory $FollowCommunityCopyWith( - FollowCommunity value, $Res Function(FollowCommunity) then) = - _$FollowCommunityCopyWithImpl<$Res, FollowCommunity>; + factory $FollowCommunityCopyWith(FollowCommunity value, $Res Function(FollowCommunity) then) = _$FollowCommunityCopyWithImpl<$Res, FollowCommunity>; @useResult $Res call({int communityId, bool follow, String? auth}); } /// @nodoc -class _$FollowCommunityCopyWithImpl<$Res, $Val extends FollowCommunity> - implements $FollowCommunityCopyWith<$Res> { +class _$FollowCommunityCopyWithImpl<$Res, $Val extends FollowCommunity> implements $FollowCommunityCopyWith<$Res> { _$FollowCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1264,70 +1184,66 @@ class _$FollowCommunityCopyWithImpl<$Res, $Val extends FollowCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? follow = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - follow: null == follow - ? _value.follow - : follow // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? follow = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + follow: + null == follow + ? _value.follow + : follow // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$FollowCommunityImplCopyWith<$Res> - implements $FollowCommunityCopyWith<$Res> { - factory _$$FollowCommunityImplCopyWith(_$FollowCommunityImpl value, - $Res Function(_$FollowCommunityImpl) then) = - __$$FollowCommunityImplCopyWithImpl<$Res>; +abstract class _$$FollowCommunityImplCopyWith<$Res> implements $FollowCommunityCopyWith<$Res> { + factory _$$FollowCommunityImplCopyWith(_$FollowCommunityImpl value, $Res Function(_$FollowCommunityImpl) then) = __$$FollowCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, bool follow, String? auth}); } /// @nodoc -class __$$FollowCommunityImplCopyWithImpl<$Res> - extends _$FollowCommunityCopyWithImpl<$Res, _$FollowCommunityImpl> - implements _$$FollowCommunityImplCopyWith<$Res> { - __$$FollowCommunityImplCopyWithImpl( - _$FollowCommunityImpl _value, $Res Function(_$FollowCommunityImpl) _then) - : super(_value, _then); +class __$$FollowCommunityImplCopyWithImpl<$Res> extends _$FollowCommunityCopyWithImpl<$Res, _$FollowCommunityImpl> implements _$$FollowCommunityImplCopyWith<$Res> { + __$$FollowCommunityImplCopyWithImpl(_$FollowCommunityImpl _value, $Res Function(_$FollowCommunityImpl) _then) : super(_value, _then); /// Create a copy of FollowCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? follow = null, - Object? auth = freezed, - }) { - return _then(_$FollowCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - follow: null == follow - ? _value.follow - : follow // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? follow = null, Object? auth = freezed}) { + return _then( + _$FollowCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + follow: + null == follow + ? _value.follow + : follow // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1335,19 +1251,16 @@ class __$$FollowCommunityImplCopyWithImpl<$Res> @apiSerde class _$FollowCommunityImpl extends _FollowCommunity { - const _$FollowCommunityImpl( - {required this.communityId, required this.follow, this.auth}) - : super._(); + const _$FollowCommunityImpl({required this.communityId, required this.follow, this.auth}) : super._(); - factory _$FollowCommunityImpl.fromJson(Map json) => - _$$FollowCommunityImplFromJson(json); + factory _$FollowCommunityImpl.fromJson(Map json) => _$$FollowCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool follow; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1361,8 +1274,7 @@ class _$FollowCommunityImpl extends _FollowCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FollowCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.follow, follow) || other.follow == follow) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1376,27 +1288,19 @@ class _$FollowCommunityImpl extends _FollowCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$FollowCommunityImplCopyWith<_$FollowCommunityImpl> get copyWith => - __$$FollowCommunityImplCopyWithImpl<_$FollowCommunityImpl>( - this, _$identity); + _$$FollowCommunityImplCopyWith<_$FollowCommunityImpl> get copyWith => __$$FollowCommunityImplCopyWithImpl<_$FollowCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$FollowCommunityImplToJson( - this, - ); + return _$$FollowCommunityImplToJson(this); } } abstract class _FollowCommunity extends FollowCommunity { - const factory _FollowCommunity( - {required final int communityId, - required final bool follow, - final String? auth}) = _$FollowCommunityImpl; + const factory _FollowCommunity({required final int communityId, required final bool follow, final String? auth}) = _$FollowCommunityImpl; const _FollowCommunity._() : super._(); - factory _FollowCommunity.fromJson(Map json) = - _$FollowCommunityImpl.fromJson; + factory _FollowCommunity.fromJson(Map json) = _$FollowCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -1409,8 +1313,7 @@ abstract class _FollowCommunity extends FollowCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$FollowCommunityImplCopyWith<_$FollowCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$FollowCommunityImplCopyWith<_$FollowCommunityImpl> get copyWith => throw _privateConstructorUsedError; } BlockCommunity _$BlockCommunityFromJson(Map json) { @@ -1429,22 +1332,18 @@ mixin _$BlockCommunity { /// Create a copy of BlockCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockCommunityCopyWith<$Res> { - factory $BlockCommunityCopyWith( - BlockCommunity value, $Res Function(BlockCommunity) then) = - _$BlockCommunityCopyWithImpl<$Res, BlockCommunity>; + factory $BlockCommunityCopyWith(BlockCommunity value, $Res Function(BlockCommunity) then) = _$BlockCommunityCopyWithImpl<$Res, BlockCommunity>; @useResult $Res call({int communityId, bool block, String? auth}); } /// @nodoc -class _$BlockCommunityCopyWithImpl<$Res, $Val extends BlockCommunity> - implements $BlockCommunityCopyWith<$Res> { +class _$BlockCommunityCopyWithImpl<$Res, $Val extends BlockCommunity> implements $BlockCommunityCopyWith<$Res> { _$BlockCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1456,70 +1355,66 @@ class _$BlockCommunityCopyWithImpl<$Res, $Val extends BlockCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? block = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? block = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$BlockCommunityImplCopyWith<$Res> - implements $BlockCommunityCopyWith<$Res> { - factory _$$BlockCommunityImplCopyWith(_$BlockCommunityImpl value, - $Res Function(_$BlockCommunityImpl) then) = - __$$BlockCommunityImplCopyWithImpl<$Res>; +abstract class _$$BlockCommunityImplCopyWith<$Res> implements $BlockCommunityCopyWith<$Res> { + factory _$$BlockCommunityImplCopyWith(_$BlockCommunityImpl value, $Res Function(_$BlockCommunityImpl) then) = __$$BlockCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, bool block, String? auth}); } /// @nodoc -class __$$BlockCommunityImplCopyWithImpl<$Res> - extends _$BlockCommunityCopyWithImpl<$Res, _$BlockCommunityImpl> - implements _$$BlockCommunityImplCopyWith<$Res> { - __$$BlockCommunityImplCopyWithImpl( - _$BlockCommunityImpl _value, $Res Function(_$BlockCommunityImpl) _then) - : super(_value, _then); +class __$$BlockCommunityImplCopyWithImpl<$Res> extends _$BlockCommunityCopyWithImpl<$Res, _$BlockCommunityImpl> implements _$$BlockCommunityImplCopyWith<$Res> { + __$$BlockCommunityImplCopyWithImpl(_$BlockCommunityImpl _value, $Res Function(_$BlockCommunityImpl) _then) : super(_value, _then); /// Create a copy of BlockCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? block = null, - Object? auth = freezed, - }) { - return _then(_$BlockCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? block = null, Object? auth = freezed}) { + return _then( + _$BlockCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1527,19 +1422,16 @@ class __$$BlockCommunityImplCopyWithImpl<$Res> @apiSerde class _$BlockCommunityImpl extends _BlockCommunity { - const _$BlockCommunityImpl( - {required this.communityId, required this.block, this.auth}) - : super._(); + const _$BlockCommunityImpl({required this.communityId, required this.block, this.auth}) : super._(); - factory _$BlockCommunityImpl.fromJson(Map json) => - _$$BlockCommunityImplFromJson(json); + factory _$BlockCommunityImpl.fromJson(Map json) => _$$BlockCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool block; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1553,8 +1445,7 @@ class _$BlockCommunityImpl extends _BlockCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlockCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.block, block) || other.block == block) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1568,27 +1459,19 @@ class _$BlockCommunityImpl extends _BlockCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockCommunityImplCopyWith<_$BlockCommunityImpl> get copyWith => - __$$BlockCommunityImplCopyWithImpl<_$BlockCommunityImpl>( - this, _$identity); + _$$BlockCommunityImplCopyWith<_$BlockCommunityImpl> get copyWith => __$$BlockCommunityImplCopyWithImpl<_$BlockCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$BlockCommunityImplToJson( - this, - ); + return _$$BlockCommunityImplToJson(this); } } abstract class _BlockCommunity extends BlockCommunity { - const factory _BlockCommunity( - {required final int communityId, - required final bool block, - final String? auth}) = _$BlockCommunityImpl; + const factory _BlockCommunity({required final int communityId, required final bool block, final String? auth}) = _$BlockCommunityImpl; const _BlockCommunity._() : super._(); - factory _BlockCommunity.fromJson(Map json) = - _$BlockCommunityImpl.fromJson; + factory _BlockCommunity.fromJson(Map json) = _$BlockCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -1601,8 +1484,7 @@ abstract class _BlockCommunity extends BlockCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockCommunityImplCopyWith<_$BlockCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BlockCommunityImplCopyWith<_$BlockCommunityImpl> get copyWith => throw _privateConstructorUsedError; } DeleteCommunity _$DeleteCommunityFromJson(Map json) { @@ -1621,22 +1503,18 @@ mixin _$DeleteCommunity { /// Create a copy of DeleteCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteCommunityCopyWith<$Res> { - factory $DeleteCommunityCopyWith( - DeleteCommunity value, $Res Function(DeleteCommunity) then) = - _$DeleteCommunityCopyWithImpl<$Res, DeleteCommunity>; + factory $DeleteCommunityCopyWith(DeleteCommunity value, $Res Function(DeleteCommunity) then) = _$DeleteCommunityCopyWithImpl<$Res, DeleteCommunity>; @useResult $Res call({int communityId, bool deleted, String? auth}); } /// @nodoc -class _$DeleteCommunityCopyWithImpl<$Res, $Val extends DeleteCommunity> - implements $DeleteCommunityCopyWith<$Res> { +class _$DeleteCommunityCopyWithImpl<$Res, $Val extends DeleteCommunity> implements $DeleteCommunityCopyWith<$Res> { _$DeleteCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1648,70 +1526,66 @@ class _$DeleteCommunityCopyWithImpl<$Res, $Val extends DeleteCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$DeleteCommunityImplCopyWith<$Res> - implements $DeleteCommunityCopyWith<$Res> { - factory _$$DeleteCommunityImplCopyWith(_$DeleteCommunityImpl value, - $Res Function(_$DeleteCommunityImpl) then) = - __$$DeleteCommunityImplCopyWithImpl<$Res>; +abstract class _$$DeleteCommunityImplCopyWith<$Res> implements $DeleteCommunityCopyWith<$Res> { + factory _$$DeleteCommunityImplCopyWith(_$DeleteCommunityImpl value, $Res Function(_$DeleteCommunityImpl) then) = __$$DeleteCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, bool deleted, String? auth}); } /// @nodoc -class __$$DeleteCommunityImplCopyWithImpl<$Res> - extends _$DeleteCommunityCopyWithImpl<$Res, _$DeleteCommunityImpl> - implements _$$DeleteCommunityImplCopyWith<$Res> { - __$$DeleteCommunityImplCopyWithImpl( - _$DeleteCommunityImpl _value, $Res Function(_$DeleteCommunityImpl) _then) - : super(_value, _then); +class __$$DeleteCommunityImplCopyWithImpl<$Res> extends _$DeleteCommunityCopyWithImpl<$Res, _$DeleteCommunityImpl> implements _$$DeleteCommunityImplCopyWith<$Res> { + __$$DeleteCommunityImplCopyWithImpl(_$DeleteCommunityImpl _value, $Res Function(_$DeleteCommunityImpl) _then) : super(_value, _then); /// Create a copy of DeleteCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_$DeleteCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _$DeleteCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1719,19 +1593,16 @@ class __$$DeleteCommunityImplCopyWithImpl<$Res> @apiSerde class _$DeleteCommunityImpl extends _DeleteCommunity { - const _$DeleteCommunityImpl( - {required this.communityId, required this.deleted, this.auth}) - : super._(); + const _$DeleteCommunityImpl({required this.communityId, required this.deleted, this.auth}) : super._(); - factory _$DeleteCommunityImpl.fromJson(Map json) => - _$$DeleteCommunityImplFromJson(json); + factory _$DeleteCommunityImpl.fromJson(Map json) => _$$DeleteCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1745,8 +1616,7 @@ class _$DeleteCommunityImpl extends _DeleteCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeleteCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1760,27 +1630,19 @@ class _$DeleteCommunityImpl extends _DeleteCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteCommunityImplCopyWith<_$DeleteCommunityImpl> get copyWith => - __$$DeleteCommunityImplCopyWithImpl<_$DeleteCommunityImpl>( - this, _$identity); + _$$DeleteCommunityImplCopyWith<_$DeleteCommunityImpl> get copyWith => __$$DeleteCommunityImplCopyWithImpl<_$DeleteCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteCommunityImplToJson( - this, - ); + return _$$DeleteCommunityImplToJson(this); } } abstract class _DeleteCommunity extends DeleteCommunity { - const factory _DeleteCommunity( - {required final int communityId, - required final bool deleted, - final String? auth}) = _$DeleteCommunityImpl; + const factory _DeleteCommunity({required final int communityId, required final bool deleted, final String? auth}) = _$DeleteCommunityImpl; const _DeleteCommunity._() : super._(); - factory _DeleteCommunity.fromJson(Map json) = - _$DeleteCommunityImpl.fromJson; + factory _DeleteCommunity.fromJson(Map json) = _$DeleteCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -1793,8 +1655,7 @@ abstract class _DeleteCommunity extends DeleteCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteCommunityImplCopyWith<_$DeleteCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DeleteCommunityImplCopyWith<_$DeleteCommunityImpl> get copyWith => throw _privateConstructorUsedError; } HideCommunity _$HideCommunityFromJson(Map json) { @@ -1814,22 +1675,18 @@ mixin _$HideCommunity { /// Create a copy of HideCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $HideCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $HideCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $HideCommunityCopyWith<$Res> { - factory $HideCommunityCopyWith( - HideCommunity value, $Res Function(HideCommunity) then) = - _$HideCommunityCopyWithImpl<$Res, HideCommunity>; + factory $HideCommunityCopyWith(HideCommunity value, $Res Function(HideCommunity) then) = _$HideCommunityCopyWithImpl<$Res, HideCommunity>; @useResult $Res call({int communityId, bool hidden, String? reason, String? auth}); } /// @nodoc -class _$HideCommunityCopyWithImpl<$Res, $Val extends HideCommunity> - implements $HideCommunityCopyWith<$Res> { +class _$HideCommunityCopyWithImpl<$Res, $Val extends HideCommunity> implements $HideCommunityCopyWith<$Res> { _$HideCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1841,80 +1698,76 @@ class _$HideCommunityCopyWithImpl<$Res, $Val extends HideCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? hidden = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? hidden = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$HideCommunityImplCopyWith<$Res> - implements $HideCommunityCopyWith<$Res> { - factory _$$HideCommunityImplCopyWith( - _$HideCommunityImpl value, $Res Function(_$HideCommunityImpl) then) = - __$$HideCommunityImplCopyWithImpl<$Res>; +abstract class _$$HideCommunityImplCopyWith<$Res> implements $HideCommunityCopyWith<$Res> { + factory _$$HideCommunityImplCopyWith(_$HideCommunityImpl value, $Res Function(_$HideCommunityImpl) then) = __$$HideCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, bool hidden, String? reason, String? auth}); } /// @nodoc -class __$$HideCommunityImplCopyWithImpl<$Res> - extends _$HideCommunityCopyWithImpl<$Res, _$HideCommunityImpl> - implements _$$HideCommunityImplCopyWith<$Res> { - __$$HideCommunityImplCopyWithImpl( - _$HideCommunityImpl _value, $Res Function(_$HideCommunityImpl) _then) - : super(_value, _then); +class __$$HideCommunityImplCopyWithImpl<$Res> extends _$HideCommunityCopyWithImpl<$Res, _$HideCommunityImpl> implements _$$HideCommunityImplCopyWith<$Res> { + __$$HideCommunityImplCopyWithImpl(_$HideCommunityImpl _value, $Res Function(_$HideCommunityImpl) _then) : super(_value, _then); /// Create a copy of HideCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? hidden = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$HideCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? hidden = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$HideCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1922,22 +1775,19 @@ class __$$HideCommunityImplCopyWithImpl<$Res> @apiSerde class _$HideCommunityImpl extends _HideCommunity { - const _$HideCommunityImpl( - {required this.communityId, required this.hidden, this.reason, this.auth}) - : super._(); + const _$HideCommunityImpl({required this.communityId, required this.hidden, this.reason, this.auth}) : super._(); - factory _$HideCommunityImpl.fromJson(Map json) => - _$$HideCommunityImplFromJson(json); + factory _$HideCommunityImpl.fromJson(Map json) => _$$HideCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool hidden; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1951,8 +1801,7 @@ class _$HideCommunityImpl extends _HideCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$HideCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.hidden, hidden) || other.hidden == hidden) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); @@ -1960,35 +1809,26 @@ class _$HideCommunityImpl extends _HideCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, communityId, hidden, reason, auth); + int get hashCode => Object.hash(runtimeType, communityId, hidden, reason, auth); /// Create a copy of HideCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$HideCommunityImplCopyWith<_$HideCommunityImpl> get copyWith => - __$$HideCommunityImplCopyWithImpl<_$HideCommunityImpl>(this, _$identity); + _$$HideCommunityImplCopyWith<_$HideCommunityImpl> get copyWith => __$$HideCommunityImplCopyWithImpl<_$HideCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$HideCommunityImplToJson( - this, - ); + return _$$HideCommunityImplToJson(this); } } abstract class _HideCommunity extends HideCommunity { - const factory _HideCommunity( - {required final int communityId, - required final bool hidden, - final String? reason, - final String? auth}) = _$HideCommunityImpl; + const factory _HideCommunity({required final int communityId, required final bool hidden, final String? reason, final String? auth}) = _$HideCommunityImpl; const _HideCommunity._() : super._(); - factory _HideCommunity.fromJson(Map json) = - _$HideCommunityImpl.fromJson; + factory _HideCommunity.fromJson(Map json) = _$HideCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -2003,8 +1843,7 @@ abstract class _HideCommunity extends HideCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$HideCommunityImplCopyWith<_$HideCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$HideCommunityImplCopyWith<_$HideCommunityImpl> get copyWith => throw _privateConstructorUsedError; } RemoveCommunity _$RemoveCommunityFromJson(Map json) { @@ -2017,8 +1856,7 @@ mixin _$RemoveCommunity { bool get removed => throw _privateConstructorUsedError; // v0.18.0 String? get reason => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get expires => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get expires => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] String? get auth => throw _privateConstructorUsedError; /// Serializes this RemoveCommunity to a JSON map. @@ -2027,27 +1865,18 @@ mixin _$RemoveCommunity { /// Create a copy of RemoveCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RemoveCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $RemoveCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RemoveCommunityCopyWith<$Res> { - factory $RemoveCommunityCopyWith( - RemoveCommunity value, $Res Function(RemoveCommunity) then) = - _$RemoveCommunityCopyWithImpl<$Res, RemoveCommunity>; + factory $RemoveCommunityCopyWith(RemoveCommunity value, $Res Function(RemoveCommunity) then) = _$RemoveCommunityCopyWithImpl<$Res, RemoveCommunity>; @useResult - $Res call( - {int communityId, - bool removed, - String? reason, - @deprecated int? expires, - String? auth}); + $Res call({int communityId, bool removed, String? reason, @deprecated int? expires, String? auth}); } /// @nodoc -class _$RemoveCommunityCopyWithImpl<$Res, $Val extends RemoveCommunity> - implements $RemoveCommunityCopyWith<$Res> { +class _$RemoveCommunityCopyWithImpl<$Res, $Val extends RemoveCommunity> implements $RemoveCommunityCopyWith<$Res> { _$RemoveCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2059,95 +1888,86 @@ class _$RemoveCommunityCopyWithImpl<$Res, $Val extends RemoveCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? removed = null, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? removed = null, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$RemoveCommunityImplCopyWith<$Res> - implements $RemoveCommunityCopyWith<$Res> { - factory _$$RemoveCommunityImplCopyWith(_$RemoveCommunityImpl value, - $Res Function(_$RemoveCommunityImpl) then) = - __$$RemoveCommunityImplCopyWithImpl<$Res>; +abstract class _$$RemoveCommunityImplCopyWith<$Res> implements $RemoveCommunityCopyWith<$Res> { + factory _$$RemoveCommunityImplCopyWith(_$RemoveCommunityImpl value, $Res Function(_$RemoveCommunityImpl) then) = __$$RemoveCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int communityId, - bool removed, - String? reason, - @deprecated int? expires, - String? auth}); + $Res call({int communityId, bool removed, String? reason, @deprecated int? expires, String? auth}); } /// @nodoc -class __$$RemoveCommunityImplCopyWithImpl<$Res> - extends _$RemoveCommunityCopyWithImpl<$Res, _$RemoveCommunityImpl> - implements _$$RemoveCommunityImplCopyWith<$Res> { - __$$RemoveCommunityImplCopyWithImpl( - _$RemoveCommunityImpl _value, $Res Function(_$RemoveCommunityImpl) _then) - : super(_value, _then); +class __$$RemoveCommunityImplCopyWithImpl<$Res> extends _$RemoveCommunityCopyWithImpl<$Res, _$RemoveCommunityImpl> implements _$$RemoveCommunityImplCopyWith<$Res> { + __$$RemoveCommunityImplCopyWithImpl(_$RemoveCommunityImpl _value, $Res Function(_$RemoveCommunityImpl) _then) : super(_value, _then); /// Create a copy of RemoveCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? removed = null, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_$RemoveCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? removed = null, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _$RemoveCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2155,30 +1975,23 @@ class __$$RemoveCommunityImplCopyWithImpl<$Res> @apiSerde class _$RemoveCommunityImpl extends _RemoveCommunity { - const _$RemoveCommunityImpl( - {required this.communityId, - required this.removed, - this.reason, - @deprecated this.expires, - this.auth}) - : super._(); + const _$RemoveCommunityImpl({required this.communityId, required this.removed, this.reason, @deprecated this.expires, this.auth}) : super._(); - factory _$RemoveCommunityImpl.fromJson(Map json) => - _$$RemoveCommunityImplFromJson(json); + factory _$RemoveCommunityImpl.fromJson(Map json) => _$$RemoveCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override @deprecated final int? expires; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final String? auth; @@ -2192,8 +2005,7 @@ class _$RemoveCommunityImpl extends _RemoveCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RemoveCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.expires, expires) || other.expires == expires) && @@ -2202,37 +2014,26 @@ class _$RemoveCommunityImpl extends _RemoveCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, communityId, removed, reason, expires, auth); + int get hashCode => Object.hash(runtimeType, communityId, removed, reason, expires, auth); /// Create a copy of RemoveCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RemoveCommunityImplCopyWith<_$RemoveCommunityImpl> get copyWith => - __$$RemoveCommunityImplCopyWithImpl<_$RemoveCommunityImpl>( - this, _$identity); + _$$RemoveCommunityImplCopyWith<_$RemoveCommunityImpl> get copyWith => __$$RemoveCommunityImplCopyWithImpl<_$RemoveCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$RemoveCommunityImplToJson( - this, - ); + return _$$RemoveCommunityImplToJson(this); } } abstract class _RemoveCommunity extends RemoveCommunity { - const factory _RemoveCommunity( - {required final int communityId, - required final bool removed, - final String? reason, - @deprecated final int? expires, - final String? auth}) = _$RemoveCommunityImpl; + const factory _RemoveCommunity({required final int communityId, required final bool removed, final String? reason, @deprecated final int? expires, final String? auth}) = _$RemoveCommunityImpl; const _RemoveCommunity._() : super._(); - factory _RemoveCommunity.fromJson(Map json) = - _$RemoveCommunityImpl.fromJson; + factory _RemoveCommunity.fromJson(Map json) = _$RemoveCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -2250,8 +2051,7 @@ abstract class _RemoveCommunity extends RemoveCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RemoveCommunityImplCopyWith<_$RemoveCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$RemoveCommunityImplCopyWith<_$RemoveCommunityImpl> get copyWith => throw _privateConstructorUsedError; } TransferCommunity _$TransferCommunityFromJson(Map json) { @@ -2270,22 +2070,18 @@ mixin _$TransferCommunity { /// Create a copy of TransferCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $TransferCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $TransferCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $TransferCommunityCopyWith<$Res> { - factory $TransferCommunityCopyWith( - TransferCommunity value, $Res Function(TransferCommunity) then) = - _$TransferCommunityCopyWithImpl<$Res, TransferCommunity>; + factory $TransferCommunityCopyWith(TransferCommunity value, $Res Function(TransferCommunity) then) = _$TransferCommunityCopyWithImpl<$Res, TransferCommunity>; @useResult $Res call({int communityId, int personId, String? auth}); } /// @nodoc -class _$TransferCommunityCopyWithImpl<$Res, $Val extends TransferCommunity> - implements $TransferCommunityCopyWith<$Res> { +class _$TransferCommunityCopyWithImpl<$Res, $Val extends TransferCommunity> implements $TransferCommunityCopyWith<$Res> { _$TransferCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2297,70 +2093,66 @@ class _$TransferCommunityCopyWithImpl<$Res, $Val extends TransferCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? personId = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$TransferCommunityImplCopyWith<$Res> - implements $TransferCommunityCopyWith<$Res> { - factory _$$TransferCommunityImplCopyWith(_$TransferCommunityImpl value, - $Res Function(_$TransferCommunityImpl) then) = - __$$TransferCommunityImplCopyWithImpl<$Res>; +abstract class _$$TransferCommunityImplCopyWith<$Res> implements $TransferCommunityCopyWith<$Res> { + factory _$$TransferCommunityImplCopyWith(_$TransferCommunityImpl value, $Res Function(_$TransferCommunityImpl) then) = __$$TransferCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, int personId, String? auth}); } /// @nodoc -class __$$TransferCommunityImplCopyWithImpl<$Res> - extends _$TransferCommunityCopyWithImpl<$Res, _$TransferCommunityImpl> - implements _$$TransferCommunityImplCopyWith<$Res> { - __$$TransferCommunityImplCopyWithImpl(_$TransferCommunityImpl _value, - $Res Function(_$TransferCommunityImpl) _then) - : super(_value, _then); +class __$$TransferCommunityImplCopyWithImpl<$Res> extends _$TransferCommunityCopyWithImpl<$Res, _$TransferCommunityImpl> implements _$$TransferCommunityImplCopyWith<$Res> { + __$$TransferCommunityImplCopyWithImpl(_$TransferCommunityImpl _value, $Res Function(_$TransferCommunityImpl) _then) : super(_value, _then); /// Create a copy of TransferCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? auth = freezed, - }) { - return _then(_$TransferCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? personId = null, Object? auth = freezed}) { + return _then( + _$TransferCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2368,19 +2160,16 @@ class __$$TransferCommunityImplCopyWithImpl<$Res> @apiSerde class _$TransferCommunityImpl extends _TransferCommunity { - const _$TransferCommunityImpl( - {required this.communityId, required this.personId, this.auth}) - : super._(); + const _$TransferCommunityImpl({required this.communityId, required this.personId, this.auth}) : super._(); - factory _$TransferCommunityImpl.fromJson(Map json) => - _$$TransferCommunityImplFromJson(json); + factory _$TransferCommunityImpl.fromJson(Map json) => _$$TransferCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final int personId; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2394,10 +2183,8 @@ class _$TransferCommunityImpl extends _TransferCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$TransferCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.auth, auth) || other.auth == auth)); } @@ -2410,27 +2197,19 @@ class _$TransferCommunityImpl extends _TransferCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$TransferCommunityImplCopyWith<_$TransferCommunityImpl> get copyWith => - __$$TransferCommunityImplCopyWithImpl<_$TransferCommunityImpl>( - this, _$identity); + _$$TransferCommunityImplCopyWith<_$TransferCommunityImpl> get copyWith => __$$TransferCommunityImplCopyWithImpl<_$TransferCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$TransferCommunityImplToJson( - this, - ); + return _$$TransferCommunityImplToJson(this); } } abstract class _TransferCommunity extends TransferCommunity { - const factory _TransferCommunity( - {required final int communityId, - required final int personId, - final String? auth}) = _$TransferCommunityImpl; + const factory _TransferCommunity({required final int communityId, required final int personId, final String? auth}) = _$TransferCommunityImpl; const _TransferCommunity._() : super._(); - factory _TransferCommunity.fromJson(Map json) = - _$TransferCommunityImpl.fromJson; + factory _TransferCommunity.fromJson(Map json) = _$TransferCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -2443,8 +2222,7 @@ abstract class _TransferCommunity extends TransferCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$TransferCommunityImplCopyWith<_$TransferCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$TransferCommunityImplCopyWith<_$TransferCommunityImpl> get copyWith => throw _privateConstructorUsedError; } BanFromCommunity _$BanFromCommunityFromJson(Map json) { @@ -2467,29 +2245,18 @@ mixin _$BanFromCommunity { /// Create a copy of BanFromCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BanFromCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $BanFromCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BanFromCommunityCopyWith<$Res> { - factory $BanFromCommunityCopyWith( - BanFromCommunity value, $Res Function(BanFromCommunity) then) = - _$BanFromCommunityCopyWithImpl<$Res, BanFromCommunity>; + factory $BanFromCommunityCopyWith(BanFromCommunity value, $Res Function(BanFromCommunity) then) = _$BanFromCommunityCopyWithImpl<$Res, BanFromCommunity>; @useResult - $Res call( - {int communityId, - int personId, - bool ban, - bool? removeData, - String? reason, - int? expires, - String? auth}); + $Res call({int communityId, int personId, bool ban, bool? removeData, String? reason, int? expires, String? auth}); } /// @nodoc -class _$BanFromCommunityCopyWithImpl<$Res, $Val extends BanFromCommunity> - implements $BanFromCommunityCopyWith<$Res> { +class _$BanFromCommunityCopyWithImpl<$Res, $Val extends BanFromCommunity> implements $BanFromCommunityCopyWith<$Res> { _$BanFromCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2501,117 +2268,106 @@ class _$BanFromCommunityCopyWithImpl<$Res, $Val extends BanFromCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? ban = null, - Object? removeData = freezed, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - ban: null == ban - ? _value.ban - : ban // ignore: cast_nullable_to_non_nullable - as bool, - removeData: freezed == removeData - ? _value.removeData - : removeData // ignore: cast_nullable_to_non_nullable - as bool?, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? personId = null, Object? ban = null, Object? removeData = freezed, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + ban: + null == ban + ? _value.ban + : ban // ignore: cast_nullable_to_non_nullable + as bool, + removeData: + freezed == removeData + ? _value.removeData + : removeData // ignore: cast_nullable_to_non_nullable + as bool?, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$BanFromCommunityImplCopyWith<$Res> - implements $BanFromCommunityCopyWith<$Res> { - factory _$$BanFromCommunityImplCopyWith(_$BanFromCommunityImpl value, - $Res Function(_$BanFromCommunityImpl) then) = - __$$BanFromCommunityImplCopyWithImpl<$Res>; +abstract class _$$BanFromCommunityImplCopyWith<$Res> implements $BanFromCommunityCopyWith<$Res> { + factory _$$BanFromCommunityImplCopyWith(_$BanFromCommunityImpl value, $Res Function(_$BanFromCommunityImpl) then) = __$$BanFromCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int communityId, - int personId, - bool ban, - bool? removeData, - String? reason, - int? expires, - String? auth}); + $Res call({int communityId, int personId, bool ban, bool? removeData, String? reason, int? expires, String? auth}); } /// @nodoc -class __$$BanFromCommunityImplCopyWithImpl<$Res> - extends _$BanFromCommunityCopyWithImpl<$Res, _$BanFromCommunityImpl> - implements _$$BanFromCommunityImplCopyWith<$Res> { - __$$BanFromCommunityImplCopyWithImpl(_$BanFromCommunityImpl _value, - $Res Function(_$BanFromCommunityImpl) _then) - : super(_value, _then); +class __$$BanFromCommunityImplCopyWithImpl<$Res> extends _$BanFromCommunityCopyWithImpl<$Res, _$BanFromCommunityImpl> implements _$$BanFromCommunityImplCopyWith<$Res> { + __$$BanFromCommunityImplCopyWithImpl(_$BanFromCommunityImpl _value, $Res Function(_$BanFromCommunityImpl) _then) : super(_value, _then); /// Create a copy of BanFromCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? ban = null, - Object? removeData = freezed, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_$BanFromCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - ban: null == ban - ? _value.ban - : ban // ignore: cast_nullable_to_non_nullable - as bool, - removeData: freezed == removeData - ? _value.removeData - : removeData // ignore: cast_nullable_to_non_nullable - as bool?, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? personId = null, Object? ban = null, Object? removeData = freezed, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _$BanFromCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + ban: + null == ban + ? _value.ban + : ban // ignore: cast_nullable_to_non_nullable + as bool, + removeData: + freezed == removeData + ? _value.removeData + : removeData // ignore: cast_nullable_to_non_nullable + as bool?, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2619,37 +2375,28 @@ class __$$BanFromCommunityImplCopyWithImpl<$Res> @apiSerde class _$BanFromCommunityImpl extends _BanFromCommunity { - const _$BanFromCommunityImpl( - {required this.communityId, - required this.personId, - required this.ban, - this.removeData, - this.reason, - this.expires, - this.auth}) - : super._(); + const _$BanFromCommunityImpl({required this.communityId, required this.personId, required this.ban, this.removeData, this.reason, this.expires, this.auth}) : super._(); - factory _$BanFromCommunityImpl.fromJson(Map json) => - _$$BanFromCommunityImplFromJson(json); + factory _$BanFromCommunityImpl.fromJson(Map json) => _$$BanFromCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final int personId; -// v0.18.0 + // v0.18.0 @override final bool ban; -// v0.18.0 + // v0.18.0 @override final bool? removeData; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final int? expires; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2663,13 +2410,10 @@ class _$BanFromCommunityImpl extends _BanFromCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BanFromCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.ban, ban) || other.ban == ban) && - (identical(other.removeData, removeData) || - other.removeData == removeData) && + (identical(other.removeData, removeData) || other.removeData == removeData) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.expires, expires) || other.expires == expires) && (identical(other.auth, auth) || other.auth == auth)); @@ -2677,39 +2421,34 @@ class _$BanFromCommunityImpl extends _BanFromCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, communityId, personId, ban, - removeData, reason, expires, auth); + int get hashCode => Object.hash(runtimeType, communityId, personId, ban, removeData, reason, expires, auth); /// Create a copy of BanFromCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BanFromCommunityImplCopyWith<_$BanFromCommunityImpl> get copyWith => - __$$BanFromCommunityImplCopyWithImpl<_$BanFromCommunityImpl>( - this, _$identity); + _$$BanFromCommunityImplCopyWith<_$BanFromCommunityImpl> get copyWith => __$$BanFromCommunityImplCopyWithImpl<_$BanFromCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$BanFromCommunityImplToJson( - this, - ); + return _$$BanFromCommunityImplToJson(this); } } abstract class _BanFromCommunity extends BanFromCommunity { - const factory _BanFromCommunity( - {required final int communityId, - required final int personId, - required final bool ban, - final bool? removeData, - final String? reason, - final int? expires, - final String? auth}) = _$BanFromCommunityImpl; + const factory _BanFromCommunity({ + required final int communityId, + required final int personId, + required final bool ban, + final bool? removeData, + final String? reason, + final int? expires, + final String? auth, + }) = _$BanFromCommunityImpl; const _BanFromCommunity._() : super._(); - factory _BanFromCommunity.fromJson(Map json) = - _$BanFromCommunityImpl.fromJson; + factory _BanFromCommunity.fromJson(Map json) = _$BanFromCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -2730,8 +2469,7 @@ abstract class _BanFromCommunity extends BanFromCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BanFromCommunityImplCopyWith<_$BanFromCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BanFromCommunityImplCopyWith<_$BanFromCommunityImpl> get copyWith => throw _privateConstructorUsedError; } AddModToCommunity _$AddModToCommunityFromJson(Map json) { @@ -2751,22 +2489,18 @@ mixin _$AddModToCommunity { /// Create a copy of AddModToCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AddModToCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $AddModToCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AddModToCommunityCopyWith<$Res> { - factory $AddModToCommunityCopyWith( - AddModToCommunity value, $Res Function(AddModToCommunity) then) = - _$AddModToCommunityCopyWithImpl<$Res, AddModToCommunity>; + factory $AddModToCommunityCopyWith(AddModToCommunity value, $Res Function(AddModToCommunity) then) = _$AddModToCommunityCopyWithImpl<$Res, AddModToCommunity>; @useResult $Res call({int communityId, int personId, bool added, String? auth}); } /// @nodoc -class _$AddModToCommunityCopyWithImpl<$Res, $Val extends AddModToCommunity> - implements $AddModToCommunityCopyWith<$Res> { +class _$AddModToCommunityCopyWithImpl<$Res, $Val extends AddModToCommunity> implements $AddModToCommunityCopyWith<$Res> { _$AddModToCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2778,80 +2512,76 @@ class _$AddModToCommunityCopyWithImpl<$Res, $Val extends AddModToCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? added = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - added: null == added - ? _value.added - : added // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = null, Object? personId = null, Object? added = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + added: + null == added + ? _value.added + : added // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AddModToCommunityImplCopyWith<$Res> - implements $AddModToCommunityCopyWith<$Res> { - factory _$$AddModToCommunityImplCopyWith(_$AddModToCommunityImpl value, - $Res Function(_$AddModToCommunityImpl) then) = - __$$AddModToCommunityImplCopyWithImpl<$Res>; +abstract class _$$AddModToCommunityImplCopyWith<$Res> implements $AddModToCommunityCopyWith<$Res> { + factory _$$AddModToCommunityImplCopyWith(_$AddModToCommunityImpl value, $Res Function(_$AddModToCommunityImpl) then) = __$$AddModToCommunityImplCopyWithImpl<$Res>; @override @useResult $Res call({int communityId, int personId, bool added, String? auth}); } /// @nodoc -class __$$AddModToCommunityImplCopyWithImpl<$Res> - extends _$AddModToCommunityCopyWithImpl<$Res, _$AddModToCommunityImpl> - implements _$$AddModToCommunityImplCopyWith<$Res> { - __$$AddModToCommunityImplCopyWithImpl(_$AddModToCommunityImpl _value, - $Res Function(_$AddModToCommunityImpl) _then) - : super(_value, _then); +class __$$AddModToCommunityImplCopyWithImpl<$Res> extends _$AddModToCommunityCopyWithImpl<$Res, _$AddModToCommunityImpl> implements _$$AddModToCommunityImplCopyWith<$Res> { + __$$AddModToCommunityImplCopyWithImpl(_$AddModToCommunityImpl _value, $Res Function(_$AddModToCommunityImpl) _then) : super(_value, _then); /// Create a copy of AddModToCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = null, - Object? personId = null, - Object? added = null, - Object? auth = freezed, - }) { - return _then(_$AddModToCommunityImpl( - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - added: null == added - ? _value.added - : added // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = null, Object? personId = null, Object? added = null, Object? auth = freezed}) { + return _then( + _$AddModToCommunityImpl( + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + added: + null == added + ? _value.added + : added // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2859,25 +2589,19 @@ class __$$AddModToCommunityImplCopyWithImpl<$Res> @apiSerde class _$AddModToCommunityImpl extends _AddModToCommunity { - const _$AddModToCommunityImpl( - {required this.communityId, - required this.personId, - required this.added, - this.auth}) - : super._(); + const _$AddModToCommunityImpl({required this.communityId, required this.personId, required this.added, this.auth}) : super._(); - factory _$AddModToCommunityImpl.fromJson(Map json) => - _$$AddModToCommunityImplFromJson(json); + factory _$AddModToCommunityImpl.fromJson(Map json) => _$$AddModToCommunityImplFromJson(json); @override final int communityId; -// v0.18.0 + // v0.18.0 @override final int personId; -// v0.18.0 + // v0.18.0 @override final bool added; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2891,46 +2615,34 @@ class _$AddModToCommunityImpl extends _AddModToCommunity { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddModToCommunityImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.added, added) || other.added == added) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, communityId, personId, added, auth); + int get hashCode => Object.hash(runtimeType, communityId, personId, added, auth); /// Create a copy of AddModToCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AddModToCommunityImplCopyWith<_$AddModToCommunityImpl> get copyWith => - __$$AddModToCommunityImplCopyWithImpl<_$AddModToCommunityImpl>( - this, _$identity); + _$$AddModToCommunityImplCopyWith<_$AddModToCommunityImpl> get copyWith => __$$AddModToCommunityImplCopyWithImpl<_$AddModToCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$AddModToCommunityImplToJson( - this, - ); + return _$$AddModToCommunityImplToJson(this); } } abstract class _AddModToCommunity extends AddModToCommunity { - const factory _AddModToCommunity( - {required final int communityId, - required final int personId, - required final bool added, - final String? auth}) = _$AddModToCommunityImpl; + const factory _AddModToCommunity({required final int communityId, required final int personId, required final bool added, final String? auth}) = _$AddModToCommunityImpl; const _AddModToCommunity._() : super._(); - factory _AddModToCommunity.fromJson(Map json) = - _$AddModToCommunityImpl.fromJson; + factory _AddModToCommunity.fromJson(Map json) = _$AddModToCommunityImpl.fromJson; @override int get communityId; // v0.18.0 @@ -2945,6 +2657,5 @@ abstract class _AddModToCommunity extends AddModToCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AddModToCommunityImplCopyWith<_$AddModToCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AddModToCommunityImplCopyWith<_$AddModToCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/community/community.g.dart b/lib/src/v3/api/community/community.g.dart index 2d2e67d2..4e6bb220 100644 --- a/lib/src/v3/api/community/community.g.dart +++ b/lib/src/v3/api/community/community.g.dart @@ -6,351 +6,172 @@ part of 'community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetCommunityImpl _$$GetCommunityImplFromJson(Map json) => - _$GetCommunityImpl( - id: (json['id'] as num?)?.toInt(), - name: json['name'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$GetCommunityImplToJson(_$GetCommunityImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', instance.id); - writeNotNull('name', instance.name); - writeNotNull('auth', instance.auth); - return val; -} - -_$CreateCommunityImpl _$$CreateCommunityImplFromJson( - Map json) => - _$CreateCommunityImpl( - name: json['name'] as String, - title: json['title'] as String, - description: json['description'] as String?, - icon: json['icon'] as String?, - banner: json['banner'] as String?, - nsfw: json['nsfw'] as bool?, - postingRestrictedToMods: json['posting_restricted_to_mods'] as bool?, - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - visibility: json['visibility'] == null - ? null - : CommunityVisibility.fromJson(json['visibility']), - auth: json['auth'] as String?, - ); - -Map _$$CreateCommunityImplToJson( - _$CreateCommunityImpl instance) { - final val = { - 'name': instance.name, - 'title': instance.title, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('description', instance.description); - writeNotNull('icon', instance.icon); - writeNotNull('banner', instance.banner); - writeNotNull('nsfw', instance.nsfw); - writeNotNull('posting_restricted_to_mods', instance.postingRestrictedToMods); - writeNotNull('discussion_languages', instance.discussionLanguages); - writeNotNull('visibility', instance.visibility?.toJson()); - writeNotNull('auth', instance.auth); - return val; -} - -_$EditCommunityImpl _$$EditCommunityImplFromJson(Map json) => - _$EditCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - title: json['title'] as String?, - description: json['description'] as String?, - icon: json['icon'] as String?, - banner: json['banner'] as String?, - nsfw: json['nsfw'] as bool?, - postingRestrictedToMods: json['posting_restricted_to_mods'] as bool?, - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - visibility: json['visibility'] == null - ? null - : CommunityVisibility.fromJson(json['visibility']), - auth: json['auth'] as String?, - ); - -Map _$$EditCommunityImplToJson(_$EditCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('title', instance.title); - writeNotNull('description', instance.description); - writeNotNull('icon', instance.icon); - writeNotNull('banner', instance.banner); - writeNotNull('nsfw', instance.nsfw); - writeNotNull('posting_restricted_to_mods', instance.postingRestrictedToMods); - writeNotNull('discussion_languages', instance.discussionLanguages); - writeNotNull('visibility', instance.visibility?.toJson()); - writeNotNull('auth', instance.auth); - return val; -} - -_$ListCommunitiesImpl _$$ListCommunitiesImplFromJson( - Map json) => - _$ListCommunitiesImpl( - type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), - sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - showNsfw: json['show_nsfw'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$ListCommunitiesImplToJson( - _$ListCommunitiesImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('type_', instance.type?.toJson()); - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('show_nsfw', instance.showNsfw); - writeNotNull('auth', instance.auth); - return val; -} - -_$FollowCommunityImpl _$$FollowCommunityImplFromJson( - Map json) => - _$FollowCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - follow: json['follow'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$FollowCommunityImplToJson( - _$FollowCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'follow': instance.follow, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +_$GetCommunityImpl _$$GetCommunityImplFromJson(Map json) => _$GetCommunityImpl(id: (json['id'] as num?)?.toInt(), name: json['name'] as String?, auth: json['auth'] as String?); + +Map _$$GetCommunityImplToJson(_$GetCommunityImpl instance) => { + if (instance.id case final value?) 'id': value, + if (instance.name case final value?) 'name': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$CreateCommunityImpl _$$CreateCommunityImplFromJson(Map json) => _$CreateCommunityImpl( + name: json['name'] as String, + title: json['title'] as String, + description: json['description'] as String?, + icon: json['icon'] as String?, + banner: json['banner'] as String?, + nsfw: json['nsfw'] as bool?, + postingRestrictedToMods: json['posting_restricted_to_mods'] as bool?, + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + visibility: json['visibility'] == null ? null : CommunityVisibility.fromJson(json['visibility']), + auth: json['auth'] as String?, +); + +Map _$$CreateCommunityImplToJson(_$CreateCommunityImpl instance) => { + 'name': instance.name, + 'title': instance.title, + if (instance.description case final value?) 'description': value, + if (instance.icon case final value?) 'icon': value, + if (instance.banner case final value?) 'banner': value, + if (instance.nsfw case final value?) 'nsfw': value, + if (instance.postingRestrictedToMods case final value?) 'posting_restricted_to_mods': value, + if (instance.discussionLanguages case final value?) 'discussion_languages': value, + if (instance.visibility?.toJson() case final value?) 'visibility': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditCommunityImpl _$$EditCommunityImplFromJson(Map json) => _$EditCommunityImpl( + communityId: (json['community_id'] as num).toInt(), + title: json['title'] as String?, + description: json['description'] as String?, + icon: json['icon'] as String?, + banner: json['banner'] as String?, + nsfw: json['nsfw'] as bool?, + postingRestrictedToMods: json['posting_restricted_to_mods'] as bool?, + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + visibility: json['visibility'] == null ? null : CommunityVisibility.fromJson(json['visibility']), + auth: json['auth'] as String?, +); + +Map _$$EditCommunityImplToJson(_$EditCommunityImpl instance) => { + 'community_id': instance.communityId, + if (instance.title case final value?) 'title': value, + if (instance.description case final value?) 'description': value, + if (instance.icon case final value?) 'icon': value, + if (instance.banner case final value?) 'banner': value, + if (instance.nsfw case final value?) 'nsfw': value, + if (instance.postingRestrictedToMods case final value?) 'posting_restricted_to_mods': value, + if (instance.discussionLanguages case final value?) 'discussion_languages': value, + if (instance.visibility?.toJson() case final value?) 'visibility': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$ListCommunitiesImpl _$$ListCommunitiesImplFromJson(Map json) => _$ListCommunitiesImpl( + type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), + sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + showNsfw: json['show_nsfw'] as bool?, + auth: json['auth'] as String?, +); + +Map _$$ListCommunitiesImplToJson(_$ListCommunitiesImpl instance) => { + if (instance.type?.toJson() case final value?) 'type_': value, + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.showNsfw case final value?) 'show_nsfw': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$FollowCommunityImpl _$$FollowCommunityImplFromJson(Map json) => + _$FollowCommunityImpl(communityId: (json['community_id'] as num).toInt(), follow: json['follow'] as bool, auth: json['auth'] as String?); + +Map _$$FollowCommunityImplToJson(_$FollowCommunityImpl instance) => { + 'community_id': instance.communityId, + 'follow': instance.follow, + if (instance.auth case final value?) 'auth': value, +}; _$BlockCommunityImpl _$$BlockCommunityImplFromJson(Map json) => - _$BlockCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - block: json['block'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$BlockCommunityImplToJson( - _$BlockCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'block': instance.block, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } + _$BlockCommunityImpl(communityId: (json['community_id'] as num).toInt(), block: json['block'] as bool, auth: json['auth'] as String?); - writeNotNull('auth', instance.auth); - return val; -} +Map _$$BlockCommunityImplToJson(_$BlockCommunityImpl instance) => { + 'community_id': instance.communityId, + 'block': instance.block, + if (instance.auth case final value?) 'auth': value, +}; -_$DeleteCommunityImpl _$$DeleteCommunityImplFromJson( - Map json) => - _$DeleteCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - deleted: json['deleted'] as bool, - auth: json['auth'] as String?, - ); +_$DeleteCommunityImpl _$$DeleteCommunityImplFromJson(Map json) => + _$DeleteCommunityImpl(communityId: (json['community_id'] as num).toInt(), deleted: json['deleted'] as bool, auth: json['auth'] as String?); -Map _$$DeleteCommunityImplToJson( - _$DeleteCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'deleted': instance.deleted, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +Map _$$DeleteCommunityImplToJson(_$DeleteCommunityImpl instance) => { + 'community_id': instance.communityId, + 'deleted': instance.deleted, + if (instance.auth case final value?) 'auth': value, +}; _$HideCommunityImpl _$$HideCommunityImplFromJson(Map json) => - _$HideCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - hidden: json['hidden'] as bool, - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$HideCommunityImplToJson(_$HideCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'hidden': instance.hidden, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} - -_$RemoveCommunityImpl _$$RemoveCommunityImplFromJson( - Map json) => - _$RemoveCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - removed: json['removed'] as bool, - reason: json['reason'] as String?, - expires: (json['expires'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$RemoveCommunityImplToJson( - _$RemoveCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'removed': instance.removed, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('expires', instance.expires); - writeNotNull('auth', instance.auth); - return val; -} - -_$TransferCommunityImpl _$$TransferCommunityImplFromJson( - Map json) => - _$TransferCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - personId: (json['person_id'] as num).toInt(), - auth: json['auth'] as String?, - ); - -Map _$$TransferCommunityImplToJson( - _$TransferCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'person_id': instance.personId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$BanFromCommunityImpl _$$BanFromCommunityImplFromJson( - Map json) => - _$BanFromCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - personId: (json['person_id'] as num).toInt(), - ban: json['ban'] as bool, - removeData: json['remove_data'] as bool?, - reason: json['reason'] as String?, - expires: (json['expires'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$BanFromCommunityImplToJson( - _$BanFromCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'person_id': instance.personId, - 'ban': instance.ban, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('remove_data', instance.removeData); - writeNotNull('reason', instance.reason); - writeNotNull('expires', instance.expires); - writeNotNull('auth', instance.auth); - return val; -} - -_$AddModToCommunityImpl _$$AddModToCommunityImplFromJson( - Map json) => - _$AddModToCommunityImpl( - communityId: (json['community_id'] as num).toInt(), - personId: (json['person_id'] as num).toInt(), - added: json['added'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$AddModToCommunityImplToJson( - _$AddModToCommunityImpl instance) { - final val = { - 'community_id': instance.communityId, - 'person_id': instance.personId, - 'added': instance.added, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} + _$HideCommunityImpl(communityId: (json['community_id'] as num).toInt(), hidden: json['hidden'] as bool, reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$HideCommunityImplToJson(_$HideCommunityImpl instance) => { + 'community_id': instance.communityId, + 'hidden': instance.hidden, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$RemoveCommunityImpl _$$RemoveCommunityImplFromJson(Map json) => _$RemoveCommunityImpl( + communityId: (json['community_id'] as num).toInt(), + removed: json['removed'] as bool, + reason: json['reason'] as String?, + expires: (json['expires'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$RemoveCommunityImplToJson(_$RemoveCommunityImpl instance) => { + 'community_id': instance.communityId, + 'removed': instance.removed, + if (instance.reason case final value?) 'reason': value, + if (instance.expires case final value?) 'expires': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$TransferCommunityImpl _$$TransferCommunityImplFromJson(Map json) => + _$TransferCommunityImpl(communityId: (json['community_id'] as num).toInt(), personId: (json['person_id'] as num).toInt(), auth: json['auth'] as String?); + +Map _$$TransferCommunityImplToJson(_$TransferCommunityImpl instance) => { + 'community_id': instance.communityId, + 'person_id': instance.personId, + if (instance.auth case final value?) 'auth': value, +}; + +_$BanFromCommunityImpl _$$BanFromCommunityImplFromJson(Map json) => _$BanFromCommunityImpl( + communityId: (json['community_id'] as num).toInt(), + personId: (json['person_id'] as num).toInt(), + ban: json['ban'] as bool, + removeData: json['remove_data'] as bool?, + reason: json['reason'] as String?, + expires: (json['expires'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$BanFromCommunityImplToJson(_$BanFromCommunityImpl instance) => { + 'community_id': instance.communityId, + 'person_id': instance.personId, + 'ban': instance.ban, + if (instance.removeData case final value?) 'remove_data': value, + if (instance.reason case final value?) 'reason': value, + if (instance.expires case final value?) 'expires': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$AddModToCommunityImpl _$$AddModToCommunityImplFromJson(Map json) => + _$AddModToCommunityImpl(communityId: (json['community_id'] as num).toInt(), personId: (json['person_id'] as num).toInt(), added: json['added'] as bool, auth: json['auth'] as String?); + +Map _$$AddModToCommunityImplToJson(_$AddModToCommunityImpl instance) => { + 'community_id': instance.communityId, + 'person_id': instance.personId, + 'added': instance.added, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/custom_emoji/custom_emoji.dart b/lib/src/v3/api/custom_emoji/custom_emoji.dart index 97b1949f..981160fc 100644 --- a/lib/src/v3/api/custom_emoji/custom_emoji.dart +++ b/lib/src/v3/api/custom_emoji/custom_emoji.dart @@ -11,9 +11,7 @@ part 'custom_emoji.g.dart'; /// /// `HTTP.POST /custom_emoji` @freezed -class CreateCustomEmoji - with _$CreateCustomEmoji - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreateCustomEmoji with _$CreateCustomEmoji implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateCustomEmoji({ required String category, // v0.18.0 @@ -25,25 +23,21 @@ class CreateCustomEmoji }) = _CreateCustomEmoji; const CreateCustomEmoji._(); - factory CreateCustomEmoji.fromJson(Map json) => - _$CreateCustomEmojiFromJson(json); + factory CreateCustomEmoji.fromJson(Map json) => _$CreateCustomEmojiFromJson(json); final path = '/custom_emoji'; final httpMethod = HttpMethod.post; @override - CustomEmojiResponse responseFactory(Map json) => - CustomEmojiResponse.fromJson(json); + CustomEmojiResponse responseFactory(Map json) => CustomEmojiResponse.fromJson(json); } /// Edit an existing custom emoji /// /// `HTTP.PUT /custom_emoji` @freezed -class EditCustomEmoji - with _$EditCustomEmoji - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class EditCustomEmoji with _$EditCustomEmoji implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditCustomEmoji({ required int id, // v0.18.0 @@ -55,27 +49,21 @@ class EditCustomEmoji }) = _EditCustomEmoji; const EditCustomEmoji._(); - factory EditCustomEmoji.fromJson(Map json) => - _$EditCustomEmojiFromJson(json); + factory EditCustomEmoji.fromJson(Map json) => _$EditCustomEmojiFromJson(json); final path = '/custom_emoji'; final httpMethod = HttpMethod.put; @override - CustomEmojiResponse responseFactory(Map json) => - CustomEmojiResponse.fromJson(json); + CustomEmojiResponse responseFactory(Map json) => CustomEmojiResponse.fromJson(json); } /// Delete a custom emoji /// /// `HTTP.Post /custom_emoji/delete` @freezed -class DeleteCustomEmoji - with _$DeleteCustomEmoji - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class DeleteCustomEmoji with _$DeleteCustomEmoji implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeleteCustomEmoji({ required int id, // v0.18.0 @@ -83,14 +71,12 @@ class DeleteCustomEmoji }) = _DeleteCustomEmoji; const DeleteCustomEmoji._(); - factory DeleteCustomEmoji.fromJson(Map json) => - _$DeleteCustomEmojiFromJson(json); + factory DeleteCustomEmoji.fromJson(Map json) => _$DeleteCustomEmojiFromJson(json); final path = '/custom_emoji/delete'; final httpMethod = HttpMethod.post; @override - DeleteCustomEmojiResponse responseFactory(Map json) => - DeleteCustomEmojiResponse.fromJson(json); + DeleteCustomEmojiResponse responseFactory(Map json) => DeleteCustomEmojiResponse.fromJson(json); } diff --git a/lib/src/v3/api/custom_emoji/custom_emoji.freezed.dart b/lib/src/v3/api/custom_emoji/custom_emoji.freezed.dart index a8c6bded..daf71709 100644 --- a/lib/src/v3/api/custom_emoji/custom_emoji.freezed.dart +++ b/lib/src/v3/api/custom_emoji/custom_emoji.freezed.dart @@ -12,7 +12,8 @@ part of 'custom_emoji.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CreateCustomEmoji _$CreateCustomEmojiFromJson(Map json) { return _CreateCustomEmoji.fromJson(json); @@ -33,28 +34,18 @@ mixin _$CreateCustomEmoji { /// Create a copy of CreateCustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateCustomEmojiCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateCustomEmojiCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateCustomEmojiCopyWith<$Res> { - factory $CreateCustomEmojiCopyWith( - CreateCustomEmoji value, $Res Function(CreateCustomEmoji) then) = - _$CreateCustomEmojiCopyWithImpl<$Res, CreateCustomEmoji>; + factory $CreateCustomEmojiCopyWith(CreateCustomEmoji value, $Res Function(CreateCustomEmoji) then) = _$CreateCustomEmojiCopyWithImpl<$Res, CreateCustomEmoji>; @useResult - $Res call( - {String category, - String shortcode, - String imageUrl, - String altText, - List keywords, - String? auth}); + $Res call({String category, String shortcode, String imageUrl, String altText, List keywords, String? auth}); } /// @nodoc -class _$CreateCustomEmojiCopyWithImpl<$Res, $Val extends CreateCustomEmoji> - implements $CreateCustomEmojiCopyWith<$Res> { +class _$CreateCustomEmojiCopyWithImpl<$Res, $Val extends CreateCustomEmoji> implements $CreateCustomEmojiCopyWith<$Res> { _$CreateCustomEmojiCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -66,106 +57,96 @@ class _$CreateCustomEmojiCopyWithImpl<$Res, $Val extends CreateCustomEmoji> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? category = null, - Object? shortcode = null, - Object? imageUrl = null, - Object? altText = null, - Object? keywords = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - shortcode: null == shortcode - ? _value.shortcode - : shortcode // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - keywords: null == keywords - ? _value.keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? category = null, Object? shortcode = null, Object? imageUrl = null, Object? altText = null, Object? keywords = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + shortcode: + null == shortcode + ? _value.shortcode + : shortcode // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + keywords: + null == keywords + ? _value.keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CreateCustomEmojiImplCopyWith<$Res> - implements $CreateCustomEmojiCopyWith<$Res> { - factory _$$CreateCustomEmojiImplCopyWith(_$CreateCustomEmojiImpl value, - $Res Function(_$CreateCustomEmojiImpl) then) = - __$$CreateCustomEmojiImplCopyWithImpl<$Res>; +abstract class _$$CreateCustomEmojiImplCopyWith<$Res> implements $CreateCustomEmojiCopyWith<$Res> { + factory _$$CreateCustomEmojiImplCopyWith(_$CreateCustomEmojiImpl value, $Res Function(_$CreateCustomEmojiImpl) then) = __$$CreateCustomEmojiImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String category, - String shortcode, - String imageUrl, - String altText, - List keywords, - String? auth}); + $Res call({String category, String shortcode, String imageUrl, String altText, List keywords, String? auth}); } /// @nodoc -class __$$CreateCustomEmojiImplCopyWithImpl<$Res> - extends _$CreateCustomEmojiCopyWithImpl<$Res, _$CreateCustomEmojiImpl> - implements _$$CreateCustomEmojiImplCopyWith<$Res> { - __$$CreateCustomEmojiImplCopyWithImpl(_$CreateCustomEmojiImpl _value, - $Res Function(_$CreateCustomEmojiImpl) _then) - : super(_value, _then); +class __$$CreateCustomEmojiImplCopyWithImpl<$Res> extends _$CreateCustomEmojiCopyWithImpl<$Res, _$CreateCustomEmojiImpl> implements _$$CreateCustomEmojiImplCopyWith<$Res> { + __$$CreateCustomEmojiImplCopyWithImpl(_$CreateCustomEmojiImpl _value, $Res Function(_$CreateCustomEmojiImpl) _then) : super(_value, _then); /// Create a copy of CreateCustomEmoji /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? category = null, - Object? shortcode = null, - Object? imageUrl = null, - Object? altText = null, - Object? keywords = null, - Object? auth = freezed, - }) { - return _then(_$CreateCustomEmojiImpl( - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - shortcode: null == shortcode - ? _value.shortcode - : shortcode // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - keywords: null == keywords - ? _value._keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? category = null, Object? shortcode = null, Object? imageUrl = null, Object? altText = null, Object? keywords = null, Object? auth = freezed}) { + return _then( + _$CreateCustomEmojiImpl( + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + shortcode: + null == shortcode + ? _value.shortcode + : shortcode // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + keywords: + null == keywords + ? _value._keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -173,33 +154,26 @@ class __$$CreateCustomEmojiImplCopyWithImpl<$Res> @apiSerde class _$CreateCustomEmojiImpl extends _CreateCustomEmoji { - const _$CreateCustomEmojiImpl( - {required this.category, - required this.shortcode, - required this.imageUrl, - required this.altText, - required final List keywords, - this.auth}) - : _keywords = keywords, - super._(); + const _$CreateCustomEmojiImpl({required this.category, required this.shortcode, required this.imageUrl, required this.altText, required final List keywords, this.auth}) + : _keywords = keywords, + super._(); - factory _$CreateCustomEmojiImpl.fromJson(Map json) => - _$$CreateCustomEmojiImplFromJson(json); + factory _$CreateCustomEmojiImpl.fromJson(Map json) => _$$CreateCustomEmojiImplFromJson(json); @override final String category; -// v0.18.0 + // v0.18.0 @override final String shortcode; -// v0.18.0 + // v0.18.0 @override final String imageUrl; -// v0.18.0 + // v0.18.0 @override final String altText; -// v0.18.0 + // v0.18.0 final List _keywords; -// v0.18.0 + // v0.18.0 @override List get keywords { if (_keywords is EqualUnmodifiableListView) return _keywords; @@ -207,7 +181,7 @@ class _$CreateCustomEmojiImpl extends _CreateCustomEmoji { return EqualUnmodifiableListView(_keywords); } -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -221,12 +195,9 @@ class _$CreateCustomEmojiImpl extends _CreateCustomEmoji { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreateCustomEmojiImpl && - (identical(other.category, category) || - other.category == category) && - (identical(other.shortcode, shortcode) || - other.shortcode == shortcode) && - (identical(other.imageUrl, imageUrl) || - other.imageUrl == imageUrl) && + (identical(other.category, category) || other.category == category) && + (identical(other.shortcode, shortcode) || other.shortcode == shortcode) && + (identical(other.imageUrl, imageUrl) || other.imageUrl == imageUrl) && (identical(other.altText, altText) || other.altText == altText) && const DeepCollectionEquality().equals(other._keywords, _keywords) && (identical(other.auth, auth) || other.auth == auth)); @@ -234,38 +205,33 @@ class _$CreateCustomEmojiImpl extends _CreateCustomEmoji { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, category, shortcode, imageUrl, - altText, const DeepCollectionEquality().hash(_keywords), auth); + int get hashCode => Object.hash(runtimeType, category, shortcode, imageUrl, altText, const DeepCollectionEquality().hash(_keywords), auth); /// Create a copy of CreateCustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateCustomEmojiImplCopyWith<_$CreateCustomEmojiImpl> get copyWith => - __$$CreateCustomEmojiImplCopyWithImpl<_$CreateCustomEmojiImpl>( - this, _$identity); + _$$CreateCustomEmojiImplCopyWith<_$CreateCustomEmojiImpl> get copyWith => __$$CreateCustomEmojiImplCopyWithImpl<_$CreateCustomEmojiImpl>(this, _$identity); @override Map toJson() { - return _$$CreateCustomEmojiImplToJson( - this, - ); + return _$$CreateCustomEmojiImplToJson(this); } } abstract class _CreateCustomEmoji extends CreateCustomEmoji { - const factory _CreateCustomEmoji( - {required final String category, - required final String shortcode, - required final String imageUrl, - required final String altText, - required final List keywords, - final String? auth}) = _$CreateCustomEmojiImpl; + const factory _CreateCustomEmoji({ + required final String category, + required final String shortcode, + required final String imageUrl, + required final String altText, + required final List keywords, + final String? auth, + }) = _$CreateCustomEmojiImpl; const _CreateCustomEmoji._() : super._(); - factory _CreateCustomEmoji.fromJson(Map json) = - _$CreateCustomEmojiImpl.fromJson; + factory _CreateCustomEmoji.fromJson(Map json) = _$CreateCustomEmojiImpl.fromJson; @override String get category; // v0.18.0 @@ -284,8 +250,7 @@ abstract class _CreateCustomEmoji extends CreateCustomEmoji { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateCustomEmojiImplCopyWith<_$CreateCustomEmojiImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateCustomEmojiImplCopyWith<_$CreateCustomEmojiImpl> get copyWith => throw _privateConstructorUsedError; } EditCustomEmoji _$EditCustomEmojiFromJson(Map json) { @@ -307,28 +272,18 @@ mixin _$EditCustomEmoji { /// Create a copy of EditCustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditCustomEmojiCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditCustomEmojiCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditCustomEmojiCopyWith<$Res> { - factory $EditCustomEmojiCopyWith( - EditCustomEmoji value, $Res Function(EditCustomEmoji) then) = - _$EditCustomEmojiCopyWithImpl<$Res, EditCustomEmoji>; + factory $EditCustomEmojiCopyWith(EditCustomEmoji value, $Res Function(EditCustomEmoji) then) = _$EditCustomEmojiCopyWithImpl<$Res, EditCustomEmoji>; @useResult - $Res call( - {int id, - String category, - String imageUrl, - String altText, - List keywords, - String? auth}); + $Res call({int id, String category, String imageUrl, String altText, List keywords, String? auth}); } /// @nodoc -class _$EditCustomEmojiCopyWithImpl<$Res, $Val extends EditCustomEmoji> - implements $EditCustomEmojiCopyWith<$Res> { +class _$EditCustomEmojiCopyWithImpl<$Res, $Val extends EditCustomEmoji> implements $EditCustomEmojiCopyWith<$Res> { _$EditCustomEmojiCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -340,106 +295,96 @@ class _$EditCustomEmojiCopyWithImpl<$Res, $Val extends EditCustomEmoji> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? category = null, - Object? imageUrl = null, - Object? altText = null, - Object? keywords = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - keywords: null == keywords - ? _value.keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = null, Object? category = null, Object? imageUrl = null, Object? altText = null, Object? keywords = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + keywords: + null == keywords + ? _value.keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$EditCustomEmojiImplCopyWith<$Res> - implements $EditCustomEmojiCopyWith<$Res> { - factory _$$EditCustomEmojiImplCopyWith(_$EditCustomEmojiImpl value, - $Res Function(_$EditCustomEmojiImpl) then) = - __$$EditCustomEmojiImplCopyWithImpl<$Res>; +abstract class _$$EditCustomEmojiImplCopyWith<$Res> implements $EditCustomEmojiCopyWith<$Res> { + factory _$$EditCustomEmojiImplCopyWith(_$EditCustomEmojiImpl value, $Res Function(_$EditCustomEmojiImpl) then) = __$$EditCustomEmojiImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String category, - String imageUrl, - String altText, - List keywords, - String? auth}); + $Res call({int id, String category, String imageUrl, String altText, List keywords, String? auth}); } /// @nodoc -class __$$EditCustomEmojiImplCopyWithImpl<$Res> - extends _$EditCustomEmojiCopyWithImpl<$Res, _$EditCustomEmojiImpl> - implements _$$EditCustomEmojiImplCopyWith<$Res> { - __$$EditCustomEmojiImplCopyWithImpl( - _$EditCustomEmojiImpl _value, $Res Function(_$EditCustomEmojiImpl) _then) - : super(_value, _then); +class __$$EditCustomEmojiImplCopyWithImpl<$Res> extends _$EditCustomEmojiCopyWithImpl<$Res, _$EditCustomEmojiImpl> implements _$$EditCustomEmojiImplCopyWith<$Res> { + __$$EditCustomEmojiImplCopyWithImpl(_$EditCustomEmojiImpl _value, $Res Function(_$EditCustomEmojiImpl) _then) : super(_value, _then); /// Create a copy of EditCustomEmoji /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? category = null, - Object? imageUrl = null, - Object? altText = null, - Object? keywords = null, - Object? auth = freezed, - }) { - return _then(_$EditCustomEmojiImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - keywords: null == keywords - ? _value._keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = null, Object? category = null, Object? imageUrl = null, Object? altText = null, Object? keywords = null, Object? auth = freezed}) { + return _then( + _$EditCustomEmojiImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + keywords: + null == keywords + ? _value._keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -447,33 +392,26 @@ class __$$EditCustomEmojiImplCopyWithImpl<$Res> @apiSerde class _$EditCustomEmojiImpl extends _EditCustomEmoji { - const _$EditCustomEmojiImpl( - {required this.id, - required this.category, - required this.imageUrl, - required this.altText, - required final List keywords, - this.auth}) - : _keywords = keywords, - super._(); + const _$EditCustomEmojiImpl({required this.id, required this.category, required this.imageUrl, required this.altText, required final List keywords, this.auth}) + : _keywords = keywords, + super._(); - factory _$EditCustomEmojiImpl.fromJson(Map json) => - _$$EditCustomEmojiImplFromJson(json); + factory _$EditCustomEmojiImpl.fromJson(Map json) => _$$EditCustomEmojiImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String category; -// v0.18.0 + // v0.18.0 @override final String imageUrl; -// v0.18.0 + // v0.18.0 @override final String altText; -// v0.18.0 + // v0.18.0 final List _keywords; -// v0.18.0 + // v0.18.0 @override List get keywords { if (_keywords is EqualUnmodifiableListView) return _keywords; @@ -481,7 +419,7 @@ class _$EditCustomEmojiImpl extends _EditCustomEmoji { return EqualUnmodifiableListView(_keywords); } -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -496,10 +434,8 @@ class _$EditCustomEmojiImpl extends _EditCustomEmoji { (other.runtimeType == runtimeType && other is _$EditCustomEmojiImpl && (identical(other.id, id) || other.id == id) && - (identical(other.category, category) || - other.category == category) && - (identical(other.imageUrl, imageUrl) || - other.imageUrl == imageUrl) && + (identical(other.category, category) || other.category == category) && + (identical(other.imageUrl, imageUrl) || other.imageUrl == imageUrl) && (identical(other.altText, altText) || other.altText == altText) && const DeepCollectionEquality().equals(other._keywords, _keywords) && (identical(other.auth, auth) || other.auth == auth)); @@ -507,38 +443,33 @@ class _$EditCustomEmojiImpl extends _EditCustomEmoji { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, category, imageUrl, altText, - const DeepCollectionEquality().hash(_keywords), auth); + int get hashCode => Object.hash(runtimeType, id, category, imageUrl, altText, const DeepCollectionEquality().hash(_keywords), auth); /// Create a copy of EditCustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditCustomEmojiImplCopyWith<_$EditCustomEmojiImpl> get copyWith => - __$$EditCustomEmojiImplCopyWithImpl<_$EditCustomEmojiImpl>( - this, _$identity); + _$$EditCustomEmojiImplCopyWith<_$EditCustomEmojiImpl> get copyWith => __$$EditCustomEmojiImplCopyWithImpl<_$EditCustomEmojiImpl>(this, _$identity); @override Map toJson() { - return _$$EditCustomEmojiImplToJson( - this, - ); + return _$$EditCustomEmojiImplToJson(this); } } abstract class _EditCustomEmoji extends EditCustomEmoji { - const factory _EditCustomEmoji( - {required final int id, - required final String category, - required final String imageUrl, - required final String altText, - required final List keywords, - final String? auth}) = _$EditCustomEmojiImpl; + const factory _EditCustomEmoji({ + required final int id, + required final String category, + required final String imageUrl, + required final String altText, + required final List keywords, + final String? auth, + }) = _$EditCustomEmojiImpl; const _EditCustomEmoji._() : super._(); - factory _EditCustomEmoji.fromJson(Map json) = - _$EditCustomEmojiImpl.fromJson; + factory _EditCustomEmoji.fromJson(Map json) = _$EditCustomEmojiImpl.fromJson; @override int get id; // v0.18.0 @@ -557,8 +488,7 @@ abstract class _EditCustomEmoji extends EditCustomEmoji { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditCustomEmojiImplCopyWith<_$EditCustomEmojiImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditCustomEmojiImplCopyWith<_$EditCustomEmojiImpl> get copyWith => throw _privateConstructorUsedError; } DeleteCustomEmoji _$DeleteCustomEmojiFromJson(Map json) { @@ -576,22 +506,18 @@ mixin _$DeleteCustomEmoji { /// Create a copy of DeleteCustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteCustomEmojiCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteCustomEmojiCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteCustomEmojiCopyWith<$Res> { - factory $DeleteCustomEmojiCopyWith( - DeleteCustomEmoji value, $Res Function(DeleteCustomEmoji) then) = - _$DeleteCustomEmojiCopyWithImpl<$Res, DeleteCustomEmoji>; + factory $DeleteCustomEmojiCopyWith(DeleteCustomEmoji value, $Res Function(DeleteCustomEmoji) then) = _$DeleteCustomEmojiCopyWithImpl<$Res, DeleteCustomEmoji>; @useResult $Res call({int id, String? auth}); } /// @nodoc -class _$DeleteCustomEmojiCopyWithImpl<$Res, $Val extends DeleteCustomEmoji> - implements $DeleteCustomEmojiCopyWith<$Res> { +class _$DeleteCustomEmojiCopyWithImpl<$Res, $Val extends DeleteCustomEmoji> implements $DeleteCustomEmojiCopyWith<$Res> { _$DeleteCustomEmojiCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -603,60 +529,56 @@ class _$DeleteCustomEmojiCopyWithImpl<$Res, $Val extends DeleteCustomEmoji> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$DeleteCustomEmojiImplCopyWith<$Res> - implements $DeleteCustomEmojiCopyWith<$Res> { - factory _$$DeleteCustomEmojiImplCopyWith(_$DeleteCustomEmojiImpl value, - $Res Function(_$DeleteCustomEmojiImpl) then) = - __$$DeleteCustomEmojiImplCopyWithImpl<$Res>; +abstract class _$$DeleteCustomEmojiImplCopyWith<$Res> implements $DeleteCustomEmojiCopyWith<$Res> { + factory _$$DeleteCustomEmojiImplCopyWith(_$DeleteCustomEmojiImpl value, $Res Function(_$DeleteCustomEmojiImpl) then) = __$$DeleteCustomEmojiImplCopyWithImpl<$Res>; @override @useResult $Res call({int id, String? auth}); } /// @nodoc -class __$$DeleteCustomEmojiImplCopyWithImpl<$Res> - extends _$DeleteCustomEmojiCopyWithImpl<$Res, _$DeleteCustomEmojiImpl> - implements _$$DeleteCustomEmojiImplCopyWith<$Res> { - __$$DeleteCustomEmojiImplCopyWithImpl(_$DeleteCustomEmojiImpl _value, - $Res Function(_$DeleteCustomEmojiImpl) _then) - : super(_value, _then); +class __$$DeleteCustomEmojiImplCopyWithImpl<$Res> extends _$DeleteCustomEmojiCopyWithImpl<$Res, _$DeleteCustomEmojiImpl> implements _$$DeleteCustomEmojiImplCopyWith<$Res> { + __$$DeleteCustomEmojiImplCopyWithImpl(_$DeleteCustomEmojiImpl _value, $Res Function(_$DeleteCustomEmojiImpl) _then) : super(_value, _then); /// Create a copy of DeleteCustomEmoji /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? auth = freezed, - }) { - return _then(_$DeleteCustomEmojiImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = null, Object? auth = freezed}) { + return _then( + _$DeleteCustomEmojiImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -666,12 +588,11 @@ class __$$DeleteCustomEmojiImplCopyWithImpl<$Res> class _$DeleteCustomEmojiImpl extends _DeleteCustomEmoji { const _$DeleteCustomEmojiImpl({required this.id, this.auth}) : super._(); - factory _$DeleteCustomEmojiImpl.fromJson(Map json) => - _$$DeleteCustomEmojiImplFromJson(json); + factory _$DeleteCustomEmojiImpl.fromJson(Map json) => _$$DeleteCustomEmojiImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -683,10 +604,7 @@ class _$DeleteCustomEmojiImpl extends _DeleteCustomEmoji { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DeleteCustomEmojiImpl && - (identical(other.id, id) || other.id == id) && - (identical(other.auth, auth) || other.auth == auth)); + (other.runtimeType == runtimeType && other is _$DeleteCustomEmojiImpl && (identical(other.id, id) || other.id == id) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -698,25 +616,19 @@ class _$DeleteCustomEmojiImpl extends _DeleteCustomEmoji { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteCustomEmojiImplCopyWith<_$DeleteCustomEmojiImpl> get copyWith => - __$$DeleteCustomEmojiImplCopyWithImpl<_$DeleteCustomEmojiImpl>( - this, _$identity); + _$$DeleteCustomEmojiImplCopyWith<_$DeleteCustomEmojiImpl> get copyWith => __$$DeleteCustomEmojiImplCopyWithImpl<_$DeleteCustomEmojiImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteCustomEmojiImplToJson( - this, - ); + return _$$DeleteCustomEmojiImplToJson(this); } } abstract class _DeleteCustomEmoji extends DeleteCustomEmoji { - const factory _DeleteCustomEmoji( - {required final int id, final String? auth}) = _$DeleteCustomEmojiImpl; + const factory _DeleteCustomEmoji({required final int id, final String? auth}) = _$DeleteCustomEmojiImpl; const _DeleteCustomEmoji._() : super._(); - factory _DeleteCustomEmoji.fromJson(Map json) = - _$DeleteCustomEmojiImpl.fromJson; + factory _DeleteCustomEmoji.fromJson(Map json) = _$DeleteCustomEmojiImpl.fromJson; @override int get id; // v0.18.0 @@ -727,6 +639,5 @@ abstract class _DeleteCustomEmoji extends DeleteCustomEmoji { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteCustomEmojiImplCopyWith<_$DeleteCustomEmojiImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DeleteCustomEmojiImplCopyWith<_$DeleteCustomEmojiImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/custom_emoji/custom_emoji.g.dart b/lib/src/v3/api/custom_emoji/custom_emoji.g.dart index 38abe812..2edac169 100644 --- a/lib/src/v3/api/custom_emoji/custom_emoji.g.dart +++ b/lib/src/v3/api/custom_emoji/custom_emoji.g.dart @@ -6,89 +6,42 @@ part of 'custom_emoji.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CreateCustomEmojiImpl _$$CreateCustomEmojiImplFromJson( - Map json) => - _$CreateCustomEmojiImpl( - category: json['category'] as String, - shortcode: json['shortcode'] as String, - imageUrl: json['image_url'] as String, - altText: json['alt_text'] as String, - keywords: - (json['keywords'] as List).map((e) => e as String).toList(), - auth: json['auth'] as String?, - ); - -Map _$$CreateCustomEmojiImplToJson( - _$CreateCustomEmojiImpl instance) { - final val = { - 'category': instance.category, - 'shortcode': instance.shortcode, - 'image_url': instance.imageUrl, - 'alt_text': instance.altText, - 'keywords': instance.keywords, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$EditCustomEmojiImpl _$$EditCustomEmojiImplFromJson( - Map json) => - _$EditCustomEmojiImpl( - id: (json['id'] as num).toInt(), - category: json['category'] as String, - imageUrl: json['image_url'] as String, - altText: json['alt_text'] as String, - keywords: - (json['keywords'] as List).map((e) => e as String).toList(), - auth: json['auth'] as String?, - ); - -Map _$$EditCustomEmojiImplToJson( - _$EditCustomEmojiImpl instance) { - final val = { - 'id': instance.id, - 'category': instance.category, - 'image_url': instance.imageUrl, - 'alt_text': instance.altText, - 'keywords': instance.keywords, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$DeleteCustomEmojiImpl _$$DeleteCustomEmojiImplFromJson( - Map json) => - _$DeleteCustomEmojiImpl( - id: (json['id'] as num).toInt(), - auth: json['auth'] as String?, - ); - -Map _$$DeleteCustomEmojiImplToJson( - _$DeleteCustomEmojiImpl instance) { - final val = { - 'id': instance.id, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +_$CreateCustomEmojiImpl _$$CreateCustomEmojiImplFromJson(Map json) => _$CreateCustomEmojiImpl( + category: json['category'] as String, + shortcode: json['shortcode'] as String, + imageUrl: json['image_url'] as String, + altText: json['alt_text'] as String, + keywords: (json['keywords'] as List).map((e) => e as String).toList(), + auth: json['auth'] as String?, +); + +Map _$$CreateCustomEmojiImplToJson(_$CreateCustomEmojiImpl instance) => { + 'category': instance.category, + 'shortcode': instance.shortcode, + 'image_url': instance.imageUrl, + 'alt_text': instance.altText, + 'keywords': instance.keywords, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditCustomEmojiImpl _$$EditCustomEmojiImplFromJson(Map json) => _$EditCustomEmojiImpl( + id: (json['id'] as num).toInt(), + category: json['category'] as String, + imageUrl: json['image_url'] as String, + altText: json['alt_text'] as String, + keywords: (json['keywords'] as List).map((e) => e as String).toList(), + auth: json['auth'] as String?, +); + +Map _$$EditCustomEmojiImplToJson(_$EditCustomEmojiImpl instance) => { + 'id': instance.id, + 'category': instance.category, + 'image_url': instance.imageUrl, + 'alt_text': instance.altText, + 'keywords': instance.keywords, + if (instance.auth case final value?) 'auth': value, +}; + +_$DeleteCustomEmojiImpl _$$DeleteCustomEmojiImplFromJson(Map json) => _$DeleteCustomEmojiImpl(id: (json['id'] as num).toInt(), auth: json['auth'] as String?); + +Map _$$DeleteCustomEmojiImplToJson(_$DeleteCustomEmojiImpl instance) => {'id': instance.id, if (instance.auth case final value?) 'auth': value}; diff --git a/lib/src/v3/api/federated_instances/federated_instances.dart b/lib/src/v3/api/federated_instances/federated_instances.dart index a5ae3aa3..7356f596 100644 --- a/lib/src/v3/api/federated_instances/federated_instances.dart +++ b/lib/src/v3/api/federated_instances/federated_instances.dart @@ -11,25 +11,17 @@ part 'federated_instances.g.dart'; /// /// `HTTP.GET /federated_instances` @freezed -class GetFederatedInstances - with _$GetFederatedInstances - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetFederatedInstances with _$GetFederatedInstances implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetFederatedInstances({ - String? auth, - }) = _GetFederatedInstances; + const factory GetFederatedInstances({String? auth}) = _GetFederatedInstances; const GetFederatedInstances._(); - factory GetFederatedInstances.fromJson(Map json) => - _$GetFederatedInstancesFromJson(json); + factory GetFederatedInstances.fromJson(Map json) => _$GetFederatedInstancesFromJson(json); final path = '/federated_instances'; final httpMethod = HttpMethod.get; @override - GetFederatedInstancesResponse responseFactory(Map json) => - GetFederatedInstancesResponse.fromJson(json); + GetFederatedInstancesResponse responseFactory(Map json) => GetFederatedInstancesResponse.fromJson(json); } diff --git a/lib/src/v3/api/federated_instances/federated_instances.freezed.dart b/lib/src/v3/api/federated_instances/federated_instances.freezed.dart index 3777b793..42b88980 100644 --- a/lib/src/v3/api/federated_instances/federated_instances.freezed.dart +++ b/lib/src/v3/api/federated_instances/federated_instances.freezed.dart @@ -12,10 +12,10 @@ part of 'federated_instances.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetFederatedInstances _$GetFederatedInstancesFromJson( - Map json) { +GetFederatedInstances _$GetFederatedInstancesFromJson(Map json) { return _GetFederatedInstances.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$GetFederatedInstances { /// Create a copy of GetFederatedInstances /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetFederatedInstancesCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetFederatedInstancesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetFederatedInstancesCopyWith<$Res> { - factory $GetFederatedInstancesCopyWith(GetFederatedInstances value, - $Res Function(GetFederatedInstances) then) = - _$GetFederatedInstancesCopyWithImpl<$Res, GetFederatedInstances>; + factory $GetFederatedInstancesCopyWith(GetFederatedInstances value, $Res Function(GetFederatedInstances) then) = _$GetFederatedInstancesCopyWithImpl<$Res, GetFederatedInstances>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetFederatedInstancesCopyWithImpl<$Res, - $Val extends GetFederatedInstances> - implements $GetFederatedInstancesCopyWith<$Res> { +class _$GetFederatedInstancesCopyWithImpl<$Res, $Val extends GetFederatedInstances> implements $GetFederatedInstancesCopyWith<$Res> { _$GetFederatedInstancesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$GetFederatedInstancesCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetFederatedInstancesImplCopyWith<$Res> - implements $GetFederatedInstancesCopyWith<$Res> { - factory _$$GetFederatedInstancesImplCopyWith( - _$GetFederatedInstancesImpl value, - $Res Function(_$GetFederatedInstancesImpl) then) = - __$$GetFederatedInstancesImplCopyWithImpl<$Res>; +abstract class _$$GetFederatedInstancesImplCopyWith<$Res> implements $GetFederatedInstancesCopyWith<$Res> { + factory _$$GetFederatedInstancesImplCopyWith(_$GetFederatedInstancesImpl value, $Res Function(_$GetFederatedInstancesImpl) then) = __$$GetFederatedInstancesImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GetFederatedInstancesImplCopyWithImpl<$Res> - extends _$GetFederatedInstancesCopyWithImpl<$Res, - _$GetFederatedInstancesImpl> - implements _$$GetFederatedInstancesImplCopyWith<$Res> { - __$$GetFederatedInstancesImplCopyWithImpl(_$GetFederatedInstancesImpl _value, - $Res Function(_$GetFederatedInstancesImpl) _then) - : super(_value, _then); +class __$$GetFederatedInstancesImplCopyWithImpl<$Res> extends _$GetFederatedInstancesCopyWithImpl<$Res, _$GetFederatedInstancesImpl> implements _$$GetFederatedInstancesImplCopyWith<$Res> { + __$$GetFederatedInstancesImplCopyWithImpl(_$GetFederatedInstancesImpl _value, $Res Function(_$GetFederatedInstancesImpl) _then) : super(_value, _then); /// Create a copy of GetFederatedInstances /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetFederatedInstancesImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetFederatedInstancesImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -112,8 +101,7 @@ class __$$GetFederatedInstancesImplCopyWithImpl<$Res> class _$GetFederatedInstancesImpl extends _GetFederatedInstances { const _$GetFederatedInstancesImpl({this.auth}) : super._(); - factory _$GetFederatedInstancesImpl.fromJson(Map json) => - _$$GetFederatedInstancesImplFromJson(json); + factory _$GetFederatedInstancesImpl.fromJson(Map json) => _$$GetFederatedInstancesImplFromJson(json); @override final String? auth; @@ -125,10 +113,7 @@ class _$GetFederatedInstancesImpl extends _GetFederatedInstances { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetFederatedInstancesImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetFederatedInstancesImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -140,25 +125,19 @@ class _$GetFederatedInstancesImpl extends _GetFederatedInstances { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetFederatedInstancesImplCopyWith<_$GetFederatedInstancesImpl> - get copyWith => __$$GetFederatedInstancesImplCopyWithImpl< - _$GetFederatedInstancesImpl>(this, _$identity); + _$$GetFederatedInstancesImplCopyWith<_$GetFederatedInstancesImpl> get copyWith => __$$GetFederatedInstancesImplCopyWithImpl<_$GetFederatedInstancesImpl>(this, _$identity); @override Map toJson() { - return _$$GetFederatedInstancesImplToJson( - this, - ); + return _$$GetFederatedInstancesImplToJson(this); } } abstract class _GetFederatedInstances extends GetFederatedInstances { - const factory _GetFederatedInstances({final String? auth}) = - _$GetFederatedInstancesImpl; + const factory _GetFederatedInstances({final String? auth}) = _$GetFederatedInstancesImpl; const _GetFederatedInstances._() : super._(); - factory _GetFederatedInstances.fromJson(Map json) = - _$GetFederatedInstancesImpl.fromJson; + factory _GetFederatedInstances.fromJson(Map json) = _$GetFederatedInstancesImpl.fromJson; @override String? get auth; @@ -167,6 +146,5 @@ abstract class _GetFederatedInstances extends GetFederatedInstances { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetFederatedInstancesImplCopyWith<_$GetFederatedInstancesImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetFederatedInstancesImplCopyWith<_$GetFederatedInstancesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/federated_instances/federated_instances.g.dart b/lib/src/v3/api/federated_instances/federated_instances.g.dart index b71fa241..707f7109 100644 --- a/lib/src/v3/api/federated_instances/federated_instances.g.dart +++ b/lib/src/v3/api/federated_instances/federated_instances.g.dart @@ -6,22 +6,6 @@ part of 'federated_instances.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetFederatedInstancesImpl _$$GetFederatedInstancesImplFromJson( - Map json) => - _$GetFederatedInstancesImpl( - auth: json['auth'] as String?, - ); +_$GetFederatedInstancesImpl _$$GetFederatedInstancesImplFromJson(Map json) => _$GetFederatedInstancesImpl(auth: json['auth'] as String?); -Map _$$GetFederatedInstancesImplToJson( - _$GetFederatedInstancesImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +Map _$$GetFederatedInstancesImplToJson(_$GetFederatedInstancesImpl instance) => {if (instance.auth case final value?) 'auth': value}; diff --git a/lib/src/v3/api/modlog/modlog.dart b/lib/src/v3/api/modlog/modlog.dart index febbda82..5ae93b99 100644 --- a/lib/src/v3/api/modlog/modlog.dart +++ b/lib/src/v3/api/modlog/modlog.dart @@ -12,9 +12,7 @@ part 'modlog.g.dart'; /// /// `HTTP.GET /modlog` @freezed -class GetModlog - with _$GetModlog - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetModlog with _$GetModlog implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetModlog({ int? modPersonId, // v0.18.0 @@ -29,14 +27,12 @@ class GetModlog }) = _GetModlog; const GetModlog._(); - factory GetModlog.fromJson(Map json) => - _$GetModlogFromJson(json); + factory GetModlog.fromJson(Map json) => _$GetModlogFromJson(json); final path = '/modlog'; final httpMethod = HttpMethod.get; @override - GetModlogResponse responseFactory(Map json) => - GetModlogResponse.fromJson(json); + GetModlogResponse responseFactory(Map json) => GetModlogResponse.fromJson(json); } diff --git a/lib/src/v3/api/modlog/modlog.freezed.dart b/lib/src/v3/api/modlog/modlog.freezed.dart index dac46256..0756ddb2 100644 --- a/lib/src/v3/api/modlog/modlog.freezed.dart +++ b/lib/src/v3/api/modlog/modlog.freezed.dart @@ -12,7 +12,8 @@ part of 'modlog.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetModlog _$GetModlogFromJson(Map json) { return _GetModlog.fromJson(json); @@ -28,8 +29,7 @@ mixin _$GetModlog { ModlogActionType? get type => throw _privateConstructorUsedError; // v0.18.0 int? get otherPersonId => throw _privateConstructorUsedError; // v0.18.0 int? get postId => throw _privateConstructorUsedError; // v0.19.4 (optional) - int? get commentId => - throw _privateConstructorUsedError; // v0.19.4 (optional) + int? get commentId => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this GetModlog to a JSON map. @@ -38,30 +38,18 @@ mixin _$GetModlog { /// Create a copy of GetModlog /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetModlogCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetModlogCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetModlogCopyWith<$Res> { - factory $GetModlogCopyWith(GetModlog value, $Res Function(GetModlog) then) = - _$GetModlogCopyWithImpl<$Res, GetModlog>; + factory $GetModlogCopyWith(GetModlog value, $Res Function(GetModlog) then) = _$GetModlogCopyWithImpl<$Res, GetModlog>; @useResult - $Res call( - {int? modPersonId, - int? communityId, - int? page, - int? limit, - @JsonKey(name: 'type_') ModlogActionType? type, - int? otherPersonId, - int? postId, - int? commentId, - String? auth}); + $Res call({int? modPersonId, int? communityId, int? page, int? limit, @JsonKey(name: 'type_') ModlogActionType? type, int? otherPersonId, int? postId, int? commentId, String? auth}); } /// @nodoc -class _$GetModlogCopyWithImpl<$Res, $Val extends GetModlog> - implements $GetModlogCopyWith<$Res> { +class _$GetModlogCopyWithImpl<$Res, $Val extends GetModlog> implements $GetModlogCopyWith<$Res> { _$GetModlogCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -84,74 +72,70 @@ class _$GetModlogCopyWithImpl<$Res, $Val extends GetModlog> Object? commentId = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - modPersonId: freezed == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ModlogActionType?, - otherPersonId: freezed == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + modPersonId: + freezed == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ModlogActionType?, + otherPersonId: + freezed == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetModlogImplCopyWith<$Res> - implements $GetModlogCopyWith<$Res> { - factory _$$GetModlogImplCopyWith( - _$GetModlogImpl value, $Res Function(_$GetModlogImpl) then) = - __$$GetModlogImplCopyWithImpl<$Res>; +abstract class _$$GetModlogImplCopyWith<$Res> implements $GetModlogCopyWith<$Res> { + factory _$$GetModlogImplCopyWith(_$GetModlogImpl value, $Res Function(_$GetModlogImpl) then) = __$$GetModlogImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? modPersonId, - int? communityId, - int? page, - int? limit, - @JsonKey(name: 'type_') ModlogActionType? type, - int? otherPersonId, - int? postId, - int? commentId, - String? auth}); + $Res call({int? modPersonId, int? communityId, int? page, int? limit, @JsonKey(name: 'type_') ModlogActionType? type, int? otherPersonId, int? postId, int? commentId, String? auth}); } /// @nodoc -class __$$GetModlogImplCopyWithImpl<$Res> - extends _$GetModlogCopyWithImpl<$Res, _$GetModlogImpl> - implements _$$GetModlogImplCopyWith<$Res> { - __$$GetModlogImplCopyWithImpl( - _$GetModlogImpl _value, $Res Function(_$GetModlogImpl) _then) - : super(_value, _then); +class __$$GetModlogImplCopyWithImpl<$Res> extends _$GetModlogCopyWithImpl<$Res, _$GetModlogImpl> implements _$$GetModlogImplCopyWith<$Res> { + __$$GetModlogImplCopyWithImpl(_$GetModlogImpl _value, $Res Function(_$GetModlogImpl) _then) : super(_value, _then); /// Create a copy of GetModlog /// with the given fields replaced by the non-null parameter values. @@ -168,44 +152,55 @@ class __$$GetModlogImplCopyWithImpl<$Res> Object? commentId = freezed, Object? auth = freezed, }) { - return _then(_$GetModlogImpl( - modPersonId: freezed == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ModlogActionType?, - otherPersonId: freezed == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$GetModlogImpl( + modPersonId: + freezed == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ModlogActionType?, + otherPersonId: + freezed == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -213,46 +208,35 @@ class __$$GetModlogImplCopyWithImpl<$Res> @apiSerde class _$GetModlogImpl extends _GetModlog { - const _$GetModlogImpl( - {this.modPersonId, - this.communityId, - this.page, - this.limit, - @JsonKey(name: 'type_') this.type, - this.otherPersonId, - this.postId, - this.commentId, - this.auth}) - : super._(); + const _$GetModlogImpl({this.modPersonId, this.communityId, this.page, this.limit, @JsonKey(name: 'type_') this.type, this.otherPersonId, this.postId, this.commentId, this.auth}) : super._(); - factory _$GetModlogImpl.fromJson(Map json) => - _$$GetModlogImplFromJson(json); + factory _$GetModlogImpl.fromJson(Map json) => _$$GetModlogImplFromJson(json); @override final int? modPersonId; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'type_') final ModlogActionType? type; -// v0.18.0 + // v0.18.0 @override final int? otherPersonId; -// v0.18.0 + // v0.18.0 @override final int? postId; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final int? commentId; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -266,57 +250,49 @@ class _$GetModlogImpl extends _GetModlog { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetModlogImpl && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.type, type) || other.type == type) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, modPersonId, communityId, page, - limit, type, otherPersonId, postId, commentId, auth); + int get hashCode => Object.hash(runtimeType, modPersonId, communityId, page, limit, type, otherPersonId, postId, commentId, auth); /// Create a copy of GetModlog /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetModlogImplCopyWith<_$GetModlogImpl> get copyWith => - __$$GetModlogImplCopyWithImpl<_$GetModlogImpl>(this, _$identity); + _$$GetModlogImplCopyWith<_$GetModlogImpl> get copyWith => __$$GetModlogImplCopyWithImpl<_$GetModlogImpl>(this, _$identity); @override Map toJson() { - return _$$GetModlogImplToJson( - this, - ); + return _$$GetModlogImplToJson(this); } } abstract class _GetModlog extends GetModlog { - const factory _GetModlog( - {final int? modPersonId, - final int? communityId, - final int? page, - final int? limit, - @JsonKey(name: 'type_') final ModlogActionType? type, - final int? otherPersonId, - final int? postId, - final int? commentId, - final String? auth}) = _$GetModlogImpl; + const factory _GetModlog({ + final int? modPersonId, + final int? communityId, + final int? page, + final int? limit, + @JsonKey(name: 'type_') final ModlogActionType? type, + final int? otherPersonId, + final int? postId, + final int? commentId, + final String? auth, + }) = _$GetModlogImpl; const _GetModlog._() : super._(); - factory _GetModlog.fromJson(Map json) = - _$GetModlogImpl.fromJson; + factory _GetModlog.fromJson(Map json) = _$GetModlogImpl.fromJson; @override int? get modPersonId; // v0.18.0 @@ -342,6 +318,5 @@ abstract class _GetModlog extends GetModlog { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetModlogImplCopyWith<_$GetModlogImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetModlogImplCopyWith<_$GetModlogImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/modlog/modlog.g.dart b/lib/src/v3/api/modlog/modlog.g.dart index 2f35a090..f218baff 100644 --- a/lib/src/v3/api/modlog/modlog.g.dart +++ b/lib/src/v3/api/modlog/modlog.g.dart @@ -6,38 +6,26 @@ part of 'modlog.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetModlogImpl _$$GetModlogImplFromJson(Map json) => - _$GetModlogImpl( - modPersonId: (json['mod_person_id'] as num?)?.toInt(), - communityId: (json['community_id'] as num?)?.toInt(), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - type: json['type_'] == null - ? null - : ModlogActionType.fromJson(json['type_'] as String), - otherPersonId: (json['other_person_id'] as num?)?.toInt(), - postId: (json['post_id'] as num?)?.toInt(), - commentId: (json['comment_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); +_$GetModlogImpl _$$GetModlogImplFromJson(Map json) => _$GetModlogImpl( + modPersonId: (json['mod_person_id'] as num?)?.toInt(), + communityId: (json['community_id'] as num?)?.toInt(), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + type: json['type_'] == null ? null : ModlogActionType.fromJson(json['type_'] as String), + otherPersonId: (json['other_person_id'] as num?)?.toInt(), + postId: (json['post_id'] as num?)?.toInt(), + commentId: (json['comment_id'] as num?)?.toInt(), + auth: json['auth'] as String?, +); -Map _$$GetModlogImplToJson(_$GetModlogImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('mod_person_id', instance.modPersonId); - writeNotNull('community_id', instance.communityId); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('type_', instance.type?.toJson()); - writeNotNull('other_person_id', instance.otherPersonId); - writeNotNull('post_id', instance.postId); - writeNotNull('comment_id', instance.commentId); - writeNotNull('auth', instance.auth); - return val; -} +Map _$$GetModlogImplToJson(_$GetModlogImpl instance) => { + if (instance.modPersonId case final value?) 'mod_person_id': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.type?.toJson() case final value?) 'type_': value, + if (instance.otherPersonId case final value?) 'other_person_id': value, + if (instance.postId case final value?) 'post_id': value, + if (instance.commentId case final value?) 'comment_id': value, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/post/post.dart b/lib/src/v3/api/post/post.dart index 18d6f79f..0b62c506 100644 --- a/lib/src/v3/api/post/post.dart +++ b/lib/src/v3/api/post/post.dart @@ -12,9 +12,7 @@ part 'post.g.dart'; /// /// `HTTP.POST /post` @freezed -class CreatePost - with _$CreatePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreatePost with _$CreatePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreatePost({ required String name, // v0.18.0 @@ -30,25 +28,21 @@ class CreatePost }) = _CreatePost; const CreatePost._(); - factory CreatePost.fromJson(Map json) => - _$CreatePostFromJson(json); + factory CreatePost.fromJson(Map json) => _$CreatePostFromJson(json); final path = '/post'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Get / fetch a post. /// /// `HTTP.GET /post` @freezed -class GetPost - with _$GetPost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetPost with _$GetPost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetPost({ int? id, // v0.18.0 @@ -57,25 +51,21 @@ class GetPost }) = _GetPost; const GetPost._(); - factory GetPost.fromJson(Map json) => - _$GetPostFromJson(json); + factory GetPost.fromJson(Map json) => _$GetPostFromJson(json); final path = '/post'; final httpMethod = HttpMethod.get; @override - GetPostResponse responseFactory(Map json) => - GetPostResponse.fromJson(json); + GetPostResponse responseFactory(Map json) => GetPostResponse.fromJson(json); } /// Edit a post. /// /// `HTTP.PUT /post` @freezed -class EditPost - with _$EditPost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class EditPost with _$EditPost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditPost({ required int postId, // v0.18.0 @@ -90,25 +80,21 @@ class EditPost }) = _EditPost; const EditPost._(); - factory EditPost.fromJson(Map json) => - _$EditPostFromJson(json); + factory EditPost.fromJson(Map json) => _$EditPostFromJson(json); final path = '/post'; final httpMethod = HttpMethod.put; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Delete a post. /// /// `HTTP.POST /post/delete` @freezed -class DeletePost - with _$DeletePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class DeletePost with _$DeletePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeletePost({ required int postId, // v0.18.0 @@ -117,25 +103,21 @@ class DeletePost }) = _DeletePost; const DeletePost._(); - factory DeletePost.fromJson(Map json) => - _$DeletePostFromJson(json); + factory DeletePost.fromJson(Map json) => _$DeletePostFromJson(json); final path = '/post/delete'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// A moderator remove for a post. /// /// `HTTP.POST /post/remove` @freezed -class RemovePost - with _$RemovePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class RemovePost with _$RemovePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory RemovePost({ required int postId, // v0.18.0 @@ -145,48 +127,38 @@ class RemovePost }) = _RemovePost; const RemovePost._(); - factory RemovePost.fromJson(Map json) => - _$RemovePostFromJson(json); + factory RemovePost.fromJson(Map json) => _$RemovePostFromJson(json); final path = '/post/remove'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Mark a post as read. /// /// `HTTP.POST /post/mark_as_read` @freezed -class MarkPostAsRead - with _$MarkPostAsRead - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class MarkPostAsRead with _$MarkPostAsRead implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory MarkPostAsRead({ - @deprecated - int? - postId, // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] + @deprecated int? postId, // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] List? postIds, // v0.19.0 (optional) required bool read, // v0.18.0 String? auth, }) = _MarkPostAsRead; const MarkPostAsRead._(); - factory MarkPostAsRead.fromJson(Map json) => - _$MarkPostAsReadFromJson(json); + factory MarkPostAsRead.fromJson(Map json) => _$MarkPostAsReadFromJson(json); final path = '/post/mark_as_read'; final httpMethod = HttpMethod.post; @override - MarkPostAsReadResponse responseFactory(Map json) => - MarkPostAsReadResponse.fromJson(json); + MarkPostAsReadResponse responseFactory(Map json) => MarkPostAsReadResponse.fromJson(json); } /// Only available in lemmy v0.19.4 and above @@ -195,9 +167,7 @@ class MarkPostAsRead /// /// `HTTP.POST /post/hide` @freezed -class HidePost - with _$HidePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class HidePost with _$HidePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory HidePost({ required List postIds, // v0.19.4 (required) @@ -206,25 +176,21 @@ class HidePost }) = _HidePost; const HidePost._(); - factory HidePost.fromJson(Map json) => - _$HidePostFromJson(json); + factory HidePost.fromJson(Map json) => _$HidePostFromJson(json); final path = '/post/hide'; final httpMethod = HttpMethod.post; @override - SuccessResponse responseFactory(Map json) => - SuccessResponse.fromJson(json); + SuccessResponse responseFactory(Map json) => SuccessResponse.fromJson(json); } /// A moderator can lock a post ( IE disable new comments ). /// /// `HTTP.POST /post/lock` @freezed -class LockPost - with _$LockPost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class LockPost with _$LockPost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory LockPost({ required int postId, // v0.18.0 @@ -233,25 +199,21 @@ class LockPost }) = _LockPost; const LockPost._(); - factory LockPost.fromJson(Map json) => - _$LockPostFromJson(json); + factory LockPost.fromJson(Map json) => _$LockPostFromJson(json); final path = '/post/lock'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// A moderator can feature a community post ( IE stick it to the top of a community ). /// /// `HTTP.POST /post/feature` @freezed -class FeaturePost - with _$FeaturePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class FeaturePost with _$FeaturePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory FeaturePost({ required int postId, // v0.18.0 @@ -261,25 +223,21 @@ class FeaturePost }) = _FeaturePost; const FeaturePost._(); - factory FeaturePost.fromJson(Map json) => - _$FeaturePostFromJson(json); + factory FeaturePost.fromJson(Map json) => _$FeaturePostFromJson(json); final path = '/post/feature'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Get / fetch posts, with various filters. /// /// `HTTP.GET /post/list` @freezed -class GetPosts - with _$GetPosts - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetPosts with _$GetPosts implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetPosts({ @JsonKey(name: 'type_') ListingType? type, // v0.18.0 @@ -300,25 +258,21 @@ class GetPosts }) = _GetPosts; const GetPosts._(); - factory GetPosts.fromJson(Map json) => - _$GetPostsFromJson(json); + factory GetPosts.fromJson(Map json) => _$GetPostsFromJson(json); final path = '/post/list'; final httpMethod = HttpMethod.get; @override - GetPostsResponse responseFactory(Map json) => - GetPostsResponse.fromJson(json); + GetPostsResponse responseFactory(Map json) => GetPostsResponse.fromJson(json); } /// Like / vote on a post. /// /// `HTTP.POST /post/like` @freezed -class CreatePostLike - with _$CreatePostLike - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreatePostLike with _$CreatePostLike implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreatePostLike({ required int postId, // v0.18.0 @@ -327,16 +281,14 @@ class CreatePostLike }) = _CreatePostLike; const CreatePostLike._(); - factory CreatePostLike.fromJson(Map json) => - _$CreatePostLikeFromJson(json); + factory CreatePostLike.fromJson(Map json) => _$CreatePostLikeFromJson(json); final path = '/post/like'; final httpMethod = HttpMethod.post; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Only available in lemmy v0.19.2 and above @@ -345,11 +297,7 @@ class CreatePostLike /// /// `HTTP.GET /post/like/list` @freezed -class ListPostLikes - with _$ListPostLikes - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListPostLikes with _$ListPostLikes implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListPostLikes({ required int postId, // v0.19.2 (required) @@ -359,25 +307,21 @@ class ListPostLikes }) = _ListPostLikes; const ListPostLikes._(); - factory ListPostLikes.fromJson(Map json) => - _$ListPostLikesFromJson(json); + factory ListPostLikes.fromJson(Map json) => _$ListPostLikesFromJson(json); final path = '/post/like/list'; final httpMethod = HttpMethod.get; @override - ListPostLikesResponse responseFactory(Map json) => - ListPostLikesResponse.fromJson(json); + ListPostLikesResponse responseFactory(Map json) => ListPostLikesResponse.fromJson(json); } /// Save a post. /// /// `HTTP.PUT /post/save` @freezed -class SavePost - with _$SavePost - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class SavePost with _$SavePost implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory SavePost({ required int postId, // v0.18.0 @@ -386,25 +330,21 @@ class SavePost }) = _SavePost; const SavePost._(); - factory SavePost.fromJson(Map json) => - _$SavePostFromJson(json); + factory SavePost.fromJson(Map json) => _$SavePostFromJson(json); final path = '/post/save'; final httpMethod = HttpMethod.put; @override - PostResponse responseFactory(Map json) => - PostResponse.fromJson(json); + PostResponse responseFactory(Map json) => PostResponse.fromJson(json); } /// Report a post. /// /// `HTTP.POST /post/report` @freezed -class CreatePostReport - with _$CreatePostReport - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreatePostReport with _$CreatePostReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreatePostReport({ required int postId, // v0.18.0 @@ -413,25 +353,21 @@ class CreatePostReport }) = _CreatePostReport; const CreatePostReport._(); - factory CreatePostReport.fromJson(Map json) => - _$CreatePostReportFromJson(json); + factory CreatePostReport.fromJson(Map json) => _$CreatePostReportFromJson(json); final path = '/post/report'; final httpMethod = HttpMethod.post; @override - PostReportResponse responseFactory(Map json) => - PostReportResponse.fromJson(json); + PostReportResponse responseFactory(Map json) => PostReportResponse.fromJson(json); } /// Resolve a post report. Only a mod can do this. /// /// `HTTP.PUT /post/report/resolve` @freezed -class ResolvePostReport - with _$ResolvePostReport - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ResolvePostReport with _$ResolvePostReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ResolvePostReport({ required int reportId, // v0.18.0 @@ -440,27 +376,21 @@ class ResolvePostReport }) = _ResolvePostReport; const ResolvePostReport._(); - factory ResolvePostReport.fromJson(Map json) => - _$ResolvePostReportFromJson(json); + factory ResolvePostReport.fromJson(Map json) => _$ResolvePostReportFromJson(json); final path = '/post/report/resolve'; final httpMethod = HttpMethod.put; @override - PostReportResponse responseFactory(Map json) => - PostReportResponse.fromJson(json); + PostReportResponse responseFactory(Map json) => PostReportResponse.fromJson(json); } /// List post reports. /// /// `HTTP.GET /post/report/list` @freezed -class ListPostReports - with _$ListPostReports - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListPostReports with _$ListPostReports implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListPostReports({ int? page, // v0.18.0 @@ -472,39 +402,33 @@ class ListPostReports }) = _ListPostReports; const ListPostReports._(); - factory ListPostReports.fromJson(Map json) => - _$ListPostReportsFromJson(json); + factory ListPostReports.fromJson(Map json) => _$ListPostReportsFromJson(json); final path = '/post/report/list'; final httpMethod = HttpMethod.get; @override - ListPostReportsResponse responseFactory(Map json) => - ListPostReportsResponse.fromJson(json); + ListPostReportsResponse responseFactory(Map json) => ListPostReportsResponse.fromJson(json); } /// Fetch metadata for any given site. /// /// `HTTP.GET /post/site_metadata` @freezed -class GetSiteMetadata - with _$GetSiteMetadata - implements LemmyApiQuery { +class GetSiteMetadata with _$GetSiteMetadata implements LemmyApiQuery { @apiSerde const factory GetSiteMetadata({ required String url, // v0.18.0 }) = _GetSiteMetadata; const GetSiteMetadata._(); - factory GetSiteMetadata.fromJson(Map json) => - _$GetSiteMetadataFromJson(json); + factory GetSiteMetadata.fromJson(Map json) => _$GetSiteMetadataFromJson(json); final path = '/post/site_metadata'; final httpMethod = HttpMethod.get; @override - GetSiteMetadataResponse responseFactory(Map json) => - GetSiteMetadataResponse.fromJson(json); + GetSiteMetadataResponse responseFactory(Map json) => GetSiteMetadataResponse.fromJson(json); } diff --git a/lib/src/v3/api/post/post.freezed.dart b/lib/src/v3/api/post/post.freezed.dart index 9fbb85ab..5a81adb2 100644 --- a/lib/src/v3/api/post/post.freezed.dart +++ b/lib/src/v3/api/post/post.freezed.dart @@ -12,7 +12,8 @@ part of 'post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CreatePost _$CreatePostFromJson(Map json) { return _CreatePost.fromJson(json); @@ -24,13 +25,11 @@ mixin _$CreatePost { int get communityId => throw _privateConstructorUsedError; // v0.18.0 String? get url => throw _privateConstructorUsedError; // v0.18.0 String? get body => throw _privateConstructorUsedError; // v0.18.0 - String? get altText => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get altText => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get honeypot => throw _privateConstructorUsedError; // v0.18.0 bool? get nsfw => throw _privateConstructorUsedError; // v0.18.0 int? get languageId => throw _privateConstructorUsedError; // v0.18.0 - String? get customThumbnail => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get customThumbnail => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this CreatePost to a JSON map. @@ -39,32 +38,18 @@ mixin _$CreatePost { /// Create a copy of CreatePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreatePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreatePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreatePostCopyWith<$Res> { - factory $CreatePostCopyWith( - CreatePost value, $Res Function(CreatePost) then) = - _$CreatePostCopyWithImpl<$Res, CreatePost>; + factory $CreatePostCopyWith(CreatePost value, $Res Function(CreatePost) then) = _$CreatePostCopyWithImpl<$Res, CreatePost>; @useResult - $Res call( - {String name, - int communityId, - String? url, - String? body, - String? altText, - String? honeypot, - bool? nsfw, - int? languageId, - String? customThumbnail, - String? auth}); -} - -/// @nodoc -class _$CreatePostCopyWithImpl<$Res, $Val extends CreatePost> - implements $CreatePostCopyWith<$Res> { + $Res call({String name, int communityId, String? url, String? body, String? altText, String? honeypot, bool? nsfw, int? languageId, String? customThumbnail, String? auth}); +} + +/// @nodoc +class _$CreatePostCopyWithImpl<$Res, $Val extends CreatePost> implements $CreatePostCopyWith<$Res> { _$CreatePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -88,79 +73,75 @@ class _$CreatePostCopyWithImpl<$Res, $Val extends CreatePost> Object? customThumbnail = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - honeypot: freezed == honeypot - ? _value.honeypot - : honeypot // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - customThumbnail: freezed == customThumbnail - ? _value.customThumbnail - : customThumbnail // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreatePostImplCopyWith<$Res> - implements $CreatePostCopyWith<$Res> { - factory _$$CreatePostImplCopyWith( - _$CreatePostImpl value, $Res Function(_$CreatePostImpl) then) = - __$$CreatePostImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + honeypot: + freezed == honeypot + ? _value.honeypot + : honeypot // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + customThumbnail: + freezed == customThumbnail + ? _value.customThumbnail + : customThumbnail // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreatePostImplCopyWith<$Res> implements $CreatePostCopyWith<$Res> { + factory _$$CreatePostImplCopyWith(_$CreatePostImpl value, $Res Function(_$CreatePostImpl) then) = __$$CreatePostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String name, - int communityId, - String? url, - String? body, - String? altText, - String? honeypot, - bool? nsfw, - int? languageId, - String? customThumbnail, - String? auth}); -} - -/// @nodoc -class __$$CreatePostImplCopyWithImpl<$Res> - extends _$CreatePostCopyWithImpl<$Res, _$CreatePostImpl> - implements _$$CreatePostImplCopyWith<$Res> { - __$$CreatePostImplCopyWithImpl( - _$CreatePostImpl _value, $Res Function(_$CreatePostImpl) _then) - : super(_value, _then); + $Res call({String name, int communityId, String? url, String? body, String? altText, String? honeypot, bool? nsfw, int? languageId, String? customThumbnail, String? auth}); +} + +/// @nodoc +class __$$CreatePostImplCopyWithImpl<$Res> extends _$CreatePostCopyWithImpl<$Res, _$CreatePostImpl> implements _$$CreatePostImplCopyWith<$Res> { + __$$CreatePostImplCopyWithImpl(_$CreatePostImpl _value, $Res Function(_$CreatePostImpl) _then) : super(_value, _then); /// Create a copy of CreatePost /// with the given fields replaced by the non-null parameter values. @@ -178,48 +159,60 @@ class __$$CreatePostImplCopyWithImpl<$Res> Object? customThumbnail = freezed, Object? auth = freezed, }) { - return _then(_$CreatePostImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - honeypot: freezed == honeypot - ? _value.honeypot - : honeypot // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - customThumbnail: freezed == customThumbnail - ? _value.customThumbnail - : customThumbnail // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$CreatePostImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + honeypot: + freezed == honeypot + ? _value.honeypot + : honeypot // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + customThumbnail: + freezed == customThumbnail + ? _value.customThumbnail + : customThumbnail // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -227,49 +220,37 @@ class __$$CreatePostImplCopyWithImpl<$Res> @apiSerde class _$CreatePostImpl extends _CreatePost { - const _$CreatePostImpl( - {required this.name, - required this.communityId, - this.url, - this.body, - this.altText, - this.honeypot, - this.nsfw, - this.languageId, - this.customThumbnail, - this.auth}) - : super._(); - - factory _$CreatePostImpl.fromJson(Map json) => - _$$CreatePostImplFromJson(json); + const _$CreatePostImpl({required this.name, required this.communityId, this.url, this.body, this.altText, this.honeypot, this.nsfw, this.languageId, this.customThumbnail, this.auth}) : super._(); + + factory _$CreatePostImpl.fromJson(Map json) => _$$CreatePostImplFromJson(json); @override final String name; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? url; -// v0.18.0 + // v0.18.0 @override final String? body; -// v0.18.0 + // v0.18.0 @override final String? altText; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? honeypot; -// v0.18.0 + // v0.18.0 @override final bool? nsfw; -// v0.18.0 + // v0.18.0 @override final int? languageId; -// v0.18.0 + // v0.18.0 @override final String? customThumbnail; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -284,58 +265,50 @@ class _$CreatePostImpl extends _CreatePost { (other.runtimeType == runtimeType && other is _$CreatePostImpl && (identical(other.name, name) || other.name == name) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.url, url) || other.url == url) && (identical(other.body, body) || other.body == body) && (identical(other.altText, altText) || other.altText == altText) && - (identical(other.honeypot, honeypot) || - other.honeypot == honeypot) && + (identical(other.honeypot, honeypot) || other.honeypot == honeypot) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && - (identical(other.languageId, languageId) || - other.languageId == languageId) && - (identical(other.customThumbnail, customThumbnail) || - other.customThumbnail == customThumbnail) && + (identical(other.languageId, languageId) || other.languageId == languageId) && + (identical(other.customThumbnail, customThumbnail) || other.customThumbnail == customThumbnail) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, name, communityId, url, body, - altText, honeypot, nsfw, languageId, customThumbnail, auth); + int get hashCode => Object.hash(runtimeType, name, communityId, url, body, altText, honeypot, nsfw, languageId, customThumbnail, auth); /// Create a copy of CreatePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreatePostImplCopyWith<_$CreatePostImpl> get copyWith => - __$$CreatePostImplCopyWithImpl<_$CreatePostImpl>(this, _$identity); + _$$CreatePostImplCopyWith<_$CreatePostImpl> get copyWith => __$$CreatePostImplCopyWithImpl<_$CreatePostImpl>(this, _$identity); @override Map toJson() { - return _$$CreatePostImplToJson( - this, - ); + return _$$CreatePostImplToJson(this); } } abstract class _CreatePost extends CreatePost { - const factory _CreatePost( - {required final String name, - required final int communityId, - final String? url, - final String? body, - final String? altText, - final String? honeypot, - final bool? nsfw, - final int? languageId, - final String? customThumbnail, - final String? auth}) = _$CreatePostImpl; + const factory _CreatePost({ + required final String name, + required final int communityId, + final String? url, + final String? body, + final String? altText, + final String? honeypot, + final bool? nsfw, + final int? languageId, + final String? customThumbnail, + final String? auth, + }) = _$CreatePostImpl; const _CreatePost._() : super._(); - factory _CreatePost.fromJson(Map json) = - _$CreatePostImpl.fromJson; + factory _CreatePost.fromJson(Map json) = _$CreatePostImpl.fromJson; @override String get name; // v0.18.0 @@ -362,8 +335,7 @@ abstract class _CreatePost extends CreatePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreatePostImplCopyWith<_$CreatePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreatePostImplCopyWith<_$CreatePostImpl> get copyWith => throw _privateConstructorUsedError; } GetPost _$GetPostFromJson(Map json) { @@ -387,15 +359,13 @@ mixin _$GetPost { /// @nodoc abstract class $GetPostCopyWith<$Res> { - factory $GetPostCopyWith(GetPost value, $Res Function(GetPost) then) = - _$GetPostCopyWithImpl<$Res, GetPost>; + factory $GetPostCopyWith(GetPost value, $Res Function(GetPost) then) = _$GetPostCopyWithImpl<$Res, GetPost>; @useResult $Res call({int? id, int? commentId, String? auth}); } /// @nodoc -class _$GetPostCopyWithImpl<$Res, $Val extends GetPost> - implements $GetPostCopyWith<$Res> { +class _$GetPostCopyWithImpl<$Res, $Val extends GetPost> implements $GetPostCopyWith<$Res> { _$GetPostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -407,69 +377,66 @@ class _$GetPostCopyWithImpl<$Res, $Val extends GetPost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? commentId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = freezed, Object? commentId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$GetPostImplCopyWith<$Res> implements $GetPostCopyWith<$Res> { - factory _$$GetPostImplCopyWith( - _$GetPostImpl value, $Res Function(_$GetPostImpl) then) = - __$$GetPostImplCopyWithImpl<$Res>; + factory _$$GetPostImplCopyWith(_$GetPostImpl value, $Res Function(_$GetPostImpl) then) = __$$GetPostImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, int? commentId, String? auth}); } /// @nodoc -class __$$GetPostImplCopyWithImpl<$Res> - extends _$GetPostCopyWithImpl<$Res, _$GetPostImpl> - implements _$$GetPostImplCopyWith<$Res> { - __$$GetPostImplCopyWithImpl( - _$GetPostImpl _value, $Res Function(_$GetPostImpl) _then) - : super(_value, _then); +class __$$GetPostImplCopyWithImpl<$Res> extends _$GetPostCopyWithImpl<$Res, _$GetPostImpl> implements _$$GetPostImplCopyWith<$Res> { + __$$GetPostImplCopyWithImpl(_$GetPostImpl _value, $Res Function(_$GetPostImpl) _then) : super(_value, _then); /// Create a copy of GetPost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? commentId = freezed, - Object? auth = freezed, - }) { - return _then(_$GetPostImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - commentId: freezed == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = freezed, Object? commentId = freezed, Object? auth = freezed}) { + return _then( + _$GetPostImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + freezed == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -479,15 +446,14 @@ class __$$GetPostImplCopyWithImpl<$Res> class _$GetPostImpl extends _GetPost { const _$GetPostImpl({this.id, this.commentId, this.auth}) : super._(); - factory _$GetPostImpl.fromJson(Map json) => - _$$GetPostImplFromJson(json); + factory _$GetPostImpl.fromJson(Map json) => _$$GetPostImplFromJson(json); @override final int? id; -// v0.18.0 + // v0.18.0 @override final int? commentId; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -502,8 +468,7 @@ class _$GetPostImpl extends _GetPost { (other.runtimeType == runtimeType && other is _$GetPostImpl && (identical(other.id, id) || other.id == id) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.auth, auth) || other.auth == auth)); } @@ -516,22 +481,16 @@ class _$GetPostImpl extends _GetPost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPostImplCopyWith<_$GetPostImpl> get copyWith => - __$$GetPostImplCopyWithImpl<_$GetPostImpl>(this, _$identity); + _$$GetPostImplCopyWith<_$GetPostImpl> get copyWith => __$$GetPostImplCopyWithImpl<_$GetPostImpl>(this, _$identity); @override Map toJson() { - return _$$GetPostImplToJson( - this, - ); + return _$$GetPostImplToJson(this); } } abstract class _GetPost extends GetPost { - const factory _GetPost( - {final int? id, - final int? commentId, - final String? auth}) = _$GetPostImpl; + const factory _GetPost({final int? id, final int? commentId, final String? auth}) = _$GetPostImpl; const _GetPost._() : super._(); factory _GetPost.fromJson(Map json) = _$GetPostImpl.fromJson; @@ -547,8 +506,7 @@ abstract class _GetPost extends GetPost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPostImplCopyWith<_$GetPostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPostImplCopyWith<_$GetPostImpl> get copyWith => throw _privateConstructorUsedError; } EditPost _$EditPostFromJson(Map json) { @@ -561,12 +519,10 @@ mixin _$EditPost { String? get name => throw _privateConstructorUsedError; // v0.18.0 String? get url => throw _privateConstructorUsedError; // v0.18.0 String? get body => throw _privateConstructorUsedError; // v0.18.0 - String? get altText => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get altText => throw _privateConstructorUsedError; // v0.19.4 (optional) bool? get nsfw => throw _privateConstructorUsedError; // v0.18.0 int? get languageId => throw _privateConstructorUsedError; // v0.18.0 - String? get customThumbnail => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get customThumbnail => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this EditPost to a JSON map. @@ -575,30 +531,18 @@ mixin _$EditPost { /// Create a copy of EditPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditPostCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditPostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditPostCopyWith<$Res> { - factory $EditPostCopyWith(EditPost value, $Res Function(EditPost) then) = - _$EditPostCopyWithImpl<$Res, EditPost>; + factory $EditPostCopyWith(EditPost value, $Res Function(EditPost) then) = _$EditPostCopyWithImpl<$Res, EditPost>; @useResult - $Res call( - {int postId, - String? name, - String? url, - String? body, - String? altText, - bool? nsfw, - int? languageId, - String? customThumbnail, - String? auth}); + $Res call({int postId, String? name, String? url, String? body, String? altText, bool? nsfw, int? languageId, String? customThumbnail, String? auth}); } /// @nodoc -class _$EditPostCopyWithImpl<$Res, $Val extends EditPost> - implements $EditPostCopyWith<$Res> { +class _$EditPostCopyWithImpl<$Res, $Val extends EditPost> implements $EditPostCopyWith<$Res> { _$EditPostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -621,74 +565,70 @@ class _$EditPostCopyWithImpl<$Res, $Val extends EditPost> Object? customThumbnail = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - customThumbnail: freezed == customThumbnail - ? _value.customThumbnail - : customThumbnail // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$EditPostImplCopyWith<$Res> - implements $EditPostCopyWith<$Res> { - factory _$$EditPostImplCopyWith( - _$EditPostImpl value, $Res Function(_$EditPostImpl) then) = - __$$EditPostImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + customThumbnail: + freezed == customThumbnail + ? _value.customThumbnail + : customThumbnail // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$EditPostImplCopyWith<$Res> implements $EditPostCopyWith<$Res> { + factory _$$EditPostImplCopyWith(_$EditPostImpl value, $Res Function(_$EditPostImpl) then) = __$$EditPostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int postId, - String? name, - String? url, - String? body, - String? altText, - bool? nsfw, - int? languageId, - String? customThumbnail, - String? auth}); -} - -/// @nodoc -class __$$EditPostImplCopyWithImpl<$Res> - extends _$EditPostCopyWithImpl<$Res, _$EditPostImpl> - implements _$$EditPostImplCopyWith<$Res> { - __$$EditPostImplCopyWithImpl( - _$EditPostImpl _value, $Res Function(_$EditPostImpl) _then) - : super(_value, _then); + $Res call({int postId, String? name, String? url, String? body, String? altText, bool? nsfw, int? languageId, String? customThumbnail, String? auth}); +} + +/// @nodoc +class __$$EditPostImplCopyWithImpl<$Res> extends _$EditPostCopyWithImpl<$Res, _$EditPostImpl> implements _$$EditPostImplCopyWith<$Res> { + __$$EditPostImplCopyWithImpl(_$EditPostImpl _value, $Res Function(_$EditPostImpl) _then) : super(_value, _then); /// Create a copy of EditPost /// with the given fields replaced by the non-null parameter values. @@ -705,44 +645,55 @@ class __$$EditPostImplCopyWithImpl<$Res> Object? customThumbnail = freezed, Object? auth = freezed, }) { - return _then(_$EditPostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - nsfw: freezed == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool?, - languageId: freezed == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int?, - customThumbnail: freezed == customThumbnail - ? _value.customThumbnail - : customThumbnail // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$EditPostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + nsfw: + freezed == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool?, + languageId: + freezed == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int?, + customThumbnail: + freezed == customThumbnail + ? _value.customThumbnail + : customThumbnail // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -750,45 +701,34 @@ class __$$EditPostImplCopyWithImpl<$Res> @apiSerde class _$EditPostImpl extends _EditPost { - const _$EditPostImpl( - {required this.postId, - this.name, - this.url, - this.body, - this.altText, - this.nsfw, - this.languageId, - this.customThumbnail, - this.auth}) - : super._(); - - factory _$EditPostImpl.fromJson(Map json) => - _$$EditPostImplFromJson(json); + const _$EditPostImpl({required this.postId, this.name, this.url, this.body, this.altText, this.nsfw, this.languageId, this.customThumbnail, this.auth}) : super._(); + + factory _$EditPostImpl.fromJson(Map json) => _$$EditPostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final String? name; -// v0.18.0 + // v0.18.0 @override final String? url; -// v0.18.0 + // v0.18.0 @override final String? body; -// v0.18.0 + // v0.18.0 @override final String? altText; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final bool? nsfw; -// v0.18.0 + // v0.18.0 @override final int? languageId; -// v0.18.0 + // v0.18.0 @override final String? customThumbnail; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -808,49 +748,43 @@ class _$EditPostImpl extends _EditPost { (identical(other.body, body) || other.body == body) && (identical(other.altText, altText) || other.altText == altText) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && - (identical(other.languageId, languageId) || - other.languageId == languageId) && - (identical(other.customThumbnail, customThumbnail) || - other.customThumbnail == customThumbnail) && + (identical(other.languageId, languageId) || other.languageId == languageId) && + (identical(other.customThumbnail, customThumbnail) || other.customThumbnail == customThumbnail) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, postId, name, url, body, altText, - nsfw, languageId, customThumbnail, auth); + int get hashCode => Object.hash(runtimeType, postId, name, url, body, altText, nsfw, languageId, customThumbnail, auth); /// Create a copy of EditPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditPostImplCopyWith<_$EditPostImpl> get copyWith => - __$$EditPostImplCopyWithImpl<_$EditPostImpl>(this, _$identity); + _$$EditPostImplCopyWith<_$EditPostImpl> get copyWith => __$$EditPostImplCopyWithImpl<_$EditPostImpl>(this, _$identity); @override Map toJson() { - return _$$EditPostImplToJson( - this, - ); + return _$$EditPostImplToJson(this); } } abstract class _EditPost extends EditPost { - const factory _EditPost( - {required final int postId, - final String? name, - final String? url, - final String? body, - final String? altText, - final bool? nsfw, - final int? languageId, - final String? customThumbnail, - final String? auth}) = _$EditPostImpl; + const factory _EditPost({ + required final int postId, + final String? name, + final String? url, + final String? body, + final String? altText, + final bool? nsfw, + final int? languageId, + final String? customThumbnail, + final String? auth, + }) = _$EditPostImpl; const _EditPost._() : super._(); - factory _EditPost.fromJson(Map json) = - _$EditPostImpl.fromJson; + factory _EditPost.fromJson(Map json) = _$EditPostImpl.fromJson; @override int get postId; // v0.18.0 @@ -875,8 +809,7 @@ abstract class _EditPost extends EditPost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditPostImplCopyWith<_$EditPostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditPostImplCopyWith<_$EditPostImpl> get copyWith => throw _privateConstructorUsedError; } DeletePost _$DeletePostFromJson(Map json) { @@ -895,22 +828,18 @@ mixin _$DeletePost { /// Create a copy of DeletePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeletePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeletePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeletePostCopyWith<$Res> { - factory $DeletePostCopyWith( - DeletePost value, $Res Function(DeletePost) then) = - _$DeletePostCopyWithImpl<$Res, DeletePost>; + factory $DeletePostCopyWith(DeletePost value, $Res Function(DeletePost) then) = _$DeletePostCopyWithImpl<$Res, DeletePost>; @useResult $Res call({int postId, bool deleted, String? auth}); } /// @nodoc -class _$DeletePostCopyWithImpl<$Res, $Val extends DeletePost> - implements $DeletePostCopyWith<$Res> { +class _$DeletePostCopyWithImpl<$Res, $Val extends DeletePost> implements $DeletePostCopyWith<$Res> { _$DeletePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -922,70 +851,66 @@ class _$DeletePostCopyWithImpl<$Res, $Val extends DeletePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$DeletePostImplCopyWith<$Res> - implements $DeletePostCopyWith<$Res> { - factory _$$DeletePostImplCopyWith( - _$DeletePostImpl value, $Res Function(_$DeletePostImpl) then) = - __$$DeletePostImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$DeletePostImplCopyWith<$Res> implements $DeletePostCopyWith<$Res> { + factory _$$DeletePostImplCopyWith(_$DeletePostImpl value, $Res Function(_$DeletePostImpl) then) = __$$DeletePostImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, bool deleted, String? auth}); } /// @nodoc -class __$$DeletePostImplCopyWithImpl<$Res> - extends _$DeletePostCopyWithImpl<$Res, _$DeletePostImpl> - implements _$$DeletePostImplCopyWith<$Res> { - __$$DeletePostImplCopyWithImpl( - _$DeletePostImpl _value, $Res Function(_$DeletePostImpl) _then) - : super(_value, _then); +class __$$DeletePostImplCopyWithImpl<$Res> extends _$DeletePostCopyWithImpl<$Res, _$DeletePostImpl> implements _$$DeletePostImplCopyWith<$Res> { + __$$DeletePostImplCopyWithImpl(_$DeletePostImpl _value, $Res Function(_$DeletePostImpl) _then) : super(_value, _then); /// Create a copy of DeletePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_$DeletePostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _$DeletePostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -993,19 +918,16 @@ class __$$DeletePostImplCopyWithImpl<$Res> @apiSerde class _$DeletePostImpl extends _DeletePost { - const _$DeletePostImpl( - {required this.postId, required this.deleted, this.auth}) - : super._(); + const _$DeletePostImpl({required this.postId, required this.deleted, this.auth}) : super._(); - factory _$DeletePostImpl.fromJson(Map json) => - _$$DeletePostImplFromJson(json); + factory _$DeletePostImpl.fromJson(Map json) => _$$DeletePostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1033,26 +955,19 @@ class _$DeletePostImpl extends _DeletePost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeletePostImplCopyWith<_$DeletePostImpl> get copyWith => - __$$DeletePostImplCopyWithImpl<_$DeletePostImpl>(this, _$identity); + _$$DeletePostImplCopyWith<_$DeletePostImpl> get copyWith => __$$DeletePostImplCopyWithImpl<_$DeletePostImpl>(this, _$identity); @override Map toJson() { - return _$$DeletePostImplToJson( - this, - ); + return _$$DeletePostImplToJson(this); } } abstract class _DeletePost extends DeletePost { - const factory _DeletePost( - {required final int postId, - required final bool deleted, - final String? auth}) = _$DeletePostImpl; + const factory _DeletePost({required final int postId, required final bool deleted, final String? auth}) = _$DeletePostImpl; const _DeletePost._() : super._(); - factory _DeletePost.fromJson(Map json) = - _$DeletePostImpl.fromJson; + factory _DeletePost.fromJson(Map json) = _$DeletePostImpl.fromJson; @override int get postId; // v0.18.0 @@ -1065,8 +980,7 @@ abstract class _DeletePost extends DeletePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeletePostImplCopyWith<_$DeletePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DeletePostImplCopyWith<_$DeletePostImpl> get copyWith => throw _privateConstructorUsedError; } RemovePost _$RemovePostFromJson(Map json) { @@ -1086,22 +1000,18 @@ mixin _$RemovePost { /// Create a copy of RemovePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RemovePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $RemovePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RemovePostCopyWith<$Res> { - factory $RemovePostCopyWith( - RemovePost value, $Res Function(RemovePost) then) = - _$RemovePostCopyWithImpl<$Res, RemovePost>; + factory $RemovePostCopyWith(RemovePost value, $Res Function(RemovePost) then) = _$RemovePostCopyWithImpl<$Res, RemovePost>; @useResult $Res call({int postId, bool removed, String? reason, String? auth}); } /// @nodoc -class _$RemovePostCopyWithImpl<$Res, $Val extends RemovePost> - implements $RemovePostCopyWith<$Res> { +class _$RemovePostCopyWithImpl<$Res, $Val extends RemovePost> implements $RemovePostCopyWith<$Res> { _$RemovePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1113,80 +1023,76 @@ class _$RemovePostCopyWithImpl<$Res, $Val extends RemovePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? removed = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$RemovePostImplCopyWith<$Res> - implements $RemovePostCopyWith<$Res> { - factory _$$RemovePostImplCopyWith( - _$RemovePostImpl value, $Res Function(_$RemovePostImpl) then) = - __$$RemovePostImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? removed = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$RemovePostImplCopyWith<$Res> implements $RemovePostCopyWith<$Res> { + factory _$$RemovePostImplCopyWith(_$RemovePostImpl value, $Res Function(_$RemovePostImpl) then) = __$$RemovePostImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, bool removed, String? reason, String? auth}); } /// @nodoc -class __$$RemovePostImplCopyWithImpl<$Res> - extends _$RemovePostCopyWithImpl<$Res, _$RemovePostImpl> - implements _$$RemovePostImplCopyWith<$Res> { - __$$RemovePostImplCopyWithImpl( - _$RemovePostImpl _value, $Res Function(_$RemovePostImpl) _then) - : super(_value, _then); +class __$$RemovePostImplCopyWithImpl<$Res> extends _$RemovePostCopyWithImpl<$Res, _$RemovePostImpl> implements _$$RemovePostImplCopyWith<$Res> { + __$$RemovePostImplCopyWithImpl(_$RemovePostImpl _value, $Res Function(_$RemovePostImpl) _then) : super(_value, _then); /// Create a copy of RemovePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? removed = null, - Object? reason = freezed, - Object? auth = freezed, - }) { - return _then(_$RemovePostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? removed = null, Object? reason = freezed, Object? auth = freezed}) { + return _then( + _$RemovePostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1194,22 +1100,19 @@ class __$$RemovePostImplCopyWithImpl<$Res> @apiSerde class _$RemovePostImpl extends _RemovePost { - const _$RemovePostImpl( - {required this.postId, required this.removed, this.reason, this.auth}) - : super._(); + const _$RemovePostImpl({required this.postId, required this.removed, this.reason, this.auth}) : super._(); - factory _$RemovePostImpl.fromJson(Map json) => - _$$RemovePostImplFromJson(json); + factory _$RemovePostImpl.fromJson(Map json) => _$$RemovePostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1238,27 +1141,19 @@ class _$RemovePostImpl extends _RemovePost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RemovePostImplCopyWith<_$RemovePostImpl> get copyWith => - __$$RemovePostImplCopyWithImpl<_$RemovePostImpl>(this, _$identity); + _$$RemovePostImplCopyWith<_$RemovePostImpl> get copyWith => __$$RemovePostImplCopyWithImpl<_$RemovePostImpl>(this, _$identity); @override Map toJson() { - return _$$RemovePostImplToJson( - this, - ); + return _$$RemovePostImplToJson(this); } } abstract class _RemovePost extends RemovePost { - const factory _RemovePost( - {required final int postId, - required final bool removed, - final String? reason, - final String? auth}) = _$RemovePostImpl; + const factory _RemovePost({required final int postId, required final bool removed, final String? reason, final String? auth}) = _$RemovePostImpl; const _RemovePost._() : super._(); - factory _RemovePost.fromJson(Map json) = - _$RemovePostImpl.fromJson; + factory _RemovePost.fromJson(Map json) = _$RemovePostImpl.fromJson; @override int get postId; // v0.18.0 @@ -1273,8 +1168,7 @@ abstract class _RemovePost extends RemovePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RemovePostImplCopyWith<_$RemovePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$RemovePostImplCopyWith<_$RemovePostImpl> get copyWith => throw _privateConstructorUsedError; } MarkPostAsRead _$MarkPostAsReadFromJson(Map json) { @@ -1284,10 +1178,8 @@ MarkPostAsRead _$MarkPostAsReadFromJson(Map json) { /// @nodoc mixin _$MarkPostAsRead { @deprecated - int? get postId => - throw _privateConstructorUsedError; // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] - List? get postIds => - throw _privateConstructorUsedError; // v0.19.0 (optional) + int? get postId => throw _privateConstructorUsedError; // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] + List? get postIds => throw _privateConstructorUsedError; // v0.19.0 (optional) bool get read => throw _privateConstructorUsedError; // v0.18.0 String? get auth => throw _privateConstructorUsedError; @@ -1297,23 +1189,18 @@ mixin _$MarkPostAsRead { /// Create a copy of MarkPostAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkPostAsReadCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkPostAsReadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkPostAsReadCopyWith<$Res> { - factory $MarkPostAsReadCopyWith( - MarkPostAsRead value, $Res Function(MarkPostAsRead) then) = - _$MarkPostAsReadCopyWithImpl<$Res, MarkPostAsRead>; + factory $MarkPostAsReadCopyWith(MarkPostAsRead value, $Res Function(MarkPostAsRead) then) = _$MarkPostAsReadCopyWithImpl<$Res, MarkPostAsRead>; @useResult - $Res call( - {@deprecated int? postId, List? postIds, bool read, String? auth}); + $Res call({@deprecated int? postId, List? postIds, bool read, String? auth}); } /// @nodoc -class _$MarkPostAsReadCopyWithImpl<$Res, $Val extends MarkPostAsRead> - implements $MarkPostAsReadCopyWith<$Res> { +class _$MarkPostAsReadCopyWithImpl<$Res, $Val extends MarkPostAsRead> implements $MarkPostAsReadCopyWith<$Res> { _$MarkPostAsReadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1325,81 +1212,76 @@ class _$MarkPostAsReadCopyWithImpl<$Res, $Val extends MarkPostAsRead> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = freezed, - Object? postIds = freezed, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - postIds: freezed == postIds - ? _value.postIds - : postIds // ignore: cast_nullable_to_non_nullable - as List?, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$MarkPostAsReadImplCopyWith<$Res> - implements $MarkPostAsReadCopyWith<$Res> { - factory _$$MarkPostAsReadImplCopyWith(_$MarkPostAsReadImpl value, - $Res Function(_$MarkPostAsReadImpl) then) = - __$$MarkPostAsReadImplCopyWithImpl<$Res>; + $Res call({Object? postId = freezed, Object? postIds = freezed, Object? read = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + postIds: + freezed == postIds + ? _value.postIds + : postIds // ignore: cast_nullable_to_non_nullable + as List?, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$MarkPostAsReadImplCopyWith<$Res> implements $MarkPostAsReadCopyWith<$Res> { + factory _$$MarkPostAsReadImplCopyWith(_$MarkPostAsReadImpl value, $Res Function(_$MarkPostAsReadImpl) then) = __$$MarkPostAsReadImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? postId, List? postIds, bool read, String? auth}); + $Res call({@deprecated int? postId, List? postIds, bool read, String? auth}); } /// @nodoc -class __$$MarkPostAsReadImplCopyWithImpl<$Res> - extends _$MarkPostAsReadCopyWithImpl<$Res, _$MarkPostAsReadImpl> - implements _$$MarkPostAsReadImplCopyWith<$Res> { - __$$MarkPostAsReadImplCopyWithImpl( - _$MarkPostAsReadImpl _value, $Res Function(_$MarkPostAsReadImpl) _then) - : super(_value, _then); +class __$$MarkPostAsReadImplCopyWithImpl<$Res> extends _$MarkPostAsReadCopyWithImpl<$Res, _$MarkPostAsReadImpl> implements _$$MarkPostAsReadImplCopyWith<$Res> { + __$$MarkPostAsReadImplCopyWithImpl(_$MarkPostAsReadImpl _value, $Res Function(_$MarkPostAsReadImpl) _then) : super(_value, _then); /// Create a copy of MarkPostAsRead /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = freezed, - Object? postIds = freezed, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_$MarkPostAsReadImpl( - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - postIds: freezed == postIds - ? _value._postIds - : postIds // ignore: cast_nullable_to_non_nullable - as List?, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = freezed, Object? postIds = freezed, Object? read = null, Object? auth = freezed}) { + return _then( + _$MarkPostAsReadImpl( + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + postIds: + freezed == postIds + ? _value._postIds + : postIds // ignore: cast_nullable_to_non_nullable + as List?, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1407,23 +1289,16 @@ class __$$MarkPostAsReadImplCopyWithImpl<$Res> @apiSerde class _$MarkPostAsReadImpl extends _MarkPostAsRead { - const _$MarkPostAsReadImpl( - {@deprecated this.postId, - final List? postIds, - required this.read, - this.auth}) - : _postIds = postIds, - super._(); + const _$MarkPostAsReadImpl({@deprecated this.postId, final List? postIds, required this.read, this.auth}) : _postIds = postIds, super._(); - factory _$MarkPostAsReadImpl.fromJson(Map json) => - _$$MarkPostAsReadImplFromJson(json); + factory _$MarkPostAsReadImpl.fromJson(Map json) => _$$MarkPostAsReadImplFromJson(json); @override @deprecated final int? postId; -// v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] + // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] final List? _postIds; -// v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] + // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] @override List? get postIds { final value = _postIds; @@ -1433,10 +1308,10 @@ class _$MarkPostAsReadImpl extends _MarkPostAsRead { return EqualUnmodifiableListView(value); } -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool read; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1458,41 +1333,30 @@ class _$MarkPostAsReadImpl extends _MarkPostAsRead { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, postId, - const DeepCollectionEquality().hash(_postIds), read, auth); + int get hashCode => Object.hash(runtimeType, postId, const DeepCollectionEquality().hash(_postIds), read, auth); /// Create a copy of MarkPostAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkPostAsReadImplCopyWith<_$MarkPostAsReadImpl> get copyWith => - __$$MarkPostAsReadImplCopyWithImpl<_$MarkPostAsReadImpl>( - this, _$identity); + _$$MarkPostAsReadImplCopyWith<_$MarkPostAsReadImpl> get copyWith => __$$MarkPostAsReadImplCopyWithImpl<_$MarkPostAsReadImpl>(this, _$identity); @override Map toJson() { - return _$$MarkPostAsReadImplToJson( - this, - ); + return _$$MarkPostAsReadImplToJson(this); } } abstract class _MarkPostAsRead extends MarkPostAsRead { - const factory _MarkPostAsRead( - {@deprecated final int? postId, - final List? postIds, - required final bool read, - final String? auth}) = _$MarkPostAsReadImpl; + const factory _MarkPostAsRead({@deprecated final int? postId, final List? postIds, required final bool read, final String? auth}) = _$MarkPostAsReadImpl; const _MarkPostAsRead._() : super._(); - factory _MarkPostAsRead.fromJson(Map json) = - _$MarkPostAsReadImpl.fromJson; + factory _MarkPostAsRead.fromJson(Map json) = _$MarkPostAsReadImpl.fromJson; @override @deprecated - int? - get postId; // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] + int? get postId; // v0.18.0 (required), v0.19.0 (optional) [deprecated in v0.19.4] @override List? get postIds; // v0.19.0 (optional) @override @@ -1504,8 +1368,7 @@ abstract class _MarkPostAsRead extends MarkPostAsRead { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkPostAsReadImplCopyWith<_$MarkPostAsReadImpl> get copyWith => - throw _privateConstructorUsedError; + _$$MarkPostAsReadImplCopyWith<_$MarkPostAsReadImpl> get copyWith => throw _privateConstructorUsedError; } HidePost _$HidePostFromJson(Map json) { @@ -1514,8 +1377,7 @@ HidePost _$HidePostFromJson(Map json) { /// @nodoc mixin _$HidePost { - List get postIds => - throw _privateConstructorUsedError; // v0.19.4 (required) + List get postIds => throw _privateConstructorUsedError; // v0.19.4 (required) bool get hide => throw _privateConstructorUsedError; // v0.19.4 (required) String? get auth => throw _privateConstructorUsedError; @@ -1525,21 +1387,18 @@ mixin _$HidePost { /// Create a copy of HidePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $HidePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $HidePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $HidePostCopyWith<$Res> { - factory $HidePostCopyWith(HidePost value, $Res Function(HidePost) then) = - _$HidePostCopyWithImpl<$Res, HidePost>; + factory $HidePostCopyWith(HidePost value, $Res Function(HidePost) then) = _$HidePostCopyWithImpl<$Res, HidePost>; @useResult $Res call({List postIds, bool hide, String? auth}); } /// @nodoc -class _$HidePostCopyWithImpl<$Res, $Val extends HidePost> - implements $HidePostCopyWith<$Res> { +class _$HidePostCopyWithImpl<$Res, $Val extends HidePost> implements $HidePostCopyWith<$Res> { _$HidePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1551,70 +1410,66 @@ class _$HidePostCopyWithImpl<$Res, $Val extends HidePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postIds = null, - Object? hide = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postIds: null == postIds - ? _value.postIds - : postIds // ignore: cast_nullable_to_non_nullable - as List, - hide: null == hide - ? _value.hide - : hide // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$HidePostImplCopyWith<$Res> - implements $HidePostCopyWith<$Res> { - factory _$$HidePostImplCopyWith( - _$HidePostImpl value, $Res Function(_$HidePostImpl) then) = - __$$HidePostImplCopyWithImpl<$Res>; + $Res call({Object? postIds = null, Object? hide = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postIds: + null == postIds + ? _value.postIds + : postIds // ignore: cast_nullable_to_non_nullable + as List, + hide: + null == hide + ? _value.hide + : hide // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$HidePostImplCopyWith<$Res> implements $HidePostCopyWith<$Res> { + factory _$$HidePostImplCopyWith(_$HidePostImpl value, $Res Function(_$HidePostImpl) then) = __$$HidePostImplCopyWithImpl<$Res>; @override @useResult $Res call({List postIds, bool hide, String? auth}); } /// @nodoc -class __$$HidePostImplCopyWithImpl<$Res> - extends _$HidePostCopyWithImpl<$Res, _$HidePostImpl> - implements _$$HidePostImplCopyWith<$Res> { - __$$HidePostImplCopyWithImpl( - _$HidePostImpl _value, $Res Function(_$HidePostImpl) _then) - : super(_value, _then); +class __$$HidePostImplCopyWithImpl<$Res> extends _$HidePostCopyWithImpl<$Res, _$HidePostImpl> implements _$$HidePostImplCopyWith<$Res> { + __$$HidePostImplCopyWithImpl(_$HidePostImpl _value, $Res Function(_$HidePostImpl) _then) : super(_value, _then); /// Create a copy of HidePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postIds = null, - Object? hide = null, - Object? auth = freezed, - }) { - return _then(_$HidePostImpl( - postIds: null == postIds - ? _value._postIds - : postIds // ignore: cast_nullable_to_non_nullable - as List, - hide: null == hide - ? _value.hide - : hide // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postIds = null, Object? hide = null, Object? auth = freezed}) { + return _then( + _$HidePostImpl( + postIds: + null == postIds + ? _value._postIds + : postIds // ignore: cast_nullable_to_non_nullable + as List, + hide: + null == hide + ? _value.hide + : hide // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1622,13 +1477,9 @@ class __$$HidePostImplCopyWithImpl<$Res> @apiSerde class _$HidePostImpl extends _HidePost { - const _$HidePostImpl( - {required final List postIds, required this.hide, this.auth}) - : _postIds = postIds, - super._(); + const _$HidePostImpl({required final List postIds, required this.hide, this.auth}) : _postIds = postIds, super._(); - factory _$HidePostImpl.fromJson(Map json) => - _$$HidePostImplFromJson(json); + factory _$HidePostImpl.fromJson(Map json) => _$$HidePostImplFromJson(json); final List _postIds; @override @@ -1638,10 +1489,10 @@ class _$HidePostImpl extends _HidePost { return EqualUnmodifiableListView(_postIds); } -// v0.19.4 (required) + // v0.19.4 (required) @override final bool hide; -// v0.19.4 (required) + // v0.19.4 (required) @override final String? auth; @@ -1662,34 +1513,26 @@ class _$HidePostImpl extends _HidePost { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_postIds), hide, auth); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_postIds), hide, auth); /// Create a copy of HidePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$HidePostImplCopyWith<_$HidePostImpl> get copyWith => - __$$HidePostImplCopyWithImpl<_$HidePostImpl>(this, _$identity); + _$$HidePostImplCopyWith<_$HidePostImpl> get copyWith => __$$HidePostImplCopyWithImpl<_$HidePostImpl>(this, _$identity); @override Map toJson() { - return _$$HidePostImplToJson( - this, - ); + return _$$HidePostImplToJson(this); } } abstract class _HidePost extends HidePost { - const factory _HidePost( - {required final List postIds, - required final bool hide, - final String? auth}) = _$HidePostImpl; + const factory _HidePost({required final List postIds, required final bool hide, final String? auth}) = _$HidePostImpl; const _HidePost._() : super._(); - factory _HidePost.fromJson(Map json) = - _$HidePostImpl.fromJson; + factory _HidePost.fromJson(Map json) = _$HidePostImpl.fromJson; @override List get postIds; // v0.19.4 (required) @@ -1702,8 +1545,7 @@ abstract class _HidePost extends HidePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$HidePostImplCopyWith<_$HidePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$HidePostImplCopyWith<_$HidePostImpl> get copyWith => throw _privateConstructorUsedError; } LockPost _$LockPostFromJson(Map json) { @@ -1722,21 +1564,18 @@ mixin _$LockPost { /// Create a copy of LockPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LockPostCopyWith get copyWith => - throw _privateConstructorUsedError; + $LockPostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LockPostCopyWith<$Res> { - factory $LockPostCopyWith(LockPost value, $Res Function(LockPost) then) = - _$LockPostCopyWithImpl<$Res, LockPost>; + factory $LockPostCopyWith(LockPost value, $Res Function(LockPost) then) = _$LockPostCopyWithImpl<$Res, LockPost>; @useResult $Res call({int postId, bool locked, String? auth}); } /// @nodoc -class _$LockPostCopyWithImpl<$Res, $Val extends LockPost> - implements $LockPostCopyWith<$Res> { +class _$LockPostCopyWithImpl<$Res, $Val extends LockPost> implements $LockPostCopyWith<$Res> { _$LockPostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1748,70 +1587,66 @@ class _$LockPostCopyWithImpl<$Res, $Val extends LockPost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? locked = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$LockPostImplCopyWith<$Res> - implements $LockPostCopyWith<$Res> { - factory _$$LockPostImplCopyWith( - _$LockPostImpl value, $Res Function(_$LockPostImpl) then) = - __$$LockPostImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? locked = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$LockPostImplCopyWith<$Res> implements $LockPostCopyWith<$Res> { + factory _$$LockPostImplCopyWith(_$LockPostImpl value, $Res Function(_$LockPostImpl) then) = __$$LockPostImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, bool locked, String? auth}); } /// @nodoc -class __$$LockPostImplCopyWithImpl<$Res> - extends _$LockPostCopyWithImpl<$Res, _$LockPostImpl> - implements _$$LockPostImplCopyWith<$Res> { - __$$LockPostImplCopyWithImpl( - _$LockPostImpl _value, $Res Function(_$LockPostImpl) _then) - : super(_value, _then); +class __$$LockPostImplCopyWithImpl<$Res> extends _$LockPostCopyWithImpl<$Res, _$LockPostImpl> implements _$$LockPostImplCopyWith<$Res> { + __$$LockPostImplCopyWithImpl(_$LockPostImpl _value, $Res Function(_$LockPostImpl) _then) : super(_value, _then); /// Create a copy of LockPost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? locked = null, - Object? auth = freezed, - }) { - return _then(_$LockPostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? locked = null, Object? auth = freezed}) { + return _then( + _$LockPostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1819,18 +1654,16 @@ class __$$LockPostImplCopyWithImpl<$Res> @apiSerde class _$LockPostImpl extends _LockPost { - const _$LockPostImpl({required this.postId, required this.locked, this.auth}) - : super._(); + const _$LockPostImpl({required this.postId, required this.locked, this.auth}) : super._(); - factory _$LockPostImpl.fromJson(Map json) => - _$$LockPostImplFromJson(json); + factory _$LockPostImpl.fromJson(Map json) => _$$LockPostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool locked; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1858,26 +1691,19 @@ class _$LockPostImpl extends _LockPost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LockPostImplCopyWith<_$LockPostImpl> get copyWith => - __$$LockPostImplCopyWithImpl<_$LockPostImpl>(this, _$identity); + _$$LockPostImplCopyWith<_$LockPostImpl> get copyWith => __$$LockPostImplCopyWithImpl<_$LockPostImpl>(this, _$identity); @override Map toJson() { - return _$$LockPostImplToJson( - this, - ); + return _$$LockPostImplToJson(this); } } abstract class _LockPost extends LockPost { - const factory _LockPost( - {required final int postId, - required final bool locked, - final String? auth}) = _$LockPostImpl; + const factory _LockPost({required final int postId, required final bool locked, final String? auth}) = _$LockPostImpl; const _LockPost._() : super._(); - factory _LockPost.fromJson(Map json) = - _$LockPostImpl.fromJson; + factory _LockPost.fromJson(Map json) = _$LockPostImpl.fromJson; @override int get postId; // v0.18.0 @@ -1890,8 +1716,7 @@ abstract class _LockPost extends LockPost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LockPostImplCopyWith<_$LockPostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LockPostImplCopyWith<_$LockPostImpl> get copyWith => throw _privateConstructorUsedError; } FeaturePost _$FeaturePostFromJson(Map json) { @@ -1902,8 +1727,7 @@ FeaturePost _$FeaturePostFromJson(Map json) { mixin _$FeaturePost { int get postId => throw _privateConstructorUsedError; // v0.18.0 bool get featured => throw _privateConstructorUsedError; // v0.18.0 - PostFeatureType get featureType => - throw _privateConstructorUsedError; // v0.18.0 + PostFeatureType get featureType => throw _privateConstructorUsedError; // v0.18.0 String? get auth => throw _privateConstructorUsedError; /// Serializes this FeaturePost to a JSON map. @@ -1912,23 +1736,18 @@ mixin _$FeaturePost { /// Create a copy of FeaturePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $FeaturePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $FeaturePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $FeaturePostCopyWith<$Res> { - factory $FeaturePostCopyWith( - FeaturePost value, $Res Function(FeaturePost) then) = - _$FeaturePostCopyWithImpl<$Res, FeaturePost>; + factory $FeaturePostCopyWith(FeaturePost value, $Res Function(FeaturePost) then) = _$FeaturePostCopyWithImpl<$Res, FeaturePost>; @useResult - $Res call( - {int postId, bool featured, PostFeatureType featureType, String? auth}); + $Res call({int postId, bool featured, PostFeatureType featureType, String? auth}); } /// @nodoc -class _$FeaturePostCopyWithImpl<$Res, $Val extends FeaturePost> - implements $FeaturePostCopyWith<$Res> { +class _$FeaturePostCopyWithImpl<$Res, $Val extends FeaturePost> implements $FeaturePostCopyWith<$Res> { _$FeaturePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1940,81 +1759,76 @@ class _$FeaturePostCopyWithImpl<$Res, $Val extends FeaturePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? featured = null, - Object? featureType = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - featured: null == featured - ? _value.featured - : featured // ignore: cast_nullable_to_non_nullable - as bool, - featureType: null == featureType - ? _value.featureType - : featureType // ignore: cast_nullable_to_non_nullable - as PostFeatureType, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$FeaturePostImplCopyWith<$Res> - implements $FeaturePostCopyWith<$Res> { - factory _$$FeaturePostImplCopyWith( - _$FeaturePostImpl value, $Res Function(_$FeaturePostImpl) then) = - __$$FeaturePostImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? featured = null, Object? featureType = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + featured: + null == featured + ? _value.featured + : featured // ignore: cast_nullable_to_non_nullable + as bool, + featureType: + null == featureType + ? _value.featureType + : featureType // ignore: cast_nullable_to_non_nullable + as PostFeatureType, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$FeaturePostImplCopyWith<$Res> implements $FeaturePostCopyWith<$Res> { + factory _$$FeaturePostImplCopyWith(_$FeaturePostImpl value, $Res Function(_$FeaturePostImpl) then) = __$$FeaturePostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int postId, bool featured, PostFeatureType featureType, String? auth}); + $Res call({int postId, bool featured, PostFeatureType featureType, String? auth}); } /// @nodoc -class __$$FeaturePostImplCopyWithImpl<$Res> - extends _$FeaturePostCopyWithImpl<$Res, _$FeaturePostImpl> - implements _$$FeaturePostImplCopyWith<$Res> { - __$$FeaturePostImplCopyWithImpl( - _$FeaturePostImpl _value, $Res Function(_$FeaturePostImpl) _then) - : super(_value, _then); +class __$$FeaturePostImplCopyWithImpl<$Res> extends _$FeaturePostCopyWithImpl<$Res, _$FeaturePostImpl> implements _$$FeaturePostImplCopyWith<$Res> { + __$$FeaturePostImplCopyWithImpl(_$FeaturePostImpl _value, $Res Function(_$FeaturePostImpl) _then) : super(_value, _then); /// Create a copy of FeaturePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? featured = null, - Object? featureType = null, - Object? auth = freezed, - }) { - return _then(_$FeaturePostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - featured: null == featured - ? _value.featured - : featured // ignore: cast_nullable_to_non_nullable - as bool, - featureType: null == featureType - ? _value.featureType - : featureType // ignore: cast_nullable_to_non_nullable - as PostFeatureType, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? featured = null, Object? featureType = null, Object? auth = freezed}) { + return _then( + _$FeaturePostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + featured: + null == featured + ? _value.featured + : featured // ignore: cast_nullable_to_non_nullable + as bool, + featureType: + null == featureType + ? _value.featureType + : featureType // ignore: cast_nullable_to_non_nullable + as PostFeatureType, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2022,25 +1836,19 @@ class __$$FeaturePostImplCopyWithImpl<$Res> @apiSerde class _$FeaturePostImpl extends _FeaturePost { - const _$FeaturePostImpl( - {required this.postId, - required this.featured, - required this.featureType, - this.auth}) - : super._(); + const _$FeaturePostImpl({required this.postId, required this.featured, required this.featureType, this.auth}) : super._(); - factory _$FeaturePostImpl.fromJson(Map json) => - _$$FeaturePostImplFromJson(json); + factory _$FeaturePostImpl.fromJson(Map json) => _$$FeaturePostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool featured; -// v0.18.0 + // v0.18.0 @override final PostFeatureType featureType; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2055,44 +1863,33 @@ class _$FeaturePostImpl extends _FeaturePost { (other.runtimeType == runtimeType && other is _$FeaturePostImpl && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.featured, featured) || - other.featured == featured) && - (identical(other.featureType, featureType) || - other.featureType == featureType) && + (identical(other.featured, featured) || other.featured == featured) && + (identical(other.featureType, featureType) || other.featureType == featureType) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, postId, featured, featureType, auth); + int get hashCode => Object.hash(runtimeType, postId, featured, featureType, auth); /// Create a copy of FeaturePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$FeaturePostImplCopyWith<_$FeaturePostImpl> get copyWith => - __$$FeaturePostImplCopyWithImpl<_$FeaturePostImpl>(this, _$identity); + _$$FeaturePostImplCopyWith<_$FeaturePostImpl> get copyWith => __$$FeaturePostImplCopyWithImpl<_$FeaturePostImpl>(this, _$identity); @override Map toJson() { - return _$$FeaturePostImplToJson( - this, - ); + return _$$FeaturePostImplToJson(this); } } abstract class _FeaturePost extends FeaturePost { - const factory _FeaturePost( - {required final int postId, - required final bool featured, - required final PostFeatureType featureType, - final String? auth}) = _$FeaturePostImpl; + const factory _FeaturePost({required final int postId, required final bool featured, required final PostFeatureType featureType, final String? auth}) = _$FeaturePostImpl; const _FeaturePost._() : super._(); - factory _FeaturePost.fromJson(Map json) = - _$FeaturePostImpl.fromJson; + factory _FeaturePost.fromJson(Map json) = _$FeaturePostImpl.fromJson; @override int get postId; // v0.18.0 @@ -2107,8 +1904,7 @@ abstract class _FeaturePost extends FeaturePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$FeaturePostImplCopyWith<_$FeaturePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$FeaturePostImplCopyWith<_$FeaturePostImpl> get copyWith => throw _privateConstructorUsedError; } GetPosts _$GetPostsFromJson(Map json) { @@ -2126,19 +1922,13 @@ mixin _$GetPosts { String? get communityName => throw _privateConstructorUsedError; // v0.18.0 bool? get savedOnly => throw _privateConstructorUsedError; // v0.18.0 @deprecated - bool? get moderatorView => - throw _privateConstructorUsedError; // v0.18.3 [deprecated in v0.19.0] + bool? get moderatorView => throw _privateConstructorUsedError; // v0.18.3 [deprecated in v0.19.0] String? get auth => throw _privateConstructorUsedError; - bool? get likedOnly => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get dislikedOnly => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get showHidden => - throw _privateConstructorUsedError; // v0.19.4 (optional) - bool? get showRead => - throw _privateConstructorUsedError; // v0.19.6 (optional) - bool? get showNsfw => - throw _privateConstructorUsedError; // v0.19.6 (optional) + bool? get likedOnly => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get dislikedOnly => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get showHidden => throw _privateConstructorUsedError; // v0.19.4 (optional) + bool? get showRead => throw _privateConstructorUsedError; // v0.19.6 (optional) + bool? get showNsfw => throw _privateConstructorUsedError; // v0.19.6 (optional) String? get pageCursor => throw _privateConstructorUsedError; /// Serializes this GetPosts to a JSON map. @@ -2147,36 +1937,34 @@ mixin _$GetPosts { /// Create a copy of GetPosts /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPostsCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPostsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPostsCopyWith<$Res> { - factory $GetPostsCopyWith(GetPosts value, $Res Function(GetPosts) then) = - _$GetPostsCopyWithImpl<$Res, GetPosts>; + factory $GetPostsCopyWith(GetPosts value, $Res Function(GetPosts) then) = _$GetPostsCopyWithImpl<$Res, GetPosts>; @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - SortType? sort, - int? page, - int? limit, - int? communityId, - String? communityName, - bool? savedOnly, - @deprecated bool? moderatorView, - String? auth, - bool? likedOnly, - bool? dislikedOnly, - bool? showHidden, - bool? showRead, - bool? showNsfw, - String? pageCursor}); -} - -/// @nodoc -class _$GetPostsCopyWithImpl<$Res, $Val extends GetPosts> - implements $GetPostsCopyWith<$Res> { + $Res call({ + @JsonKey(name: 'type_') ListingType? type, + SortType? sort, + int? page, + int? limit, + int? communityId, + String? communityName, + bool? savedOnly, + @deprecated bool? moderatorView, + String? auth, + bool? likedOnly, + bool? dislikedOnly, + bool? showHidden, + bool? showRead, + bool? showNsfw, + String? pageCursor, + }); +} + +/// @nodoc +class _$GetPostsCopyWithImpl<$Res, $Val extends GetPosts> implements $GetPostsCopyWith<$Res> { _$GetPostsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2205,104 +1993,116 @@ class _$GetPostsCopyWithImpl<$Res, $Val extends GetPosts> Object? showNsfw = freezed, Object? pageCursor = freezed, }) { - return _then(_value.copyWith( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - moderatorView: freezed == moderatorView - ? _value.moderatorView - : moderatorView // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - likedOnly: freezed == likedOnly - ? _value.likedOnly - : likedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - dislikedOnly: freezed == dislikedOnly - ? _value.dislikedOnly - : dislikedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - showHidden: freezed == showHidden - ? _value.showHidden - : showHidden // ignore: cast_nullable_to_non_nullable - as bool?, - showRead: freezed == showRead - ? _value.showRead - : showRead // ignore: cast_nullable_to_non_nullable - as bool?, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - pageCursor: freezed == pageCursor - ? _value.pageCursor - : pageCursor // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$GetPostsImplCopyWith<$Res> - implements $GetPostsCopyWith<$Res> { - factory _$$GetPostsImplCopyWith( - _$GetPostsImpl value, $Res Function(_$GetPostsImpl) then) = - __$$GetPostsImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + moderatorView: + freezed == moderatorView + ? _value.moderatorView + : moderatorView // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + likedOnly: + freezed == likedOnly + ? _value.likedOnly + : likedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + dislikedOnly: + freezed == dislikedOnly + ? _value.dislikedOnly + : dislikedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + showHidden: + freezed == showHidden + ? _value.showHidden + : showHidden // ignore: cast_nullable_to_non_nullable + as bool?, + showRead: + freezed == showRead + ? _value.showRead + : showRead // ignore: cast_nullable_to_non_nullable + as bool?, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + pageCursor: + freezed == pageCursor + ? _value.pageCursor + : pageCursor // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$GetPostsImplCopyWith<$Res> implements $GetPostsCopyWith<$Res> { + factory _$$GetPostsImplCopyWith(_$GetPostsImpl value, $Res Function(_$GetPostsImpl) then) = __$$GetPostsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'type_') ListingType? type, - SortType? sort, - int? page, - int? limit, - int? communityId, - String? communityName, - bool? savedOnly, - @deprecated bool? moderatorView, - String? auth, - bool? likedOnly, - bool? dislikedOnly, - bool? showHidden, - bool? showRead, - bool? showNsfw, - String? pageCursor}); -} - -/// @nodoc -class __$$GetPostsImplCopyWithImpl<$Res> - extends _$GetPostsCopyWithImpl<$Res, _$GetPostsImpl> - implements _$$GetPostsImplCopyWith<$Res> { - __$$GetPostsImplCopyWithImpl( - _$GetPostsImpl _value, $Res Function(_$GetPostsImpl) _then) - : super(_value, _then); + $Res call({ + @JsonKey(name: 'type_') ListingType? type, + SortType? sort, + int? page, + int? limit, + int? communityId, + String? communityName, + bool? savedOnly, + @deprecated bool? moderatorView, + String? auth, + bool? likedOnly, + bool? dislikedOnly, + bool? showHidden, + bool? showRead, + bool? showNsfw, + String? pageCursor, + }); +} + +/// @nodoc +class __$$GetPostsImplCopyWithImpl<$Res> extends _$GetPostsCopyWithImpl<$Res, _$GetPostsImpl> implements _$$GetPostsImplCopyWith<$Res> { + __$$GetPostsImplCopyWithImpl(_$GetPostsImpl _value, $Res Function(_$GetPostsImpl) _then) : super(_value, _then); /// Create a copy of GetPosts /// with the given fields replaced by the non-null parameter values. @@ -2325,68 +2125,85 @@ class __$$GetPostsImplCopyWithImpl<$Res> Object? showNsfw = freezed, Object? pageCursor = freezed, }) { - return _then(_$GetPostsImpl( - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as ListingType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - moderatorView: freezed == moderatorView - ? _value.moderatorView - : moderatorView // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - likedOnly: freezed == likedOnly - ? _value.likedOnly - : likedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - dislikedOnly: freezed == dislikedOnly - ? _value.dislikedOnly - : dislikedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - showHidden: freezed == showHidden - ? _value.showHidden - : showHidden // ignore: cast_nullable_to_non_nullable - as bool?, - showRead: freezed == showRead - ? _value.showRead - : showRead // ignore: cast_nullable_to_non_nullable - as bool?, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - pageCursor: freezed == pageCursor - ? _value.pageCursor - : pageCursor // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$GetPostsImpl( + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as ListingType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + moderatorView: + freezed == moderatorView + ? _value.moderatorView + : moderatorView // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + likedOnly: + freezed == likedOnly + ? _value.likedOnly + : likedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + dislikedOnly: + freezed == dislikedOnly + ? _value.dislikedOnly + : dislikedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + showHidden: + freezed == showHidden + ? _value.showHidden + : showHidden // ignore: cast_nullable_to_non_nullable + as bool?, + showRead: + freezed == showRead + ? _value.showRead + : showRead // ignore: cast_nullable_to_non_nullable + as bool?, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + pageCursor: + freezed == pageCursor + ? _value.pageCursor + : pageCursor // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2394,70 +2211,69 @@ class __$$GetPostsImplCopyWithImpl<$Res> @apiSerde class _$GetPostsImpl extends _GetPosts { - const _$GetPostsImpl( - {@JsonKey(name: 'type_') this.type, - this.sort, - this.page, - this.limit, - this.communityId, - this.communityName, - this.savedOnly, - @deprecated this.moderatorView, - this.auth, - this.likedOnly, - this.dislikedOnly, - this.showHidden, - this.showRead, - this.showNsfw, - this.pageCursor}) - : super._(); - - factory _$GetPostsImpl.fromJson(Map json) => - _$$GetPostsImplFromJson(json); + const _$GetPostsImpl({ + @JsonKey(name: 'type_') this.type, + this.sort, + this.page, + this.limit, + this.communityId, + this.communityName, + this.savedOnly, + @deprecated this.moderatorView, + this.auth, + this.likedOnly, + this.dislikedOnly, + this.showHidden, + this.showRead, + this.showNsfw, + this.pageCursor, + }) : super._(); + + factory _$GetPostsImpl.fromJson(Map json) => _$$GetPostsImplFromJson(json); @override @JsonKey(name: 'type_') final ListingType? type; -// v0.18.0 + // v0.18.0 @override final SortType? sort; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final String? communityName; -// v0.18.0 + // v0.18.0 @override final bool? savedOnly; -// v0.18.0 + // v0.18.0 @override @deprecated final bool? moderatorView; -// v0.18.3 [deprecated in v0.19.0] + // v0.18.3 [deprecated in v0.19.0] @override final String? auth; @override final bool? likedOnly; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? dislikedOnly; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? showHidden; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final bool? showRead; -// v0.19.6 (optional) + // v0.19.6 (optional) @override final bool? showNsfw; -// v0.19.6 (optional) + // v0.19.6 (optional) @override final String? pageCursor; @@ -2475,86 +2291,58 @@ class _$GetPostsImpl extends _GetPosts { (identical(other.sort, sort) || other.sort == sort) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.communityName, communityName) || - other.communityName == communityName) && - (identical(other.savedOnly, savedOnly) || - other.savedOnly == savedOnly) && - (identical(other.moderatorView, moderatorView) || - other.moderatorView == moderatorView) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.communityName, communityName) || other.communityName == communityName) && + (identical(other.savedOnly, savedOnly) || other.savedOnly == savedOnly) && + (identical(other.moderatorView, moderatorView) || other.moderatorView == moderatorView) && (identical(other.auth, auth) || other.auth == auth) && - (identical(other.likedOnly, likedOnly) || - other.likedOnly == likedOnly) && - (identical(other.dislikedOnly, dislikedOnly) || - other.dislikedOnly == dislikedOnly) && - (identical(other.showHidden, showHidden) || - other.showHidden == showHidden) && - (identical(other.showRead, showRead) || - other.showRead == showRead) && - (identical(other.showNsfw, showNsfw) || - other.showNsfw == showNsfw) && - (identical(other.pageCursor, pageCursor) || - other.pageCursor == pageCursor)); - } - - @JsonKey(includeFromJson: false, includeToJson: false) - @override - int get hashCode => Object.hash( - runtimeType, - type, - sort, - page, - limit, - communityId, - communityName, - savedOnly, - moderatorView, - auth, - likedOnly, - dislikedOnly, - showHidden, - showRead, - showNsfw, - pageCursor); + (identical(other.likedOnly, likedOnly) || other.likedOnly == likedOnly) && + (identical(other.dislikedOnly, dislikedOnly) || other.dislikedOnly == dislikedOnly) && + (identical(other.showHidden, showHidden) || other.showHidden == showHidden) && + (identical(other.showRead, showRead) || other.showRead == showRead) && + (identical(other.showNsfw, showNsfw) || other.showNsfw == showNsfw) && + (identical(other.pageCursor, pageCursor) || other.pageCursor == pageCursor)); + } + + @JsonKey(includeFromJson: false, includeToJson: false) + @override + int get hashCode => + Object.hash(runtimeType, type, sort, page, limit, communityId, communityName, savedOnly, moderatorView, auth, likedOnly, dislikedOnly, showHidden, showRead, showNsfw, pageCursor); /// Create a copy of GetPosts /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPostsImplCopyWith<_$GetPostsImpl> get copyWith => - __$$GetPostsImplCopyWithImpl<_$GetPostsImpl>(this, _$identity); + _$$GetPostsImplCopyWith<_$GetPostsImpl> get copyWith => __$$GetPostsImplCopyWithImpl<_$GetPostsImpl>(this, _$identity); @override Map toJson() { - return _$$GetPostsImplToJson( - this, - ); + return _$$GetPostsImplToJson(this); } } abstract class _GetPosts extends GetPosts { - const factory _GetPosts( - {@JsonKey(name: 'type_') final ListingType? type, - final SortType? sort, - final int? page, - final int? limit, - final int? communityId, - final String? communityName, - final bool? savedOnly, - @deprecated final bool? moderatorView, - final String? auth, - final bool? likedOnly, - final bool? dislikedOnly, - final bool? showHidden, - final bool? showRead, - final bool? showNsfw, - final String? pageCursor}) = _$GetPostsImpl; + const factory _GetPosts({ + @JsonKey(name: 'type_') final ListingType? type, + final SortType? sort, + final int? page, + final int? limit, + final int? communityId, + final String? communityName, + final bool? savedOnly, + @deprecated final bool? moderatorView, + final String? auth, + final bool? likedOnly, + final bool? dislikedOnly, + final bool? showHidden, + final bool? showRead, + final bool? showNsfw, + final String? pageCursor, + }) = _$GetPostsImpl; const _GetPosts._() : super._(); - factory _GetPosts.fromJson(Map json) = - _$GetPostsImpl.fromJson; + factory _GetPosts.fromJson(Map json) = _$GetPostsImpl.fromJson; @override @JsonKey(name: 'type_') @@ -2593,8 +2381,7 @@ abstract class _GetPosts extends GetPosts { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPostsImplCopyWith<_$GetPostsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPostsImplCopyWith<_$GetPostsImpl> get copyWith => throw _privateConstructorUsedError; } CreatePostLike _$CreatePostLikeFromJson(Map json) { @@ -2613,22 +2400,18 @@ mixin _$CreatePostLike { /// Create a copy of CreatePostLike /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreatePostLikeCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreatePostLikeCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreatePostLikeCopyWith<$Res> { - factory $CreatePostLikeCopyWith( - CreatePostLike value, $Res Function(CreatePostLike) then) = - _$CreatePostLikeCopyWithImpl<$Res, CreatePostLike>; + factory $CreatePostLikeCopyWith(CreatePostLike value, $Res Function(CreatePostLike) then) = _$CreatePostLikeCopyWithImpl<$Res, CreatePostLike>; @useResult $Res call({int postId, num score, String? auth}); } /// @nodoc -class _$CreatePostLikeCopyWithImpl<$Res, $Val extends CreatePostLike> - implements $CreatePostLikeCopyWith<$Res> { +class _$CreatePostLikeCopyWithImpl<$Res, $Val extends CreatePostLike> implements $CreatePostLikeCopyWith<$Res> { _$CreatePostLikeCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2640,70 +2423,66 @@ class _$CreatePostLikeCopyWithImpl<$Res, $Val extends CreatePostLike> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? score = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as num, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreatePostLikeImplCopyWith<$Res> - implements $CreatePostLikeCopyWith<$Res> { - factory _$$CreatePostLikeImplCopyWith(_$CreatePostLikeImpl value, - $Res Function(_$CreatePostLikeImpl) then) = - __$$CreatePostLikeImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? score = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as num, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreatePostLikeImplCopyWith<$Res> implements $CreatePostLikeCopyWith<$Res> { + factory _$$CreatePostLikeImplCopyWith(_$CreatePostLikeImpl value, $Res Function(_$CreatePostLikeImpl) then) = __$$CreatePostLikeImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, num score, String? auth}); } /// @nodoc -class __$$CreatePostLikeImplCopyWithImpl<$Res> - extends _$CreatePostLikeCopyWithImpl<$Res, _$CreatePostLikeImpl> - implements _$$CreatePostLikeImplCopyWith<$Res> { - __$$CreatePostLikeImplCopyWithImpl( - _$CreatePostLikeImpl _value, $Res Function(_$CreatePostLikeImpl) _then) - : super(_value, _then); +class __$$CreatePostLikeImplCopyWithImpl<$Res> extends _$CreatePostLikeCopyWithImpl<$Res, _$CreatePostLikeImpl> implements _$$CreatePostLikeImplCopyWith<$Res> { + __$$CreatePostLikeImplCopyWithImpl(_$CreatePostLikeImpl _value, $Res Function(_$CreatePostLikeImpl) _then) : super(_value, _then); /// Create a copy of CreatePostLike /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? score = null, - Object? auth = freezed, - }) { - return _then(_$CreatePostLikeImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as num, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? score = null, Object? auth = freezed}) { + return _then( + _$CreatePostLikeImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as num, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2711,19 +2490,16 @@ class __$$CreatePostLikeImplCopyWithImpl<$Res> @apiSerde class _$CreatePostLikeImpl extends _CreatePostLike { - const _$CreatePostLikeImpl( - {required this.postId, required this.score, this.auth}) - : super._(); + const _$CreatePostLikeImpl({required this.postId, required this.score, this.auth}) : super._(); - factory _$CreatePostLikeImpl.fromJson(Map json) => - _$$CreatePostLikeImplFromJson(json); + factory _$CreatePostLikeImpl.fromJson(Map json) => _$$CreatePostLikeImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final num score; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2751,27 +2527,19 @@ class _$CreatePostLikeImpl extends _CreatePostLike { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreatePostLikeImplCopyWith<_$CreatePostLikeImpl> get copyWith => - __$$CreatePostLikeImplCopyWithImpl<_$CreatePostLikeImpl>( - this, _$identity); + _$$CreatePostLikeImplCopyWith<_$CreatePostLikeImpl> get copyWith => __$$CreatePostLikeImplCopyWithImpl<_$CreatePostLikeImpl>(this, _$identity); @override Map toJson() { - return _$$CreatePostLikeImplToJson( - this, - ); + return _$$CreatePostLikeImplToJson(this); } } abstract class _CreatePostLike extends CreatePostLike { - const factory _CreatePostLike( - {required final int postId, - required final num score, - final String? auth}) = _$CreatePostLikeImpl; + const factory _CreatePostLike({required final int postId, required final num score, final String? auth}) = _$CreatePostLikeImpl; const _CreatePostLike._() : super._(); - factory _CreatePostLike.fromJson(Map json) = - _$CreatePostLikeImpl.fromJson; + factory _CreatePostLike.fromJson(Map json) = _$CreatePostLikeImpl.fromJson; @override int get postId; // v0.18.0 @@ -2784,8 +2552,7 @@ abstract class _CreatePostLike extends CreatePostLike { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreatePostLikeImplCopyWith<_$CreatePostLikeImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreatePostLikeImplCopyWith<_$CreatePostLikeImpl> get copyWith => throw _privateConstructorUsedError; } ListPostLikes _$ListPostLikesFromJson(Map json) { @@ -2805,22 +2572,18 @@ mixin _$ListPostLikes { /// Create a copy of ListPostLikes /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPostLikesCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListPostLikesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPostLikesCopyWith<$Res> { - factory $ListPostLikesCopyWith( - ListPostLikes value, $Res Function(ListPostLikes) then) = - _$ListPostLikesCopyWithImpl<$Res, ListPostLikes>; + factory $ListPostLikesCopyWith(ListPostLikes value, $Res Function(ListPostLikes) then) = _$ListPostLikesCopyWithImpl<$Res, ListPostLikes>; @useResult $Res call({int postId, int? page, int? limit, String? auth}); } /// @nodoc -class _$ListPostLikesCopyWithImpl<$Res, $Val extends ListPostLikes> - implements $ListPostLikesCopyWith<$Res> { +class _$ListPostLikesCopyWithImpl<$Res, $Val extends ListPostLikes> implements $ListPostLikesCopyWith<$Res> { _$ListPostLikesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2832,80 +2595,76 @@ class _$ListPostLikesCopyWithImpl<$Res, $Val extends ListPostLikes> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ListPostLikesImplCopyWith<$Res> - implements $ListPostLikesCopyWith<$Res> { - factory _$$ListPostLikesImplCopyWith( - _$ListPostLikesImpl value, $Res Function(_$ListPostLikesImpl) then) = - __$$ListPostLikesImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ListPostLikesImplCopyWith<$Res> implements $ListPostLikesCopyWith<$Res> { + factory _$$ListPostLikesImplCopyWith(_$ListPostLikesImpl value, $Res Function(_$ListPostLikesImpl) then) = __$$ListPostLikesImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, int? page, int? limit, String? auth}); } /// @nodoc -class __$$ListPostLikesImplCopyWithImpl<$Res> - extends _$ListPostLikesCopyWithImpl<$Res, _$ListPostLikesImpl> - implements _$$ListPostLikesImplCopyWith<$Res> { - __$$ListPostLikesImplCopyWithImpl( - _$ListPostLikesImpl _value, $Res Function(_$ListPostLikesImpl) _then) - : super(_value, _then); +class __$$ListPostLikesImplCopyWithImpl<$Res> extends _$ListPostLikesCopyWithImpl<$Res, _$ListPostLikesImpl> implements _$$ListPostLikesImplCopyWith<$Res> { + __$$ListPostLikesImplCopyWithImpl(_$ListPostLikesImpl _value, $Res Function(_$ListPostLikesImpl) _then) : super(_value, _then); /// Create a copy of ListPostLikes /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_$ListPostLikesImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _$ListPostLikesImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2913,22 +2672,19 @@ class __$$ListPostLikesImplCopyWithImpl<$Res> @apiSerde class _$ListPostLikesImpl extends _ListPostLikes { - const _$ListPostLikesImpl( - {required this.postId, this.page, this.limit, this.auth}) - : super._(); + const _$ListPostLikesImpl({required this.postId, this.page, this.limit, this.auth}) : super._(); - factory _$ListPostLikesImpl.fromJson(Map json) => - _$$ListPostLikesImplFromJson(json); + factory _$ListPostLikesImpl.fromJson(Map json) => _$$ListPostLikesImplFromJson(json); @override final int postId; -// v0.19.2 (required) + // v0.19.2 (required) @override final int? page; -// v0.19.2 (optional) + // v0.19.2 (optional) @override final int? limit; -// v0.19.2 (optional) + // v0.19.2 (optional) @override final String? auth; @@ -2957,27 +2713,19 @@ class _$ListPostLikesImpl extends _ListPostLikes { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPostLikesImplCopyWith<_$ListPostLikesImpl> get copyWith => - __$$ListPostLikesImplCopyWithImpl<_$ListPostLikesImpl>(this, _$identity); + _$$ListPostLikesImplCopyWith<_$ListPostLikesImpl> get copyWith => __$$ListPostLikesImplCopyWithImpl<_$ListPostLikesImpl>(this, _$identity); @override Map toJson() { - return _$$ListPostLikesImplToJson( - this, - ); + return _$$ListPostLikesImplToJson(this); } } abstract class _ListPostLikes extends ListPostLikes { - const factory _ListPostLikes( - {required final int postId, - final int? page, - final int? limit, - final String? auth}) = _$ListPostLikesImpl; + const factory _ListPostLikes({required final int postId, final int? page, final int? limit, final String? auth}) = _$ListPostLikesImpl; const _ListPostLikes._() : super._(); - factory _ListPostLikes.fromJson(Map json) = - _$ListPostLikesImpl.fromJson; + factory _ListPostLikes.fromJson(Map json) = _$ListPostLikesImpl.fromJson; @override int get postId; // v0.19.2 (required) @@ -2992,8 +2740,7 @@ abstract class _ListPostLikes extends ListPostLikes { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPostLikesImplCopyWith<_$ListPostLikesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListPostLikesImplCopyWith<_$ListPostLikesImpl> get copyWith => throw _privateConstructorUsedError; } SavePost _$SavePostFromJson(Map json) { @@ -3012,21 +2759,18 @@ mixin _$SavePost { /// Create a copy of SavePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SavePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $SavePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SavePostCopyWith<$Res> { - factory $SavePostCopyWith(SavePost value, $Res Function(SavePost) then) = - _$SavePostCopyWithImpl<$Res, SavePost>; + factory $SavePostCopyWith(SavePost value, $Res Function(SavePost) then) = _$SavePostCopyWithImpl<$Res, SavePost>; @useResult $Res call({int postId, bool save, String? auth}); } /// @nodoc -class _$SavePostCopyWithImpl<$Res, $Val extends SavePost> - implements $SavePostCopyWith<$Res> { +class _$SavePostCopyWithImpl<$Res, $Val extends SavePost> implements $SavePostCopyWith<$Res> { _$SavePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3038,70 +2782,66 @@ class _$SavePostCopyWithImpl<$Res, $Val extends SavePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? save = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - save: null == save - ? _value.save - : save // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SavePostImplCopyWith<$Res> - implements $SavePostCopyWith<$Res> { - factory _$$SavePostImplCopyWith( - _$SavePostImpl value, $Res Function(_$SavePostImpl) then) = - __$$SavePostImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? save = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + save: + null == save + ? _value.save + : save // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$SavePostImplCopyWith<$Res> implements $SavePostCopyWith<$Res> { + factory _$$SavePostImplCopyWith(_$SavePostImpl value, $Res Function(_$SavePostImpl) then) = __$$SavePostImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, bool save, String? auth}); } /// @nodoc -class __$$SavePostImplCopyWithImpl<$Res> - extends _$SavePostCopyWithImpl<$Res, _$SavePostImpl> - implements _$$SavePostImplCopyWith<$Res> { - __$$SavePostImplCopyWithImpl( - _$SavePostImpl _value, $Res Function(_$SavePostImpl) _then) - : super(_value, _then); +class __$$SavePostImplCopyWithImpl<$Res> extends _$SavePostCopyWithImpl<$Res, _$SavePostImpl> implements _$$SavePostImplCopyWith<$Res> { + __$$SavePostImplCopyWithImpl(_$SavePostImpl _value, $Res Function(_$SavePostImpl) _then) : super(_value, _then); /// Create a copy of SavePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? save = null, - Object? auth = freezed, - }) { - return _then(_$SavePostImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - save: null == save - ? _value.save - : save // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? save = null, Object? auth = freezed}) { + return _then( + _$SavePostImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + save: + null == save + ? _value.save + : save // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3109,18 +2849,16 @@ class __$$SavePostImplCopyWithImpl<$Res> @apiSerde class _$SavePostImpl extends _SavePost { - const _$SavePostImpl({required this.postId, required this.save, this.auth}) - : super._(); + const _$SavePostImpl({required this.postId, required this.save, this.auth}) : super._(); - factory _$SavePostImpl.fromJson(Map json) => - _$$SavePostImplFromJson(json); + factory _$SavePostImpl.fromJson(Map json) => _$$SavePostImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool save; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -3148,26 +2886,19 @@ class _$SavePostImpl extends _SavePost { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SavePostImplCopyWith<_$SavePostImpl> get copyWith => - __$$SavePostImplCopyWithImpl<_$SavePostImpl>(this, _$identity); + _$$SavePostImplCopyWith<_$SavePostImpl> get copyWith => __$$SavePostImplCopyWithImpl<_$SavePostImpl>(this, _$identity); @override Map toJson() { - return _$$SavePostImplToJson( - this, - ); + return _$$SavePostImplToJson(this); } } abstract class _SavePost extends SavePost { - const factory _SavePost( - {required final int postId, - required final bool save, - final String? auth}) = _$SavePostImpl; + const factory _SavePost({required final int postId, required final bool save, final String? auth}) = _$SavePostImpl; const _SavePost._() : super._(); - factory _SavePost.fromJson(Map json) = - _$SavePostImpl.fromJson; + factory _SavePost.fromJson(Map json) = _$SavePostImpl.fromJson; @override int get postId; // v0.18.0 @@ -3180,8 +2911,7 @@ abstract class _SavePost extends SavePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SavePostImplCopyWith<_$SavePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SavePostImplCopyWith<_$SavePostImpl> get copyWith => throw _privateConstructorUsedError; } CreatePostReport _$CreatePostReportFromJson(Map json) { @@ -3200,22 +2930,18 @@ mixin _$CreatePostReport { /// Create a copy of CreatePostReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreatePostReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreatePostReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreatePostReportCopyWith<$Res> { - factory $CreatePostReportCopyWith( - CreatePostReport value, $Res Function(CreatePostReport) then) = - _$CreatePostReportCopyWithImpl<$Res, CreatePostReport>; + factory $CreatePostReportCopyWith(CreatePostReport value, $Res Function(CreatePostReport) then) = _$CreatePostReportCopyWithImpl<$Res, CreatePostReport>; @useResult $Res call({int postId, String reason, String? auth}); } /// @nodoc -class _$CreatePostReportCopyWithImpl<$Res, $Val extends CreatePostReport> - implements $CreatePostReportCopyWith<$Res> { +class _$CreatePostReportCopyWithImpl<$Res, $Val extends CreatePostReport> implements $CreatePostReportCopyWith<$Res> { _$CreatePostReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3227,70 +2953,66 @@ class _$CreatePostReportCopyWithImpl<$Res, $Val extends CreatePostReport> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$CreatePostReportImplCopyWith<$Res> - implements $CreatePostReportCopyWith<$Res> { - factory _$$CreatePostReportImplCopyWith(_$CreatePostReportImpl value, - $Res Function(_$CreatePostReportImpl) then) = - __$$CreatePostReportImplCopyWithImpl<$Res>; + $Res call({Object? postId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$CreatePostReportImplCopyWith<$Res> implements $CreatePostReportCopyWith<$Res> { + factory _$$CreatePostReportImplCopyWith(_$CreatePostReportImpl value, $Res Function(_$CreatePostReportImpl) then) = __$$CreatePostReportImplCopyWithImpl<$Res>; @override @useResult $Res call({int postId, String reason, String? auth}); } /// @nodoc -class __$$CreatePostReportImplCopyWithImpl<$Res> - extends _$CreatePostReportCopyWithImpl<$Res, _$CreatePostReportImpl> - implements _$$CreatePostReportImplCopyWith<$Res> { - __$$CreatePostReportImplCopyWithImpl(_$CreatePostReportImpl _value, - $Res Function(_$CreatePostReportImpl) _then) - : super(_value, _then); +class __$$CreatePostReportImplCopyWithImpl<$Res> extends _$CreatePostReportCopyWithImpl<$Res, _$CreatePostReportImpl> implements _$$CreatePostReportImplCopyWith<$Res> { + __$$CreatePostReportImplCopyWithImpl(_$CreatePostReportImpl _value, $Res Function(_$CreatePostReportImpl) _then) : super(_value, _then); /// Create a copy of CreatePostReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_$CreatePostReportImpl( - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? postId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _$CreatePostReportImpl( + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3298,19 +3020,16 @@ class __$$CreatePostReportImplCopyWithImpl<$Res> @apiSerde class _$CreatePostReportImpl extends _CreatePostReport { - const _$CreatePostReportImpl( - {required this.postId, required this.reason, this.auth}) - : super._(); + const _$CreatePostReportImpl({required this.postId, required this.reason, this.auth}) : super._(); - factory _$CreatePostReportImpl.fromJson(Map json) => - _$$CreatePostReportImplFromJson(json); + factory _$CreatePostReportImpl.fromJson(Map json) => _$$CreatePostReportImplFromJson(json); @override final int postId; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -3338,27 +3057,19 @@ class _$CreatePostReportImpl extends _CreatePostReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreatePostReportImplCopyWith<_$CreatePostReportImpl> get copyWith => - __$$CreatePostReportImplCopyWithImpl<_$CreatePostReportImpl>( - this, _$identity); + _$$CreatePostReportImplCopyWith<_$CreatePostReportImpl> get copyWith => __$$CreatePostReportImplCopyWithImpl<_$CreatePostReportImpl>(this, _$identity); @override Map toJson() { - return _$$CreatePostReportImplToJson( - this, - ); + return _$$CreatePostReportImplToJson(this); } } abstract class _CreatePostReport extends CreatePostReport { - const factory _CreatePostReport( - {required final int postId, - required final String reason, - final String? auth}) = _$CreatePostReportImpl; + const factory _CreatePostReport({required final int postId, required final String reason, final String? auth}) = _$CreatePostReportImpl; const _CreatePostReport._() : super._(); - factory _CreatePostReport.fromJson(Map json) = - _$CreatePostReportImpl.fromJson; + factory _CreatePostReport.fromJson(Map json) = _$CreatePostReportImpl.fromJson; @override int get postId; // v0.18.0 @@ -3371,8 +3082,7 @@ abstract class _CreatePostReport extends CreatePostReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreatePostReportImplCopyWith<_$CreatePostReportImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreatePostReportImplCopyWith<_$CreatePostReportImpl> get copyWith => throw _privateConstructorUsedError; } ResolvePostReport _$ResolvePostReportFromJson(Map json) { @@ -3391,22 +3101,18 @@ mixin _$ResolvePostReport { /// Create a copy of ResolvePostReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ResolvePostReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $ResolvePostReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ResolvePostReportCopyWith<$Res> { - factory $ResolvePostReportCopyWith( - ResolvePostReport value, $Res Function(ResolvePostReport) then) = - _$ResolvePostReportCopyWithImpl<$Res, ResolvePostReport>; + factory $ResolvePostReportCopyWith(ResolvePostReport value, $Res Function(ResolvePostReport) then) = _$ResolvePostReportCopyWithImpl<$Res, ResolvePostReport>; @useResult $Res call({int reportId, bool resolved, String? auth}); } /// @nodoc -class _$ResolvePostReportCopyWithImpl<$Res, $Val extends ResolvePostReport> - implements $ResolvePostReportCopyWith<$Res> { +class _$ResolvePostReportCopyWithImpl<$Res, $Val extends ResolvePostReport> implements $ResolvePostReportCopyWith<$Res> { _$ResolvePostReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3418,70 +3124,66 @@ class _$ResolvePostReportCopyWithImpl<$Res, $Val extends ResolvePostReport> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ResolvePostReportImplCopyWith<$Res> - implements $ResolvePostReportCopyWith<$Res> { - factory _$$ResolvePostReportImplCopyWith(_$ResolvePostReportImpl value, - $Res Function(_$ResolvePostReportImpl) then) = - __$$ResolvePostReportImplCopyWithImpl<$Res>; + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ResolvePostReportImplCopyWith<$Res> implements $ResolvePostReportCopyWith<$Res> { + factory _$$ResolvePostReportImplCopyWith(_$ResolvePostReportImpl value, $Res Function(_$ResolvePostReportImpl) then) = __$$ResolvePostReportImplCopyWithImpl<$Res>; @override @useResult $Res call({int reportId, bool resolved, String? auth}); } /// @nodoc -class __$$ResolvePostReportImplCopyWithImpl<$Res> - extends _$ResolvePostReportCopyWithImpl<$Res, _$ResolvePostReportImpl> - implements _$$ResolvePostReportImplCopyWith<$Res> { - __$$ResolvePostReportImplCopyWithImpl(_$ResolvePostReportImpl _value, - $Res Function(_$ResolvePostReportImpl) _then) - : super(_value, _then); +class __$$ResolvePostReportImplCopyWithImpl<$Res> extends _$ResolvePostReportCopyWithImpl<$Res, _$ResolvePostReportImpl> implements _$$ResolvePostReportImplCopyWith<$Res> { + __$$ResolvePostReportImplCopyWithImpl(_$ResolvePostReportImpl _value, $Res Function(_$ResolvePostReportImpl) _then) : super(_value, _then); /// Create a copy of ResolvePostReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_$ResolvePostReportImpl( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _$ResolvePostReportImpl( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3489,19 +3191,16 @@ class __$$ResolvePostReportImplCopyWithImpl<$Res> @apiSerde class _$ResolvePostReportImpl extends _ResolvePostReport { - const _$ResolvePostReportImpl( - {required this.reportId, required this.resolved, this.auth}) - : super._(); + const _$ResolvePostReportImpl({required this.reportId, required this.resolved, this.auth}) : super._(); - factory _$ResolvePostReportImpl.fromJson(Map json) => - _$$ResolvePostReportImplFromJson(json); + factory _$ResolvePostReportImpl.fromJson(Map json) => _$$ResolvePostReportImplFromJson(json); @override final int reportId; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -3515,10 +3214,8 @@ class _$ResolvePostReportImpl extends _ResolvePostReport { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ResolvePostReportImpl && - (identical(other.reportId, reportId) || - other.reportId == reportId) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && + (identical(other.reportId, reportId) || other.reportId == reportId) && + (identical(other.resolved, resolved) || other.resolved == resolved) && (identical(other.auth, auth) || other.auth == auth)); } @@ -3531,27 +3228,19 @@ class _$ResolvePostReportImpl extends _ResolvePostReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ResolvePostReportImplCopyWith<_$ResolvePostReportImpl> get copyWith => - __$$ResolvePostReportImplCopyWithImpl<_$ResolvePostReportImpl>( - this, _$identity); + _$$ResolvePostReportImplCopyWith<_$ResolvePostReportImpl> get copyWith => __$$ResolvePostReportImplCopyWithImpl<_$ResolvePostReportImpl>(this, _$identity); @override Map toJson() { - return _$$ResolvePostReportImplToJson( - this, - ); + return _$$ResolvePostReportImplToJson(this); } } abstract class _ResolvePostReport extends ResolvePostReport { - const factory _ResolvePostReport( - {required final int reportId, - required final bool resolved, - final String? auth}) = _$ResolvePostReportImpl; + const factory _ResolvePostReport({required final int reportId, required final bool resolved, final String? auth}) = _$ResolvePostReportImpl; const _ResolvePostReport._() : super._(); - factory _ResolvePostReport.fromJson(Map json) = - _$ResolvePostReportImpl.fromJson; + factory _ResolvePostReport.fromJson(Map json) = _$ResolvePostReportImpl.fromJson; @override int get reportId; // v0.18.0 @@ -3564,8 +3253,7 @@ abstract class _ResolvePostReport extends ResolvePostReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ResolvePostReportImplCopyWith<_$ResolvePostReportImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ResolvePostReportImplCopyWith<_$ResolvePostReportImpl> get copyWith => throw _privateConstructorUsedError; } ListPostReports _$ListPostReportsFromJson(Map json) { @@ -3587,28 +3275,18 @@ mixin _$ListPostReports { /// Create a copy of ListPostReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPostReportsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListPostReportsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPostReportsCopyWith<$Res> { - factory $ListPostReportsCopyWith( - ListPostReports value, $Res Function(ListPostReports) then) = - _$ListPostReportsCopyWithImpl<$Res, ListPostReports>; + factory $ListPostReportsCopyWith(ListPostReports value, $Res Function(ListPostReports) then) = _$ListPostReportsCopyWithImpl<$Res, ListPostReports>; @useResult - $Res call( - {int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - int? postId, - String? auth}); + $Res call({int? page, int? limit, bool? unresolvedOnly, int? communityId, int? postId, String? auth}); } /// @nodoc -class _$ListPostReportsCopyWithImpl<$Res, $Val extends ListPostReports> - implements $ListPostReportsCopyWith<$Res> { +class _$ListPostReportsCopyWithImpl<$Res, $Val extends ListPostReports> implements $ListPostReportsCopyWith<$Res> { _$ListPostReportsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3620,106 +3298,96 @@ class _$ListPostReportsCopyWithImpl<$Res, $Val extends ListPostReports> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? postId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ListPostReportsImplCopyWith<$Res> - implements $ListPostReportsCopyWith<$Res> { - factory _$$ListPostReportsImplCopyWith(_$ListPostReportsImpl value, - $Res Function(_$ListPostReportsImpl) then) = - __$$ListPostReportsImplCopyWithImpl<$Res>; + $Res call({Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? postId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ListPostReportsImplCopyWith<$Res> implements $ListPostReportsCopyWith<$Res> { + factory _$$ListPostReportsImplCopyWith(_$ListPostReportsImpl value, $Res Function(_$ListPostReportsImpl) then) = __$$ListPostReportsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - int? postId, - String? auth}); + $Res call({int? page, int? limit, bool? unresolvedOnly, int? communityId, int? postId, String? auth}); } /// @nodoc -class __$$ListPostReportsImplCopyWithImpl<$Res> - extends _$ListPostReportsCopyWithImpl<$Res, _$ListPostReportsImpl> - implements _$$ListPostReportsImplCopyWith<$Res> { - __$$ListPostReportsImplCopyWithImpl( - _$ListPostReportsImpl _value, $Res Function(_$ListPostReportsImpl) _then) - : super(_value, _then); +class __$$ListPostReportsImplCopyWithImpl<$Res> extends _$ListPostReportsCopyWithImpl<$Res, _$ListPostReportsImpl> implements _$$ListPostReportsImplCopyWith<$Res> { + __$$ListPostReportsImplCopyWithImpl(_$ListPostReportsImpl _value, $Res Function(_$ListPostReportsImpl) _then) : super(_value, _then); /// Create a copy of ListPostReports /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? postId = freezed, - Object? auth = freezed, - }) { - return _then(_$ListPostReportsImpl( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - postId: freezed == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? postId = freezed, Object? auth = freezed}) { + return _then( + _$ListPostReportsImpl( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + postId: + freezed == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3727,33 +3395,25 @@ class __$$ListPostReportsImplCopyWithImpl<$Res> @apiSerde class _$ListPostReportsImpl extends _ListPostReports { - const _$ListPostReportsImpl( - {this.page, - this.limit, - this.unresolvedOnly, - this.communityId, - this.postId, - this.auth}) - : super._(); + const _$ListPostReportsImpl({this.page, this.limit, this.unresolvedOnly, this.communityId, this.postId, this.auth}) : super._(); - factory _$ListPostReportsImpl.fromJson(Map json) => - _$$ListPostReportsImplFromJson(json); + factory _$ListPostReportsImpl.fromJson(Map json) => _$$ListPostReportsImplFromJson(json); @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? unresolvedOnly; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final int? postId; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -3769,48 +3429,34 @@ class _$ListPostReportsImpl extends _ListPostReports { other is _$ListPostReportsImpl && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.unresolvedOnly, unresolvedOnly) || - other.unresolvedOnly == unresolvedOnly) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.unresolvedOnly, unresolvedOnly) || other.unresolvedOnly == unresolvedOnly) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.postId, postId) || other.postId == postId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, page, limit, unresolvedOnly, communityId, postId, auth); + int get hashCode => Object.hash(runtimeType, page, limit, unresolvedOnly, communityId, postId, auth); /// Create a copy of ListPostReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPostReportsImplCopyWith<_$ListPostReportsImpl> get copyWith => - __$$ListPostReportsImplCopyWithImpl<_$ListPostReportsImpl>( - this, _$identity); + _$$ListPostReportsImplCopyWith<_$ListPostReportsImpl> get copyWith => __$$ListPostReportsImplCopyWithImpl<_$ListPostReportsImpl>(this, _$identity); @override Map toJson() { - return _$$ListPostReportsImplToJson( - this, - ); + return _$$ListPostReportsImplToJson(this); } } abstract class _ListPostReports extends ListPostReports { - const factory _ListPostReports( - {final int? page, - final int? limit, - final bool? unresolvedOnly, - final int? communityId, - final int? postId, - final String? auth}) = _$ListPostReportsImpl; + const factory _ListPostReports({final int? page, final int? limit, final bool? unresolvedOnly, final int? communityId, final int? postId, final String? auth}) = _$ListPostReportsImpl; const _ListPostReports._() : super._(); - factory _ListPostReports.fromJson(Map json) = - _$ListPostReportsImpl.fromJson; + factory _ListPostReports.fromJson(Map json) = _$ListPostReportsImpl.fromJson; @override int? get page; // v0.18.0 @@ -3829,8 +3475,7 @@ abstract class _ListPostReports extends ListPostReports { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPostReportsImplCopyWith<_$ListPostReportsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListPostReportsImplCopyWith<_$ListPostReportsImpl> get copyWith => throw _privateConstructorUsedError; } GetSiteMetadata _$GetSiteMetadataFromJson(Map json) { @@ -3847,22 +3492,18 @@ mixin _$GetSiteMetadata { /// Create a copy of GetSiteMetadata /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetSiteMetadataCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetSiteMetadataCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetSiteMetadataCopyWith<$Res> { - factory $GetSiteMetadataCopyWith( - GetSiteMetadata value, $Res Function(GetSiteMetadata) then) = - _$GetSiteMetadataCopyWithImpl<$Res, GetSiteMetadata>; + factory $GetSiteMetadataCopyWith(GetSiteMetadata value, $Res Function(GetSiteMetadata) then) = _$GetSiteMetadataCopyWithImpl<$Res, GetSiteMetadata>; @useResult $Res call({String url}); } /// @nodoc -class _$GetSiteMetadataCopyWithImpl<$Res, $Val extends GetSiteMetadata> - implements $GetSiteMetadataCopyWith<$Res> { +class _$GetSiteMetadataCopyWithImpl<$Res, $Val extends GetSiteMetadata> implements $GetSiteMetadataCopyWith<$Res> { _$GetSiteMetadataCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3874,50 +3515,46 @@ class _$GetSiteMetadataCopyWithImpl<$Res, $Val extends GetSiteMetadata> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - }) { - return _then(_value.copyWith( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? url = null}) { + return _then( + _value.copyWith( + url: + null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetSiteMetadataImplCopyWith<$Res> - implements $GetSiteMetadataCopyWith<$Res> { - factory _$$GetSiteMetadataImplCopyWith(_$GetSiteMetadataImpl value, - $Res Function(_$GetSiteMetadataImpl) then) = - __$$GetSiteMetadataImplCopyWithImpl<$Res>; +abstract class _$$GetSiteMetadataImplCopyWith<$Res> implements $GetSiteMetadataCopyWith<$Res> { + factory _$$GetSiteMetadataImplCopyWith(_$GetSiteMetadataImpl value, $Res Function(_$GetSiteMetadataImpl) then) = __$$GetSiteMetadataImplCopyWithImpl<$Res>; @override @useResult $Res call({String url}); } /// @nodoc -class __$$GetSiteMetadataImplCopyWithImpl<$Res> - extends _$GetSiteMetadataCopyWithImpl<$Res, _$GetSiteMetadataImpl> - implements _$$GetSiteMetadataImplCopyWith<$Res> { - __$$GetSiteMetadataImplCopyWithImpl( - _$GetSiteMetadataImpl _value, $Res Function(_$GetSiteMetadataImpl) _then) - : super(_value, _then); +class __$$GetSiteMetadataImplCopyWithImpl<$Res> extends _$GetSiteMetadataCopyWithImpl<$Res, _$GetSiteMetadataImpl> implements _$$GetSiteMetadataImplCopyWith<$Res> { + __$$GetSiteMetadataImplCopyWithImpl(_$GetSiteMetadataImpl _value, $Res Function(_$GetSiteMetadataImpl) _then) : super(_value, _then); /// Create a copy of GetSiteMetadata /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? url = null, - }) { - return _then(_$GetSiteMetadataImpl( - url: null == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? url = null}) { + return _then( + _$GetSiteMetadataImpl( + url: + null == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -3927,8 +3564,7 @@ class __$$GetSiteMetadataImplCopyWithImpl<$Res> class _$GetSiteMetadataImpl extends _GetSiteMetadata { const _$GetSiteMetadataImpl({required this.url}) : super._(); - factory _$GetSiteMetadataImpl.fromJson(Map json) => - _$$GetSiteMetadataImplFromJson(json); + factory _$GetSiteMetadataImpl.fromJson(Map json) => _$$GetSiteMetadataImplFromJson(json); @override final String url; @@ -3940,10 +3576,7 @@ class _$GetSiteMetadataImpl extends _GetSiteMetadata { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetSiteMetadataImpl && - (identical(other.url, url) || other.url == url)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetSiteMetadataImpl && (identical(other.url, url) || other.url == url)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -3955,25 +3588,19 @@ class _$GetSiteMetadataImpl extends _GetSiteMetadata { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetSiteMetadataImplCopyWith<_$GetSiteMetadataImpl> get copyWith => - __$$GetSiteMetadataImplCopyWithImpl<_$GetSiteMetadataImpl>( - this, _$identity); + _$$GetSiteMetadataImplCopyWith<_$GetSiteMetadataImpl> get copyWith => __$$GetSiteMetadataImplCopyWithImpl<_$GetSiteMetadataImpl>(this, _$identity); @override Map toJson() { - return _$$GetSiteMetadataImplToJson( - this, - ); + return _$$GetSiteMetadataImplToJson(this); } } abstract class _GetSiteMetadata extends GetSiteMetadata { - const factory _GetSiteMetadata({required final String url}) = - _$GetSiteMetadataImpl; + const factory _GetSiteMetadata({required final String url}) = _$GetSiteMetadataImpl; const _GetSiteMetadata._() : super._(); - factory _GetSiteMetadata.fromJson(Map json) = - _$GetSiteMetadataImpl.fromJson; + factory _GetSiteMetadata.fromJson(Map json) = _$GetSiteMetadataImpl.fromJson; @override String get url; @@ -3982,6 +3609,5 @@ abstract class _GetSiteMetadata extends GetSiteMetadata { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetSiteMetadataImplCopyWith<_$GetSiteMetadataImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetSiteMetadataImplCopyWith<_$GetSiteMetadataImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/post/post.g.dart b/lib/src/v3/api/post/post.g.dart index c2ec74ed..d8b50645 100644 --- a/lib/src/v3/api/post/post.g.dart +++ b/lib/src/v3/api/post/post.g.dart @@ -6,454 +6,214 @@ part of 'post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CreatePostImpl _$$CreatePostImplFromJson(Map json) => - _$CreatePostImpl( - name: json['name'] as String, - communityId: (json['community_id'] as num).toInt(), - url: json['url'] as String?, - body: json['body'] as String?, - altText: json['alt_text'] as String?, - honeypot: json['honeypot'] as String?, - nsfw: json['nsfw'] as bool?, - languageId: (json['language_id'] as num?)?.toInt(), - customThumbnail: json['custom_thumbnail'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$CreatePostImplToJson(_$CreatePostImpl instance) { - final val = { - 'name': instance.name, - 'community_id': instance.communityId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('url', instance.url); - writeNotNull('body', instance.body); - writeNotNull('alt_text', instance.altText); - writeNotNull('honeypot', instance.honeypot); - writeNotNull('nsfw', instance.nsfw); - writeNotNull('language_id', instance.languageId); - writeNotNull('custom_thumbnail', instance.customThumbnail); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetPostImpl _$$GetPostImplFromJson(Map json) => - _$GetPostImpl( - id: (json['id'] as num?)?.toInt(), - commentId: (json['comment_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$GetPostImplToJson(_$GetPostImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('id', instance.id); - writeNotNull('comment_id', instance.commentId); - writeNotNull('auth', instance.auth); - return val; -} - -_$EditPostImpl _$$EditPostImplFromJson(Map json) => - _$EditPostImpl( - postId: (json['post_id'] as num).toInt(), - name: json['name'] as String?, - url: json['url'] as String?, - body: json['body'] as String?, - altText: json['alt_text'] as String?, - nsfw: json['nsfw'] as bool?, - languageId: (json['language_id'] as num?)?.toInt(), - customThumbnail: json['custom_thumbnail'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$EditPostImplToJson(_$EditPostImpl instance) { - final val = { - 'post_id': instance.postId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('name', instance.name); - writeNotNull('url', instance.url); - writeNotNull('body', instance.body); - writeNotNull('alt_text', instance.altText); - writeNotNull('nsfw', instance.nsfw); - writeNotNull('language_id', instance.languageId); - writeNotNull('custom_thumbnail', instance.customThumbnail); - writeNotNull('auth', instance.auth); - return val; -} - -_$DeletePostImpl _$$DeletePostImplFromJson(Map json) => - _$DeletePostImpl( - postId: (json['post_id'] as num).toInt(), - deleted: json['deleted'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$DeletePostImplToJson(_$DeletePostImpl instance) { - final val = { - 'post_id': instance.postId, - 'deleted': instance.deleted, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +_$CreatePostImpl _$$CreatePostImplFromJson(Map json) => _$CreatePostImpl( + name: json['name'] as String, + communityId: (json['community_id'] as num).toInt(), + url: json['url'] as String?, + body: json['body'] as String?, + altText: json['alt_text'] as String?, + honeypot: json['honeypot'] as String?, + nsfw: json['nsfw'] as bool?, + languageId: (json['language_id'] as num?)?.toInt(), + customThumbnail: json['custom_thumbnail'] as String?, + auth: json['auth'] as String?, +); + +Map _$$CreatePostImplToJson(_$CreatePostImpl instance) => { + 'name': instance.name, + 'community_id': instance.communityId, + if (instance.url case final value?) 'url': value, + if (instance.body case final value?) 'body': value, + if (instance.altText case final value?) 'alt_text': value, + if (instance.honeypot case final value?) 'honeypot': value, + if (instance.nsfw case final value?) 'nsfw': value, + if (instance.languageId case final value?) 'language_id': value, + if (instance.customThumbnail case final value?) 'custom_thumbnail': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetPostImpl _$$GetPostImplFromJson(Map json) => _$GetPostImpl(id: (json['id'] as num?)?.toInt(), commentId: (json['comment_id'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$GetPostImplToJson(_$GetPostImpl instance) => { + if (instance.id case final value?) 'id': value, + if (instance.commentId case final value?) 'comment_id': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditPostImpl _$$EditPostImplFromJson(Map json) => _$EditPostImpl( + postId: (json['post_id'] as num).toInt(), + name: json['name'] as String?, + url: json['url'] as String?, + body: json['body'] as String?, + altText: json['alt_text'] as String?, + nsfw: json['nsfw'] as bool?, + languageId: (json['language_id'] as num?)?.toInt(), + customThumbnail: json['custom_thumbnail'] as String?, + auth: json['auth'] as String?, +); + +Map _$$EditPostImplToJson(_$EditPostImpl instance) => { + 'post_id': instance.postId, + if (instance.name case final value?) 'name': value, + if (instance.url case final value?) 'url': value, + if (instance.body case final value?) 'body': value, + if (instance.altText case final value?) 'alt_text': value, + if (instance.nsfw case final value?) 'nsfw': value, + if (instance.languageId case final value?) 'language_id': value, + if (instance.customThumbnail case final value?) 'custom_thumbnail': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$DeletePostImpl _$$DeletePostImplFromJson(Map json) => _$DeletePostImpl(postId: (json['post_id'] as num).toInt(), deleted: json['deleted'] as bool, auth: json['auth'] as String?); + +Map _$$DeletePostImplToJson(_$DeletePostImpl instance) => { + 'post_id': instance.postId, + 'deleted': instance.deleted, + if (instance.auth case final value?) 'auth': value, +}; _$RemovePostImpl _$$RemovePostImplFromJson(Map json) => - _$RemovePostImpl( - postId: (json['post_id'] as num).toInt(), - removed: json['removed'] as bool, - reason: json['reason'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$RemovePostImplToJson(_$RemovePostImpl instance) { - final val = { - 'post_id': instance.postId, - 'removed': instance.removed, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('reason', instance.reason); - writeNotNull('auth', instance.auth); - return val; -} - -_$MarkPostAsReadImpl _$$MarkPostAsReadImplFromJson(Map json) => - _$MarkPostAsReadImpl( - postId: (json['post_id'] as num?)?.toInt(), - postIds: (json['post_ids'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - read: json['read'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$MarkPostAsReadImplToJson( - _$MarkPostAsReadImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('post_id', instance.postId); - writeNotNull('post_ids', instance.postIds); - val['read'] = instance.read; - writeNotNull('auth', instance.auth); - return val; -} + _$RemovePostImpl(postId: (json['post_id'] as num).toInt(), removed: json['removed'] as bool, reason: json['reason'] as String?, auth: json['auth'] as String?); + +Map _$$RemovePostImplToJson(_$RemovePostImpl instance) => { + 'post_id': instance.postId, + 'removed': instance.removed, + if (instance.reason case final value?) 'reason': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$MarkPostAsReadImpl _$$MarkPostAsReadImplFromJson(Map json) => _$MarkPostAsReadImpl( + postId: (json['post_id'] as num?)?.toInt(), + postIds: (json['post_ids'] as List?)?.map((e) => (e as num).toInt()).toList(), + read: json['read'] as bool, + auth: json['auth'] as String?, +); + +Map _$$MarkPostAsReadImplToJson(_$MarkPostAsReadImpl instance) => { + if (instance.postId case final value?) 'post_id': value, + if (instance.postIds case final value?) 'post_ids': value, + 'read': instance.read, + if (instance.auth case final value?) 'auth': value, +}; _$HidePostImpl _$$HidePostImplFromJson(Map json) => - _$HidePostImpl( - postIds: (json['post_ids'] as List) - .map((e) => (e as num).toInt()) - .toList(), - hide: json['hide'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$HidePostImplToJson(_$HidePostImpl instance) { - final val = { - 'post_ids': instance.postIds, - 'hide': instance.hide, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$LockPostImpl _$$LockPostImplFromJson(Map json) => - _$LockPostImpl( - postId: (json['post_id'] as num).toInt(), - locked: json['locked'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$LockPostImplToJson(_$LockPostImpl instance) { - final val = { - 'post_id': instance.postId, - 'locked': instance.locked, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$FeaturePostImpl _$$FeaturePostImplFromJson(Map json) => - _$FeaturePostImpl( - postId: (json['post_id'] as num).toInt(), - featured: json['featured'] as bool, - featureType: PostFeatureType.fromJson(json['feature_type'] as String), - auth: json['auth'] as String?, - ); - -Map _$$FeaturePostImplToJson(_$FeaturePostImpl instance) { - final val = { - 'post_id': instance.postId, - 'featured': instance.featured, - 'feature_type': instance.featureType.toJson(), - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetPostsImpl _$$GetPostsImplFromJson(Map json) => - _$GetPostsImpl( - type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), - sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - communityId: (json['community_id'] as num?)?.toInt(), - communityName: json['community_name'] as String?, - savedOnly: json['saved_only'] as bool?, - moderatorView: json['moderator_view'] as bool?, - auth: json['auth'] as String?, - likedOnly: json['liked_only'] as bool?, - dislikedOnly: json['disliked_only'] as bool?, - showHidden: json['show_hidden'] as bool?, - showRead: json['show_read'] as bool?, - showNsfw: json['show_nsfw'] as bool?, - pageCursor: json['page_cursor'] as String?, - ); - -Map _$$GetPostsImplToJson(_$GetPostsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('type_', instance.type?.toJson()); - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('community_id', instance.communityId); - writeNotNull('community_name', instance.communityName); - writeNotNull('saved_only', instance.savedOnly); - writeNotNull('moderator_view', instance.moderatorView); - writeNotNull('auth', instance.auth); - writeNotNull('liked_only', instance.likedOnly); - writeNotNull('disliked_only', instance.dislikedOnly); - writeNotNull('show_hidden', instance.showHidden); - writeNotNull('show_read', instance.showRead); - writeNotNull('show_nsfw', instance.showNsfw); - writeNotNull('page_cursor', instance.pageCursor); - return val; -} + _$HidePostImpl(postIds: (json['post_ids'] as List).map((e) => (e as num).toInt()).toList(), hide: json['hide'] as bool, auth: json['auth'] as String?); + +Map _$$HidePostImplToJson(_$HidePostImpl instance) => {'post_ids': instance.postIds, 'hide': instance.hide, if (instance.auth case final value?) 'auth': value}; + +_$LockPostImpl _$$LockPostImplFromJson(Map json) => _$LockPostImpl(postId: (json['post_id'] as num).toInt(), locked: json['locked'] as bool, auth: json['auth'] as String?); + +Map _$$LockPostImplToJson(_$LockPostImpl instance) => {'post_id': instance.postId, 'locked': instance.locked, if (instance.auth case final value?) 'auth': value}; + +_$FeaturePostImpl _$$FeaturePostImplFromJson(Map json) => _$FeaturePostImpl( + postId: (json['post_id'] as num).toInt(), + featured: json['featured'] as bool, + featureType: PostFeatureType.fromJson(json['feature_type'] as String), + auth: json['auth'] as String?, +); + +Map _$$FeaturePostImplToJson(_$FeaturePostImpl instance) => { + 'post_id': instance.postId, + 'featured': instance.featured, + 'feature_type': instance.featureType.toJson(), + if (instance.auth case final value?) 'auth': value, +}; + +_$GetPostsImpl _$$GetPostsImplFromJson(Map json) => _$GetPostsImpl( + type: json['type_'] == null ? null : ListingType.fromJson(json['type_']), + sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + communityId: (json['community_id'] as num?)?.toInt(), + communityName: json['community_name'] as String?, + savedOnly: json['saved_only'] as bool?, + moderatorView: json['moderator_view'] as bool?, + auth: json['auth'] as String?, + likedOnly: json['liked_only'] as bool?, + dislikedOnly: json['disliked_only'] as bool?, + showHidden: json['show_hidden'] as bool?, + showRead: json['show_read'] as bool?, + showNsfw: json['show_nsfw'] as bool?, + pageCursor: json['page_cursor'] as String?, +); + +Map _$$GetPostsImplToJson(_$GetPostsImpl instance) => { + if (instance.type?.toJson() case final value?) 'type_': value, + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.communityName case final value?) 'community_name': value, + if (instance.savedOnly case final value?) 'saved_only': value, + if (instance.moderatorView case final value?) 'moderator_view': value, + if (instance.auth case final value?) 'auth': value, + if (instance.likedOnly case final value?) 'liked_only': value, + if (instance.dislikedOnly case final value?) 'disliked_only': value, + if (instance.showHidden case final value?) 'show_hidden': value, + if (instance.showRead case final value?) 'show_read': value, + if (instance.showNsfw case final value?) 'show_nsfw': value, + if (instance.pageCursor case final value?) 'page_cursor': value, +}; _$CreatePostLikeImpl _$$CreatePostLikeImplFromJson(Map json) => - _$CreatePostLikeImpl( - postId: (json['post_id'] as num).toInt(), - score: json['score'] as num, - auth: json['auth'] as String?, - ); - -Map _$$CreatePostLikeImplToJson( - _$CreatePostLikeImpl instance) { - final val = { - 'post_id': instance.postId, - 'score': instance.score, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} + _$CreatePostLikeImpl(postId: (json['post_id'] as num).toInt(), score: json['score'] as num, auth: json['auth'] as String?); + +Map _$$CreatePostLikeImplToJson(_$CreatePostLikeImpl instance) => { + 'post_id': instance.postId, + 'score': instance.score, + if (instance.auth case final value?) 'auth': value, +}; _$ListPostLikesImpl _$$ListPostLikesImplFromJson(Map json) => - _$ListPostLikesImpl( - postId: (json['post_id'] as num).toInt(), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListPostLikesImplToJson(_$ListPostLikesImpl instance) { - final val = { - 'post_id': instance.postId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} - -_$SavePostImpl _$$SavePostImplFromJson(Map json) => - _$SavePostImpl( - postId: (json['post_id'] as num).toInt(), - save: json['save'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$SavePostImplToJson(_$SavePostImpl instance) { - final val = { - 'post_id': instance.postId, - 'save': instance.save, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$CreatePostReportImpl _$$CreatePostReportImplFromJson( - Map json) => - _$CreatePostReportImpl( - postId: (json['post_id'] as num).toInt(), - reason: json['reason'] as String, - auth: json['auth'] as String?, - ); - -Map _$$CreatePostReportImplToJson( - _$CreatePostReportImpl instance) { - final val = { - 'post_id': instance.postId, - 'reason': instance.reason, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ResolvePostReportImpl _$$ResolvePostReportImplFromJson( - Map json) => - _$ResolvePostReportImpl( - reportId: (json['report_id'] as num).toInt(), - resolved: json['resolved'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$ResolvePostReportImplToJson( - _$ResolvePostReportImpl instance) { - final val = { - 'report_id': instance.reportId, - 'resolved': instance.resolved, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListPostReportsImpl _$$ListPostReportsImplFromJson( - Map json) => - _$ListPostReportsImpl( - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - unresolvedOnly: json['unresolved_only'] as bool?, - communityId: (json['community_id'] as num?)?.toInt(), - postId: (json['post_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListPostReportsImplToJson( - _$ListPostReportsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('unresolved_only', instance.unresolvedOnly); - writeNotNull('community_id', instance.communityId); - writeNotNull('post_id', instance.postId); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetSiteMetadataImpl _$$GetSiteMetadataImplFromJson( - Map json) => - _$GetSiteMetadataImpl( - url: json['url'] as String, - ); - -Map _$$GetSiteMetadataImplToJson( - _$GetSiteMetadataImpl instance) => - { - 'url': instance.url, - }; + _$ListPostLikesImpl(postId: (json['post_id'] as num).toInt(), page: (json['page'] as num?)?.toInt(), limit: (json['limit'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$ListPostLikesImplToJson(_$ListPostLikesImpl instance) => { + 'post_id': instance.postId, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$SavePostImpl _$$SavePostImplFromJson(Map json) => _$SavePostImpl(postId: (json['post_id'] as num).toInt(), save: json['save'] as bool, auth: json['auth'] as String?); + +Map _$$SavePostImplToJson(_$SavePostImpl instance) => {'post_id': instance.postId, 'save': instance.save, if (instance.auth case final value?) 'auth': value}; + +_$CreatePostReportImpl _$$CreatePostReportImplFromJson(Map json) => + _$CreatePostReportImpl(postId: (json['post_id'] as num).toInt(), reason: json['reason'] as String, auth: json['auth'] as String?); + +Map _$$CreatePostReportImplToJson(_$CreatePostReportImpl instance) => { + 'post_id': instance.postId, + 'reason': instance.reason, + if (instance.auth case final value?) 'auth': value, +}; + +_$ResolvePostReportImpl _$$ResolvePostReportImplFromJson(Map json) => + _$ResolvePostReportImpl(reportId: (json['report_id'] as num).toInt(), resolved: json['resolved'] as bool, auth: json['auth'] as String?); + +Map _$$ResolvePostReportImplToJson(_$ResolvePostReportImpl instance) => { + 'report_id': instance.reportId, + 'resolved': instance.resolved, + if (instance.auth case final value?) 'auth': value, +}; + +_$ListPostReportsImpl _$$ListPostReportsImplFromJson(Map json) => _$ListPostReportsImpl( + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + unresolvedOnly: json['unresolved_only'] as bool?, + communityId: (json['community_id'] as num?)?.toInt(), + postId: (json['post_id'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$ListPostReportsImplToJson(_$ListPostReportsImpl instance) => { + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.unresolvedOnly case final value?) 'unresolved_only': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.postId case final value?) 'post_id': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetSiteMetadataImpl _$$GetSiteMetadataImplFromJson(Map json) => _$GetSiteMetadataImpl(url: json['url'] as String); + +Map _$$GetSiteMetadataImplToJson(_$GetSiteMetadataImpl instance) => {'url': instance.url}; diff --git a/lib/src/v3/api/private_message/private_message.dart b/lib/src/v3/api/private_message/private_message.dart index dd2ed122..36104305 100644 --- a/lib/src/v3/api/private_message/private_message.dart +++ b/lib/src/v3/api/private_message/private_message.dart @@ -11,11 +11,7 @@ part 'private_message.g.dart'; /// /// `HTTP.GET /private_message/list` @freezed -class GetPrivateMessages - with _$GetPrivateMessages - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetPrivateMessages with _$GetPrivateMessages implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetPrivateMessages({ bool? unreadOnly, // v0.18.0 @@ -26,27 +22,21 @@ class GetPrivateMessages }) = _GetPrivateMessages; const GetPrivateMessages._(); - factory GetPrivateMessages.fromJson(Map json) => - _$GetPrivateMessagesFromJson(json); + factory GetPrivateMessages.fromJson(Map json) => _$GetPrivateMessagesFromJson(json); final path = '/private_message/list'; final httpMethod = HttpMethod.get; @override - PrivateMessagesResponse responseFactory(Map json) => - PrivateMessagesResponse.fromJson(json); + PrivateMessagesResponse responseFactory(Map json) => PrivateMessagesResponse.fromJson(json); } /// Create a private_message. /// /// `HTTP.POST /private_message` @freezed -class CreatePrivateMessage - with _$CreatePrivateMessage - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class CreatePrivateMessage with _$CreatePrivateMessage implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreatePrivateMessage({ required String content, // v0.18.0 @@ -55,27 +45,21 @@ class CreatePrivateMessage }) = _CreatePrivateMessage; const CreatePrivateMessage._(); - factory CreatePrivateMessage.fromJson(Map json) => - _$CreatePrivateMessageFromJson(json); + factory CreatePrivateMessage.fromJson(Map json) => _$CreatePrivateMessageFromJson(json); final path = '/private_message'; final httpMethod = HttpMethod.post; @override - PrivateMessageResponse responseFactory(Map json) => - PrivateMessageResponse.fromJson(json); + PrivateMessageResponse responseFactory(Map json) => PrivateMessageResponse.fromJson(json); } /// Edit a private_message. /// /// `HTTP.PUT /private_message` @freezed -class EditPrivateMessage - with _$EditPrivateMessage - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class EditPrivateMessage with _$EditPrivateMessage implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditPrivateMessage({ required int privateMessageId, // v0.18.0 @@ -84,27 +68,21 @@ class EditPrivateMessage }) = _EditPrivateMessage; const EditPrivateMessage._(); - factory EditPrivateMessage.fromJson(Map json) => - _$EditPrivateMessageFromJson(json); + factory EditPrivateMessage.fromJson(Map json) => _$EditPrivateMessageFromJson(json); final path = '/private_message'; final httpMethod = HttpMethod.put; @override - PrivateMessageResponse responseFactory(Map json) => - PrivateMessageResponse.fromJson(json); + PrivateMessageResponse responseFactory(Map json) => PrivateMessageResponse.fromJson(json); } /// Delete a private_message. /// /// `HTTP.POST /private_message/delete` @freezed -class DeletePrivateMessage - with _$DeletePrivateMessage - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class DeletePrivateMessage with _$DeletePrivateMessage implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeletePrivateMessage({ required int privateMessageId, // v0.18.0 @@ -113,27 +91,21 @@ class DeletePrivateMessage }) = _DeletePrivateMessage; const DeletePrivateMessage._(); - factory DeletePrivateMessage.fromJson(Map json) => - _$DeletePrivateMessageFromJson(json); + factory DeletePrivateMessage.fromJson(Map json) => _$DeletePrivateMessageFromJson(json); final path = '/private_message/delete'; final httpMethod = HttpMethod.post; @override - PrivateMessageResponse responseFactory(Map json) => - PrivateMessageResponse.fromJson(json); + PrivateMessageResponse responseFactory(Map json) => PrivateMessageResponse.fromJson(json); } /// Mark a private_message as read. /// /// `HTTP.POST /private_message/mark_as_read` @freezed -class MarkPrivateMessageAsRead - with _$MarkPrivateMessageAsRead - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class MarkPrivateMessageAsRead with _$MarkPrivateMessageAsRead implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory MarkPrivateMessageAsRead({ required int privateMessageId, // v0.18.0 @@ -142,27 +114,21 @@ class MarkPrivateMessageAsRead }) = _MarkPrivateMessageAsRead; const MarkPrivateMessageAsRead._(); - factory MarkPrivateMessageAsRead.fromJson(Map json) => - _$MarkPrivateMessageAsReadFromJson(json); + factory MarkPrivateMessageAsRead.fromJson(Map json) => _$MarkPrivateMessageAsReadFromJson(json); final path = '/private_message/mark_as_read'; final httpMethod = HttpMethod.post; @override - PrivateMessageResponse responseFactory(Map json) => - PrivateMessageResponse.fromJson(json); + PrivateMessageResponse responseFactory(Map json) => PrivateMessageResponse.fromJson(json); } /// Create a report for a private message. /// /// `HTTP.POST /private_message/report` @freezed -class CreatePrivateMessageReport - with _$CreatePrivateMessageReport - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class CreatePrivateMessageReport with _$CreatePrivateMessageReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreatePrivateMessageReport({ required int privateMessageId, // v0.18.0 @@ -171,27 +137,21 @@ class CreatePrivateMessageReport }) = _CreatePrivateMessageReport; const CreatePrivateMessageReport._(); - factory CreatePrivateMessageReport.fromJson(Map json) => - _$CreatePrivateMessageReportFromJson(json); + factory CreatePrivateMessageReport.fromJson(Map json) => _$CreatePrivateMessageReportFromJson(json); final path = '/private_message/report'; final httpMethod = HttpMethod.post; @override - PrivateMessageReportResponse responseFactory(Map json) => - PrivateMessageReportResponse.fromJson(json); + PrivateMessageReportResponse responseFactory(Map json) => PrivateMessageReportResponse.fromJson(json); } /// Resolve a report for a private message. /// /// `HTTP.PUT /private_message/report/resolve` @freezed -class ResolvePrivateMessageReport - with _$ResolvePrivateMessageReport - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ResolvePrivateMessageReport with _$ResolvePrivateMessageReport implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ResolvePrivateMessageReport({ required int reportId, // v0.18.0 @@ -200,27 +160,21 @@ class ResolvePrivateMessageReport }) = _ResolvePrivateMessageReport; const ResolvePrivateMessageReport._(); - factory ResolvePrivateMessageReport.fromJson(Map json) => - _$ResolvePrivateMessageReportFromJson(json); + factory ResolvePrivateMessageReport.fromJson(Map json) => _$ResolvePrivateMessageReportFromJson(json); final path = '/private_message/report/resolve'; final httpMethod = HttpMethod.put; @override - PrivateMessageReportResponse responseFactory(Map json) => - PrivateMessageReportResponse.fromJson(json); + PrivateMessageReportResponse responseFactory(Map json) => PrivateMessageReportResponse.fromJson(json); } /// List private_message reports. /// /// `HTTP.GET /private_message/report/list` @freezed -class ListPrivateMessageReports - with _$ListPrivateMessageReports - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ListPrivateMessageReports with _$ListPrivateMessageReports implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListPrivateMessageReports({ int? page, // v0.18.0 @@ -231,16 +185,12 @@ class ListPrivateMessageReports }) = _ListPrivateMessageReports; const ListPrivateMessageReports._(); - factory ListPrivateMessageReports.fromJson(Map json) => - _$ListPrivateMessageReportsFromJson(json); + factory ListPrivateMessageReports.fromJson(Map json) => _$ListPrivateMessageReportsFromJson(json); final path = '/private_message/report/list'; final httpMethod = HttpMethod.get; @override - ListPrivateMessageReportsResponse responseFactory( - Map json, - ) => - ListPrivateMessageReportsResponse.fromJson(json); + ListPrivateMessageReportsResponse responseFactory(Map json) => ListPrivateMessageReportsResponse.fromJson(json); } diff --git a/lib/src/v3/api/private_message/private_message.freezed.dart b/lib/src/v3/api/private_message/private_message.freezed.dart index ebdf9258..cab18c29 100644 --- a/lib/src/v3/api/private_message/private_message.freezed.dart +++ b/lib/src/v3/api/private_message/private_message.freezed.dart @@ -12,7 +12,8 @@ part of 'private_message.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetPrivateMessages _$GetPrivateMessagesFromJson(Map json) { return _GetPrivateMessages.fromJson(json); @@ -23,8 +24,7 @@ mixin _$GetPrivateMessages { bool? get unreadOnly => throw _privateConstructorUsedError; // v0.18.0 int? get page => throw _privateConstructorUsedError; // v0.18.0 int? get limit => throw _privateConstructorUsedError; // v0.18.0 - int? get creatorId => - throw _privateConstructorUsedError; // v0.19.0 (optional) + int? get creatorId => throw _privateConstructorUsedError; // v0.19.0 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this GetPrivateMessages to a JSON map. @@ -33,23 +33,18 @@ mixin _$GetPrivateMessages { /// Create a copy of GetPrivateMessages /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPrivateMessagesCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPrivateMessagesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPrivateMessagesCopyWith<$Res> { - factory $GetPrivateMessagesCopyWith( - GetPrivateMessages value, $Res Function(GetPrivateMessages) then) = - _$GetPrivateMessagesCopyWithImpl<$Res, GetPrivateMessages>; + factory $GetPrivateMessagesCopyWith(GetPrivateMessages value, $Res Function(GetPrivateMessages) then) = _$GetPrivateMessagesCopyWithImpl<$Res, GetPrivateMessages>; @useResult - $Res call( - {bool? unreadOnly, int? page, int? limit, int? creatorId, String? auth}); + $Res call({bool? unreadOnly, int? page, int? limit, int? creatorId, String? auth}); } /// @nodoc -class _$GetPrivateMessagesCopyWithImpl<$Res, $Val extends GetPrivateMessages> - implements $GetPrivateMessagesCopyWith<$Res> { +class _$GetPrivateMessagesCopyWithImpl<$Res, $Val extends GetPrivateMessages> implements $GetPrivateMessagesCopyWith<$Res> { _$GetPrivateMessagesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,91 +56,86 @@ class _$GetPrivateMessagesCopyWithImpl<$Res, $Val extends GetPrivateMessages> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? unreadOnly = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? creatorId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - creatorId: freezed == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? unreadOnly = freezed, Object? page = freezed, Object? limit = freezed, Object? creatorId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + creatorId: + freezed == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetPrivateMessagesImplCopyWith<$Res> - implements $GetPrivateMessagesCopyWith<$Res> { - factory _$$GetPrivateMessagesImplCopyWith(_$GetPrivateMessagesImpl value, - $Res Function(_$GetPrivateMessagesImpl) then) = - __$$GetPrivateMessagesImplCopyWithImpl<$Res>; +abstract class _$$GetPrivateMessagesImplCopyWith<$Res> implements $GetPrivateMessagesCopyWith<$Res> { + factory _$$GetPrivateMessagesImplCopyWith(_$GetPrivateMessagesImpl value, $Res Function(_$GetPrivateMessagesImpl) then) = __$$GetPrivateMessagesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool? unreadOnly, int? page, int? limit, int? creatorId, String? auth}); + $Res call({bool? unreadOnly, int? page, int? limit, int? creatorId, String? auth}); } /// @nodoc -class __$$GetPrivateMessagesImplCopyWithImpl<$Res> - extends _$GetPrivateMessagesCopyWithImpl<$Res, _$GetPrivateMessagesImpl> - implements _$$GetPrivateMessagesImplCopyWith<$Res> { - __$$GetPrivateMessagesImplCopyWithImpl(_$GetPrivateMessagesImpl _value, - $Res Function(_$GetPrivateMessagesImpl) _then) - : super(_value, _then); +class __$$GetPrivateMessagesImplCopyWithImpl<$Res> extends _$GetPrivateMessagesCopyWithImpl<$Res, _$GetPrivateMessagesImpl> implements _$$GetPrivateMessagesImplCopyWith<$Res> { + __$$GetPrivateMessagesImplCopyWithImpl(_$GetPrivateMessagesImpl _value, $Res Function(_$GetPrivateMessagesImpl) _then) : super(_value, _then); /// Create a copy of GetPrivateMessages /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? unreadOnly = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? creatorId = freezed, - Object? auth = freezed, - }) { - return _then(_$GetPrivateMessagesImpl( - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - creatorId: freezed == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? unreadOnly = freezed, Object? page = freezed, Object? limit = freezed, Object? creatorId = freezed, Object? auth = freezed}) { + return _then( + _$GetPrivateMessagesImpl( + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + creatorId: + freezed == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -153,25 +143,22 @@ class __$$GetPrivateMessagesImplCopyWithImpl<$Res> @apiSerde class _$GetPrivateMessagesImpl extends _GetPrivateMessages { - const _$GetPrivateMessagesImpl( - {this.unreadOnly, this.page, this.limit, this.creatorId, this.auth}) - : super._(); + const _$GetPrivateMessagesImpl({this.unreadOnly, this.page, this.limit, this.creatorId, this.auth}) : super._(); - factory _$GetPrivateMessagesImpl.fromJson(Map json) => - _$$GetPrivateMessagesImplFromJson(json); + factory _$GetPrivateMessagesImpl.fromJson(Map json) => _$$GetPrivateMessagesImplFromJson(json); @override final bool? unreadOnly; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final int? creatorId; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String? auth; @@ -185,48 +172,35 @@ class _$GetPrivateMessagesImpl extends _GetPrivateMessages { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetPrivateMessagesImpl && - (identical(other.unreadOnly, unreadOnly) || - other.unreadOnly == unreadOnly) && + (identical(other.unreadOnly, unreadOnly) || other.unreadOnly == unreadOnly) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, unreadOnly, page, limit, creatorId, auth); + int get hashCode => Object.hash(runtimeType, unreadOnly, page, limit, creatorId, auth); /// Create a copy of GetPrivateMessages /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPrivateMessagesImplCopyWith<_$GetPrivateMessagesImpl> get copyWith => - __$$GetPrivateMessagesImplCopyWithImpl<_$GetPrivateMessagesImpl>( - this, _$identity); + _$$GetPrivateMessagesImplCopyWith<_$GetPrivateMessagesImpl> get copyWith => __$$GetPrivateMessagesImplCopyWithImpl<_$GetPrivateMessagesImpl>(this, _$identity); @override Map toJson() { - return _$$GetPrivateMessagesImplToJson( - this, - ); + return _$$GetPrivateMessagesImplToJson(this); } } abstract class _GetPrivateMessages extends GetPrivateMessages { - const factory _GetPrivateMessages( - {final bool? unreadOnly, - final int? page, - final int? limit, - final int? creatorId, - final String? auth}) = _$GetPrivateMessagesImpl; + const factory _GetPrivateMessages({final bool? unreadOnly, final int? page, final int? limit, final int? creatorId, final String? auth}) = _$GetPrivateMessagesImpl; const _GetPrivateMessages._() : super._(); - factory _GetPrivateMessages.fromJson(Map json) = - _$GetPrivateMessagesImpl.fromJson; + factory _GetPrivateMessages.fromJson(Map json) = _$GetPrivateMessagesImpl.fromJson; @override bool? get unreadOnly; // v0.18.0 @@ -243,8 +217,7 @@ abstract class _GetPrivateMessages extends GetPrivateMessages { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPrivateMessagesImplCopyWith<_$GetPrivateMessagesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPrivateMessagesImplCopyWith<_$GetPrivateMessagesImpl> get copyWith => throw _privateConstructorUsedError; } CreatePrivateMessage _$CreatePrivateMessageFromJson(Map json) { @@ -263,23 +236,18 @@ mixin _$CreatePrivateMessage { /// Create a copy of CreatePrivateMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreatePrivateMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreatePrivateMessageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreatePrivateMessageCopyWith<$Res> { - factory $CreatePrivateMessageCopyWith(CreatePrivateMessage value, - $Res Function(CreatePrivateMessage) then) = - _$CreatePrivateMessageCopyWithImpl<$Res, CreatePrivateMessage>; + factory $CreatePrivateMessageCopyWith(CreatePrivateMessage value, $Res Function(CreatePrivateMessage) then) = _$CreatePrivateMessageCopyWithImpl<$Res, CreatePrivateMessage>; @useResult $Res call({String content, int recipientId, String? auth}); } /// @nodoc -class _$CreatePrivateMessageCopyWithImpl<$Res, - $Val extends CreatePrivateMessage> - implements $CreatePrivateMessageCopyWith<$Res> { +class _$CreatePrivateMessageCopyWithImpl<$Res, $Val extends CreatePrivateMessage> implements $CreatePrivateMessageCopyWith<$Res> { _$CreatePrivateMessageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -291,70 +259,66 @@ class _$CreatePrivateMessageCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? content = null, - Object? recipientId = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? content = null, Object? recipientId = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CreatePrivateMessageImplCopyWith<$Res> - implements $CreatePrivateMessageCopyWith<$Res> { - factory _$$CreatePrivateMessageImplCopyWith(_$CreatePrivateMessageImpl value, - $Res Function(_$CreatePrivateMessageImpl) then) = - __$$CreatePrivateMessageImplCopyWithImpl<$Res>; +abstract class _$$CreatePrivateMessageImplCopyWith<$Res> implements $CreatePrivateMessageCopyWith<$Res> { + factory _$$CreatePrivateMessageImplCopyWith(_$CreatePrivateMessageImpl value, $Res Function(_$CreatePrivateMessageImpl) then) = __$$CreatePrivateMessageImplCopyWithImpl<$Res>; @override @useResult $Res call({String content, int recipientId, String? auth}); } /// @nodoc -class __$$CreatePrivateMessageImplCopyWithImpl<$Res> - extends _$CreatePrivateMessageCopyWithImpl<$Res, _$CreatePrivateMessageImpl> - implements _$$CreatePrivateMessageImplCopyWith<$Res> { - __$$CreatePrivateMessageImplCopyWithImpl(_$CreatePrivateMessageImpl _value, - $Res Function(_$CreatePrivateMessageImpl) _then) - : super(_value, _then); +class __$$CreatePrivateMessageImplCopyWithImpl<$Res> extends _$CreatePrivateMessageCopyWithImpl<$Res, _$CreatePrivateMessageImpl> implements _$$CreatePrivateMessageImplCopyWith<$Res> { + __$$CreatePrivateMessageImplCopyWithImpl(_$CreatePrivateMessageImpl _value, $Res Function(_$CreatePrivateMessageImpl) _then) : super(_value, _then); /// Create a copy of CreatePrivateMessage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? content = null, - Object? recipientId = null, - Object? auth = freezed, - }) { - return _then(_$CreatePrivateMessageImpl( - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? content = null, Object? recipientId = null, Object? auth = freezed}) { + return _then( + _$CreatePrivateMessageImpl( + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -362,19 +326,16 @@ class __$$CreatePrivateMessageImplCopyWithImpl<$Res> @apiSerde class _$CreatePrivateMessageImpl extends _CreatePrivateMessage { - const _$CreatePrivateMessageImpl( - {required this.content, required this.recipientId, this.auth}) - : super._(); + const _$CreatePrivateMessageImpl({required this.content, required this.recipientId, this.auth}) : super._(); - factory _$CreatePrivateMessageImpl.fromJson(Map json) => - _$$CreatePrivateMessageImplFromJson(json); + factory _$CreatePrivateMessageImpl.fromJson(Map json) => _$$CreatePrivateMessageImplFromJson(json); @override final String content; -// v0.18.0 + // v0.18.0 @override final int recipientId; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -389,8 +350,7 @@ class _$CreatePrivateMessageImpl extends _CreatePrivateMessage { (other.runtimeType == runtimeType && other is _$CreatePrivateMessageImpl && (identical(other.content, content) || other.content == content) && - (identical(other.recipientId, recipientId) || - other.recipientId == recipientId) && + (identical(other.recipientId, recipientId) || other.recipientId == recipientId) && (identical(other.auth, auth) || other.auth == auth)); } @@ -403,28 +363,19 @@ class _$CreatePrivateMessageImpl extends _CreatePrivateMessage { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreatePrivateMessageImplCopyWith<_$CreatePrivateMessageImpl> - get copyWith => - __$$CreatePrivateMessageImplCopyWithImpl<_$CreatePrivateMessageImpl>( - this, _$identity); + _$$CreatePrivateMessageImplCopyWith<_$CreatePrivateMessageImpl> get copyWith => __$$CreatePrivateMessageImplCopyWithImpl<_$CreatePrivateMessageImpl>(this, _$identity); @override Map toJson() { - return _$$CreatePrivateMessageImplToJson( - this, - ); + return _$$CreatePrivateMessageImplToJson(this); } } abstract class _CreatePrivateMessage extends CreatePrivateMessage { - const factory _CreatePrivateMessage( - {required final String content, - required final int recipientId, - final String? auth}) = _$CreatePrivateMessageImpl; + const factory _CreatePrivateMessage({required final String content, required final int recipientId, final String? auth}) = _$CreatePrivateMessageImpl; const _CreatePrivateMessage._() : super._(); - factory _CreatePrivateMessage.fromJson(Map json) = - _$CreatePrivateMessageImpl.fromJson; + factory _CreatePrivateMessage.fromJson(Map json) = _$CreatePrivateMessageImpl.fromJson; @override String get content; // v0.18.0 @@ -437,8 +388,7 @@ abstract class _CreatePrivateMessage extends CreatePrivateMessage { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreatePrivateMessageImplCopyWith<_$CreatePrivateMessageImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CreatePrivateMessageImplCopyWith<_$CreatePrivateMessageImpl> get copyWith => throw _privateConstructorUsedError; } EditPrivateMessage _$EditPrivateMessageFromJson(Map json) { @@ -457,22 +407,18 @@ mixin _$EditPrivateMessage { /// Create a copy of EditPrivateMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditPrivateMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditPrivateMessageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditPrivateMessageCopyWith<$Res> { - factory $EditPrivateMessageCopyWith( - EditPrivateMessage value, $Res Function(EditPrivateMessage) then) = - _$EditPrivateMessageCopyWithImpl<$Res, EditPrivateMessage>; + factory $EditPrivateMessageCopyWith(EditPrivateMessage value, $Res Function(EditPrivateMessage) then) = _$EditPrivateMessageCopyWithImpl<$Res, EditPrivateMessage>; @useResult $Res call({int privateMessageId, String content, String? auth}); } /// @nodoc -class _$EditPrivateMessageCopyWithImpl<$Res, $Val extends EditPrivateMessage> - implements $EditPrivateMessageCopyWith<$Res> { +class _$EditPrivateMessageCopyWithImpl<$Res, $Val extends EditPrivateMessage> implements $EditPrivateMessageCopyWith<$Res> { _$EditPrivateMessageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -484,70 +430,66 @@ class _$EditPrivateMessageCopyWithImpl<$Res, $Val extends EditPrivateMessage> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? content = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? privateMessageId = null, Object? content = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$EditPrivateMessageImplCopyWith<$Res> - implements $EditPrivateMessageCopyWith<$Res> { - factory _$$EditPrivateMessageImplCopyWith(_$EditPrivateMessageImpl value, - $Res Function(_$EditPrivateMessageImpl) then) = - __$$EditPrivateMessageImplCopyWithImpl<$Res>; +abstract class _$$EditPrivateMessageImplCopyWith<$Res> implements $EditPrivateMessageCopyWith<$Res> { + factory _$$EditPrivateMessageImplCopyWith(_$EditPrivateMessageImpl value, $Res Function(_$EditPrivateMessageImpl) then) = __$$EditPrivateMessageImplCopyWithImpl<$Res>; @override @useResult $Res call({int privateMessageId, String content, String? auth}); } /// @nodoc -class __$$EditPrivateMessageImplCopyWithImpl<$Res> - extends _$EditPrivateMessageCopyWithImpl<$Res, _$EditPrivateMessageImpl> - implements _$$EditPrivateMessageImplCopyWith<$Res> { - __$$EditPrivateMessageImplCopyWithImpl(_$EditPrivateMessageImpl _value, - $Res Function(_$EditPrivateMessageImpl) _then) - : super(_value, _then); +class __$$EditPrivateMessageImplCopyWithImpl<$Res> extends _$EditPrivateMessageCopyWithImpl<$Res, _$EditPrivateMessageImpl> implements _$$EditPrivateMessageImplCopyWith<$Res> { + __$$EditPrivateMessageImplCopyWithImpl(_$EditPrivateMessageImpl _value, $Res Function(_$EditPrivateMessageImpl) _then) : super(_value, _then); /// Create a copy of EditPrivateMessage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? content = null, - Object? auth = freezed, - }) { - return _then(_$EditPrivateMessageImpl( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? privateMessageId = null, Object? content = null, Object? auth = freezed}) { + return _then( + _$EditPrivateMessageImpl( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -555,19 +497,16 @@ class __$$EditPrivateMessageImplCopyWithImpl<$Res> @apiSerde class _$EditPrivateMessageImpl extends _EditPrivateMessage { - const _$EditPrivateMessageImpl( - {required this.privateMessageId, required this.content, this.auth}) - : super._(); + const _$EditPrivateMessageImpl({required this.privateMessageId, required this.content, this.auth}) : super._(); - factory _$EditPrivateMessageImpl.fromJson(Map json) => - _$$EditPrivateMessageImplFromJson(json); + factory _$EditPrivateMessageImpl.fromJson(Map json) => _$$EditPrivateMessageImplFromJson(json); @override final int privateMessageId; -// v0.18.0 + // v0.18.0 @override final String content; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -581,8 +520,7 @@ class _$EditPrivateMessageImpl extends _EditPrivateMessage { return identical(this, other) || (other.runtimeType == runtimeType && other is _$EditPrivateMessageImpl && - (identical(other.privateMessageId, privateMessageId) || - other.privateMessageId == privateMessageId) && + (identical(other.privateMessageId, privateMessageId) || other.privateMessageId == privateMessageId) && (identical(other.content, content) || other.content == content) && (identical(other.auth, auth) || other.auth == auth)); } @@ -596,27 +534,19 @@ class _$EditPrivateMessageImpl extends _EditPrivateMessage { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditPrivateMessageImplCopyWith<_$EditPrivateMessageImpl> get copyWith => - __$$EditPrivateMessageImplCopyWithImpl<_$EditPrivateMessageImpl>( - this, _$identity); + _$$EditPrivateMessageImplCopyWith<_$EditPrivateMessageImpl> get copyWith => __$$EditPrivateMessageImplCopyWithImpl<_$EditPrivateMessageImpl>(this, _$identity); @override Map toJson() { - return _$$EditPrivateMessageImplToJson( - this, - ); + return _$$EditPrivateMessageImplToJson(this); } } abstract class _EditPrivateMessage extends EditPrivateMessage { - const factory _EditPrivateMessage( - {required final int privateMessageId, - required final String content, - final String? auth}) = _$EditPrivateMessageImpl; + const factory _EditPrivateMessage({required final int privateMessageId, required final String content, final String? auth}) = _$EditPrivateMessageImpl; const _EditPrivateMessage._() : super._(); - factory _EditPrivateMessage.fromJson(Map json) = - _$EditPrivateMessageImpl.fromJson; + factory _EditPrivateMessage.fromJson(Map json) = _$EditPrivateMessageImpl.fromJson; @override int get privateMessageId; // v0.18.0 @@ -629,8 +559,7 @@ abstract class _EditPrivateMessage extends EditPrivateMessage { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditPrivateMessageImplCopyWith<_$EditPrivateMessageImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditPrivateMessageImplCopyWith<_$EditPrivateMessageImpl> get copyWith => throw _privateConstructorUsedError; } DeletePrivateMessage _$DeletePrivateMessageFromJson(Map json) { @@ -649,23 +578,18 @@ mixin _$DeletePrivateMessage { /// Create a copy of DeletePrivateMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeletePrivateMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeletePrivateMessageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeletePrivateMessageCopyWith<$Res> { - factory $DeletePrivateMessageCopyWith(DeletePrivateMessage value, - $Res Function(DeletePrivateMessage) then) = - _$DeletePrivateMessageCopyWithImpl<$Res, DeletePrivateMessage>; + factory $DeletePrivateMessageCopyWith(DeletePrivateMessage value, $Res Function(DeletePrivateMessage) then) = _$DeletePrivateMessageCopyWithImpl<$Res, DeletePrivateMessage>; @useResult $Res call({int privateMessageId, bool deleted, String? auth}); } /// @nodoc -class _$DeletePrivateMessageCopyWithImpl<$Res, - $Val extends DeletePrivateMessage> - implements $DeletePrivateMessageCopyWith<$Res> { +class _$DeletePrivateMessageCopyWithImpl<$Res, $Val extends DeletePrivateMessage> implements $DeletePrivateMessageCopyWith<$Res> { _$DeletePrivateMessageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -677,70 +601,66 @@ class _$DeletePrivateMessageCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? privateMessageId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$DeletePrivateMessageImplCopyWith<$Res> - implements $DeletePrivateMessageCopyWith<$Res> { - factory _$$DeletePrivateMessageImplCopyWith(_$DeletePrivateMessageImpl value, - $Res Function(_$DeletePrivateMessageImpl) then) = - __$$DeletePrivateMessageImplCopyWithImpl<$Res>; +abstract class _$$DeletePrivateMessageImplCopyWith<$Res> implements $DeletePrivateMessageCopyWith<$Res> { + factory _$$DeletePrivateMessageImplCopyWith(_$DeletePrivateMessageImpl value, $Res Function(_$DeletePrivateMessageImpl) then) = __$$DeletePrivateMessageImplCopyWithImpl<$Res>; @override @useResult $Res call({int privateMessageId, bool deleted, String? auth}); } /// @nodoc -class __$$DeletePrivateMessageImplCopyWithImpl<$Res> - extends _$DeletePrivateMessageCopyWithImpl<$Res, _$DeletePrivateMessageImpl> - implements _$$DeletePrivateMessageImplCopyWith<$Res> { - __$$DeletePrivateMessageImplCopyWithImpl(_$DeletePrivateMessageImpl _value, - $Res Function(_$DeletePrivateMessageImpl) _then) - : super(_value, _then); +class __$$DeletePrivateMessageImplCopyWithImpl<$Res> extends _$DeletePrivateMessageCopyWithImpl<$Res, _$DeletePrivateMessageImpl> implements _$$DeletePrivateMessageImplCopyWith<$Res> { + __$$DeletePrivateMessageImplCopyWithImpl(_$DeletePrivateMessageImpl _value, $Res Function(_$DeletePrivateMessageImpl) _then) : super(_value, _then); /// Create a copy of DeletePrivateMessage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? deleted = null, - Object? auth = freezed, - }) { - return _then(_$DeletePrivateMessageImpl( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? privateMessageId = null, Object? deleted = null, Object? auth = freezed}) { + return _then( + _$DeletePrivateMessageImpl( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -748,19 +668,16 @@ class __$$DeletePrivateMessageImplCopyWithImpl<$Res> @apiSerde class _$DeletePrivateMessageImpl extends _DeletePrivateMessage { - const _$DeletePrivateMessageImpl( - {required this.privateMessageId, required this.deleted, this.auth}) - : super._(); + const _$DeletePrivateMessageImpl({required this.privateMessageId, required this.deleted, this.auth}) : super._(); - factory _$DeletePrivateMessageImpl.fromJson(Map json) => - _$$DeletePrivateMessageImplFromJson(json); + factory _$DeletePrivateMessageImpl.fromJson(Map json) => _$$DeletePrivateMessageImplFromJson(json); @override final int privateMessageId; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -774,8 +691,7 @@ class _$DeletePrivateMessageImpl extends _DeletePrivateMessage { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeletePrivateMessageImpl && - (identical(other.privateMessageId, privateMessageId) || - other.privateMessageId == privateMessageId) && + (identical(other.privateMessageId, privateMessageId) || other.privateMessageId == privateMessageId) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.auth, auth) || other.auth == auth)); } @@ -789,28 +705,19 @@ class _$DeletePrivateMessageImpl extends _DeletePrivateMessage { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeletePrivateMessageImplCopyWith<_$DeletePrivateMessageImpl> - get copyWith => - __$$DeletePrivateMessageImplCopyWithImpl<_$DeletePrivateMessageImpl>( - this, _$identity); + _$$DeletePrivateMessageImplCopyWith<_$DeletePrivateMessageImpl> get copyWith => __$$DeletePrivateMessageImplCopyWithImpl<_$DeletePrivateMessageImpl>(this, _$identity); @override Map toJson() { - return _$$DeletePrivateMessageImplToJson( - this, - ); + return _$$DeletePrivateMessageImplToJson(this); } } abstract class _DeletePrivateMessage extends DeletePrivateMessage { - const factory _DeletePrivateMessage( - {required final int privateMessageId, - required final bool deleted, - final String? auth}) = _$DeletePrivateMessageImpl; + const factory _DeletePrivateMessage({required final int privateMessageId, required final bool deleted, final String? auth}) = _$DeletePrivateMessageImpl; const _DeletePrivateMessage._() : super._(); - factory _DeletePrivateMessage.fromJson(Map json) = - _$DeletePrivateMessageImpl.fromJson; + factory _DeletePrivateMessage.fromJson(Map json) = _$DeletePrivateMessageImpl.fromJson; @override int get privateMessageId; // v0.18.0 @@ -823,12 +730,10 @@ abstract class _DeletePrivateMessage extends DeletePrivateMessage { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeletePrivateMessageImplCopyWith<_$DeletePrivateMessageImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DeletePrivateMessageImplCopyWith<_$DeletePrivateMessageImpl> get copyWith => throw _privateConstructorUsedError; } -MarkPrivateMessageAsRead _$MarkPrivateMessageAsReadFromJson( - Map json) { +MarkPrivateMessageAsRead _$MarkPrivateMessageAsReadFromJson(Map json) { return _MarkPrivateMessageAsRead.fromJson(json); } @@ -844,23 +749,18 @@ mixin _$MarkPrivateMessageAsRead { /// Create a copy of MarkPrivateMessageAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkPrivateMessageAsReadCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkPrivateMessageAsReadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkPrivateMessageAsReadCopyWith<$Res> { - factory $MarkPrivateMessageAsReadCopyWith(MarkPrivateMessageAsRead value, - $Res Function(MarkPrivateMessageAsRead) then) = - _$MarkPrivateMessageAsReadCopyWithImpl<$Res, MarkPrivateMessageAsRead>; + factory $MarkPrivateMessageAsReadCopyWith(MarkPrivateMessageAsRead value, $Res Function(MarkPrivateMessageAsRead) then) = _$MarkPrivateMessageAsReadCopyWithImpl<$Res, MarkPrivateMessageAsRead>; @useResult $Res call({int privateMessageId, bool read, String? auth}); } /// @nodoc -class _$MarkPrivateMessageAsReadCopyWithImpl<$Res, - $Val extends MarkPrivateMessageAsRead> - implements $MarkPrivateMessageAsReadCopyWith<$Res> { +class _$MarkPrivateMessageAsReadCopyWithImpl<$Res, $Val extends MarkPrivateMessageAsRead> implements $MarkPrivateMessageAsReadCopyWith<$Res> { _$MarkPrivateMessageAsReadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -872,73 +772,66 @@ class _$MarkPrivateMessageAsReadCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? privateMessageId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$MarkPrivateMessageAsReadImplCopyWith<$Res> - implements $MarkPrivateMessageAsReadCopyWith<$Res> { - factory _$$MarkPrivateMessageAsReadImplCopyWith( - _$MarkPrivateMessageAsReadImpl value, - $Res Function(_$MarkPrivateMessageAsReadImpl) then) = - __$$MarkPrivateMessageAsReadImplCopyWithImpl<$Res>; +abstract class _$$MarkPrivateMessageAsReadImplCopyWith<$Res> implements $MarkPrivateMessageAsReadCopyWith<$Res> { + factory _$$MarkPrivateMessageAsReadImplCopyWith(_$MarkPrivateMessageAsReadImpl value, $Res Function(_$MarkPrivateMessageAsReadImpl) then) = __$$MarkPrivateMessageAsReadImplCopyWithImpl<$Res>; @override @useResult $Res call({int privateMessageId, bool read, String? auth}); } /// @nodoc -class __$$MarkPrivateMessageAsReadImplCopyWithImpl<$Res> - extends _$MarkPrivateMessageAsReadCopyWithImpl<$Res, - _$MarkPrivateMessageAsReadImpl> - implements _$$MarkPrivateMessageAsReadImplCopyWith<$Res> { - __$$MarkPrivateMessageAsReadImplCopyWithImpl( - _$MarkPrivateMessageAsReadImpl _value, - $Res Function(_$MarkPrivateMessageAsReadImpl) _then) - : super(_value, _then); +class __$$MarkPrivateMessageAsReadImplCopyWithImpl<$Res> extends _$MarkPrivateMessageAsReadCopyWithImpl<$Res, _$MarkPrivateMessageAsReadImpl> implements _$$MarkPrivateMessageAsReadImplCopyWith<$Res> { + __$$MarkPrivateMessageAsReadImplCopyWithImpl(_$MarkPrivateMessageAsReadImpl _value, $Res Function(_$MarkPrivateMessageAsReadImpl) _then) : super(_value, _then); /// Create a copy of MarkPrivateMessageAsRead /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_$MarkPrivateMessageAsReadImpl( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? privateMessageId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _$MarkPrivateMessageAsReadImpl( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -946,19 +839,16 @@ class __$$MarkPrivateMessageAsReadImplCopyWithImpl<$Res> @apiSerde class _$MarkPrivateMessageAsReadImpl extends _MarkPrivateMessageAsRead { - const _$MarkPrivateMessageAsReadImpl( - {required this.privateMessageId, required this.read, this.auth}) - : super._(); + const _$MarkPrivateMessageAsReadImpl({required this.privateMessageId, required this.read, this.auth}) : super._(); - factory _$MarkPrivateMessageAsReadImpl.fromJson(Map json) => - _$$MarkPrivateMessageAsReadImplFromJson(json); + factory _$MarkPrivateMessageAsReadImpl.fromJson(Map json) => _$$MarkPrivateMessageAsReadImplFromJson(json); @override final int privateMessageId; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -972,8 +862,7 @@ class _$MarkPrivateMessageAsReadImpl extends _MarkPrivateMessageAsRead { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MarkPrivateMessageAsReadImpl && - (identical(other.privateMessageId, privateMessageId) || - other.privateMessageId == privateMessageId) && + (identical(other.privateMessageId, privateMessageId) || other.privateMessageId == privateMessageId) && (identical(other.read, read) || other.read == read) && (identical(other.auth, auth) || other.auth == auth)); } @@ -987,27 +876,19 @@ class _$MarkPrivateMessageAsReadImpl extends _MarkPrivateMessageAsRead { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkPrivateMessageAsReadImplCopyWith<_$MarkPrivateMessageAsReadImpl> - get copyWith => __$$MarkPrivateMessageAsReadImplCopyWithImpl< - _$MarkPrivateMessageAsReadImpl>(this, _$identity); + _$$MarkPrivateMessageAsReadImplCopyWith<_$MarkPrivateMessageAsReadImpl> get copyWith => __$$MarkPrivateMessageAsReadImplCopyWithImpl<_$MarkPrivateMessageAsReadImpl>(this, _$identity); @override Map toJson() { - return _$$MarkPrivateMessageAsReadImplToJson( - this, - ); + return _$$MarkPrivateMessageAsReadImplToJson(this); } } abstract class _MarkPrivateMessageAsRead extends MarkPrivateMessageAsRead { - const factory _MarkPrivateMessageAsRead( - {required final int privateMessageId, - required final bool read, - final String? auth}) = _$MarkPrivateMessageAsReadImpl; + const factory _MarkPrivateMessageAsRead({required final int privateMessageId, required final bool read, final String? auth}) = _$MarkPrivateMessageAsReadImpl; const _MarkPrivateMessageAsRead._() : super._(); - factory _MarkPrivateMessageAsRead.fromJson(Map json) = - _$MarkPrivateMessageAsReadImpl.fromJson; + factory _MarkPrivateMessageAsRead.fromJson(Map json) = _$MarkPrivateMessageAsReadImpl.fromJson; @override int get privateMessageId; // v0.18.0 @@ -1020,12 +901,10 @@ abstract class _MarkPrivateMessageAsRead extends MarkPrivateMessageAsRead { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkPrivateMessageAsReadImplCopyWith<_$MarkPrivateMessageAsReadImpl> - get copyWith => throw _privateConstructorUsedError; + _$$MarkPrivateMessageAsReadImplCopyWith<_$MarkPrivateMessageAsReadImpl> get copyWith => throw _privateConstructorUsedError; } -CreatePrivateMessageReport _$CreatePrivateMessageReportFromJson( - Map json) { +CreatePrivateMessageReport _$CreatePrivateMessageReportFromJson(Map json) { return _CreatePrivateMessageReport.fromJson(json); } @@ -1041,24 +920,19 @@ mixin _$CreatePrivateMessageReport { /// Create a copy of CreatePrivateMessageReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreatePrivateMessageReportCopyWith - get copyWith => throw _privateConstructorUsedError; + $CreatePrivateMessageReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreatePrivateMessageReportCopyWith<$Res> { - factory $CreatePrivateMessageReportCopyWith(CreatePrivateMessageReport value, - $Res Function(CreatePrivateMessageReport) then) = - _$CreatePrivateMessageReportCopyWithImpl<$Res, - CreatePrivateMessageReport>; + factory $CreatePrivateMessageReportCopyWith(CreatePrivateMessageReport value, $Res Function(CreatePrivateMessageReport) then) = + _$CreatePrivateMessageReportCopyWithImpl<$Res, CreatePrivateMessageReport>; @useResult $Res call({int privateMessageId, String reason, String? auth}); } /// @nodoc -class _$CreatePrivateMessageReportCopyWithImpl<$Res, - $Val extends CreatePrivateMessageReport> - implements $CreatePrivateMessageReportCopyWith<$Res> { +class _$CreatePrivateMessageReportCopyWithImpl<$Res, $Val extends CreatePrivateMessageReport> implements $CreatePrivateMessageReportCopyWith<$Res> { _$CreatePrivateMessageReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1070,34 +944,33 @@ class _$CreatePrivateMessageReportCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? privateMessageId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CreatePrivateMessageReportImplCopyWith<$Res> - implements $CreatePrivateMessageReportCopyWith<$Res> { - factory _$$CreatePrivateMessageReportImplCopyWith( - _$CreatePrivateMessageReportImpl value, - $Res Function(_$CreatePrivateMessageReportImpl) then) = +abstract class _$$CreatePrivateMessageReportImplCopyWith<$Res> implements $CreatePrivateMessageReportCopyWith<$Res> { + factory _$$CreatePrivateMessageReportImplCopyWith(_$CreatePrivateMessageReportImpl value, $Res Function(_$CreatePrivateMessageReportImpl) then) = __$$CreatePrivateMessageReportImplCopyWithImpl<$Res>; @override @useResult @@ -1105,38 +978,34 @@ abstract class _$$CreatePrivateMessageReportImplCopyWith<$Res> } /// @nodoc -class __$$CreatePrivateMessageReportImplCopyWithImpl<$Res> - extends _$CreatePrivateMessageReportCopyWithImpl<$Res, - _$CreatePrivateMessageReportImpl> +class __$$CreatePrivateMessageReportImplCopyWithImpl<$Res> extends _$CreatePrivateMessageReportCopyWithImpl<$Res, _$CreatePrivateMessageReportImpl> implements _$$CreatePrivateMessageReportImplCopyWith<$Res> { - __$$CreatePrivateMessageReportImplCopyWithImpl( - _$CreatePrivateMessageReportImpl _value, - $Res Function(_$CreatePrivateMessageReportImpl) _then) - : super(_value, _then); + __$$CreatePrivateMessageReportImplCopyWithImpl(_$CreatePrivateMessageReportImpl _value, $Res Function(_$CreatePrivateMessageReportImpl) _then) : super(_value, _then); /// Create a copy of CreatePrivateMessageReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageId = null, - Object? reason = null, - Object? auth = freezed, - }) { - return _then(_$CreatePrivateMessageReportImpl( - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? privateMessageId = null, Object? reason = null, Object? auth = freezed}) { + return _then( + _$CreatePrivateMessageReportImpl( + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1144,20 +1013,16 @@ class __$$CreatePrivateMessageReportImplCopyWithImpl<$Res> @apiSerde class _$CreatePrivateMessageReportImpl extends _CreatePrivateMessageReport { - const _$CreatePrivateMessageReportImpl( - {required this.privateMessageId, required this.reason, this.auth}) - : super._(); + const _$CreatePrivateMessageReportImpl({required this.privateMessageId, required this.reason, this.auth}) : super._(); - factory _$CreatePrivateMessageReportImpl.fromJson( - Map json) => - _$$CreatePrivateMessageReportImplFromJson(json); + factory _$CreatePrivateMessageReportImpl.fromJson(Map json) => _$$CreatePrivateMessageReportImplFromJson(json); @override final int privateMessageId; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1171,8 +1036,7 @@ class _$CreatePrivateMessageReportImpl extends _CreatePrivateMessageReport { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CreatePrivateMessageReportImpl && - (identical(other.privateMessageId, privateMessageId) || - other.privateMessageId == privateMessageId) && + (identical(other.privateMessageId, privateMessageId) || other.privateMessageId == privateMessageId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1186,27 +1050,19 @@ class _$CreatePrivateMessageReportImpl extends _CreatePrivateMessageReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreatePrivateMessageReportImplCopyWith<_$CreatePrivateMessageReportImpl> - get copyWith => __$$CreatePrivateMessageReportImplCopyWithImpl< - _$CreatePrivateMessageReportImpl>(this, _$identity); + _$$CreatePrivateMessageReportImplCopyWith<_$CreatePrivateMessageReportImpl> get copyWith => __$$CreatePrivateMessageReportImplCopyWithImpl<_$CreatePrivateMessageReportImpl>(this, _$identity); @override Map toJson() { - return _$$CreatePrivateMessageReportImplToJson( - this, - ); + return _$$CreatePrivateMessageReportImplToJson(this); } } abstract class _CreatePrivateMessageReport extends CreatePrivateMessageReport { - const factory _CreatePrivateMessageReport( - {required final int privateMessageId, - required final String reason, - final String? auth}) = _$CreatePrivateMessageReportImpl; + const factory _CreatePrivateMessageReport({required final int privateMessageId, required final String reason, final String? auth}) = _$CreatePrivateMessageReportImpl; const _CreatePrivateMessageReport._() : super._(); - factory _CreatePrivateMessageReport.fromJson(Map json) = - _$CreatePrivateMessageReportImpl.fromJson; + factory _CreatePrivateMessageReport.fromJson(Map json) = _$CreatePrivateMessageReportImpl.fromJson; @override int get privateMessageId; // v0.18.0 @@ -1219,12 +1075,10 @@ abstract class _CreatePrivateMessageReport extends CreatePrivateMessageReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreatePrivateMessageReportImplCopyWith<_$CreatePrivateMessageReportImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CreatePrivateMessageReportImplCopyWith<_$CreatePrivateMessageReportImpl> get copyWith => throw _privateConstructorUsedError; } -ResolvePrivateMessageReport _$ResolvePrivateMessageReportFromJson( - Map json) { +ResolvePrivateMessageReport _$ResolvePrivateMessageReportFromJson(Map json) { return _ResolvePrivateMessageReport.fromJson(json); } @@ -1240,25 +1094,19 @@ mixin _$ResolvePrivateMessageReport { /// Create a copy of ResolvePrivateMessageReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ResolvePrivateMessageReportCopyWith - get copyWith => throw _privateConstructorUsedError; + $ResolvePrivateMessageReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ResolvePrivateMessageReportCopyWith<$Res> { - factory $ResolvePrivateMessageReportCopyWith( - ResolvePrivateMessageReport value, - $Res Function(ResolvePrivateMessageReport) then) = - _$ResolvePrivateMessageReportCopyWithImpl<$Res, - ResolvePrivateMessageReport>; + factory $ResolvePrivateMessageReportCopyWith(ResolvePrivateMessageReport value, $Res Function(ResolvePrivateMessageReport) then) = + _$ResolvePrivateMessageReportCopyWithImpl<$Res, ResolvePrivateMessageReport>; @useResult $Res call({int reportId, bool resolved, String? auth}); } /// @nodoc -class _$ResolvePrivateMessageReportCopyWithImpl<$Res, - $Val extends ResolvePrivateMessageReport> - implements $ResolvePrivateMessageReportCopyWith<$Res> { +class _$ResolvePrivateMessageReportCopyWithImpl<$Res, $Val extends ResolvePrivateMessageReport> implements $ResolvePrivateMessageReportCopyWith<$Res> { _$ResolvePrivateMessageReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1270,34 +1118,33 @@ class _$ResolvePrivateMessageReportCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ResolvePrivateMessageReportImplCopyWith<$Res> - implements $ResolvePrivateMessageReportCopyWith<$Res> { - factory _$$ResolvePrivateMessageReportImplCopyWith( - _$ResolvePrivateMessageReportImpl value, - $Res Function(_$ResolvePrivateMessageReportImpl) then) = +abstract class _$$ResolvePrivateMessageReportImplCopyWith<$Res> implements $ResolvePrivateMessageReportCopyWith<$Res> { + factory _$$ResolvePrivateMessageReportImplCopyWith(_$ResolvePrivateMessageReportImpl value, $Res Function(_$ResolvePrivateMessageReportImpl) then) = __$$ResolvePrivateMessageReportImplCopyWithImpl<$Res>; @override @useResult @@ -1305,38 +1152,34 @@ abstract class _$$ResolvePrivateMessageReportImplCopyWith<$Res> } /// @nodoc -class __$$ResolvePrivateMessageReportImplCopyWithImpl<$Res> - extends _$ResolvePrivateMessageReportCopyWithImpl<$Res, - _$ResolvePrivateMessageReportImpl> +class __$$ResolvePrivateMessageReportImplCopyWithImpl<$Res> extends _$ResolvePrivateMessageReportCopyWithImpl<$Res, _$ResolvePrivateMessageReportImpl> implements _$$ResolvePrivateMessageReportImplCopyWith<$Res> { - __$$ResolvePrivateMessageReportImplCopyWithImpl( - _$ResolvePrivateMessageReportImpl _value, - $Res Function(_$ResolvePrivateMessageReportImpl) _then) - : super(_value, _then); + __$$ResolvePrivateMessageReportImplCopyWithImpl(_$ResolvePrivateMessageReportImpl _value, $Res Function(_$ResolvePrivateMessageReportImpl) _then) : super(_value, _then); /// Create a copy of ResolvePrivateMessageReport /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? reportId = null, - Object? resolved = null, - Object? auth = freezed, - }) { - return _then(_$ResolvePrivateMessageReportImpl( - reportId: null == reportId - ? _value.reportId - : reportId // ignore: cast_nullable_to_non_nullable - as int, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? reportId = null, Object? resolved = null, Object? auth = freezed}) { + return _then( + _$ResolvePrivateMessageReportImpl( + reportId: + null == reportId + ? _value.reportId + : reportId // ignore: cast_nullable_to_non_nullable + as int, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1344,20 +1187,16 @@ class __$$ResolvePrivateMessageReportImplCopyWithImpl<$Res> @apiSerde class _$ResolvePrivateMessageReportImpl extends _ResolvePrivateMessageReport { - const _$ResolvePrivateMessageReportImpl( - {required this.reportId, required this.resolved, this.auth}) - : super._(); + const _$ResolvePrivateMessageReportImpl({required this.reportId, required this.resolved, this.auth}) : super._(); - factory _$ResolvePrivateMessageReportImpl.fromJson( - Map json) => - _$$ResolvePrivateMessageReportImplFromJson(json); + factory _$ResolvePrivateMessageReportImpl.fromJson(Map json) => _$$ResolvePrivateMessageReportImplFromJson(json); @override final int reportId; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -1371,10 +1210,8 @@ class _$ResolvePrivateMessageReportImpl extends _ResolvePrivateMessageReport { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ResolvePrivateMessageReportImpl && - (identical(other.reportId, reportId) || - other.reportId == reportId) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && + (identical(other.reportId, reportId) || other.reportId == reportId) && + (identical(other.resolved, resolved) || other.resolved == resolved) && (identical(other.auth, auth) || other.auth == auth)); } @@ -1387,28 +1224,19 @@ class _$ResolvePrivateMessageReportImpl extends _ResolvePrivateMessageReport { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ResolvePrivateMessageReportImplCopyWith<_$ResolvePrivateMessageReportImpl> - get copyWith => __$$ResolvePrivateMessageReportImplCopyWithImpl< - _$ResolvePrivateMessageReportImpl>(this, _$identity); + _$$ResolvePrivateMessageReportImplCopyWith<_$ResolvePrivateMessageReportImpl> get copyWith => __$$ResolvePrivateMessageReportImplCopyWithImpl<_$ResolvePrivateMessageReportImpl>(this, _$identity); @override Map toJson() { - return _$$ResolvePrivateMessageReportImplToJson( - this, - ); + return _$$ResolvePrivateMessageReportImplToJson(this); } } -abstract class _ResolvePrivateMessageReport - extends ResolvePrivateMessageReport { - const factory _ResolvePrivateMessageReport( - {required final int reportId, - required final bool resolved, - final String? auth}) = _$ResolvePrivateMessageReportImpl; +abstract class _ResolvePrivateMessageReport extends ResolvePrivateMessageReport { + const factory _ResolvePrivateMessageReport({required final int reportId, required final bool resolved, final String? auth}) = _$ResolvePrivateMessageReportImpl; const _ResolvePrivateMessageReport._() : super._(); - factory _ResolvePrivateMessageReport.fromJson(Map json) = - _$ResolvePrivateMessageReportImpl.fromJson; + factory _ResolvePrivateMessageReport.fromJson(Map json) = _$ResolvePrivateMessageReportImpl.fromJson; @override int get reportId; // v0.18.0 @@ -1421,12 +1249,10 @@ abstract class _ResolvePrivateMessageReport /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ResolvePrivateMessageReportImplCopyWith<_$ResolvePrivateMessageReportImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ResolvePrivateMessageReportImplCopyWith<_$ResolvePrivateMessageReportImpl> get copyWith => throw _privateConstructorUsedError; } -ListPrivateMessageReports _$ListPrivateMessageReportsFromJson( - Map json) { +ListPrivateMessageReports _$ListPrivateMessageReportsFromJson(Map json) { return _ListPrivateMessageReports.fromJson(json); } @@ -1444,28 +1270,18 @@ mixin _$ListPrivateMessageReports { /// Create a copy of ListPrivateMessageReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPrivateMessageReportsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListPrivateMessageReportsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPrivateMessageReportsCopyWith<$Res> { - factory $ListPrivateMessageReportsCopyWith(ListPrivateMessageReports value, - $Res Function(ListPrivateMessageReports) then) = - _$ListPrivateMessageReportsCopyWithImpl<$Res, ListPrivateMessageReports>; + factory $ListPrivateMessageReportsCopyWith(ListPrivateMessageReports value, $Res Function(ListPrivateMessageReports) then) = _$ListPrivateMessageReportsCopyWithImpl<$Res, ListPrivateMessageReports>; @useResult - $Res call( - {int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - String? auth}); + $Res call({int? page, int? limit, bool? unresolvedOnly, int? communityId, String? auth}); } /// @nodoc -class _$ListPrivateMessageReportsCopyWithImpl<$Res, - $Val extends ListPrivateMessageReports> - implements $ListPrivateMessageReportsCopyWith<$Res> { +class _$ListPrivateMessageReportsCopyWithImpl<$Res, $Val extends ListPrivateMessageReports> implements $ListPrivateMessageReportsCopyWith<$Res> { _$ListPrivateMessageReportsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1477,98 +1293,87 @@ class _$ListPrivateMessageReportsCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListPrivateMessageReportsImplCopyWith<$Res> - implements $ListPrivateMessageReportsCopyWith<$Res> { - factory _$$ListPrivateMessageReportsImplCopyWith( - _$ListPrivateMessageReportsImpl value, - $Res Function(_$ListPrivateMessageReportsImpl) then) = - __$$ListPrivateMessageReportsImplCopyWithImpl<$Res>; +abstract class _$$ListPrivateMessageReportsImplCopyWith<$Res> implements $ListPrivateMessageReportsCopyWith<$Res> { + factory _$$ListPrivateMessageReportsImplCopyWith(_$ListPrivateMessageReportsImpl value, $Res Function(_$ListPrivateMessageReportsImpl) then) = __$$ListPrivateMessageReportsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? page, - int? limit, - bool? unresolvedOnly, - int? communityId, - String? auth}); + $Res call({int? page, int? limit, bool? unresolvedOnly, int? communityId, String? auth}); } /// @nodoc -class __$$ListPrivateMessageReportsImplCopyWithImpl<$Res> - extends _$ListPrivateMessageReportsCopyWithImpl<$Res, - _$ListPrivateMessageReportsImpl> +class __$$ListPrivateMessageReportsImplCopyWithImpl<$Res> extends _$ListPrivateMessageReportsCopyWithImpl<$Res, _$ListPrivateMessageReportsImpl> implements _$$ListPrivateMessageReportsImplCopyWith<$Res> { - __$$ListPrivateMessageReportsImplCopyWithImpl( - _$ListPrivateMessageReportsImpl _value, - $Res Function(_$ListPrivateMessageReportsImpl) _then) - : super(_value, _then); + __$$ListPrivateMessageReportsImplCopyWithImpl(_$ListPrivateMessageReportsImpl _value, $Res Function(_$ListPrivateMessageReportsImpl) _then) : super(_value, _then); /// Create a copy of ListPrivateMessageReports /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? unresolvedOnly = freezed, - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_$ListPrivateMessageReportsImpl( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unresolvedOnly: freezed == unresolvedOnly - ? _value.unresolvedOnly - : unresolvedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? page = freezed, Object? limit = freezed, Object? unresolvedOnly = freezed, Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _$ListPrivateMessageReportsImpl( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unresolvedOnly: + freezed == unresolvedOnly + ? _value.unresolvedOnly + : unresolvedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1576,22 +1381,19 @@ class __$$ListPrivateMessageReportsImplCopyWithImpl<$Res> @apiSerde class _$ListPrivateMessageReportsImpl extends _ListPrivateMessageReports { - const _$ListPrivateMessageReportsImpl( - {this.page, this.limit, this.unresolvedOnly, this.communityId, this.auth}) - : super._(); + const _$ListPrivateMessageReportsImpl({this.page, this.limit, this.unresolvedOnly, this.communityId, this.auth}) : super._(); - factory _$ListPrivateMessageReportsImpl.fromJson(Map json) => - _$$ListPrivateMessageReportsImplFromJson(json); + factory _$ListPrivateMessageReportsImpl.fromJson(Map json) => _$$ListPrivateMessageReportsImplFromJson(json); @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? unresolvedOnly; -// v0.18.0 + // v0.18.0 @override final int? communityId; @override @@ -1609,46 +1411,33 @@ class _$ListPrivateMessageReportsImpl extends _ListPrivateMessageReports { other is _$ListPrivateMessageReportsImpl && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.unresolvedOnly, unresolvedOnly) || - other.unresolvedOnly == unresolvedOnly) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.unresolvedOnly, unresolvedOnly) || other.unresolvedOnly == unresolvedOnly) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, page, limit, unresolvedOnly, communityId, auth); + int get hashCode => Object.hash(runtimeType, page, limit, unresolvedOnly, communityId, auth); /// Create a copy of ListPrivateMessageReports /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPrivateMessageReportsImplCopyWith<_$ListPrivateMessageReportsImpl> - get copyWith => __$$ListPrivateMessageReportsImplCopyWithImpl< - _$ListPrivateMessageReportsImpl>(this, _$identity); + _$$ListPrivateMessageReportsImplCopyWith<_$ListPrivateMessageReportsImpl> get copyWith => __$$ListPrivateMessageReportsImplCopyWithImpl<_$ListPrivateMessageReportsImpl>(this, _$identity); @override Map toJson() { - return _$$ListPrivateMessageReportsImplToJson( - this, - ); + return _$$ListPrivateMessageReportsImplToJson(this); } } abstract class _ListPrivateMessageReports extends ListPrivateMessageReports { - const factory _ListPrivateMessageReports( - {final int? page, - final int? limit, - final bool? unresolvedOnly, - final int? communityId, - final String? auth}) = _$ListPrivateMessageReportsImpl; + const factory _ListPrivateMessageReports({final int? page, final int? limit, final bool? unresolvedOnly, final int? communityId, final String? auth}) = _$ListPrivateMessageReportsImpl; const _ListPrivateMessageReports._() : super._(); - factory _ListPrivateMessageReports.fromJson(Map json) = - _$ListPrivateMessageReportsImpl.fromJson; + factory _ListPrivateMessageReports.fromJson(Map json) = _$ListPrivateMessageReportsImpl.fromJson; @override int? get page; // v0.18.0 @@ -1665,6 +1454,5 @@ abstract class _ListPrivateMessageReports extends ListPrivateMessageReports { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPrivateMessageReportsImplCopyWith<_$ListPrivateMessageReportsImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListPrivateMessageReportsImplCopyWith<_$ListPrivateMessageReportsImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/private_message/private_message.g.dart b/lib/src/v3/api/private_message/private_message.g.dart index 4c24bbd3..58e8cf92 100644 --- a/lib/src/v3/api/private_message/private_message.g.dart +++ b/lib/src/v3/api/private_message/private_message.g.dart @@ -6,208 +6,88 @@ part of 'private_message.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetPrivateMessagesImpl _$$GetPrivateMessagesImplFromJson( - Map json) => - _$GetPrivateMessagesImpl( - unreadOnly: json['unread_only'] as bool?, - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - creatorId: (json['creator_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$GetPrivateMessagesImplToJson( - _$GetPrivateMessagesImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('unread_only', instance.unreadOnly); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('creator_id', instance.creatorId); - writeNotNull('auth', instance.auth); - return val; -} - -_$CreatePrivateMessageImpl _$$CreatePrivateMessageImplFromJson( - Map json) => - _$CreatePrivateMessageImpl( - content: json['content'] as String, - recipientId: (json['recipient_id'] as num).toInt(), - auth: json['auth'] as String?, - ); - -Map _$$CreatePrivateMessageImplToJson( - _$CreatePrivateMessageImpl instance) { - final val = { - 'content': instance.content, - 'recipient_id': instance.recipientId, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$EditPrivateMessageImpl _$$EditPrivateMessageImplFromJson( - Map json) => - _$EditPrivateMessageImpl( - privateMessageId: (json['private_message_id'] as num).toInt(), - content: json['content'] as String, - auth: json['auth'] as String?, - ); - -Map _$$EditPrivateMessageImplToJson( - _$EditPrivateMessageImpl instance) { - final val = { - 'private_message_id': instance.privateMessageId, - 'content': instance.content, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$DeletePrivateMessageImpl _$$DeletePrivateMessageImplFromJson( - Map json) => - _$DeletePrivateMessageImpl( - privateMessageId: (json['private_message_id'] as num).toInt(), - deleted: json['deleted'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$DeletePrivateMessageImplToJson( - _$DeletePrivateMessageImpl instance) { - final val = { - 'private_message_id': instance.privateMessageId, - 'deleted': instance.deleted, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$MarkPrivateMessageAsReadImpl _$$MarkPrivateMessageAsReadImplFromJson( - Map json) => - _$MarkPrivateMessageAsReadImpl( - privateMessageId: (json['private_message_id'] as num).toInt(), - read: json['read'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$MarkPrivateMessageAsReadImplToJson( - _$MarkPrivateMessageAsReadImpl instance) { - final val = { - 'private_message_id': instance.privateMessageId, - 'read': instance.read, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$CreatePrivateMessageReportImpl _$$CreatePrivateMessageReportImplFromJson( - Map json) => - _$CreatePrivateMessageReportImpl( - privateMessageId: (json['private_message_id'] as num).toInt(), - reason: json['reason'] as String, - auth: json['auth'] as String?, - ); - -Map _$$CreatePrivateMessageReportImplToJson( - _$CreatePrivateMessageReportImpl instance) { - final val = { - 'private_message_id': instance.privateMessageId, - 'reason': instance.reason, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ResolvePrivateMessageReportImpl _$$ResolvePrivateMessageReportImplFromJson( - Map json) => - _$ResolvePrivateMessageReportImpl( - reportId: (json['report_id'] as num).toInt(), - resolved: json['resolved'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$ResolvePrivateMessageReportImplToJson( - _$ResolvePrivateMessageReportImpl instance) { - final val = { - 'report_id': instance.reportId, - 'resolved': instance.resolved, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListPrivateMessageReportsImpl _$$ListPrivateMessageReportsImplFromJson( - Map json) => - _$ListPrivateMessageReportsImpl( - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - unresolvedOnly: json['unresolved_only'] as bool?, - communityId: (json['community_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListPrivateMessageReportsImplToJson( - _$ListPrivateMessageReportsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('unresolved_only', instance.unresolvedOnly); - writeNotNull('community_id', instance.communityId); - writeNotNull('auth', instance.auth); - return val; -} +_$GetPrivateMessagesImpl _$$GetPrivateMessagesImplFromJson(Map json) => _$GetPrivateMessagesImpl( + unreadOnly: json['unread_only'] as bool?, + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + creatorId: (json['creator_id'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$GetPrivateMessagesImplToJson(_$GetPrivateMessagesImpl instance) => { + if (instance.unreadOnly case final value?) 'unread_only': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.creatorId case final value?) 'creator_id': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$CreatePrivateMessageImpl _$$CreatePrivateMessageImplFromJson(Map json) => + _$CreatePrivateMessageImpl(content: json['content'] as String, recipientId: (json['recipient_id'] as num).toInt(), auth: json['auth'] as String?); + +Map _$$CreatePrivateMessageImplToJson(_$CreatePrivateMessageImpl instance) => { + 'content': instance.content, + 'recipient_id': instance.recipientId, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditPrivateMessageImpl _$$EditPrivateMessageImplFromJson(Map json) => + _$EditPrivateMessageImpl(privateMessageId: (json['private_message_id'] as num).toInt(), content: json['content'] as String, auth: json['auth'] as String?); + +Map _$$EditPrivateMessageImplToJson(_$EditPrivateMessageImpl instance) => { + 'private_message_id': instance.privateMessageId, + 'content': instance.content, + if (instance.auth case final value?) 'auth': value, +}; + +_$DeletePrivateMessageImpl _$$DeletePrivateMessageImplFromJson(Map json) => + _$DeletePrivateMessageImpl(privateMessageId: (json['private_message_id'] as num).toInt(), deleted: json['deleted'] as bool, auth: json['auth'] as String?); + +Map _$$DeletePrivateMessageImplToJson(_$DeletePrivateMessageImpl instance) => { + 'private_message_id': instance.privateMessageId, + 'deleted': instance.deleted, + if (instance.auth case final value?) 'auth': value, +}; + +_$MarkPrivateMessageAsReadImpl _$$MarkPrivateMessageAsReadImplFromJson(Map json) => + _$MarkPrivateMessageAsReadImpl(privateMessageId: (json['private_message_id'] as num).toInt(), read: json['read'] as bool, auth: json['auth'] as String?); + +Map _$$MarkPrivateMessageAsReadImplToJson(_$MarkPrivateMessageAsReadImpl instance) => { + 'private_message_id': instance.privateMessageId, + 'read': instance.read, + if (instance.auth case final value?) 'auth': value, +}; + +_$CreatePrivateMessageReportImpl _$$CreatePrivateMessageReportImplFromJson(Map json) => + _$CreatePrivateMessageReportImpl(privateMessageId: (json['private_message_id'] as num).toInt(), reason: json['reason'] as String, auth: json['auth'] as String?); + +Map _$$CreatePrivateMessageReportImplToJson(_$CreatePrivateMessageReportImpl instance) => { + 'private_message_id': instance.privateMessageId, + 'reason': instance.reason, + if (instance.auth case final value?) 'auth': value, +}; + +_$ResolvePrivateMessageReportImpl _$$ResolvePrivateMessageReportImplFromJson(Map json) => + _$ResolvePrivateMessageReportImpl(reportId: (json['report_id'] as num).toInt(), resolved: json['resolved'] as bool, auth: json['auth'] as String?); + +Map _$$ResolvePrivateMessageReportImplToJson(_$ResolvePrivateMessageReportImpl instance) => { + 'report_id': instance.reportId, + 'resolved': instance.resolved, + if (instance.auth case final value?) 'auth': value, +}; + +_$ListPrivateMessageReportsImpl _$$ListPrivateMessageReportsImplFromJson(Map json) => _$ListPrivateMessageReportsImpl( + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + unresolvedOnly: json['unresolved_only'] as bool?, + communityId: (json['community_id'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$ListPrivateMessageReportsImplToJson(_$ListPrivateMessageReportsImpl instance) => { + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.unresolvedOnly case final value?) 'unresolved_only': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/resolve_object/resolve_object.dart b/lib/src/v3/api/resolve_object/resolve_object.dart index 8df30f97..416c1279 100644 --- a/lib/src/v3/api/resolve_object/resolve_object.dart +++ b/lib/src/v3/api/resolve_object/resolve_object.dart @@ -11,11 +11,7 @@ part 'resolve_object.g.dart'; /// /// `HTTP.GET /resolve_object` @freezed -class ResolveObject - with _$ResolveObject - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class ResolveObject with _$ResolveObject implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ResolveObject({ required String q, // v0.18.0 @@ -23,14 +19,12 @@ class ResolveObject }) = _ResolveObject; const ResolveObject._(); - factory ResolveObject.fromJson(Map json) => - _$ResolveObjectFromJson(json); + factory ResolveObject.fromJson(Map json) => _$ResolveObjectFromJson(json); final path = '/resolve_object'; final httpMethod = HttpMethod.get; @override - ResolveObjectResponse responseFactory(Map json) => - ResolveObjectResponse.fromJson(json); + ResolveObjectResponse responseFactory(Map json) => ResolveObjectResponse.fromJson(json); } diff --git a/lib/src/v3/api/resolve_object/resolve_object.freezed.dart b/lib/src/v3/api/resolve_object/resolve_object.freezed.dart index 2d77dce0..ba65f195 100644 --- a/lib/src/v3/api/resolve_object/resolve_object.freezed.dart +++ b/lib/src/v3/api/resolve_object/resolve_object.freezed.dart @@ -12,7 +12,8 @@ part of 'resolve_object.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ResolveObject _$ResolveObjectFromJson(Map json) { return _ResolveObject.fromJson(json); @@ -29,22 +30,18 @@ mixin _$ResolveObject { /// Create a copy of ResolveObject /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ResolveObjectCopyWith get copyWith => - throw _privateConstructorUsedError; + $ResolveObjectCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ResolveObjectCopyWith<$Res> { - factory $ResolveObjectCopyWith( - ResolveObject value, $Res Function(ResolveObject) then) = - _$ResolveObjectCopyWithImpl<$Res, ResolveObject>; + factory $ResolveObjectCopyWith(ResolveObject value, $Res Function(ResolveObject) then) = _$ResolveObjectCopyWithImpl<$Res, ResolveObject>; @useResult $Res call({String q, String? auth}); } /// @nodoc -class _$ResolveObjectCopyWithImpl<$Res, $Val extends ResolveObject> - implements $ResolveObjectCopyWith<$Res> { +class _$ResolveObjectCopyWithImpl<$Res, $Val extends ResolveObject> implements $ResolveObjectCopyWith<$Res> { _$ResolveObjectCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -56,60 +53,56 @@ class _$ResolveObjectCopyWithImpl<$Res, $Val extends ResolveObject> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? q = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - q: null == q - ? _value.q - : q // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? q = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + q: + null == q + ? _value.q + : q // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ResolveObjectImplCopyWith<$Res> - implements $ResolveObjectCopyWith<$Res> { - factory _$$ResolveObjectImplCopyWith( - _$ResolveObjectImpl value, $Res Function(_$ResolveObjectImpl) then) = - __$$ResolveObjectImplCopyWithImpl<$Res>; +abstract class _$$ResolveObjectImplCopyWith<$Res> implements $ResolveObjectCopyWith<$Res> { + factory _$$ResolveObjectImplCopyWith(_$ResolveObjectImpl value, $Res Function(_$ResolveObjectImpl) then) = __$$ResolveObjectImplCopyWithImpl<$Res>; @override @useResult $Res call({String q, String? auth}); } /// @nodoc -class __$$ResolveObjectImplCopyWithImpl<$Res> - extends _$ResolveObjectCopyWithImpl<$Res, _$ResolveObjectImpl> - implements _$$ResolveObjectImplCopyWith<$Res> { - __$$ResolveObjectImplCopyWithImpl( - _$ResolveObjectImpl _value, $Res Function(_$ResolveObjectImpl) _then) - : super(_value, _then); +class __$$ResolveObjectImplCopyWithImpl<$Res> extends _$ResolveObjectCopyWithImpl<$Res, _$ResolveObjectImpl> implements _$$ResolveObjectImplCopyWith<$Res> { + __$$ResolveObjectImplCopyWithImpl(_$ResolveObjectImpl _value, $Res Function(_$ResolveObjectImpl) _then) : super(_value, _then); /// Create a copy of ResolveObject /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? q = null, - Object? auth = freezed, - }) { - return _then(_$ResolveObjectImpl( - q: null == q - ? _value.q - : q // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? q = null, Object? auth = freezed}) { + return _then( + _$ResolveObjectImpl( + q: + null == q + ? _value.q + : q // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -119,12 +112,11 @@ class __$$ResolveObjectImplCopyWithImpl<$Res> class _$ResolveObjectImpl extends _ResolveObject { const _$ResolveObjectImpl({required this.q, this.auth}) : super._(); - factory _$ResolveObjectImpl.fromJson(Map json) => - _$$ResolveObjectImplFromJson(json); + factory _$ResolveObjectImpl.fromJson(Map json) => _$$ResolveObjectImplFromJson(json); @override final String q; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -136,10 +128,7 @@ class _$ResolveObjectImpl extends _ResolveObject { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ResolveObjectImpl && - (identical(other.q, q) || other.q == q) && - (identical(other.auth, auth) || other.auth == auth)); + (other.runtimeType == runtimeType && other is _$ResolveObjectImpl && (identical(other.q, q) || other.q == q) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -151,24 +140,19 @@ class _$ResolveObjectImpl extends _ResolveObject { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ResolveObjectImplCopyWith<_$ResolveObjectImpl> get copyWith => - __$$ResolveObjectImplCopyWithImpl<_$ResolveObjectImpl>(this, _$identity); + _$$ResolveObjectImplCopyWith<_$ResolveObjectImpl> get copyWith => __$$ResolveObjectImplCopyWithImpl<_$ResolveObjectImpl>(this, _$identity); @override Map toJson() { - return _$$ResolveObjectImplToJson( - this, - ); + return _$$ResolveObjectImplToJson(this); } } abstract class _ResolveObject extends ResolveObject { - const factory _ResolveObject({required final String q, final String? auth}) = - _$ResolveObjectImpl; + const factory _ResolveObject({required final String q, final String? auth}) = _$ResolveObjectImpl; const _ResolveObject._() : super._(); - factory _ResolveObject.fromJson(Map json) = - _$ResolveObjectImpl.fromJson; + factory _ResolveObject.fromJson(Map json) = _$ResolveObjectImpl.fromJson; @override String get q; // v0.18.0 @@ -179,6 +163,5 @@ abstract class _ResolveObject extends ResolveObject { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ResolveObjectImplCopyWith<_$ResolveObjectImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ResolveObjectImplCopyWith<_$ResolveObjectImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/resolve_object/resolve_object.g.dart b/lib/src/v3/api/resolve_object/resolve_object.g.dart index bfff79bd..7374b8ff 100644 --- a/lib/src/v3/api/resolve_object/resolve_object.g.dart +++ b/lib/src/v3/api/resolve_object/resolve_object.g.dart @@ -6,23 +6,6 @@ part of 'resolve_object.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ResolveObjectImpl _$$ResolveObjectImplFromJson(Map json) => - _$ResolveObjectImpl( - q: json['q'] as String, - auth: json['auth'] as String?, - ); +_$ResolveObjectImpl _$$ResolveObjectImplFromJson(Map json) => _$ResolveObjectImpl(q: json['q'] as String, auth: json['auth'] as String?); -Map _$$ResolveObjectImplToJson(_$ResolveObjectImpl instance) { - final val = { - 'q': instance.q, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +Map _$$ResolveObjectImplToJson(_$ResolveObjectImpl instance) => {'q': instance.q, if (instance.auth case final value?) 'auth': value}; diff --git a/lib/src/v3/api/search/search.dart b/lib/src/v3/api/search/search.dart index 432fac8a..dfe6663e 100644 --- a/lib/src/v3/api/search/search.dart +++ b/lib/src/v3/api/search/search.dart @@ -12,9 +12,7 @@ part 'search.g.dart'; /// /// `HTTP.GET /search` @freezed -class Search - with _$Search - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class Search with _$Search implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory Search({ required String q, // v0.18.0 @@ -37,6 +35,5 @@ class Search final httpMethod = HttpMethod.get; @override - SearchResponse responseFactory(Map json) => - SearchResponse.fromJson(json); + SearchResponse responseFactory(Map json) => SearchResponse.fromJson(json); } diff --git a/lib/src/v3/api/search/search.freezed.dart b/lib/src/v3/api/search/search.freezed.dart index 88fefeb0..64d83536 100644 --- a/lib/src/v3/api/search/search.freezed.dart +++ b/lib/src/v3/api/search/search.freezed.dart @@ -12,7 +12,8 @@ part of 'search.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Search _$SearchFromJson(Map json) { return _Search.fromJson(json); @@ -43,25 +44,24 @@ mixin _$Search { /// @nodoc abstract class $SearchCopyWith<$Res> { - factory $SearchCopyWith(Search value, $Res Function(Search) then) = - _$SearchCopyWithImpl<$Res, Search>; + factory $SearchCopyWith(Search value, $Res Function(Search) then) = _$SearchCopyWithImpl<$Res, Search>; @useResult - $Res call( - {String q, - int? communityId, - String? communityName, - int? creatorId, - @JsonKey(name: 'type_') SearchType? type, - SortType? sort, - ListingType? listingType, - int? page, - int? limit, - String? auth}); + $Res call({ + String q, + int? communityId, + String? communityName, + int? creatorId, + @JsonKey(name: 'type_') SearchType? type, + SortType? sort, + ListingType? listingType, + int? page, + int? limit, + String? auth, + }); } /// @nodoc -class _$SearchCopyWithImpl<$Res, $Val extends Search> - implements $SearchCopyWith<$Res> { +class _$SearchCopyWithImpl<$Res, $Val extends Search> implements $SearchCopyWith<$Res> { _$SearchCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -85,78 +85,86 @@ class _$SearchCopyWithImpl<$Res, $Val extends Search> Object? limit = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - q: null == q - ? _value.q - : q // ignore: cast_nullable_to_non_nullable - as String, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - creatorId: freezed == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SearchType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - listingType: freezed == listingType - ? _value.listingType - : listingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + q: + null == q + ? _value.q + : q // ignore: cast_nullable_to_non_nullable + as String, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + creatorId: + freezed == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as SearchType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + listingType: + freezed == listingType + ? _value.listingType + : listingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$SearchImplCopyWith<$Res> implements $SearchCopyWith<$Res> { - factory _$$SearchImplCopyWith( - _$SearchImpl value, $Res Function(_$SearchImpl) then) = - __$$SearchImplCopyWithImpl<$Res>; + factory _$$SearchImplCopyWith(_$SearchImpl value, $Res Function(_$SearchImpl) then) = __$$SearchImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String q, - int? communityId, - String? communityName, - int? creatorId, - @JsonKey(name: 'type_') SearchType? type, - SortType? sort, - ListingType? listingType, - int? page, - int? limit, - String? auth}); + $Res call({ + String q, + int? communityId, + String? communityName, + int? creatorId, + @JsonKey(name: 'type_') SearchType? type, + SortType? sort, + ListingType? listingType, + int? page, + int? limit, + String? auth, + }); } /// @nodoc -class __$$SearchImplCopyWithImpl<$Res> - extends _$SearchCopyWithImpl<$Res, _$SearchImpl> - implements _$$SearchImplCopyWith<$Res> { - __$$SearchImplCopyWithImpl( - _$SearchImpl _value, $Res Function(_$SearchImpl) _then) - : super(_value, _then); +class __$$SearchImplCopyWithImpl<$Res> extends _$SearchCopyWithImpl<$Res, _$SearchImpl> implements _$$SearchImplCopyWith<$Res> { + __$$SearchImplCopyWithImpl(_$SearchImpl _value, $Res Function(_$SearchImpl) _then) : super(_value, _then); /// Create a copy of Search /// with the given fields replaced by the non-null parameter values. @@ -174,48 +182,60 @@ class __$$SearchImplCopyWithImpl<$Res> Object? limit = freezed, Object? auth = freezed, }) { - return _then(_$SearchImpl( - q: null == q - ? _value.q - : q // ignore: cast_nullable_to_non_nullable - as String, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - communityName: freezed == communityName - ? _value.communityName - : communityName // ignore: cast_nullable_to_non_nullable - as String?, - creatorId: freezed == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SearchType?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - listingType: freezed == listingType - ? _value.listingType - : listingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$SearchImpl( + q: + null == q + ? _value.q + : q // ignore: cast_nullable_to_non_nullable + as String, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + communityName: + freezed == communityName + ? _value.communityName + : communityName // ignore: cast_nullable_to_non_nullable + as String?, + creatorId: + freezed == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as SearchType?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + listingType: + freezed == listingType + ? _value.listingType + : listingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -223,50 +243,39 @@ class __$$SearchImplCopyWithImpl<$Res> @apiSerde class _$SearchImpl extends _Search { - const _$SearchImpl( - {required this.q, - this.communityId, - this.communityName, - this.creatorId, - @JsonKey(name: 'type_') this.type, - this.sort, - this.listingType, - this.page, - this.limit, - this.auth}) - : super._(); + const _$SearchImpl({required this.q, this.communityId, this.communityName, this.creatorId, @JsonKey(name: 'type_') this.type, this.sort, this.listingType, this.page, this.limit, this.auth}) + : super._(); - factory _$SearchImpl.fromJson(Map json) => - _$$SearchImplFromJson(json); + factory _$SearchImpl.fromJson(Map json) => _$$SearchImplFromJson(json); @override final String q; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final String? communityName; -// v0.18.0 + // v0.18.0 @override final int? creatorId; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'type_') final SearchType? type; -// v0.18.0 + // v0.18.0 @override final SortType? sort; -// v0.18.0 + // v0.18.0 @override final ListingType? listingType; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -281,16 +290,12 @@ class _$SearchImpl extends _Search { (other.runtimeType == runtimeType && other is _$SearchImpl && (identical(other.q, q) || other.q == q) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.communityName, communityName) || - other.communityName == communityName) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.communityName, communityName) || other.communityName == communityName) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && (identical(other.type, type) || other.type == type) && (identical(other.sort, sort) || other.sort == sort) && - (identical(other.listingType, listingType) || - other.listingType == listingType) && + (identical(other.listingType, listingType) || other.listingType == listingType) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && (identical(other.auth, auth) || other.auth == auth)); @@ -298,37 +303,34 @@ class _$SearchImpl extends _Search { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, q, communityId, communityName, - creatorId, type, sort, listingType, page, limit, auth); + int get hashCode => Object.hash(runtimeType, q, communityId, communityName, creatorId, type, sort, listingType, page, limit, auth); /// Create a copy of Search /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SearchImplCopyWith<_$SearchImpl> get copyWith => - __$$SearchImplCopyWithImpl<_$SearchImpl>(this, _$identity); + _$$SearchImplCopyWith<_$SearchImpl> get copyWith => __$$SearchImplCopyWithImpl<_$SearchImpl>(this, _$identity); @override Map toJson() { - return _$$SearchImplToJson( - this, - ); + return _$$SearchImplToJson(this); } } abstract class _Search extends Search { - const factory _Search( - {required final String q, - final int? communityId, - final String? communityName, - final int? creatorId, - @JsonKey(name: 'type_') final SearchType? type, - final SortType? sort, - final ListingType? listingType, - final int? page, - final int? limit, - final String? auth}) = _$SearchImpl; + const factory _Search({ + required final String q, + final int? communityId, + final String? communityName, + final int? creatorId, + @JsonKey(name: 'type_') final SearchType? type, + final SortType? sort, + final ListingType? listingType, + final int? page, + final int? limit, + final String? auth, + }) = _$SearchImpl; const _Search._() : super._(); factory _Search.fromJson(Map json) = _$SearchImpl.fromJson; @@ -359,6 +361,5 @@ abstract class _Search extends Search { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SearchImplCopyWith<_$SearchImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SearchImplCopyWith<_$SearchImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/search/search.g.dart b/lib/src/v3/api/search/search.g.dart index f7ac5264..a93edec8 100644 --- a/lib/src/v3/api/search/search.g.dart +++ b/lib/src/v3/api/search/search.g.dart @@ -7,41 +7,27 @@ part of 'search.dart'; // ************************************************************************** _$SearchImpl _$$SearchImplFromJson(Map json) => _$SearchImpl( - q: json['q'] as String, - communityId: (json['community_id'] as num?)?.toInt(), - communityName: json['community_name'] as String?, - creatorId: (json['creator_id'] as num?)?.toInt(), - type: json['type_'] == null - ? null - : SearchType.fromJson(json['type_'] as String), - sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), - listingType: json['listing_type'] == null - ? null - : ListingType.fromJson(json['listing_type']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); + q: json['q'] as String, + communityId: (json['community_id'] as num?)?.toInt(), + communityName: json['community_name'] as String?, + creatorId: (json['creator_id'] as num?)?.toInt(), + type: json['type_'] == null ? null : SearchType.fromJson(json['type_'] as String), + sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), + listingType: json['listing_type'] == null ? null : ListingType.fromJson(json['listing_type']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + auth: json['auth'] as String?, +); -Map _$$SearchImplToJson(_$SearchImpl instance) { - final val = { - 'q': instance.q, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('community_id', instance.communityId); - writeNotNull('community_name', instance.communityName); - writeNotNull('creator_id', instance.creatorId); - writeNotNull('type_', instance.type?.toJson()); - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('listing_type', instance.listingType?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} +Map _$$SearchImplToJson(_$SearchImpl instance) => { + 'q': instance.q, + if (instance.communityId case final value?) 'community_id': value, + if (instance.communityName case final value?) 'community_name': value, + if (instance.creatorId case final value?) 'creator_id': value, + if (instance.type?.toJson() case final value?) 'type_': value, + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.listingType?.toJson() case final value?) 'listing_type': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; diff --git a/lib/src/v3/api/site/site.dart b/lib/src/v3/api/site/site.dart index 64ea73a4..bbdee4b3 100644 --- a/lib/src/v3/api/site/site.dart +++ b/lib/src/v3/api/site/site.dart @@ -10,34 +10,26 @@ part 'site.g.dart'; /// /// `HTTP.GET /site` @freezed -class GetSite - with _$GetSite - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetSite with _$GetSite implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetSite({ - String? auth, - }) = _GetSite; + const factory GetSite({String? auth}) = _GetSite; const GetSite._(); - factory GetSite.fromJson(Map json) => - _$GetSiteFromJson(json); + factory GetSite.fromJson(Map json) => _$GetSiteFromJson(json); final path = '/site'; final httpMethod = HttpMethod.get; @override - GetSiteResponse responseFactory(Map json) => - GetSiteResponse.fromJson(json); + GetSiteResponse responseFactory(Map json) => GetSiteResponse.fromJson(json); } /// Create your site. /// /// `HTTP.POST /site` @freezed -class CreateSite - with _$CreateSite - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class CreateSite with _$CreateSite implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory CreateSite({ required String name, // v0.18.0 @@ -87,25 +79,21 @@ class CreateSite }) = _CreateSite; const CreateSite._(); - factory CreateSite.fromJson(Map json) => - _$CreateSiteFromJson(json); + factory CreateSite.fromJson(Map json) => _$CreateSiteFromJson(json); final path = '/site'; final httpMethod = HttpMethod.post; @override - SiteResponse responseFactory(Map json) => - SiteResponse.fromJson(json); + SiteResponse responseFactory(Map json) => SiteResponse.fromJson(json); } /// Edit your site. /// /// `HTTP.PUT /site` @freezed -class EditSite - with _$EditSite - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class EditSite with _$EditSite implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory EditSite({ String? name, // v0.18.0 @@ -157,16 +145,14 @@ class EditSite }) = _EditSite; const EditSite._(); - factory EditSite.fromJson(Map json) => - _$EditSiteFromJson(json); + factory EditSite.fromJson(Map json) => _$EditSiteFromJson(json); final path = '/site'; final httpMethod = HttpMethod.put; @override - SiteResponse responseFactory(Map json) => - SiteResponse.fromJson(json); + SiteResponse responseFactory(Map json) => SiteResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -175,11 +161,7 @@ class EditSite /// /// `HTTP.Post /site/block` @freezed -class BlockInstance - with _$BlockInstance - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class BlockInstance with _$BlockInstance implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory BlockInstance({ String? auth, @@ -188,14 +170,12 @@ class BlockInstance }) = _BlockInstance; const BlockInstance._(); - factory BlockInstance.fromJson(Map json) => - _$BlockInstanceFromJson(json); + factory BlockInstance.fromJson(Map json) => _$BlockInstanceFromJson(json); final path = '/site/block'; final httpMethod = HttpMethod.post; @override - BlockInstanceResponse responseFactory(Map json) => - BlockInstanceResponse.fromJson(json); + BlockInstanceResponse responseFactory(Map json) => BlockInstanceResponse.fromJson(json); } diff --git a/lib/src/v3/api/site/site.freezed.dart b/lib/src/v3/api/site/site.freezed.dart index 5180d3a1..b1d07262 100644 --- a/lib/src/v3/api/site/site.freezed.dart +++ b/lib/src/v3/api/site/site.freezed.dart @@ -12,7 +12,8 @@ part of 'site.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetSite _$GetSiteFromJson(Map json) { return _GetSite.fromJson(json); @@ -33,15 +34,13 @@ mixin _$GetSite { /// @nodoc abstract class $GetSiteCopyWith<$Res> { - factory $GetSiteCopyWith(GetSite value, $Res Function(GetSite) then) = - _$GetSiteCopyWithImpl<$Res, GetSite>; + factory $GetSiteCopyWith(GetSite value, $Res Function(GetSite) then) = _$GetSiteCopyWithImpl<$Res, GetSite>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetSiteCopyWithImpl<$Res, $Val extends GetSite> - implements $GetSiteCopyWith<$Res> { +class _$GetSiteCopyWithImpl<$Res, $Val extends GetSite> implements $GetSiteCopyWith<$Res> { _$GetSiteCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -53,49 +52,46 @@ class _$GetSiteCopyWithImpl<$Res, $Val extends GetSite> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$GetSiteImplCopyWith<$Res> implements $GetSiteCopyWith<$Res> { - factory _$$GetSiteImplCopyWith( - _$GetSiteImpl value, $Res Function(_$GetSiteImpl) then) = - __$$GetSiteImplCopyWithImpl<$Res>; + factory _$$GetSiteImplCopyWith(_$GetSiteImpl value, $Res Function(_$GetSiteImpl) then) = __$$GetSiteImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GetSiteImplCopyWithImpl<$Res> - extends _$GetSiteCopyWithImpl<$Res, _$GetSiteImpl> - implements _$$GetSiteImplCopyWith<$Res> { - __$$GetSiteImplCopyWithImpl( - _$GetSiteImpl _value, $Res Function(_$GetSiteImpl) _then) - : super(_value, _then); +class __$$GetSiteImplCopyWithImpl<$Res> extends _$GetSiteCopyWithImpl<$Res, _$GetSiteImpl> implements _$$GetSiteImplCopyWith<$Res> { + __$$GetSiteImplCopyWithImpl(_$GetSiteImpl _value, $Res Function(_$GetSiteImpl) _then) : super(_value, _then); /// Create a copy of GetSite /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetSiteImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetSiteImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -105,8 +101,7 @@ class __$$GetSiteImplCopyWithImpl<$Res> class _$GetSiteImpl extends _GetSite { const _$GetSiteImpl({this.auth}) : super._(); - factory _$GetSiteImpl.fromJson(Map json) => - _$$GetSiteImplFromJson(json); + factory _$GetSiteImpl.fromJson(Map json) => _$$GetSiteImplFromJson(json); @override final String? auth; @@ -118,10 +113,7 @@ class _$GetSiteImpl extends _GetSite { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetSiteImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetSiteImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -133,14 +125,11 @@ class _$GetSiteImpl extends _GetSite { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetSiteImplCopyWith<_$GetSiteImpl> get copyWith => - __$$GetSiteImplCopyWithImpl<_$GetSiteImpl>(this, _$identity); + _$$GetSiteImplCopyWith<_$GetSiteImpl> get copyWith => __$$GetSiteImplCopyWithImpl<_$GetSiteImpl>(this, _$identity); @override Map toJson() { - return _$$GetSiteImplToJson( - this, - ); + return _$$GetSiteImplToJson(this); } } @@ -157,8 +146,7 @@ abstract class _GetSite extends GetSite { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetSiteImplCopyWith<_$GetSiteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetSiteImplCopyWith<_$GetSiteImpl> get copyWith => throw _privateConstructorUsedError; } CreateSite _$CreateSiteFromJson(Map json) { @@ -174,63 +162,43 @@ mixin _$CreateSite { String? get banner => throw _privateConstructorUsedError; // v0.18.0 bool? get enableDownvotes => throw _privateConstructorUsedError; // v0.18.0 bool? get enableNsfw => throw _privateConstructorUsedError; // v0.18.0 - bool? get communityCreationAdminOnly => - throw _privateConstructorUsedError; // v0.18.0 - bool? get requireEmailVerification => - throw _privateConstructorUsedError; // v0.18.0 - String? get applicationQuestion => - throw _privateConstructorUsedError; // v0.18.0 + bool? get communityCreationAdminOnly => throw _privateConstructorUsedError; // v0.18.0 + bool? get requireEmailVerification => throw _privateConstructorUsedError; // v0.18.0 + String? get applicationQuestion => throw _privateConstructorUsedError; // v0.18.0 bool? get privateInstance => throw _privateConstructorUsedError; // v0.18.0 String? get defaultTheme => throw _privateConstructorUsedError; // v0.18.0 - ListingType? get defaultPostListingType => - throw _privateConstructorUsedError; // v0.18.0 - SortType? get defaultSortType => - throw _privateConstructorUsedError; // v0.19.4 (optional) + ListingType? get defaultPostListingType => throw _privateConstructorUsedError; // v0.18.0 + SortType? get defaultSortType => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get legalInformation => throw _privateConstructorUsedError; // v0.18.0 - bool? get applicationEmailAdmins => - throw _privateConstructorUsedError; // v0.18.0 + bool? get applicationEmailAdmins => throw _privateConstructorUsedError; // v0.18.0 bool? get hideModlogModNames => throw _privateConstructorUsedError; // v0.18.0 - List? get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 + List? get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 String? get slurFilterRegex => throw _privateConstructorUsedError; // v0.18.0 int? get actorNameMaxLength => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitMessage => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitMessagePerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitMessagePerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitPost => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitPostPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitPostPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitRegister => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitRegisterPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitRegisterPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitImage => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitImagePerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitImagePerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitComment => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitCommentPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitCommentPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitSearch => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitSearchPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitSearchPerSecond => throw _privateConstructorUsedError; // v0.18.0 bool? get federationEnabled => throw _privateConstructorUsedError; // v0.18.0 bool? get federationDebug => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get federationWorkerCount => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] + int? get federationWorkerCount => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] bool? get captchaEnabled => throw _privateConstructorUsedError; // v0.18.0 - String? get captchaDifficulty => - throw _privateConstructorUsedError; // v0.18.0 - List? get allowedInstances => - throw _privateConstructorUsedError; // v0.18.0 - List? get blockedInstances => - throw _privateConstructorUsedError; // v0.18.0 + String? get captchaDifficulty => throw _privateConstructorUsedError; // v0.18.0 + List? get allowedInstances => throw _privateConstructorUsedError; // v0.18.0 + List? get blockedInstances => throw _privateConstructorUsedError; // v0.18.0 List? get taglines => throw _privateConstructorUsedError; // v0.18.0 - RegistrationMode? get registrationMode => - throw _privateConstructorUsedError; // v0.18.0 - String? get contentWarning => - throw _privateConstructorUsedError; // v0.19.4 (optional) - String? get defaultPostListingMode => - throw _privateConstructorUsedError; // v0.19.4 (optional) + RegistrationMode? get registrationMode => throw _privateConstructorUsedError; // v0.18.0 + String? get contentWarning => throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get defaultPostListingMode => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this CreateSite to a JSON map. @@ -239,66 +207,63 @@ mixin _$CreateSite { /// Create a copy of CreateSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CreateSiteCopyWith get copyWith => - throw _privateConstructorUsedError; + $CreateSiteCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CreateSiteCopyWith<$Res> { - factory $CreateSiteCopyWith( - CreateSite value, $Res Function(CreateSite) then) = - _$CreateSiteCopyWithImpl<$Res, CreateSite>; + factory $CreateSiteCopyWith(CreateSite value, $Res Function(CreateSite) then) = _$CreateSiteCopyWithImpl<$Res, CreateSite>; @useResult - $Res call( - {String name, - String? sidebar, - String? description, - String? icon, - String? banner, - bool? enableDownvotes, - bool? enableNsfw, - bool? communityCreationAdminOnly, - bool? requireEmailVerification, - String? applicationQuestion, - bool? privateInstance, - String? defaultTheme, - ListingType? defaultPostListingType, - SortType? defaultSortType, - String? legalInformation, - bool? applicationEmailAdmins, - bool? hideModlogModNames, - List? discussionLanguages, - String? slurFilterRegex, - int? actorNameMaxLength, - int? rateLimitMessage, - int? rateLimitMessagePerSecond, - int? rateLimitPost, - int? rateLimitPostPerSecond, - int? rateLimitRegister, - int? rateLimitRegisterPerSecond, - int? rateLimitImage, - int? rateLimitImagePerSecond, - int? rateLimitComment, - int? rateLimitCommentPerSecond, - int? rateLimitSearch, - int? rateLimitSearchPerSecond, - bool? federationEnabled, - bool? federationDebug, - @deprecated int? federationWorkerCount, - bool? captchaEnabled, - String? captchaDifficulty, - List? allowedInstances, - List? blockedInstances, - List? taglines, - RegistrationMode? registrationMode, - String? contentWarning, - String? defaultPostListingMode, - String? auth}); + $Res call({ + String name, + String? sidebar, + String? description, + String? icon, + String? banner, + bool? enableDownvotes, + bool? enableNsfw, + bool? communityCreationAdminOnly, + bool? requireEmailVerification, + String? applicationQuestion, + bool? privateInstance, + String? defaultTheme, + ListingType? defaultPostListingType, + SortType? defaultSortType, + String? legalInformation, + bool? applicationEmailAdmins, + bool? hideModlogModNames, + List? discussionLanguages, + String? slurFilterRegex, + int? actorNameMaxLength, + int? rateLimitMessage, + int? rateLimitMessagePerSecond, + int? rateLimitPost, + int? rateLimitPostPerSecond, + int? rateLimitRegister, + int? rateLimitRegisterPerSecond, + int? rateLimitImage, + int? rateLimitImagePerSecond, + int? rateLimitComment, + int? rateLimitCommentPerSecond, + int? rateLimitSearch, + int? rateLimitSearchPerSecond, + bool? federationEnabled, + bool? federationDebug, + @deprecated int? federationWorkerCount, + bool? captchaEnabled, + String? captchaDifficulty, + List? allowedInstances, + List? blockedInstances, + List? taglines, + RegistrationMode? registrationMode, + String? contentWarning, + String? defaultPostListingMode, + String? auth, + }); } /// @nodoc -class _$CreateSiteCopyWithImpl<$Res, $Val extends CreateSite> - implements $CreateSiteCopyWith<$Res> { +class _$CreateSiteCopyWithImpl<$Res, $Val extends CreateSite> implements $CreateSiteCopyWith<$Res> { _$CreateSiteCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -356,249 +321,290 @@ class _$CreateSiteCopyWithImpl<$Res, $Val extends CreateSite> Object? defaultPostListingMode = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - enableDownvotes: freezed == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - enableNsfw: freezed == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - communityCreationAdminOnly: freezed == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool?, - requireEmailVerification: freezed == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool?, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: freezed == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool?, - defaultTheme: freezed == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingType: freezed == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - applicationEmailAdmins: freezed == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - hideModlogModNames: freezed == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: freezed == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessage: freezed == rateLimitMessage - ? _value.rateLimitMessage - : rateLimitMessage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessagePerSecond: freezed == rateLimitMessagePerSecond - ? _value.rateLimitMessagePerSecond - : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPost: freezed == rateLimitPost - ? _value.rateLimitPost - : rateLimitPost // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPostPerSecond: freezed == rateLimitPostPerSecond - ? _value.rateLimitPostPerSecond - : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegister: freezed == rateLimitRegister - ? _value.rateLimitRegister - : rateLimitRegister // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegisterPerSecond: freezed == rateLimitRegisterPerSecond - ? _value.rateLimitRegisterPerSecond - : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImage: freezed == rateLimitImage - ? _value.rateLimitImage - : rateLimitImage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImagePerSecond: freezed == rateLimitImagePerSecond - ? _value.rateLimitImagePerSecond - : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitComment: freezed == rateLimitComment - ? _value.rateLimitComment - : rateLimitComment // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitCommentPerSecond: freezed == rateLimitCommentPerSecond - ? _value.rateLimitCommentPerSecond - : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearch: freezed == rateLimitSearch - ? _value.rateLimitSearch - : rateLimitSearch // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearchPerSecond: freezed == rateLimitSearchPerSecond - ? _value.rateLimitSearchPerSecond - : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - federationEnabled: freezed == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - federationDebug: freezed == federationDebug - ? _value.federationDebug - : federationDebug // ignore: cast_nullable_to_non_nullable - as bool?, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: freezed == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - captchaDifficulty: freezed == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String?, - allowedInstances: freezed == allowedInstances - ? _value.allowedInstances - : allowedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedInstances: freezed == blockedInstances - ? _value.blockedInstances - : blockedInstances // ignore: cast_nullable_to_non_nullable - as List?, - taglines: freezed == taglines - ? _value.taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List?, - registrationMode: freezed == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode?, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + enableDownvotes: + freezed == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + enableNsfw: + freezed == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + communityCreationAdminOnly: + freezed == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool?, + requireEmailVerification: + freezed == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool?, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + freezed == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool?, + defaultTheme: + freezed == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingType: + freezed == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + applicationEmailAdmins: + freezed == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + hideModlogModNames: + freezed == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + freezed == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessage: + freezed == rateLimitMessage + ? _value.rateLimitMessage + : rateLimitMessage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessagePerSecond: + freezed == rateLimitMessagePerSecond + ? _value.rateLimitMessagePerSecond + : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPost: + freezed == rateLimitPost + ? _value.rateLimitPost + : rateLimitPost // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPostPerSecond: + freezed == rateLimitPostPerSecond + ? _value.rateLimitPostPerSecond + : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegister: + freezed == rateLimitRegister + ? _value.rateLimitRegister + : rateLimitRegister // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegisterPerSecond: + freezed == rateLimitRegisterPerSecond + ? _value.rateLimitRegisterPerSecond + : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImage: + freezed == rateLimitImage + ? _value.rateLimitImage + : rateLimitImage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImagePerSecond: + freezed == rateLimitImagePerSecond + ? _value.rateLimitImagePerSecond + : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitComment: + freezed == rateLimitComment + ? _value.rateLimitComment + : rateLimitComment // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitCommentPerSecond: + freezed == rateLimitCommentPerSecond + ? _value.rateLimitCommentPerSecond + : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearch: + freezed == rateLimitSearch + ? _value.rateLimitSearch + : rateLimitSearch // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearchPerSecond: + freezed == rateLimitSearchPerSecond + ? _value.rateLimitSearchPerSecond + : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + federationEnabled: + freezed == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + federationDebug: + freezed == federationDebug + ? _value.federationDebug + : federationDebug // ignore: cast_nullable_to_non_nullable + as bool?, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + freezed == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + captchaDifficulty: + freezed == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String?, + allowedInstances: + freezed == allowedInstances + ? _value.allowedInstances + : allowedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedInstances: + freezed == blockedInstances + ? _value.blockedInstances + : blockedInstances // ignore: cast_nullable_to_non_nullable + as List?, + taglines: + freezed == taglines + ? _value.taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List?, + registrationMode: + freezed == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode?, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CreateSiteImplCopyWith<$Res> - implements $CreateSiteCopyWith<$Res> { - factory _$$CreateSiteImplCopyWith( - _$CreateSiteImpl value, $Res Function(_$CreateSiteImpl) then) = - __$$CreateSiteImplCopyWithImpl<$Res>; +abstract class _$$CreateSiteImplCopyWith<$Res> implements $CreateSiteCopyWith<$Res> { + factory _$$CreateSiteImplCopyWith(_$CreateSiteImpl value, $Res Function(_$CreateSiteImpl) then) = __$$CreateSiteImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String name, - String? sidebar, - String? description, - String? icon, - String? banner, - bool? enableDownvotes, - bool? enableNsfw, - bool? communityCreationAdminOnly, - bool? requireEmailVerification, - String? applicationQuestion, - bool? privateInstance, - String? defaultTheme, - ListingType? defaultPostListingType, - SortType? defaultSortType, - String? legalInformation, - bool? applicationEmailAdmins, - bool? hideModlogModNames, - List? discussionLanguages, - String? slurFilterRegex, - int? actorNameMaxLength, - int? rateLimitMessage, - int? rateLimitMessagePerSecond, - int? rateLimitPost, - int? rateLimitPostPerSecond, - int? rateLimitRegister, - int? rateLimitRegisterPerSecond, - int? rateLimitImage, - int? rateLimitImagePerSecond, - int? rateLimitComment, - int? rateLimitCommentPerSecond, - int? rateLimitSearch, - int? rateLimitSearchPerSecond, - bool? federationEnabled, - bool? federationDebug, - @deprecated int? federationWorkerCount, - bool? captchaEnabled, - String? captchaDifficulty, - List? allowedInstances, - List? blockedInstances, - List? taglines, - RegistrationMode? registrationMode, - String? contentWarning, - String? defaultPostListingMode, - String? auth}); + $Res call({ + String name, + String? sidebar, + String? description, + String? icon, + String? banner, + bool? enableDownvotes, + bool? enableNsfw, + bool? communityCreationAdminOnly, + bool? requireEmailVerification, + String? applicationQuestion, + bool? privateInstance, + String? defaultTheme, + ListingType? defaultPostListingType, + SortType? defaultSortType, + String? legalInformation, + bool? applicationEmailAdmins, + bool? hideModlogModNames, + List? discussionLanguages, + String? slurFilterRegex, + int? actorNameMaxLength, + int? rateLimitMessage, + int? rateLimitMessagePerSecond, + int? rateLimitPost, + int? rateLimitPostPerSecond, + int? rateLimitRegister, + int? rateLimitRegisterPerSecond, + int? rateLimitImage, + int? rateLimitImagePerSecond, + int? rateLimitComment, + int? rateLimitCommentPerSecond, + int? rateLimitSearch, + int? rateLimitSearchPerSecond, + bool? federationEnabled, + bool? federationDebug, + @deprecated int? federationWorkerCount, + bool? captchaEnabled, + String? captchaDifficulty, + List? allowedInstances, + List? blockedInstances, + List? taglines, + RegistrationMode? registrationMode, + String? contentWarning, + String? defaultPostListingMode, + String? auth, + }); } /// @nodoc -class __$$CreateSiteImplCopyWithImpl<$Res> - extends _$CreateSiteCopyWithImpl<$Res, _$CreateSiteImpl> - implements _$$CreateSiteImplCopyWith<$Res> { - __$$CreateSiteImplCopyWithImpl( - _$CreateSiteImpl _value, $Res Function(_$CreateSiteImpl) _then) - : super(_value, _then); +class __$$CreateSiteImplCopyWithImpl<$Res> extends _$CreateSiteCopyWithImpl<$Res, _$CreateSiteImpl> implements _$$CreateSiteImplCopyWith<$Res> { + __$$CreateSiteImplCopyWithImpl(_$CreateSiteImpl _value, $Res Function(_$CreateSiteImpl) _then) : super(_value, _then); /// Create a copy of CreateSite /// with the given fields replaced by the non-null parameter values. @@ -650,184 +656,230 @@ class __$$CreateSiteImplCopyWithImpl<$Res> Object? defaultPostListingMode = freezed, Object? auth = freezed, }) { - return _then(_$CreateSiteImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - enableDownvotes: freezed == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - enableNsfw: freezed == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - communityCreationAdminOnly: freezed == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool?, - requireEmailVerification: freezed == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool?, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: freezed == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool?, - defaultTheme: freezed == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingType: freezed == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - applicationEmailAdmins: freezed == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - hideModlogModNames: freezed == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: freezed == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessage: freezed == rateLimitMessage - ? _value.rateLimitMessage - : rateLimitMessage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessagePerSecond: freezed == rateLimitMessagePerSecond - ? _value.rateLimitMessagePerSecond - : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPost: freezed == rateLimitPost - ? _value.rateLimitPost - : rateLimitPost // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPostPerSecond: freezed == rateLimitPostPerSecond - ? _value.rateLimitPostPerSecond - : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegister: freezed == rateLimitRegister - ? _value.rateLimitRegister - : rateLimitRegister // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegisterPerSecond: freezed == rateLimitRegisterPerSecond - ? _value.rateLimitRegisterPerSecond - : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImage: freezed == rateLimitImage - ? _value.rateLimitImage - : rateLimitImage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImagePerSecond: freezed == rateLimitImagePerSecond - ? _value.rateLimitImagePerSecond - : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitComment: freezed == rateLimitComment - ? _value.rateLimitComment - : rateLimitComment // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitCommentPerSecond: freezed == rateLimitCommentPerSecond - ? _value.rateLimitCommentPerSecond - : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearch: freezed == rateLimitSearch - ? _value.rateLimitSearch - : rateLimitSearch // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearchPerSecond: freezed == rateLimitSearchPerSecond - ? _value.rateLimitSearchPerSecond - : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - federationEnabled: freezed == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - federationDebug: freezed == federationDebug - ? _value.federationDebug - : federationDebug // ignore: cast_nullable_to_non_nullable - as bool?, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: freezed == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - captchaDifficulty: freezed == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String?, - allowedInstances: freezed == allowedInstances - ? _value._allowedInstances - : allowedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedInstances: freezed == blockedInstances - ? _value._blockedInstances - : blockedInstances // ignore: cast_nullable_to_non_nullable - as List?, - taglines: freezed == taglines - ? _value._taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List?, - registrationMode: freezed == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode?, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$CreateSiteImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + enableDownvotes: + freezed == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + enableNsfw: + freezed == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + communityCreationAdminOnly: + freezed == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool?, + requireEmailVerification: + freezed == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool?, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + freezed == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool?, + defaultTheme: + freezed == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingType: + freezed == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + applicationEmailAdmins: + freezed == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + hideModlogModNames: + freezed == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + freezed == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessage: + freezed == rateLimitMessage + ? _value.rateLimitMessage + : rateLimitMessage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessagePerSecond: + freezed == rateLimitMessagePerSecond + ? _value.rateLimitMessagePerSecond + : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPost: + freezed == rateLimitPost + ? _value.rateLimitPost + : rateLimitPost // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPostPerSecond: + freezed == rateLimitPostPerSecond + ? _value.rateLimitPostPerSecond + : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegister: + freezed == rateLimitRegister + ? _value.rateLimitRegister + : rateLimitRegister // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegisterPerSecond: + freezed == rateLimitRegisterPerSecond + ? _value.rateLimitRegisterPerSecond + : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImage: + freezed == rateLimitImage + ? _value.rateLimitImage + : rateLimitImage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImagePerSecond: + freezed == rateLimitImagePerSecond + ? _value.rateLimitImagePerSecond + : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitComment: + freezed == rateLimitComment + ? _value.rateLimitComment + : rateLimitComment // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitCommentPerSecond: + freezed == rateLimitCommentPerSecond + ? _value.rateLimitCommentPerSecond + : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearch: + freezed == rateLimitSearch + ? _value.rateLimitSearch + : rateLimitSearch // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearchPerSecond: + freezed == rateLimitSearchPerSecond + ? _value.rateLimitSearchPerSecond + : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + federationEnabled: + freezed == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + federationDebug: + freezed == federationDebug + ? _value.federationDebug + : federationDebug // ignore: cast_nullable_to_non_nullable + as bool?, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + freezed == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + captchaDifficulty: + freezed == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String?, + allowedInstances: + freezed == allowedInstances + ? _value._allowedInstances + : allowedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedInstances: + freezed == blockedInstances + ? _value._blockedInstances + : blockedInstances // ignore: cast_nullable_to_non_nullable + as List?, + taglines: + freezed == taglines + ? _value._taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List?, + registrationMode: + freezed == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode?, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -835,210 +887,206 @@ class __$$CreateSiteImplCopyWithImpl<$Res> @apiSerde class _$CreateSiteImpl extends _CreateSite { - const _$CreateSiteImpl( - {required this.name, - this.sidebar, - this.description, - this.icon, - this.banner, - this.enableDownvotes, - this.enableNsfw, - this.communityCreationAdminOnly, - this.requireEmailVerification, - this.applicationQuestion, - this.privateInstance, - this.defaultTheme, - this.defaultPostListingType, - this.defaultSortType, - this.legalInformation, - this.applicationEmailAdmins, - this.hideModlogModNames, - final List? discussionLanguages, - this.slurFilterRegex, - this.actorNameMaxLength, - this.rateLimitMessage, - this.rateLimitMessagePerSecond, - this.rateLimitPost, - this.rateLimitPostPerSecond, - this.rateLimitRegister, - this.rateLimitRegisterPerSecond, - this.rateLimitImage, - this.rateLimitImagePerSecond, - this.rateLimitComment, - this.rateLimitCommentPerSecond, - this.rateLimitSearch, - this.rateLimitSearchPerSecond, - this.federationEnabled, - this.federationDebug, - @deprecated this.federationWorkerCount, - this.captchaEnabled, - this.captchaDifficulty, - final List? allowedInstances, - final List? blockedInstances, - final List? taglines, - this.registrationMode, - this.contentWarning, - this.defaultPostListingMode, - this.auth}) - : _discussionLanguages = discussionLanguages, - _allowedInstances = allowedInstances, - _blockedInstances = blockedInstances, - _taglines = taglines, - super._(); - - factory _$CreateSiteImpl.fromJson(Map json) => - _$$CreateSiteImplFromJson(json); + const _$CreateSiteImpl({ + required this.name, + this.sidebar, + this.description, + this.icon, + this.banner, + this.enableDownvotes, + this.enableNsfw, + this.communityCreationAdminOnly, + this.requireEmailVerification, + this.applicationQuestion, + this.privateInstance, + this.defaultTheme, + this.defaultPostListingType, + this.defaultSortType, + this.legalInformation, + this.applicationEmailAdmins, + this.hideModlogModNames, + final List? discussionLanguages, + this.slurFilterRegex, + this.actorNameMaxLength, + this.rateLimitMessage, + this.rateLimitMessagePerSecond, + this.rateLimitPost, + this.rateLimitPostPerSecond, + this.rateLimitRegister, + this.rateLimitRegisterPerSecond, + this.rateLimitImage, + this.rateLimitImagePerSecond, + this.rateLimitComment, + this.rateLimitCommentPerSecond, + this.rateLimitSearch, + this.rateLimitSearchPerSecond, + this.federationEnabled, + this.federationDebug, + @deprecated this.federationWorkerCount, + this.captchaEnabled, + this.captchaDifficulty, + final List? allowedInstances, + final List? blockedInstances, + final List? taglines, + this.registrationMode, + this.contentWarning, + this.defaultPostListingMode, + this.auth, + }) : _discussionLanguages = discussionLanguages, + _allowedInstances = allowedInstances, + _blockedInstances = blockedInstances, + _taglines = taglines, + super._(); + + factory _$CreateSiteImpl.fromJson(Map json) => _$$CreateSiteImplFromJson(json); @override final String name; -// v0.18.0 + // v0.18.0 @override final String? sidebar; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final bool? enableDownvotes; -// v0.18.0 + // v0.18.0 @override final bool? enableNsfw; -// v0.18.0 + // v0.18.0 @override final bool? communityCreationAdminOnly; -// v0.18.0 + // v0.18.0 @override final bool? requireEmailVerification; -// v0.18.0 + // v0.18.0 @override final String? applicationQuestion; -// v0.18.0 + // v0.18.0 @override final bool? privateInstance; -// v0.18.0 + // v0.18.0 @override final String? defaultTheme; -// v0.18.0 + // v0.18.0 @override final ListingType? defaultPostListingType; -// v0.18.0 + // v0.18.0 @override final SortType? defaultSortType; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? legalInformation; -// v0.18.0 + // v0.18.0 @override final bool? applicationEmailAdmins; -// v0.18.0 + // v0.18.0 @override final bool? hideModlogModNames; -// v0.18.0 + // v0.18.0 final List? _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final String? slurFilterRegex; -// v0.18.0 + // v0.18.0 @override final int? actorNameMaxLength; -// v0.18.0 + // v0.18.0 @override final int? rateLimitMessage; -// v0.18.0 + // v0.18.0 @override final int? rateLimitMessagePerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitPost; -// v0.18.0 + // v0.18.0 @override final int? rateLimitPostPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitRegister; -// v0.18.0 + // v0.18.0 @override final int? rateLimitRegisterPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitImage; -// v0.18.0 + // v0.18.0 @override final int? rateLimitImagePerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitComment; -// v0.18.0 + // v0.18.0 @override final int? rateLimitCommentPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitSearch; -// v0.18.0 + // v0.18.0 @override final int? rateLimitSearchPerSecond; -// v0.18.0 + // v0.18.0 @override final bool? federationEnabled; -// v0.18.0 + // v0.18.0 @override final bool? federationDebug; -// v0.18.0 + // v0.18.0 @override @deprecated final int? federationWorkerCount; -// v0.18.0 [deprecated in v0.18.1] + // v0.18.0 [deprecated in v0.18.1] @override final bool? captchaEnabled; -// v0.18.0 + // v0.18.0 @override final String? captchaDifficulty; -// v0.18.0 + // v0.18.0 final List? _allowedInstances; -// v0.18.0 + // v0.18.0 @override List? get allowedInstances { final value = _allowedInstances; if (value == null) return null; - if (_allowedInstances is EqualUnmodifiableListView) - return _allowedInstances; + if (_allowedInstances is EqualUnmodifiableListView) return _allowedInstances; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 final List? _blockedInstances; -// v0.18.0 + // v0.18.0 @override List? get blockedInstances { final value = _blockedInstances; if (value == null) return null; - if (_blockedInstances is EqualUnmodifiableListView) - return _blockedInstances; + if (_blockedInstances is EqualUnmodifiableListView) return _blockedInstances; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 final List? _taglines; -// v0.18.0 + // v0.18.0 @override List? get taglines { final value = _taglines; @@ -1048,16 +1096,16 @@ class _$CreateSiteImpl extends _CreateSite { return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final RegistrationMode? registrationMode; -// v0.18.0 + // v0.18.0 @override final String? contentWarning; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? defaultPostListingMode; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -1073,60 +1121,33 @@ class _$CreateSiteImpl extends _CreateSite { other is _$CreateSiteImpl && (identical(other.name, name) || other.name == name) && (identical(other.sidebar, sidebar) || other.sidebar == sidebar) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && - (identical(other.enableDownvotes, enableDownvotes) || - other.enableDownvotes == enableDownvotes) && - (identical(other.enableNsfw, enableNsfw) || - other.enableNsfw == enableNsfw) && - (identical(other.communityCreationAdminOnly, communityCreationAdminOnly) || - other.communityCreationAdminOnly == - communityCreationAdminOnly) && - (identical(other.requireEmailVerification, requireEmailVerification) || - other.requireEmailVerification == requireEmailVerification) && - (identical(other.applicationQuestion, applicationQuestion) || - other.applicationQuestion == applicationQuestion) && - (identical(other.privateInstance, privateInstance) || - other.privateInstance == privateInstance) && - (identical(other.defaultTheme, defaultTheme) || - other.defaultTheme == defaultTheme) && - (identical(other.defaultPostListingType, defaultPostListingType) || - other.defaultPostListingType == defaultPostListingType) && - (identical(other.defaultSortType, defaultSortType) || - other.defaultSortType == defaultSortType) && - (identical(other.legalInformation, legalInformation) || - other.legalInformation == legalInformation) && - (identical(other.applicationEmailAdmins, applicationEmailAdmins) || - other.applicationEmailAdmins == applicationEmailAdmins) && - (identical(other.hideModlogModNames, hideModlogModNames) || - other.hideModlogModNames == hideModlogModNames) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && - (identical(other.slurFilterRegex, slurFilterRegex) || - other.slurFilterRegex == slurFilterRegex) && - (identical(other.actorNameMaxLength, actorNameMaxLength) || - other.actorNameMaxLength == actorNameMaxLength) && - (identical(other.rateLimitMessage, rateLimitMessage) || - other.rateLimitMessage == rateLimitMessage) && - (identical(other.rateLimitMessagePerSecond, rateLimitMessagePerSecond) || - other.rateLimitMessagePerSecond == rateLimitMessagePerSecond) && - (identical(other.rateLimitPost, rateLimitPost) || - other.rateLimitPost == rateLimitPost) && - (identical(other.rateLimitPostPerSecond, rateLimitPostPerSecond) || - other.rateLimitPostPerSecond == rateLimitPostPerSecond) && - (identical(other.rateLimitRegister, rateLimitRegister) || - other.rateLimitRegister == rateLimitRegister) && - (identical(other.rateLimitRegisterPerSecond, rateLimitRegisterPerSecond) || - other.rateLimitRegisterPerSecond == - rateLimitRegisterPerSecond) && - (identical(other.rateLimitImage, rateLimitImage) || - other.rateLimitImage == rateLimitImage) && - (identical(other.rateLimitImagePerSecond, rateLimitImagePerSecond) || - other.rateLimitImagePerSecond == rateLimitImagePerSecond) && - (identical(other.rateLimitComment, rateLimitComment) || - other.rateLimitComment == rateLimitComment) && + (identical(other.enableDownvotes, enableDownvotes) || other.enableDownvotes == enableDownvotes) && + (identical(other.enableNsfw, enableNsfw) || other.enableNsfw == enableNsfw) && + (identical(other.communityCreationAdminOnly, communityCreationAdminOnly) || other.communityCreationAdminOnly == communityCreationAdminOnly) && + (identical(other.requireEmailVerification, requireEmailVerification) || other.requireEmailVerification == requireEmailVerification) && + (identical(other.applicationQuestion, applicationQuestion) || other.applicationQuestion == applicationQuestion) && + (identical(other.privateInstance, privateInstance) || other.privateInstance == privateInstance) && + (identical(other.defaultTheme, defaultTheme) || other.defaultTheme == defaultTheme) && + (identical(other.defaultPostListingType, defaultPostListingType) || other.defaultPostListingType == defaultPostListingType) && + (identical(other.defaultSortType, defaultSortType) || other.defaultSortType == defaultSortType) && + (identical(other.legalInformation, legalInformation) || other.legalInformation == legalInformation) && + (identical(other.applicationEmailAdmins, applicationEmailAdmins) || other.applicationEmailAdmins == applicationEmailAdmins) && + (identical(other.hideModlogModNames, hideModlogModNames) || other.hideModlogModNames == hideModlogModNames) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.slurFilterRegex, slurFilterRegex) || other.slurFilterRegex == slurFilterRegex) && + (identical(other.actorNameMaxLength, actorNameMaxLength) || other.actorNameMaxLength == actorNameMaxLength) && + (identical(other.rateLimitMessage, rateLimitMessage) || other.rateLimitMessage == rateLimitMessage) && + (identical(other.rateLimitMessagePerSecond, rateLimitMessagePerSecond) || other.rateLimitMessagePerSecond == rateLimitMessagePerSecond) && + (identical(other.rateLimitPost, rateLimitPost) || other.rateLimitPost == rateLimitPost) && + (identical(other.rateLimitPostPerSecond, rateLimitPostPerSecond) || other.rateLimitPostPerSecond == rateLimitPostPerSecond) && + (identical(other.rateLimitRegister, rateLimitRegister) || other.rateLimitRegister == rateLimitRegister) && + (identical(other.rateLimitRegisterPerSecond, rateLimitRegisterPerSecond) || other.rateLimitRegisterPerSecond == rateLimitRegisterPerSecond) && + (identical(other.rateLimitImage, rateLimitImage) || other.rateLimitImage == rateLimitImage) && + (identical(other.rateLimitImagePerSecond, rateLimitImagePerSecond) || other.rateLimitImagePerSecond == rateLimitImagePerSecond) && + (identical(other.rateLimitComment, rateLimitComment) || other.rateLimitComment == rateLimitComment) && (identical(other.rateLimitCommentPerSecond, rateLimitCommentPerSecond) || other.rateLimitCommentPerSecond == rateLimitCommentPerSecond) && (identical(other.rateLimitSearch, rateLimitSearch) || other.rateLimitSearch == rateLimitSearch) && (identical(other.rateLimitSearchPerSecond, rateLimitSearchPerSecond) || other.rateLimitSearchPerSecond == rateLimitSearchPerSecond) && @@ -1147,119 +1168,116 @@ class _$CreateSiteImpl extends _CreateSite { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - name, - sidebar, - description, - icon, - banner, - enableDownvotes, - enableNsfw, - communityCreationAdminOnly, - requireEmailVerification, - applicationQuestion, - privateInstance, - defaultTheme, - defaultPostListingType, - defaultSortType, - legalInformation, - applicationEmailAdmins, - hideModlogModNames, - const DeepCollectionEquality().hash(_discussionLanguages), - slurFilterRegex, - actorNameMaxLength, - rateLimitMessage, - rateLimitMessagePerSecond, - rateLimitPost, - rateLimitPostPerSecond, - rateLimitRegister, - rateLimitRegisterPerSecond, - rateLimitImage, - rateLimitImagePerSecond, - rateLimitComment, - rateLimitCommentPerSecond, - rateLimitSearch, - rateLimitSearchPerSecond, - federationEnabled, - federationDebug, - federationWorkerCount, - captchaEnabled, - captchaDifficulty, - const DeepCollectionEquality().hash(_allowedInstances), - const DeepCollectionEquality().hash(_blockedInstances), - const DeepCollectionEquality().hash(_taglines), - registrationMode, - contentWarning, - defaultPostListingMode, - auth - ]); + runtimeType, + name, + sidebar, + description, + icon, + banner, + enableDownvotes, + enableNsfw, + communityCreationAdminOnly, + requireEmailVerification, + applicationQuestion, + privateInstance, + defaultTheme, + defaultPostListingType, + defaultSortType, + legalInformation, + applicationEmailAdmins, + hideModlogModNames, + const DeepCollectionEquality().hash(_discussionLanguages), + slurFilterRegex, + actorNameMaxLength, + rateLimitMessage, + rateLimitMessagePerSecond, + rateLimitPost, + rateLimitPostPerSecond, + rateLimitRegister, + rateLimitRegisterPerSecond, + rateLimitImage, + rateLimitImagePerSecond, + rateLimitComment, + rateLimitCommentPerSecond, + rateLimitSearch, + rateLimitSearchPerSecond, + federationEnabled, + federationDebug, + federationWorkerCount, + captchaEnabled, + captchaDifficulty, + const DeepCollectionEquality().hash(_allowedInstances), + const DeepCollectionEquality().hash(_blockedInstances), + const DeepCollectionEquality().hash(_taglines), + registrationMode, + contentWarning, + defaultPostListingMode, + auth, + ]); /// Create a copy of CreateSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CreateSiteImplCopyWith<_$CreateSiteImpl> get copyWith => - __$$CreateSiteImplCopyWithImpl<_$CreateSiteImpl>(this, _$identity); + _$$CreateSiteImplCopyWith<_$CreateSiteImpl> get copyWith => __$$CreateSiteImplCopyWithImpl<_$CreateSiteImpl>(this, _$identity); @override Map toJson() { - return _$$CreateSiteImplToJson( - this, - ); + return _$$CreateSiteImplToJson(this); } } abstract class _CreateSite extends CreateSite { - const factory _CreateSite( - {required final String name, - final String? sidebar, - final String? description, - final String? icon, - final String? banner, - final bool? enableDownvotes, - final bool? enableNsfw, - final bool? communityCreationAdminOnly, - final bool? requireEmailVerification, - final String? applicationQuestion, - final bool? privateInstance, - final String? defaultTheme, - final ListingType? defaultPostListingType, - final SortType? defaultSortType, - final String? legalInformation, - final bool? applicationEmailAdmins, - final bool? hideModlogModNames, - final List? discussionLanguages, - final String? slurFilterRegex, - final int? actorNameMaxLength, - final int? rateLimitMessage, - final int? rateLimitMessagePerSecond, - final int? rateLimitPost, - final int? rateLimitPostPerSecond, - final int? rateLimitRegister, - final int? rateLimitRegisterPerSecond, - final int? rateLimitImage, - final int? rateLimitImagePerSecond, - final int? rateLimitComment, - final int? rateLimitCommentPerSecond, - final int? rateLimitSearch, - final int? rateLimitSearchPerSecond, - final bool? federationEnabled, - final bool? federationDebug, - @deprecated final int? federationWorkerCount, - final bool? captchaEnabled, - final String? captchaDifficulty, - final List? allowedInstances, - final List? blockedInstances, - final List? taglines, - final RegistrationMode? registrationMode, - final String? contentWarning, - final String? defaultPostListingMode, - final String? auth}) = _$CreateSiteImpl; + const factory _CreateSite({ + required final String name, + final String? sidebar, + final String? description, + final String? icon, + final String? banner, + final bool? enableDownvotes, + final bool? enableNsfw, + final bool? communityCreationAdminOnly, + final bool? requireEmailVerification, + final String? applicationQuestion, + final bool? privateInstance, + final String? defaultTheme, + final ListingType? defaultPostListingType, + final SortType? defaultSortType, + final String? legalInformation, + final bool? applicationEmailAdmins, + final bool? hideModlogModNames, + final List? discussionLanguages, + final String? slurFilterRegex, + final int? actorNameMaxLength, + final int? rateLimitMessage, + final int? rateLimitMessagePerSecond, + final int? rateLimitPost, + final int? rateLimitPostPerSecond, + final int? rateLimitRegister, + final int? rateLimitRegisterPerSecond, + final int? rateLimitImage, + final int? rateLimitImagePerSecond, + final int? rateLimitComment, + final int? rateLimitCommentPerSecond, + final int? rateLimitSearch, + final int? rateLimitSearchPerSecond, + final bool? federationEnabled, + final bool? federationDebug, + @deprecated final int? federationWorkerCount, + final bool? captchaEnabled, + final String? captchaDifficulty, + final List? allowedInstances, + final List? blockedInstances, + final List? taglines, + final RegistrationMode? registrationMode, + final String? contentWarning, + final String? defaultPostListingMode, + final String? auth, + }) = _$CreateSiteImpl; const _CreateSite._() : super._(); - factory _CreateSite.fromJson(Map json) = - _$CreateSiteImpl.fromJson; + factory _CreateSite.fromJson(Map json) = _$CreateSiteImpl.fromJson; @override String get name; // v0.18.0 @@ -1355,8 +1373,7 @@ abstract class _CreateSite extends CreateSite { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CreateSiteImplCopyWith<_$CreateSiteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CreateSiteImplCopyWith<_$CreateSiteImpl> get copyWith => throw _privateConstructorUsedError; } EditSite _$EditSiteFromJson(Map json) { @@ -1372,66 +1389,45 @@ mixin _$EditSite { String? get banner => throw _privateConstructorUsedError; // v0.18.0 bool? get enableDownvotes => throw _privateConstructorUsedError; // v0.18.0 bool? get enableNsfw => throw _privateConstructorUsedError; // v0.18.0 - bool? get communityCreationAdminOnly => - throw _privateConstructorUsedError; // v0.18.0 - bool? get requireEmailVerification => - throw _privateConstructorUsedError; // v0.18.0 - String? get applicationQuestion => - throw _privateConstructorUsedError; // v0.18.0 + bool? get communityCreationAdminOnly => throw _privateConstructorUsedError; // v0.18.0 + bool? get requireEmailVerification => throw _privateConstructorUsedError; // v0.18.0 + String? get applicationQuestion => throw _privateConstructorUsedError; // v0.18.0 bool? get privateInstance => throw _privateConstructorUsedError; // v0.18.0 String? get defaultTheme => throw _privateConstructorUsedError; // v0.18.0 - ListingType? get defaultPostListingType => - throw _privateConstructorUsedError; // v0.18.0 - SortType? get defaultSortType => - throw _privateConstructorUsedError; // v0.19.4 (optional) + ListingType? get defaultPostListingType => throw _privateConstructorUsedError; // v0.18.0 + SortType? get defaultSortType => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get legalInformation => throw _privateConstructorUsedError; // v0.18.0 - bool? get applicationEmailAdmins => - throw _privateConstructorUsedError; // v0.18.0 + bool? get applicationEmailAdmins => throw _privateConstructorUsedError; // v0.18.0 bool? get hideModlogModNames => throw _privateConstructorUsedError; // v0.18.0 - List? get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 + List? get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 String? get slurFilterRegex => throw _privateConstructorUsedError; // v0.18.0 int? get actorNameMaxLength => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitMessage => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitMessagePerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitMessagePerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitPost => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitPostPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitPostPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitRegister => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitRegisterPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitRegisterPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitImage => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitImagePerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitImagePerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitComment => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitCommentPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitCommentPerSecond => throw _privateConstructorUsedError; // v0.18.0 int? get rateLimitSearch => throw _privateConstructorUsedError; // v0.18.0 - int? get rateLimitSearchPerSecond => - throw _privateConstructorUsedError; // v0.18.0 + int? get rateLimitSearchPerSecond => throw _privateConstructorUsedError; // v0.18.0 bool? get federationEnabled => throw _privateConstructorUsedError; // v0.18.0 bool? get federationDebug => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get federationWorkerCount => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] + int? get federationWorkerCount => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] bool? get captchaEnabled => throw _privateConstructorUsedError; // v0.18.0 - String? get captchaDifficulty => - throw _privateConstructorUsedError; // v0.18.0 - List? get allowedInstances => - throw _privateConstructorUsedError; // v0.18.0 - List? get blockedInstances => - throw _privateConstructorUsedError; // v0.18.0 - List? get blockedUrls => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get captchaDifficulty => throw _privateConstructorUsedError; // v0.18.0 + List? get allowedInstances => throw _privateConstructorUsedError; // v0.18.0 + List? get blockedInstances => throw _privateConstructorUsedError; // v0.18.0 + List? get blockedUrls => throw _privateConstructorUsedError; // v0.19.4 (optional) List? get taglines => throw _privateConstructorUsedError; // v0.18.0 - RegistrationMode? get registrationMode => - throw _privateConstructorUsedError; // v0.18.0 + RegistrationMode? get registrationMode => throw _privateConstructorUsedError; // v0.18.0 bool? get reportsEmailAdmins => throw _privateConstructorUsedError; // v0.18.0 - String? get contentWarning => - throw _privateConstructorUsedError; // v0.19.4 (optional) - String? get defaultPostListingMode => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get contentWarning => throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get defaultPostListingMode => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get auth => throw _privateConstructorUsedError; /// Serializes this EditSite to a JSON map. @@ -1440,67 +1436,65 @@ mixin _$EditSite { /// Create a copy of EditSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $EditSiteCopyWith get copyWith => - throw _privateConstructorUsedError; + $EditSiteCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $EditSiteCopyWith<$Res> { - factory $EditSiteCopyWith(EditSite value, $Res Function(EditSite) then) = - _$EditSiteCopyWithImpl<$Res, EditSite>; + factory $EditSiteCopyWith(EditSite value, $Res Function(EditSite) then) = _$EditSiteCopyWithImpl<$Res, EditSite>; @useResult - $Res call( - {String? name, - String? sidebar, - String? description, - String? icon, - String? banner, - bool? enableDownvotes, - bool? enableNsfw, - bool? communityCreationAdminOnly, - bool? requireEmailVerification, - String? applicationQuestion, - bool? privateInstance, - String? defaultTheme, - ListingType? defaultPostListingType, - SortType? defaultSortType, - String? legalInformation, - bool? applicationEmailAdmins, - bool? hideModlogModNames, - List? discussionLanguages, - String? slurFilterRegex, - int? actorNameMaxLength, - int? rateLimitMessage, - int? rateLimitMessagePerSecond, - int? rateLimitPost, - int? rateLimitPostPerSecond, - int? rateLimitRegister, - int? rateLimitRegisterPerSecond, - int? rateLimitImage, - int? rateLimitImagePerSecond, - int? rateLimitComment, - int? rateLimitCommentPerSecond, - int? rateLimitSearch, - int? rateLimitSearchPerSecond, - bool? federationEnabled, - bool? federationDebug, - @deprecated int? federationWorkerCount, - bool? captchaEnabled, - String? captchaDifficulty, - List? allowedInstances, - List? blockedInstances, - List? blockedUrls, - List? taglines, - RegistrationMode? registrationMode, - bool? reportsEmailAdmins, - String? contentWarning, - String? defaultPostListingMode, - String? auth}); + $Res call({ + String? name, + String? sidebar, + String? description, + String? icon, + String? banner, + bool? enableDownvotes, + bool? enableNsfw, + bool? communityCreationAdminOnly, + bool? requireEmailVerification, + String? applicationQuestion, + bool? privateInstance, + String? defaultTheme, + ListingType? defaultPostListingType, + SortType? defaultSortType, + String? legalInformation, + bool? applicationEmailAdmins, + bool? hideModlogModNames, + List? discussionLanguages, + String? slurFilterRegex, + int? actorNameMaxLength, + int? rateLimitMessage, + int? rateLimitMessagePerSecond, + int? rateLimitPost, + int? rateLimitPostPerSecond, + int? rateLimitRegister, + int? rateLimitRegisterPerSecond, + int? rateLimitImage, + int? rateLimitImagePerSecond, + int? rateLimitComment, + int? rateLimitCommentPerSecond, + int? rateLimitSearch, + int? rateLimitSearchPerSecond, + bool? federationEnabled, + bool? federationDebug, + @deprecated int? federationWorkerCount, + bool? captchaEnabled, + String? captchaDifficulty, + List? allowedInstances, + List? blockedInstances, + List? blockedUrls, + List? taglines, + RegistrationMode? registrationMode, + bool? reportsEmailAdmins, + String? contentWarning, + String? defaultPostListingMode, + String? auth, + }); } /// @nodoc -class _$EditSiteCopyWithImpl<$Res, $Val extends EditSite> - implements $EditSiteCopyWith<$Res> { +class _$EditSiteCopyWithImpl<$Res, $Val extends EditSite> implements $EditSiteCopyWith<$Res> { _$EditSiteCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1560,259 +1554,302 @@ class _$EditSiteCopyWithImpl<$Res, $Val extends EditSite> Object? defaultPostListingMode = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - enableDownvotes: freezed == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - enableNsfw: freezed == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - communityCreationAdminOnly: freezed == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool?, - requireEmailVerification: freezed == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool?, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: freezed == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool?, - defaultTheme: freezed == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingType: freezed == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - applicationEmailAdmins: freezed == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - hideModlogModNames: freezed == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: freezed == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessage: freezed == rateLimitMessage - ? _value.rateLimitMessage - : rateLimitMessage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessagePerSecond: freezed == rateLimitMessagePerSecond - ? _value.rateLimitMessagePerSecond - : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPost: freezed == rateLimitPost - ? _value.rateLimitPost - : rateLimitPost // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPostPerSecond: freezed == rateLimitPostPerSecond - ? _value.rateLimitPostPerSecond - : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegister: freezed == rateLimitRegister - ? _value.rateLimitRegister - : rateLimitRegister // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegisterPerSecond: freezed == rateLimitRegisterPerSecond - ? _value.rateLimitRegisterPerSecond - : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImage: freezed == rateLimitImage - ? _value.rateLimitImage - : rateLimitImage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImagePerSecond: freezed == rateLimitImagePerSecond - ? _value.rateLimitImagePerSecond - : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitComment: freezed == rateLimitComment - ? _value.rateLimitComment - : rateLimitComment // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitCommentPerSecond: freezed == rateLimitCommentPerSecond - ? _value.rateLimitCommentPerSecond - : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearch: freezed == rateLimitSearch - ? _value.rateLimitSearch - : rateLimitSearch // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearchPerSecond: freezed == rateLimitSearchPerSecond - ? _value.rateLimitSearchPerSecond - : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - federationEnabled: freezed == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - federationDebug: freezed == federationDebug - ? _value.federationDebug - : federationDebug // ignore: cast_nullable_to_non_nullable - as bool?, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: freezed == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - captchaDifficulty: freezed == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String?, - allowedInstances: freezed == allowedInstances - ? _value.allowedInstances - : allowedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedInstances: freezed == blockedInstances - ? _value.blockedInstances - : blockedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedUrls: freezed == blockedUrls - ? _value.blockedUrls - : blockedUrls // ignore: cast_nullable_to_non_nullable - as List?, - taglines: freezed == taglines - ? _value.taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List?, - registrationMode: freezed == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode?, - reportsEmailAdmins: freezed == reportsEmailAdmins - ? _value.reportsEmailAdmins - : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + enableDownvotes: + freezed == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + enableNsfw: + freezed == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + communityCreationAdminOnly: + freezed == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool?, + requireEmailVerification: + freezed == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool?, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + freezed == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool?, + defaultTheme: + freezed == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingType: + freezed == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + applicationEmailAdmins: + freezed == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + hideModlogModNames: + freezed == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + freezed == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessage: + freezed == rateLimitMessage + ? _value.rateLimitMessage + : rateLimitMessage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessagePerSecond: + freezed == rateLimitMessagePerSecond + ? _value.rateLimitMessagePerSecond + : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPost: + freezed == rateLimitPost + ? _value.rateLimitPost + : rateLimitPost // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPostPerSecond: + freezed == rateLimitPostPerSecond + ? _value.rateLimitPostPerSecond + : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegister: + freezed == rateLimitRegister + ? _value.rateLimitRegister + : rateLimitRegister // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegisterPerSecond: + freezed == rateLimitRegisterPerSecond + ? _value.rateLimitRegisterPerSecond + : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImage: + freezed == rateLimitImage + ? _value.rateLimitImage + : rateLimitImage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImagePerSecond: + freezed == rateLimitImagePerSecond + ? _value.rateLimitImagePerSecond + : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitComment: + freezed == rateLimitComment + ? _value.rateLimitComment + : rateLimitComment // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitCommentPerSecond: + freezed == rateLimitCommentPerSecond + ? _value.rateLimitCommentPerSecond + : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearch: + freezed == rateLimitSearch + ? _value.rateLimitSearch + : rateLimitSearch // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearchPerSecond: + freezed == rateLimitSearchPerSecond + ? _value.rateLimitSearchPerSecond + : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + federationEnabled: + freezed == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + federationDebug: + freezed == federationDebug + ? _value.federationDebug + : federationDebug // ignore: cast_nullable_to_non_nullable + as bool?, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + freezed == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + captchaDifficulty: + freezed == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String?, + allowedInstances: + freezed == allowedInstances + ? _value.allowedInstances + : allowedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedInstances: + freezed == blockedInstances + ? _value.blockedInstances + : blockedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedUrls: + freezed == blockedUrls + ? _value.blockedUrls + : blockedUrls // ignore: cast_nullable_to_non_nullable + as List?, + taglines: + freezed == taglines + ? _value.taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List?, + registrationMode: + freezed == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode?, + reportsEmailAdmins: + freezed == reportsEmailAdmins + ? _value.reportsEmailAdmins + : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$EditSiteImplCopyWith<$Res> - implements $EditSiteCopyWith<$Res> { - factory _$$EditSiteImplCopyWith( - _$EditSiteImpl value, $Res Function(_$EditSiteImpl) then) = - __$$EditSiteImplCopyWithImpl<$Res>; +abstract class _$$EditSiteImplCopyWith<$Res> implements $EditSiteCopyWith<$Res> { + factory _$$EditSiteImplCopyWith(_$EditSiteImpl value, $Res Function(_$EditSiteImpl) then) = __$$EditSiteImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String? name, - String? sidebar, - String? description, - String? icon, - String? banner, - bool? enableDownvotes, - bool? enableNsfw, - bool? communityCreationAdminOnly, - bool? requireEmailVerification, - String? applicationQuestion, - bool? privateInstance, - String? defaultTheme, - ListingType? defaultPostListingType, - SortType? defaultSortType, - String? legalInformation, - bool? applicationEmailAdmins, - bool? hideModlogModNames, - List? discussionLanguages, - String? slurFilterRegex, - int? actorNameMaxLength, - int? rateLimitMessage, - int? rateLimitMessagePerSecond, - int? rateLimitPost, - int? rateLimitPostPerSecond, - int? rateLimitRegister, - int? rateLimitRegisterPerSecond, - int? rateLimitImage, - int? rateLimitImagePerSecond, - int? rateLimitComment, - int? rateLimitCommentPerSecond, - int? rateLimitSearch, - int? rateLimitSearchPerSecond, - bool? federationEnabled, - bool? federationDebug, - @deprecated int? federationWorkerCount, - bool? captchaEnabled, - String? captchaDifficulty, - List? allowedInstances, - List? blockedInstances, - List? blockedUrls, - List? taglines, - RegistrationMode? registrationMode, - bool? reportsEmailAdmins, - String? contentWarning, - String? defaultPostListingMode, - String? auth}); + $Res call({ + String? name, + String? sidebar, + String? description, + String? icon, + String? banner, + bool? enableDownvotes, + bool? enableNsfw, + bool? communityCreationAdminOnly, + bool? requireEmailVerification, + String? applicationQuestion, + bool? privateInstance, + String? defaultTheme, + ListingType? defaultPostListingType, + SortType? defaultSortType, + String? legalInformation, + bool? applicationEmailAdmins, + bool? hideModlogModNames, + List? discussionLanguages, + String? slurFilterRegex, + int? actorNameMaxLength, + int? rateLimitMessage, + int? rateLimitMessagePerSecond, + int? rateLimitPost, + int? rateLimitPostPerSecond, + int? rateLimitRegister, + int? rateLimitRegisterPerSecond, + int? rateLimitImage, + int? rateLimitImagePerSecond, + int? rateLimitComment, + int? rateLimitCommentPerSecond, + int? rateLimitSearch, + int? rateLimitSearchPerSecond, + bool? federationEnabled, + bool? federationDebug, + @deprecated int? federationWorkerCount, + bool? captchaEnabled, + String? captchaDifficulty, + List? allowedInstances, + List? blockedInstances, + List? blockedUrls, + List? taglines, + RegistrationMode? registrationMode, + bool? reportsEmailAdmins, + String? contentWarning, + String? defaultPostListingMode, + String? auth, + }); } /// @nodoc -class __$$EditSiteImplCopyWithImpl<$Res> - extends _$EditSiteCopyWithImpl<$Res, _$EditSiteImpl> - implements _$$EditSiteImplCopyWith<$Res> { - __$$EditSiteImplCopyWithImpl( - _$EditSiteImpl _value, $Res Function(_$EditSiteImpl) _then) - : super(_value, _then); +class __$$EditSiteImplCopyWithImpl<$Res> extends _$EditSiteCopyWithImpl<$Res, _$EditSiteImpl> implements _$$EditSiteImplCopyWith<$Res> { + __$$EditSiteImplCopyWithImpl(_$EditSiteImpl _value, $Res Function(_$EditSiteImpl) _then) : super(_value, _then); /// Create a copy of EditSite /// with the given fields replaced by the non-null parameter values. @@ -1866,192 +1903,240 @@ class __$$EditSiteImplCopyWithImpl<$Res> Object? defaultPostListingMode = freezed, Object? auth = freezed, }) { - return _then(_$EditSiteImpl( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - enableDownvotes: freezed == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - enableNsfw: freezed == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - communityCreationAdminOnly: freezed == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool?, - requireEmailVerification: freezed == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool?, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: freezed == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool?, - defaultTheme: freezed == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingType: freezed == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - applicationEmailAdmins: freezed == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - hideModlogModNames: freezed == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: freezed == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessage: freezed == rateLimitMessage - ? _value.rateLimitMessage - : rateLimitMessage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitMessagePerSecond: freezed == rateLimitMessagePerSecond - ? _value.rateLimitMessagePerSecond - : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPost: freezed == rateLimitPost - ? _value.rateLimitPost - : rateLimitPost // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitPostPerSecond: freezed == rateLimitPostPerSecond - ? _value.rateLimitPostPerSecond - : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegister: freezed == rateLimitRegister - ? _value.rateLimitRegister - : rateLimitRegister // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitRegisterPerSecond: freezed == rateLimitRegisterPerSecond - ? _value.rateLimitRegisterPerSecond - : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImage: freezed == rateLimitImage - ? _value.rateLimitImage - : rateLimitImage // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitImagePerSecond: freezed == rateLimitImagePerSecond - ? _value.rateLimitImagePerSecond - : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitComment: freezed == rateLimitComment - ? _value.rateLimitComment - : rateLimitComment // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitCommentPerSecond: freezed == rateLimitCommentPerSecond - ? _value.rateLimitCommentPerSecond - : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearch: freezed == rateLimitSearch - ? _value.rateLimitSearch - : rateLimitSearch // ignore: cast_nullable_to_non_nullable - as int?, - rateLimitSearchPerSecond: freezed == rateLimitSearchPerSecond - ? _value.rateLimitSearchPerSecond - : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - federationEnabled: freezed == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - federationDebug: freezed == federationDebug - ? _value.federationDebug - : federationDebug // ignore: cast_nullable_to_non_nullable - as bool?, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: freezed == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - captchaDifficulty: freezed == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String?, - allowedInstances: freezed == allowedInstances - ? _value._allowedInstances - : allowedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedInstances: freezed == blockedInstances - ? _value._blockedInstances - : blockedInstances // ignore: cast_nullable_to_non_nullable - as List?, - blockedUrls: freezed == blockedUrls - ? _value._blockedUrls - : blockedUrls // ignore: cast_nullable_to_non_nullable - as List?, - taglines: freezed == taglines - ? _value._taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List?, - registrationMode: freezed == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode?, - reportsEmailAdmins: freezed == reportsEmailAdmins - ? _value.reportsEmailAdmins - : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool?, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$EditSiteImpl( + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + enableDownvotes: + freezed == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + enableNsfw: + freezed == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + communityCreationAdminOnly: + freezed == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool?, + requireEmailVerification: + freezed == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool?, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + freezed == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool?, + defaultTheme: + freezed == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingType: + freezed == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + applicationEmailAdmins: + freezed == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + hideModlogModNames: + freezed == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + freezed == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessage: + freezed == rateLimitMessage + ? _value.rateLimitMessage + : rateLimitMessage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitMessagePerSecond: + freezed == rateLimitMessagePerSecond + ? _value.rateLimitMessagePerSecond + : rateLimitMessagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPost: + freezed == rateLimitPost + ? _value.rateLimitPost + : rateLimitPost // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitPostPerSecond: + freezed == rateLimitPostPerSecond + ? _value.rateLimitPostPerSecond + : rateLimitPostPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegister: + freezed == rateLimitRegister + ? _value.rateLimitRegister + : rateLimitRegister // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitRegisterPerSecond: + freezed == rateLimitRegisterPerSecond + ? _value.rateLimitRegisterPerSecond + : rateLimitRegisterPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImage: + freezed == rateLimitImage + ? _value.rateLimitImage + : rateLimitImage // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitImagePerSecond: + freezed == rateLimitImagePerSecond + ? _value.rateLimitImagePerSecond + : rateLimitImagePerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitComment: + freezed == rateLimitComment + ? _value.rateLimitComment + : rateLimitComment // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitCommentPerSecond: + freezed == rateLimitCommentPerSecond + ? _value.rateLimitCommentPerSecond + : rateLimitCommentPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearch: + freezed == rateLimitSearch + ? _value.rateLimitSearch + : rateLimitSearch // ignore: cast_nullable_to_non_nullable + as int?, + rateLimitSearchPerSecond: + freezed == rateLimitSearchPerSecond + ? _value.rateLimitSearchPerSecond + : rateLimitSearchPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + federationEnabled: + freezed == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + federationDebug: + freezed == federationDebug + ? _value.federationDebug + : federationDebug // ignore: cast_nullable_to_non_nullable + as bool?, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + freezed == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + captchaDifficulty: + freezed == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String?, + allowedInstances: + freezed == allowedInstances + ? _value._allowedInstances + : allowedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedInstances: + freezed == blockedInstances + ? _value._blockedInstances + : blockedInstances // ignore: cast_nullable_to_non_nullable + as List?, + blockedUrls: + freezed == blockedUrls + ? _value._blockedUrls + : blockedUrls // ignore: cast_nullable_to_non_nullable + as List?, + taglines: + freezed == taglines + ? _value._taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List?, + registrationMode: + freezed == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode?, + reportsEmailAdmins: + freezed == reportsEmailAdmins + ? _value.reportsEmailAdmins + : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool?, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2059,213 +2144,209 @@ class __$$EditSiteImplCopyWithImpl<$Res> @apiSerde class _$EditSiteImpl extends _EditSite { - const _$EditSiteImpl( - {this.name, - this.sidebar, - this.description, - this.icon, - this.banner, - this.enableDownvotes, - this.enableNsfw, - this.communityCreationAdminOnly, - this.requireEmailVerification, - this.applicationQuestion, - this.privateInstance, - this.defaultTheme, - this.defaultPostListingType, - this.defaultSortType, - this.legalInformation, - this.applicationEmailAdmins, - this.hideModlogModNames, - final List? discussionLanguages, - this.slurFilterRegex, - this.actorNameMaxLength, - this.rateLimitMessage, - this.rateLimitMessagePerSecond, - this.rateLimitPost, - this.rateLimitPostPerSecond, - this.rateLimitRegister, - this.rateLimitRegisterPerSecond, - this.rateLimitImage, - this.rateLimitImagePerSecond, - this.rateLimitComment, - this.rateLimitCommentPerSecond, - this.rateLimitSearch, - this.rateLimitSearchPerSecond, - this.federationEnabled, - this.federationDebug, - @deprecated this.federationWorkerCount, - this.captchaEnabled, - this.captchaDifficulty, - final List? allowedInstances, - final List? blockedInstances, - final List? blockedUrls, - final List? taglines, - this.registrationMode, - this.reportsEmailAdmins, - this.contentWarning, - this.defaultPostListingMode, - this.auth}) - : _discussionLanguages = discussionLanguages, - _allowedInstances = allowedInstances, - _blockedInstances = blockedInstances, - _blockedUrls = blockedUrls, - _taglines = taglines, - super._(); - - factory _$EditSiteImpl.fromJson(Map json) => - _$$EditSiteImplFromJson(json); + const _$EditSiteImpl({ + this.name, + this.sidebar, + this.description, + this.icon, + this.banner, + this.enableDownvotes, + this.enableNsfw, + this.communityCreationAdminOnly, + this.requireEmailVerification, + this.applicationQuestion, + this.privateInstance, + this.defaultTheme, + this.defaultPostListingType, + this.defaultSortType, + this.legalInformation, + this.applicationEmailAdmins, + this.hideModlogModNames, + final List? discussionLanguages, + this.slurFilterRegex, + this.actorNameMaxLength, + this.rateLimitMessage, + this.rateLimitMessagePerSecond, + this.rateLimitPost, + this.rateLimitPostPerSecond, + this.rateLimitRegister, + this.rateLimitRegisterPerSecond, + this.rateLimitImage, + this.rateLimitImagePerSecond, + this.rateLimitComment, + this.rateLimitCommentPerSecond, + this.rateLimitSearch, + this.rateLimitSearchPerSecond, + this.federationEnabled, + this.federationDebug, + @deprecated this.federationWorkerCount, + this.captchaEnabled, + this.captchaDifficulty, + final List? allowedInstances, + final List? blockedInstances, + final List? blockedUrls, + final List? taglines, + this.registrationMode, + this.reportsEmailAdmins, + this.contentWarning, + this.defaultPostListingMode, + this.auth, + }) : _discussionLanguages = discussionLanguages, + _allowedInstances = allowedInstances, + _blockedInstances = blockedInstances, + _blockedUrls = blockedUrls, + _taglines = taglines, + super._(); + + factory _$EditSiteImpl.fromJson(Map json) => _$$EditSiteImplFromJson(json); @override final String? name; -// v0.18.0 + // v0.18.0 @override final String? sidebar; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final bool? enableDownvotes; -// v0.18.0 + // v0.18.0 @override final bool? enableNsfw; -// v0.18.0 + // v0.18.0 @override final bool? communityCreationAdminOnly; -// v0.18.0 + // v0.18.0 @override final bool? requireEmailVerification; -// v0.18.0 + // v0.18.0 @override final String? applicationQuestion; -// v0.18.0 + // v0.18.0 @override final bool? privateInstance; -// v0.18.0 + // v0.18.0 @override final String? defaultTheme; -// v0.18.0 + // v0.18.0 @override final ListingType? defaultPostListingType; -// v0.18.0 + // v0.18.0 @override final SortType? defaultSortType; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? legalInformation; -// v0.18.0 + // v0.18.0 @override final bool? applicationEmailAdmins; -// v0.18.0 + // v0.18.0 @override final bool? hideModlogModNames; -// v0.18.0 + // v0.18.0 final List? _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final String? slurFilterRegex; -// v0.18.0 + // v0.18.0 @override final int? actorNameMaxLength; -// v0.18.0 + // v0.18.0 @override final int? rateLimitMessage; -// v0.18.0 + // v0.18.0 @override final int? rateLimitMessagePerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitPost; -// v0.18.0 + // v0.18.0 @override final int? rateLimitPostPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitRegister; -// v0.18.0 + // v0.18.0 @override final int? rateLimitRegisterPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitImage; -// v0.18.0 + // v0.18.0 @override final int? rateLimitImagePerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitComment; -// v0.18.0 + // v0.18.0 @override final int? rateLimitCommentPerSecond; -// v0.18.0 + // v0.18.0 @override final int? rateLimitSearch; -// v0.18.0 + // v0.18.0 @override final int? rateLimitSearchPerSecond; -// v0.18.0 + // v0.18.0 @override final bool? federationEnabled; -// v0.18.0 + // v0.18.0 @override final bool? federationDebug; -// v0.18.0 + // v0.18.0 @override @deprecated final int? federationWorkerCount; -// v0.18.0 [deprecated in v0.18.1] + // v0.18.0 [deprecated in v0.18.1] @override final bool? captchaEnabled; -// v0.18.0 + // v0.18.0 @override final String? captchaDifficulty; -// v0.18.0 + // v0.18.0 final List? _allowedInstances; -// v0.18.0 + // v0.18.0 @override List? get allowedInstances { final value = _allowedInstances; if (value == null) return null; - if (_allowedInstances is EqualUnmodifiableListView) - return _allowedInstances; + if (_allowedInstances is EqualUnmodifiableListView) return _allowedInstances; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 final List? _blockedInstances; -// v0.18.0 + // v0.18.0 @override List? get blockedInstances { final value = _blockedInstances; if (value == null) return null; - if (_blockedInstances is EqualUnmodifiableListView) - return _blockedInstances; + if (_blockedInstances is EqualUnmodifiableListView) return _blockedInstances; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 final List? _blockedUrls; -// v0.18.0 + // v0.18.0 @override List? get blockedUrls { final value = _blockedUrls; @@ -2275,9 +2356,9 @@ class _$EditSiteImpl extends _EditSite { return EqualUnmodifiableListView(value); } -// v0.19.4 (optional) + // v0.19.4 (optional) final List? _taglines; -// v0.19.4 (optional) + // v0.19.4 (optional) @override List? get taglines { final value = _taglines; @@ -2287,19 +2368,19 @@ class _$EditSiteImpl extends _EditSite { return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override final RegistrationMode? registrationMode; -// v0.18.0 + // v0.18.0 @override final bool? reportsEmailAdmins; -// v0.18.0 + // v0.18.0 @override final String? contentWarning; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? defaultPostListingMode; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -2315,60 +2396,33 @@ class _$EditSiteImpl extends _EditSite { other is _$EditSiteImpl && (identical(other.name, name) || other.name == name) && (identical(other.sidebar, sidebar) || other.sidebar == sidebar) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && - (identical(other.enableDownvotes, enableDownvotes) || - other.enableDownvotes == enableDownvotes) && - (identical(other.enableNsfw, enableNsfw) || - other.enableNsfw == enableNsfw) && - (identical(other.communityCreationAdminOnly, communityCreationAdminOnly) || - other.communityCreationAdminOnly == - communityCreationAdminOnly) && - (identical(other.requireEmailVerification, requireEmailVerification) || - other.requireEmailVerification == requireEmailVerification) && - (identical(other.applicationQuestion, applicationQuestion) || - other.applicationQuestion == applicationQuestion) && - (identical(other.privateInstance, privateInstance) || - other.privateInstance == privateInstance) && - (identical(other.defaultTheme, defaultTheme) || - other.defaultTheme == defaultTheme) && - (identical(other.defaultPostListingType, defaultPostListingType) || - other.defaultPostListingType == defaultPostListingType) && - (identical(other.defaultSortType, defaultSortType) || - other.defaultSortType == defaultSortType) && - (identical(other.legalInformation, legalInformation) || - other.legalInformation == legalInformation) && - (identical(other.applicationEmailAdmins, applicationEmailAdmins) || - other.applicationEmailAdmins == applicationEmailAdmins) && - (identical(other.hideModlogModNames, hideModlogModNames) || - other.hideModlogModNames == hideModlogModNames) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && - (identical(other.slurFilterRegex, slurFilterRegex) || - other.slurFilterRegex == slurFilterRegex) && - (identical(other.actorNameMaxLength, actorNameMaxLength) || - other.actorNameMaxLength == actorNameMaxLength) && - (identical(other.rateLimitMessage, rateLimitMessage) || - other.rateLimitMessage == rateLimitMessage) && - (identical(other.rateLimitMessagePerSecond, rateLimitMessagePerSecond) || - other.rateLimitMessagePerSecond == rateLimitMessagePerSecond) && - (identical(other.rateLimitPost, rateLimitPost) || - other.rateLimitPost == rateLimitPost) && - (identical(other.rateLimitPostPerSecond, rateLimitPostPerSecond) || - other.rateLimitPostPerSecond == rateLimitPostPerSecond) && - (identical(other.rateLimitRegister, rateLimitRegister) || - other.rateLimitRegister == rateLimitRegister) && - (identical(other.rateLimitRegisterPerSecond, rateLimitRegisterPerSecond) || - other.rateLimitRegisterPerSecond == - rateLimitRegisterPerSecond) && - (identical(other.rateLimitImage, rateLimitImage) || - other.rateLimitImage == rateLimitImage) && - (identical(other.rateLimitImagePerSecond, rateLimitImagePerSecond) || - other.rateLimitImagePerSecond == rateLimitImagePerSecond) && - (identical(other.rateLimitComment, rateLimitComment) || - other.rateLimitComment == rateLimitComment) && + (identical(other.enableDownvotes, enableDownvotes) || other.enableDownvotes == enableDownvotes) && + (identical(other.enableNsfw, enableNsfw) || other.enableNsfw == enableNsfw) && + (identical(other.communityCreationAdminOnly, communityCreationAdminOnly) || other.communityCreationAdminOnly == communityCreationAdminOnly) && + (identical(other.requireEmailVerification, requireEmailVerification) || other.requireEmailVerification == requireEmailVerification) && + (identical(other.applicationQuestion, applicationQuestion) || other.applicationQuestion == applicationQuestion) && + (identical(other.privateInstance, privateInstance) || other.privateInstance == privateInstance) && + (identical(other.defaultTheme, defaultTheme) || other.defaultTheme == defaultTheme) && + (identical(other.defaultPostListingType, defaultPostListingType) || other.defaultPostListingType == defaultPostListingType) && + (identical(other.defaultSortType, defaultSortType) || other.defaultSortType == defaultSortType) && + (identical(other.legalInformation, legalInformation) || other.legalInformation == legalInformation) && + (identical(other.applicationEmailAdmins, applicationEmailAdmins) || other.applicationEmailAdmins == applicationEmailAdmins) && + (identical(other.hideModlogModNames, hideModlogModNames) || other.hideModlogModNames == hideModlogModNames) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.slurFilterRegex, slurFilterRegex) || other.slurFilterRegex == slurFilterRegex) && + (identical(other.actorNameMaxLength, actorNameMaxLength) || other.actorNameMaxLength == actorNameMaxLength) && + (identical(other.rateLimitMessage, rateLimitMessage) || other.rateLimitMessage == rateLimitMessage) && + (identical(other.rateLimitMessagePerSecond, rateLimitMessagePerSecond) || other.rateLimitMessagePerSecond == rateLimitMessagePerSecond) && + (identical(other.rateLimitPost, rateLimitPost) || other.rateLimitPost == rateLimitPost) && + (identical(other.rateLimitPostPerSecond, rateLimitPostPerSecond) || other.rateLimitPostPerSecond == rateLimitPostPerSecond) && + (identical(other.rateLimitRegister, rateLimitRegister) || other.rateLimitRegister == rateLimitRegister) && + (identical(other.rateLimitRegisterPerSecond, rateLimitRegisterPerSecond) || other.rateLimitRegisterPerSecond == rateLimitRegisterPerSecond) && + (identical(other.rateLimitImage, rateLimitImage) || other.rateLimitImage == rateLimitImage) && + (identical(other.rateLimitImagePerSecond, rateLimitImagePerSecond) || other.rateLimitImagePerSecond == rateLimitImagePerSecond) && + (identical(other.rateLimitComment, rateLimitComment) || other.rateLimitComment == rateLimitComment) && (identical(other.rateLimitCommentPerSecond, rateLimitCommentPerSecond) || other.rateLimitCommentPerSecond == rateLimitCommentPerSecond) && (identical(other.rateLimitSearch, rateLimitSearch) || other.rateLimitSearch == rateLimitSearch) && (identical(other.rateLimitSearchPerSecond, rateLimitSearchPerSecond) || other.rateLimitSearchPerSecond == rateLimitSearchPerSecond) && @@ -2391,123 +2445,120 @@ class _$EditSiteImpl extends _EditSite { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - name, - sidebar, - description, - icon, - banner, - enableDownvotes, - enableNsfw, - communityCreationAdminOnly, - requireEmailVerification, - applicationQuestion, - privateInstance, - defaultTheme, - defaultPostListingType, - defaultSortType, - legalInformation, - applicationEmailAdmins, - hideModlogModNames, - const DeepCollectionEquality().hash(_discussionLanguages), - slurFilterRegex, - actorNameMaxLength, - rateLimitMessage, - rateLimitMessagePerSecond, - rateLimitPost, - rateLimitPostPerSecond, - rateLimitRegister, - rateLimitRegisterPerSecond, - rateLimitImage, - rateLimitImagePerSecond, - rateLimitComment, - rateLimitCommentPerSecond, - rateLimitSearch, - rateLimitSearchPerSecond, - federationEnabled, - federationDebug, - federationWorkerCount, - captchaEnabled, - captchaDifficulty, - const DeepCollectionEquality().hash(_allowedInstances), - const DeepCollectionEquality().hash(_blockedInstances), - const DeepCollectionEquality().hash(_blockedUrls), - const DeepCollectionEquality().hash(_taglines), - registrationMode, - reportsEmailAdmins, - contentWarning, - defaultPostListingMode, - auth - ]); + runtimeType, + name, + sidebar, + description, + icon, + banner, + enableDownvotes, + enableNsfw, + communityCreationAdminOnly, + requireEmailVerification, + applicationQuestion, + privateInstance, + defaultTheme, + defaultPostListingType, + defaultSortType, + legalInformation, + applicationEmailAdmins, + hideModlogModNames, + const DeepCollectionEquality().hash(_discussionLanguages), + slurFilterRegex, + actorNameMaxLength, + rateLimitMessage, + rateLimitMessagePerSecond, + rateLimitPost, + rateLimitPostPerSecond, + rateLimitRegister, + rateLimitRegisterPerSecond, + rateLimitImage, + rateLimitImagePerSecond, + rateLimitComment, + rateLimitCommentPerSecond, + rateLimitSearch, + rateLimitSearchPerSecond, + federationEnabled, + federationDebug, + federationWorkerCount, + captchaEnabled, + captchaDifficulty, + const DeepCollectionEquality().hash(_allowedInstances), + const DeepCollectionEquality().hash(_blockedInstances), + const DeepCollectionEquality().hash(_blockedUrls), + const DeepCollectionEquality().hash(_taglines), + registrationMode, + reportsEmailAdmins, + contentWarning, + defaultPostListingMode, + auth, + ]); /// Create a copy of EditSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$EditSiteImplCopyWith<_$EditSiteImpl> get copyWith => - __$$EditSiteImplCopyWithImpl<_$EditSiteImpl>(this, _$identity); + _$$EditSiteImplCopyWith<_$EditSiteImpl> get copyWith => __$$EditSiteImplCopyWithImpl<_$EditSiteImpl>(this, _$identity); @override Map toJson() { - return _$$EditSiteImplToJson( - this, - ); + return _$$EditSiteImplToJson(this); } } abstract class _EditSite extends EditSite { - const factory _EditSite( - {final String? name, - final String? sidebar, - final String? description, - final String? icon, - final String? banner, - final bool? enableDownvotes, - final bool? enableNsfw, - final bool? communityCreationAdminOnly, - final bool? requireEmailVerification, - final String? applicationQuestion, - final bool? privateInstance, - final String? defaultTheme, - final ListingType? defaultPostListingType, - final SortType? defaultSortType, - final String? legalInformation, - final bool? applicationEmailAdmins, - final bool? hideModlogModNames, - final List? discussionLanguages, - final String? slurFilterRegex, - final int? actorNameMaxLength, - final int? rateLimitMessage, - final int? rateLimitMessagePerSecond, - final int? rateLimitPost, - final int? rateLimitPostPerSecond, - final int? rateLimitRegister, - final int? rateLimitRegisterPerSecond, - final int? rateLimitImage, - final int? rateLimitImagePerSecond, - final int? rateLimitComment, - final int? rateLimitCommentPerSecond, - final int? rateLimitSearch, - final int? rateLimitSearchPerSecond, - final bool? federationEnabled, - final bool? federationDebug, - @deprecated final int? federationWorkerCount, - final bool? captchaEnabled, - final String? captchaDifficulty, - final List? allowedInstances, - final List? blockedInstances, - final List? blockedUrls, - final List? taglines, - final RegistrationMode? registrationMode, - final bool? reportsEmailAdmins, - final String? contentWarning, - final String? defaultPostListingMode, - final String? auth}) = _$EditSiteImpl; + const factory _EditSite({ + final String? name, + final String? sidebar, + final String? description, + final String? icon, + final String? banner, + final bool? enableDownvotes, + final bool? enableNsfw, + final bool? communityCreationAdminOnly, + final bool? requireEmailVerification, + final String? applicationQuestion, + final bool? privateInstance, + final String? defaultTheme, + final ListingType? defaultPostListingType, + final SortType? defaultSortType, + final String? legalInformation, + final bool? applicationEmailAdmins, + final bool? hideModlogModNames, + final List? discussionLanguages, + final String? slurFilterRegex, + final int? actorNameMaxLength, + final int? rateLimitMessage, + final int? rateLimitMessagePerSecond, + final int? rateLimitPost, + final int? rateLimitPostPerSecond, + final int? rateLimitRegister, + final int? rateLimitRegisterPerSecond, + final int? rateLimitImage, + final int? rateLimitImagePerSecond, + final int? rateLimitComment, + final int? rateLimitCommentPerSecond, + final int? rateLimitSearch, + final int? rateLimitSearchPerSecond, + final bool? federationEnabled, + final bool? federationDebug, + @deprecated final int? federationWorkerCount, + final bool? captchaEnabled, + final String? captchaDifficulty, + final List? allowedInstances, + final List? blockedInstances, + final List? blockedUrls, + final List? taglines, + final RegistrationMode? registrationMode, + final bool? reportsEmailAdmins, + final String? contentWarning, + final String? defaultPostListingMode, + final String? auth, + }) = _$EditSiteImpl; const _EditSite._() : super._(); - factory _EditSite.fromJson(Map json) = - _$EditSiteImpl.fromJson; + factory _EditSite.fromJson(Map json) = _$EditSiteImpl.fromJson; @override String? get name; // v0.18.0 @@ -2607,8 +2658,7 @@ abstract class _EditSite extends EditSite { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$EditSiteImplCopyWith<_$EditSiteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$EditSiteImplCopyWith<_$EditSiteImpl> get copyWith => throw _privateConstructorUsedError; } BlockInstance _$BlockInstanceFromJson(Map json) { @@ -2618,8 +2668,7 @@ BlockInstance _$BlockInstanceFromJson(Map json) { /// @nodoc mixin _$BlockInstance { String? get auth => throw _privateConstructorUsedError; - int get instanceId => - throw _privateConstructorUsedError; // v0.19.0 (required) + int get instanceId => throw _privateConstructorUsedError; // v0.19.0 (required) bool get block => throw _privateConstructorUsedError; /// Serializes this BlockInstance to a JSON map. @@ -2628,22 +2677,18 @@ mixin _$BlockInstance { /// Create a copy of BlockInstance /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockInstanceCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockInstanceCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockInstanceCopyWith<$Res> { - factory $BlockInstanceCopyWith( - BlockInstance value, $Res Function(BlockInstance) then) = - _$BlockInstanceCopyWithImpl<$Res, BlockInstance>; + factory $BlockInstanceCopyWith(BlockInstance value, $Res Function(BlockInstance) then) = _$BlockInstanceCopyWithImpl<$Res, BlockInstance>; @useResult $Res call({String? auth, int instanceId, bool block}); } /// @nodoc -class _$BlockInstanceCopyWithImpl<$Res, $Val extends BlockInstance> - implements $BlockInstanceCopyWith<$Res> { +class _$BlockInstanceCopyWithImpl<$Res, $Val extends BlockInstance> implements $BlockInstanceCopyWith<$Res> { _$BlockInstanceCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2655,70 +2700,66 @@ class _$BlockInstanceCopyWithImpl<$Res, $Val extends BlockInstance> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? instanceId = null, - Object? block = null, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? auth = freezed, Object? instanceId = null, Object? block = null}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$BlockInstanceImplCopyWith<$Res> - implements $BlockInstanceCopyWith<$Res> { - factory _$$BlockInstanceImplCopyWith( - _$BlockInstanceImpl value, $Res Function(_$BlockInstanceImpl) then) = - __$$BlockInstanceImplCopyWithImpl<$Res>; +abstract class _$$BlockInstanceImplCopyWith<$Res> implements $BlockInstanceCopyWith<$Res> { + factory _$$BlockInstanceImplCopyWith(_$BlockInstanceImpl value, $Res Function(_$BlockInstanceImpl) then) = __$$BlockInstanceImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth, int instanceId, bool block}); } /// @nodoc -class __$$BlockInstanceImplCopyWithImpl<$Res> - extends _$BlockInstanceCopyWithImpl<$Res, _$BlockInstanceImpl> - implements _$$BlockInstanceImplCopyWith<$Res> { - __$$BlockInstanceImplCopyWithImpl( - _$BlockInstanceImpl _value, $Res Function(_$BlockInstanceImpl) _then) - : super(_value, _then); +class __$$BlockInstanceImplCopyWithImpl<$Res> extends _$BlockInstanceCopyWithImpl<$Res, _$BlockInstanceImpl> implements _$$BlockInstanceImplCopyWith<$Res> { + __$$BlockInstanceImplCopyWithImpl(_$BlockInstanceImpl _value, $Res Function(_$BlockInstanceImpl) _then) : super(_value, _then); /// Create a copy of BlockInstance /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? instanceId = null, - Object? block = null, - }) { - return _then(_$BlockInstanceImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? auth = freezed, Object? instanceId = null, Object? block = null}) { + return _then( + _$BlockInstanceImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -2726,18 +2767,15 @@ class __$$BlockInstanceImplCopyWithImpl<$Res> @apiSerde class _$BlockInstanceImpl extends _BlockInstance { - const _$BlockInstanceImpl( - {this.auth, required this.instanceId, required this.block}) - : super._(); + const _$BlockInstanceImpl({this.auth, required this.instanceId, required this.block}) : super._(); - factory _$BlockInstanceImpl.fromJson(Map json) => - _$$BlockInstanceImplFromJson(json); + factory _$BlockInstanceImpl.fromJson(Map json) => _$$BlockInstanceImplFromJson(json); @override final String? auth; @override final int instanceId; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool block; @@ -2752,8 +2790,7 @@ class _$BlockInstanceImpl extends _BlockInstance { (other.runtimeType == runtimeType && other is _$BlockInstanceImpl && (identical(other.auth, auth) || other.auth == auth) && - (identical(other.instanceId, instanceId) || - other.instanceId == instanceId) && + (identical(other.instanceId, instanceId) || other.instanceId == instanceId) && (identical(other.block, block) || other.block == block)); } @@ -2766,26 +2803,19 @@ class _$BlockInstanceImpl extends _BlockInstance { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockInstanceImplCopyWith<_$BlockInstanceImpl> get copyWith => - __$$BlockInstanceImplCopyWithImpl<_$BlockInstanceImpl>(this, _$identity); + _$$BlockInstanceImplCopyWith<_$BlockInstanceImpl> get copyWith => __$$BlockInstanceImplCopyWithImpl<_$BlockInstanceImpl>(this, _$identity); @override Map toJson() { - return _$$BlockInstanceImplToJson( - this, - ); + return _$$BlockInstanceImplToJson(this); } } abstract class _BlockInstance extends BlockInstance { - const factory _BlockInstance( - {final String? auth, - required final int instanceId, - required final bool block}) = _$BlockInstanceImpl; + const factory _BlockInstance({final String? auth, required final int instanceId, required final bool block}) = _$BlockInstanceImpl; const _BlockInstance._() : super._(); - factory _BlockInstance.fromJson(Map json) = - _$BlockInstanceImpl.fromJson; + factory _BlockInstance.fromJson(Map json) = _$BlockInstanceImpl.fromJson; @override String? get auth; @@ -2798,6 +2828,5 @@ abstract class _BlockInstance extends BlockInstance { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockInstanceImplCopyWith<_$BlockInstanceImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BlockInstanceImplCopyWith<_$BlockInstanceImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/site/site.g.dart b/lib/src/v3/api/site/site.g.dart index 15820768..a002e663 100644 --- a/lib/src/v3/api/site/site.g.dart +++ b/lib/src/v3/api/site/site.g.dart @@ -6,311 +6,207 @@ part of 'site.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetSiteImpl _$$GetSiteImplFromJson(Map json) => - _$GetSiteImpl( - auth: json['auth'] as String?, - ); - -Map _$$GetSiteImplToJson(_$GetSiteImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$CreateSiteImpl _$$CreateSiteImplFromJson(Map json) => - _$CreateSiteImpl( - name: json['name'] as String, - sidebar: json['sidebar'] as String?, - description: json['description'] as String?, - icon: json['icon'] as String?, - banner: json['banner'] as String?, - enableDownvotes: json['enable_downvotes'] as bool?, - enableNsfw: json['enable_nsfw'] as bool?, - communityCreationAdminOnly: - json['community_creation_admin_only'] as bool?, - requireEmailVerification: json['require_email_verification'] as bool?, - applicationQuestion: json['application_question'] as String?, - privateInstance: json['private_instance'] as bool?, - defaultTheme: json['default_theme'] as String?, - defaultPostListingType: json['default_post_listing_type'] == null - ? null - : ListingType.fromJson(json['default_post_listing_type']), - defaultSortType: json['default_sort_type'] == null - ? null - : SortType.fromJson(json['default_sort_type']), - legalInformation: json['legal_information'] as String?, - applicationEmailAdmins: json['application_email_admins'] as bool?, - hideModlogModNames: json['hide_modlog_mod_names'] as bool?, - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - slurFilterRegex: json['slur_filter_regex'] as String?, - actorNameMaxLength: (json['actor_name_max_length'] as num?)?.toInt(), - rateLimitMessage: (json['rate_limit_message'] as num?)?.toInt(), - rateLimitMessagePerSecond: - (json['rate_limit_message_per_second'] as num?)?.toInt(), - rateLimitPost: (json['rate_limit_post'] as num?)?.toInt(), - rateLimitPostPerSecond: - (json['rate_limit_post_per_second'] as num?)?.toInt(), - rateLimitRegister: (json['rate_limit_register'] as num?)?.toInt(), - rateLimitRegisterPerSecond: - (json['rate_limit_register_per_second'] as num?)?.toInt(), - rateLimitImage: (json['rate_limit_image'] as num?)?.toInt(), - rateLimitImagePerSecond: - (json['rate_limit_image_per_second'] as num?)?.toInt(), - rateLimitComment: (json['rate_limit_comment'] as num?)?.toInt(), - rateLimitCommentPerSecond: - (json['rate_limit_comment_per_second'] as num?)?.toInt(), - rateLimitSearch: (json['rate_limit_search'] as num?)?.toInt(), - rateLimitSearchPerSecond: - (json['rate_limit_search_per_second'] as num?)?.toInt(), - federationEnabled: json['federation_enabled'] as bool?, - federationDebug: json['federation_debug'] as bool?, - federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), - captchaEnabled: json['captcha_enabled'] as bool?, - captchaDifficulty: json['captcha_difficulty'] as String?, - allowedInstances: (json['allowed_instances'] as List?) - ?.map((e) => e as String) - .toList(), - blockedInstances: (json['blocked_instances'] as List?) - ?.map((e) => e as String) - .toList(), - taglines: (json['taglines'] as List?) - ?.map((e) => e as String) - .toList(), - registrationMode: json['registration_mode'] == null - ? null - : RegistrationMode.fromJson(json['registration_mode'] as String), - contentWarning: json['content_warning'] as String?, - defaultPostListingMode: json['default_post_listing_mode'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$CreateSiteImplToJson(_$CreateSiteImpl instance) { - final val = { - 'name': instance.name, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('sidebar', instance.sidebar); - writeNotNull('description', instance.description); - writeNotNull('icon', instance.icon); - writeNotNull('banner', instance.banner); - writeNotNull('enable_downvotes', instance.enableDownvotes); - writeNotNull('enable_nsfw', instance.enableNsfw); - writeNotNull( - 'community_creation_admin_only', instance.communityCreationAdminOnly); - writeNotNull('require_email_verification', instance.requireEmailVerification); - writeNotNull('application_question', instance.applicationQuestion); - writeNotNull('private_instance', instance.privateInstance); - writeNotNull('default_theme', instance.defaultTheme); - writeNotNull( - 'default_post_listing_type', instance.defaultPostListingType?.toJson()); - writeNotNull('default_sort_type', instance.defaultSortType?.toJson()); - writeNotNull('legal_information', instance.legalInformation); - writeNotNull('application_email_admins', instance.applicationEmailAdmins); - writeNotNull('hide_modlog_mod_names', instance.hideModlogModNames); - writeNotNull('discussion_languages', instance.discussionLanguages); - writeNotNull('slur_filter_regex', instance.slurFilterRegex); - writeNotNull('actor_name_max_length', instance.actorNameMaxLength); - writeNotNull('rate_limit_message', instance.rateLimitMessage); - writeNotNull( - 'rate_limit_message_per_second', instance.rateLimitMessagePerSecond); - writeNotNull('rate_limit_post', instance.rateLimitPost); - writeNotNull('rate_limit_post_per_second', instance.rateLimitPostPerSecond); - writeNotNull('rate_limit_register', instance.rateLimitRegister); - writeNotNull( - 'rate_limit_register_per_second', instance.rateLimitRegisterPerSecond); - writeNotNull('rate_limit_image', instance.rateLimitImage); - writeNotNull('rate_limit_image_per_second', instance.rateLimitImagePerSecond); - writeNotNull('rate_limit_comment', instance.rateLimitComment); - writeNotNull( - 'rate_limit_comment_per_second', instance.rateLimitCommentPerSecond); - writeNotNull('rate_limit_search', instance.rateLimitSearch); - writeNotNull( - 'rate_limit_search_per_second', instance.rateLimitSearchPerSecond); - writeNotNull('federation_enabled', instance.federationEnabled); - writeNotNull('federation_debug', instance.federationDebug); - writeNotNull('federation_worker_count', instance.federationWorkerCount); - writeNotNull('captcha_enabled', instance.captchaEnabled); - writeNotNull('captcha_difficulty', instance.captchaDifficulty); - writeNotNull('allowed_instances', instance.allowedInstances); - writeNotNull('blocked_instances', instance.blockedInstances); - writeNotNull('taglines', instance.taglines); - writeNotNull('registration_mode', instance.registrationMode?.toJson()); - writeNotNull('content_warning', instance.contentWarning); - writeNotNull('default_post_listing_mode', instance.defaultPostListingMode); - writeNotNull('auth', instance.auth); - return val; -} - -_$EditSiteImpl _$$EditSiteImplFromJson(Map json) => - _$EditSiteImpl( - name: json['name'] as String?, - sidebar: json['sidebar'] as String?, - description: json['description'] as String?, - icon: json['icon'] as String?, - banner: json['banner'] as String?, - enableDownvotes: json['enable_downvotes'] as bool?, - enableNsfw: json['enable_nsfw'] as bool?, - communityCreationAdminOnly: - json['community_creation_admin_only'] as bool?, - requireEmailVerification: json['require_email_verification'] as bool?, - applicationQuestion: json['application_question'] as String?, - privateInstance: json['private_instance'] as bool?, - defaultTheme: json['default_theme'] as String?, - defaultPostListingType: json['default_post_listing_type'] == null - ? null - : ListingType.fromJson(json['default_post_listing_type']), - defaultSortType: json['default_sort_type'] == null - ? null - : SortType.fromJson(json['default_sort_type']), - legalInformation: json['legal_information'] as String?, - applicationEmailAdmins: json['application_email_admins'] as bool?, - hideModlogModNames: json['hide_modlog_mod_names'] as bool?, - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - slurFilterRegex: json['slur_filter_regex'] as String?, - actorNameMaxLength: (json['actor_name_max_length'] as num?)?.toInt(), - rateLimitMessage: (json['rate_limit_message'] as num?)?.toInt(), - rateLimitMessagePerSecond: - (json['rate_limit_message_per_second'] as num?)?.toInt(), - rateLimitPost: (json['rate_limit_post'] as num?)?.toInt(), - rateLimitPostPerSecond: - (json['rate_limit_post_per_second'] as num?)?.toInt(), - rateLimitRegister: (json['rate_limit_register'] as num?)?.toInt(), - rateLimitRegisterPerSecond: - (json['rate_limit_register_per_second'] as num?)?.toInt(), - rateLimitImage: (json['rate_limit_image'] as num?)?.toInt(), - rateLimitImagePerSecond: - (json['rate_limit_image_per_second'] as num?)?.toInt(), - rateLimitComment: (json['rate_limit_comment'] as num?)?.toInt(), - rateLimitCommentPerSecond: - (json['rate_limit_comment_per_second'] as num?)?.toInt(), - rateLimitSearch: (json['rate_limit_search'] as num?)?.toInt(), - rateLimitSearchPerSecond: - (json['rate_limit_search_per_second'] as num?)?.toInt(), - federationEnabled: json['federation_enabled'] as bool?, - federationDebug: json['federation_debug'] as bool?, - federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), - captchaEnabled: json['captcha_enabled'] as bool?, - captchaDifficulty: json['captcha_difficulty'] as String?, - allowedInstances: (json['allowed_instances'] as List?) - ?.map((e) => e as String) - .toList(), - blockedInstances: (json['blocked_instances'] as List?) - ?.map((e) => e as String) - .toList(), - blockedUrls: (json['blocked_urls'] as List?) - ?.map((e) => e as String) - .toList(), - taglines: (json['taglines'] as List?) - ?.map((e) => e as String) - .toList(), - registrationMode: json['registration_mode'] == null - ? null - : RegistrationMode.fromJson(json['registration_mode'] as String), - reportsEmailAdmins: json['reports_email_admins'] as bool?, - contentWarning: json['content_warning'] as String?, - defaultPostListingMode: json['default_post_listing_mode'] as String?, - auth: json['auth'] as String?, - ); - -Map _$$EditSiteImplToJson(_$EditSiteImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('name', instance.name); - writeNotNull('sidebar', instance.sidebar); - writeNotNull('description', instance.description); - writeNotNull('icon', instance.icon); - writeNotNull('banner', instance.banner); - writeNotNull('enable_downvotes', instance.enableDownvotes); - writeNotNull('enable_nsfw', instance.enableNsfw); - writeNotNull( - 'community_creation_admin_only', instance.communityCreationAdminOnly); - writeNotNull('require_email_verification', instance.requireEmailVerification); - writeNotNull('application_question', instance.applicationQuestion); - writeNotNull('private_instance', instance.privateInstance); - writeNotNull('default_theme', instance.defaultTheme); - writeNotNull( - 'default_post_listing_type', instance.defaultPostListingType?.toJson()); - writeNotNull('default_sort_type', instance.defaultSortType?.toJson()); - writeNotNull('legal_information', instance.legalInformation); - writeNotNull('application_email_admins', instance.applicationEmailAdmins); - writeNotNull('hide_modlog_mod_names', instance.hideModlogModNames); - writeNotNull('discussion_languages', instance.discussionLanguages); - writeNotNull('slur_filter_regex', instance.slurFilterRegex); - writeNotNull('actor_name_max_length', instance.actorNameMaxLength); - writeNotNull('rate_limit_message', instance.rateLimitMessage); - writeNotNull( - 'rate_limit_message_per_second', instance.rateLimitMessagePerSecond); - writeNotNull('rate_limit_post', instance.rateLimitPost); - writeNotNull('rate_limit_post_per_second', instance.rateLimitPostPerSecond); - writeNotNull('rate_limit_register', instance.rateLimitRegister); - writeNotNull( - 'rate_limit_register_per_second', instance.rateLimitRegisterPerSecond); - writeNotNull('rate_limit_image', instance.rateLimitImage); - writeNotNull('rate_limit_image_per_second', instance.rateLimitImagePerSecond); - writeNotNull('rate_limit_comment', instance.rateLimitComment); - writeNotNull( - 'rate_limit_comment_per_second', instance.rateLimitCommentPerSecond); - writeNotNull('rate_limit_search', instance.rateLimitSearch); - writeNotNull( - 'rate_limit_search_per_second', instance.rateLimitSearchPerSecond); - writeNotNull('federation_enabled', instance.federationEnabled); - writeNotNull('federation_debug', instance.federationDebug); - writeNotNull('federation_worker_count', instance.federationWorkerCount); - writeNotNull('captcha_enabled', instance.captchaEnabled); - writeNotNull('captcha_difficulty', instance.captchaDifficulty); - writeNotNull('allowed_instances', instance.allowedInstances); - writeNotNull('blocked_instances', instance.blockedInstances); - writeNotNull('blocked_urls', instance.blockedUrls); - writeNotNull('taglines', instance.taglines); - writeNotNull('registration_mode', instance.registrationMode?.toJson()); - writeNotNull('reports_email_admins', instance.reportsEmailAdmins); - writeNotNull('content_warning', instance.contentWarning); - writeNotNull('default_post_listing_mode', instance.defaultPostListingMode); - writeNotNull('auth', instance.auth); - return val; -} +_$GetSiteImpl _$$GetSiteImplFromJson(Map json) => _$GetSiteImpl(auth: json['auth'] as String?); + +Map _$$GetSiteImplToJson(_$GetSiteImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$CreateSiteImpl _$$CreateSiteImplFromJson(Map json) => _$CreateSiteImpl( + name: json['name'] as String, + sidebar: json['sidebar'] as String?, + description: json['description'] as String?, + icon: json['icon'] as String?, + banner: json['banner'] as String?, + enableDownvotes: json['enable_downvotes'] as bool?, + enableNsfw: json['enable_nsfw'] as bool?, + communityCreationAdminOnly: json['community_creation_admin_only'] as bool?, + requireEmailVerification: json['require_email_verification'] as bool?, + applicationQuestion: json['application_question'] as String?, + privateInstance: json['private_instance'] as bool?, + defaultTheme: json['default_theme'] as String?, + defaultPostListingType: json['default_post_listing_type'] == null ? null : ListingType.fromJson(json['default_post_listing_type']), + defaultSortType: json['default_sort_type'] == null ? null : SortType.fromJson(json['default_sort_type']), + legalInformation: json['legal_information'] as String?, + applicationEmailAdmins: json['application_email_admins'] as bool?, + hideModlogModNames: json['hide_modlog_mod_names'] as bool?, + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + slurFilterRegex: json['slur_filter_regex'] as String?, + actorNameMaxLength: (json['actor_name_max_length'] as num?)?.toInt(), + rateLimitMessage: (json['rate_limit_message'] as num?)?.toInt(), + rateLimitMessagePerSecond: (json['rate_limit_message_per_second'] as num?)?.toInt(), + rateLimitPost: (json['rate_limit_post'] as num?)?.toInt(), + rateLimitPostPerSecond: (json['rate_limit_post_per_second'] as num?)?.toInt(), + rateLimitRegister: (json['rate_limit_register'] as num?)?.toInt(), + rateLimitRegisterPerSecond: (json['rate_limit_register_per_second'] as num?)?.toInt(), + rateLimitImage: (json['rate_limit_image'] as num?)?.toInt(), + rateLimitImagePerSecond: (json['rate_limit_image_per_second'] as num?)?.toInt(), + rateLimitComment: (json['rate_limit_comment'] as num?)?.toInt(), + rateLimitCommentPerSecond: (json['rate_limit_comment_per_second'] as num?)?.toInt(), + rateLimitSearch: (json['rate_limit_search'] as num?)?.toInt(), + rateLimitSearchPerSecond: (json['rate_limit_search_per_second'] as num?)?.toInt(), + federationEnabled: json['federation_enabled'] as bool?, + federationDebug: json['federation_debug'] as bool?, + federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), + captchaEnabled: json['captcha_enabled'] as bool?, + captchaDifficulty: json['captcha_difficulty'] as String?, + allowedInstances: (json['allowed_instances'] as List?)?.map((e) => e as String).toList(), + blockedInstances: (json['blocked_instances'] as List?)?.map((e) => e as String).toList(), + taglines: (json['taglines'] as List?)?.map((e) => e as String).toList(), + registrationMode: json['registration_mode'] == null ? null : RegistrationMode.fromJson(json['registration_mode'] as String), + contentWarning: json['content_warning'] as String?, + defaultPostListingMode: json['default_post_listing_mode'] as String?, + auth: json['auth'] as String?, +); + +Map _$$CreateSiteImplToJson(_$CreateSiteImpl instance) => { + 'name': instance.name, + if (instance.sidebar case final value?) 'sidebar': value, + if (instance.description case final value?) 'description': value, + if (instance.icon case final value?) 'icon': value, + if (instance.banner case final value?) 'banner': value, + if (instance.enableDownvotes case final value?) 'enable_downvotes': value, + if (instance.enableNsfw case final value?) 'enable_nsfw': value, + if (instance.communityCreationAdminOnly case final value?) 'community_creation_admin_only': value, + if (instance.requireEmailVerification case final value?) 'require_email_verification': value, + if (instance.applicationQuestion case final value?) 'application_question': value, + if (instance.privateInstance case final value?) 'private_instance': value, + if (instance.defaultTheme case final value?) 'default_theme': value, + if (instance.defaultPostListingType?.toJson() case final value?) 'default_post_listing_type': value, + if (instance.defaultSortType?.toJson() case final value?) 'default_sort_type': value, + if (instance.legalInformation case final value?) 'legal_information': value, + if (instance.applicationEmailAdmins case final value?) 'application_email_admins': value, + if (instance.hideModlogModNames case final value?) 'hide_modlog_mod_names': value, + if (instance.discussionLanguages case final value?) 'discussion_languages': value, + if (instance.slurFilterRegex case final value?) 'slur_filter_regex': value, + if (instance.actorNameMaxLength case final value?) 'actor_name_max_length': value, + if (instance.rateLimitMessage case final value?) 'rate_limit_message': value, + if (instance.rateLimitMessagePerSecond case final value?) 'rate_limit_message_per_second': value, + if (instance.rateLimitPost case final value?) 'rate_limit_post': value, + if (instance.rateLimitPostPerSecond case final value?) 'rate_limit_post_per_second': value, + if (instance.rateLimitRegister case final value?) 'rate_limit_register': value, + if (instance.rateLimitRegisterPerSecond case final value?) 'rate_limit_register_per_second': value, + if (instance.rateLimitImage case final value?) 'rate_limit_image': value, + if (instance.rateLimitImagePerSecond case final value?) 'rate_limit_image_per_second': value, + if (instance.rateLimitComment case final value?) 'rate_limit_comment': value, + if (instance.rateLimitCommentPerSecond case final value?) 'rate_limit_comment_per_second': value, + if (instance.rateLimitSearch case final value?) 'rate_limit_search': value, + if (instance.rateLimitSearchPerSecond case final value?) 'rate_limit_search_per_second': value, + if (instance.federationEnabled case final value?) 'federation_enabled': value, + if (instance.federationDebug case final value?) 'federation_debug': value, + if (instance.federationWorkerCount case final value?) 'federation_worker_count': value, + if (instance.captchaEnabled case final value?) 'captcha_enabled': value, + if (instance.captchaDifficulty case final value?) 'captcha_difficulty': value, + if (instance.allowedInstances case final value?) 'allowed_instances': value, + if (instance.blockedInstances case final value?) 'blocked_instances': value, + if (instance.taglines case final value?) 'taglines': value, + if (instance.registrationMode?.toJson() case final value?) 'registration_mode': value, + if (instance.contentWarning case final value?) 'content_warning': value, + if (instance.defaultPostListingMode case final value?) 'default_post_listing_mode': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$EditSiteImpl _$$EditSiteImplFromJson(Map json) => _$EditSiteImpl( + name: json['name'] as String?, + sidebar: json['sidebar'] as String?, + description: json['description'] as String?, + icon: json['icon'] as String?, + banner: json['banner'] as String?, + enableDownvotes: json['enable_downvotes'] as bool?, + enableNsfw: json['enable_nsfw'] as bool?, + communityCreationAdminOnly: json['community_creation_admin_only'] as bool?, + requireEmailVerification: json['require_email_verification'] as bool?, + applicationQuestion: json['application_question'] as String?, + privateInstance: json['private_instance'] as bool?, + defaultTheme: json['default_theme'] as String?, + defaultPostListingType: json['default_post_listing_type'] == null ? null : ListingType.fromJson(json['default_post_listing_type']), + defaultSortType: json['default_sort_type'] == null ? null : SortType.fromJson(json['default_sort_type']), + legalInformation: json['legal_information'] as String?, + applicationEmailAdmins: json['application_email_admins'] as bool?, + hideModlogModNames: json['hide_modlog_mod_names'] as bool?, + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + slurFilterRegex: json['slur_filter_regex'] as String?, + actorNameMaxLength: (json['actor_name_max_length'] as num?)?.toInt(), + rateLimitMessage: (json['rate_limit_message'] as num?)?.toInt(), + rateLimitMessagePerSecond: (json['rate_limit_message_per_second'] as num?)?.toInt(), + rateLimitPost: (json['rate_limit_post'] as num?)?.toInt(), + rateLimitPostPerSecond: (json['rate_limit_post_per_second'] as num?)?.toInt(), + rateLimitRegister: (json['rate_limit_register'] as num?)?.toInt(), + rateLimitRegisterPerSecond: (json['rate_limit_register_per_second'] as num?)?.toInt(), + rateLimitImage: (json['rate_limit_image'] as num?)?.toInt(), + rateLimitImagePerSecond: (json['rate_limit_image_per_second'] as num?)?.toInt(), + rateLimitComment: (json['rate_limit_comment'] as num?)?.toInt(), + rateLimitCommentPerSecond: (json['rate_limit_comment_per_second'] as num?)?.toInt(), + rateLimitSearch: (json['rate_limit_search'] as num?)?.toInt(), + rateLimitSearchPerSecond: (json['rate_limit_search_per_second'] as num?)?.toInt(), + federationEnabled: json['federation_enabled'] as bool?, + federationDebug: json['federation_debug'] as bool?, + federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), + captchaEnabled: json['captcha_enabled'] as bool?, + captchaDifficulty: json['captcha_difficulty'] as String?, + allowedInstances: (json['allowed_instances'] as List?)?.map((e) => e as String).toList(), + blockedInstances: (json['blocked_instances'] as List?)?.map((e) => e as String).toList(), + blockedUrls: (json['blocked_urls'] as List?)?.map((e) => e as String).toList(), + taglines: (json['taglines'] as List?)?.map((e) => e as String).toList(), + registrationMode: json['registration_mode'] == null ? null : RegistrationMode.fromJson(json['registration_mode'] as String), + reportsEmailAdmins: json['reports_email_admins'] as bool?, + contentWarning: json['content_warning'] as String?, + defaultPostListingMode: json['default_post_listing_mode'] as String?, + auth: json['auth'] as String?, +); + +Map _$$EditSiteImplToJson(_$EditSiteImpl instance) => { + if (instance.name case final value?) 'name': value, + if (instance.sidebar case final value?) 'sidebar': value, + if (instance.description case final value?) 'description': value, + if (instance.icon case final value?) 'icon': value, + if (instance.banner case final value?) 'banner': value, + if (instance.enableDownvotes case final value?) 'enable_downvotes': value, + if (instance.enableNsfw case final value?) 'enable_nsfw': value, + if (instance.communityCreationAdminOnly case final value?) 'community_creation_admin_only': value, + if (instance.requireEmailVerification case final value?) 'require_email_verification': value, + if (instance.applicationQuestion case final value?) 'application_question': value, + if (instance.privateInstance case final value?) 'private_instance': value, + if (instance.defaultTheme case final value?) 'default_theme': value, + if (instance.defaultPostListingType?.toJson() case final value?) 'default_post_listing_type': value, + if (instance.defaultSortType?.toJson() case final value?) 'default_sort_type': value, + if (instance.legalInformation case final value?) 'legal_information': value, + if (instance.applicationEmailAdmins case final value?) 'application_email_admins': value, + if (instance.hideModlogModNames case final value?) 'hide_modlog_mod_names': value, + if (instance.discussionLanguages case final value?) 'discussion_languages': value, + if (instance.slurFilterRegex case final value?) 'slur_filter_regex': value, + if (instance.actorNameMaxLength case final value?) 'actor_name_max_length': value, + if (instance.rateLimitMessage case final value?) 'rate_limit_message': value, + if (instance.rateLimitMessagePerSecond case final value?) 'rate_limit_message_per_second': value, + if (instance.rateLimitPost case final value?) 'rate_limit_post': value, + if (instance.rateLimitPostPerSecond case final value?) 'rate_limit_post_per_second': value, + if (instance.rateLimitRegister case final value?) 'rate_limit_register': value, + if (instance.rateLimitRegisterPerSecond case final value?) 'rate_limit_register_per_second': value, + if (instance.rateLimitImage case final value?) 'rate_limit_image': value, + if (instance.rateLimitImagePerSecond case final value?) 'rate_limit_image_per_second': value, + if (instance.rateLimitComment case final value?) 'rate_limit_comment': value, + if (instance.rateLimitCommentPerSecond case final value?) 'rate_limit_comment_per_second': value, + if (instance.rateLimitSearch case final value?) 'rate_limit_search': value, + if (instance.rateLimitSearchPerSecond case final value?) 'rate_limit_search_per_second': value, + if (instance.federationEnabled case final value?) 'federation_enabled': value, + if (instance.federationDebug case final value?) 'federation_debug': value, + if (instance.federationWorkerCount case final value?) 'federation_worker_count': value, + if (instance.captchaEnabled case final value?) 'captcha_enabled': value, + if (instance.captchaDifficulty case final value?) 'captcha_difficulty': value, + if (instance.allowedInstances case final value?) 'allowed_instances': value, + if (instance.blockedInstances case final value?) 'blocked_instances': value, + if (instance.blockedUrls case final value?) 'blocked_urls': value, + if (instance.taglines case final value?) 'taglines': value, + if (instance.registrationMode?.toJson() case final value?) 'registration_mode': value, + if (instance.reportsEmailAdmins case final value?) 'reports_email_admins': value, + if (instance.contentWarning case final value?) 'content_warning': value, + if (instance.defaultPostListingMode case final value?) 'default_post_listing_mode': value, + if (instance.auth case final value?) 'auth': value, +}; _$BlockInstanceImpl _$$BlockInstanceImplFromJson(Map json) => - _$BlockInstanceImpl( - auth: json['auth'] as String?, - instanceId: (json['instance_id'] as num).toInt(), - block: json['block'] as bool, - ); - -Map _$$BlockInstanceImplToJson(_$BlockInstanceImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } + _$BlockInstanceImpl(auth: json['auth'] as String?, instanceId: (json['instance_id'] as num).toInt(), block: json['block'] as bool); - writeNotNull('auth', instance.auth); - val['instance_id'] = instance.instanceId; - val['block'] = instance.block; - return val; -} +Map _$$BlockInstanceImplToJson(_$BlockInstanceImpl instance) => { + if (instance.auth case final value?) 'auth': value, + 'instance_id': instance.instanceId, + 'block': instance.block, +}; diff --git a/lib/src/v3/api/user/user.dart b/lib/src/v3/api/user/user.dart index 4c9a4a02..c4d44ada 100644 --- a/lib/src/v3/api/user/user.dart +++ b/lib/src/v3/api/user/user.dart @@ -10,25 +10,19 @@ part 'user.g.dart'; /// /// `HTTP.POST /user/leave_admin` @freezed -class LeaveAdmin - with _$LeaveAdmin - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class LeaveAdmin with _$LeaveAdmin implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory LeaveAdmin({ - String? auth, - }) = _LeaveAdmin; + const factory LeaveAdmin({String? auth}) = _LeaveAdmin; const LeaveAdmin._(); - factory LeaveAdmin.fromJson(Map json) => - _$LeaveAdminFromJson(json); + factory LeaveAdmin.fromJson(Map json) => _$LeaveAdminFromJson(json); final path = '/user/leave_admin'; final httpMethod = HttpMethod.post; @override - GetSiteResponse responseFactory(Map json) => - GetSiteResponse.fromJson(json); + GetSiteResponse responseFactory(Map json) => GetSiteResponse.fromJson(json); } /// Only available in lemmy v0.19.4 and above @@ -37,9 +31,7 @@ class LeaveAdmin /// /// `HTTP.GET /account/list_media` @freezed -class ListMedia - with _$ListMedia - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ListMedia with _$ListMedia implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ListMedia({ int? page, // v0.19.4 (optional) @@ -48,16 +40,14 @@ class ListMedia }) = _ListMedia; const ListMedia._(); - factory ListMedia.fromJson(Map json) => - _$ListMediaFromJson(json); + factory ListMedia.fromJson(Map json) => _$ListMediaFromJson(json); final path = '/account/list_media'; final httpMethod = HttpMethod.get; @override - ListMediaResponse responseFactory(Map json) => - ListMediaResponse.fromJson(json); + ListMediaResponse responseFactory(Map json) => ListMediaResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -68,27 +58,19 @@ class ListMedia /// /// `HTTP.POST /user/totp/generate` @freezed -class GenerateTotpSecret - with _$GenerateTotpSecret - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GenerateTotpSecret with _$GenerateTotpSecret implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GenerateTotpSecret({ - String? auth, - }) = _GenerateTotpSecret; + const factory GenerateTotpSecret({String? auth}) = _GenerateTotpSecret; const GenerateTotpSecret._(); - factory GenerateTotpSecret.fromJson(Map json) => - _$GenerateTotpSecretFromJson(json); + factory GenerateTotpSecret.fromJson(Map json) => _$GenerateTotpSecretFromJson(json); final path = '/user/totp/generate'; final httpMethod = HttpMethod.post; @override - GenerateTotpSecretResponse responseFactory(Map json) => - GenerateTotpSecretResponse.fromJson(json); + GenerateTotpSecretResponse responseFactory(Map json) => GenerateTotpSecretResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -100,17 +82,12 @@ class GenerateTotpSecret /// /// TODO: Need to figure out how to pass response back to client without parsing json: https://lemmy.ml/post/6754481 @freezed -class ExportSettings - with _$ExportSettings - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ExportSettings with _$ExportSettings implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory ExportSettings({ - String? auth, - }) = _ExportSettings; + const factory ExportSettings({String? auth}) = _ExportSettings; const ExportSettings._(); - factory ExportSettings.fromJson(Map json) => - _$ExportSettingsFromJson(json); + factory ExportSettings.fromJson(Map json) => _$ExportSettingsFromJson(json); final path = '/user/export_settings'; @@ -126,29 +103,19 @@ class ExportSettings /// /// `HTTP.POST /user/import_settings` @freezed -class ImportSettings - with _$ImportSettings - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery, - PassthroughParameter { +class ImportSettings with _$ImportSettings implements LemmyApiQuery, LemmyApiAuthenticatedQuery, PassthroughParameter { @apiSerde - const factory ImportSettings({ - String? auth, - dynamic data, - }) = _ImportSettings; + const factory ImportSettings({String? auth, dynamic data}) = _ImportSettings; const ImportSettings._(); - factory ImportSettings.fromJson(Map json) => - _$ImportSettingsFromJson(json); + factory ImportSettings.fromJson(Map json) => _$ImportSettingsFromJson(json); final path = '/user/import_settings'; final httpMethod = HttpMethod.post; @override - SuccessResponse responseFactory(Map json) => - SuccessResponse.fromJson(json); + SuccessResponse responseFactory(Map json) => SuccessResponse.fromJson(json); @override String get parameter => 'data'; @@ -169,25 +136,19 @@ class ListLogins { /// /// `HTTP.GET /user/validate_auth` @freezed -class ValidateAuth - with _$ValidateAuth - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ValidateAuth with _$ValidateAuth implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory ValidateAuth({ - String? auth, - }) = _ValidateAuth; + const factory ValidateAuth({String? auth}) = _ValidateAuth; const ValidateAuth._(); - factory ValidateAuth.fromJson(Map json) => - _$ValidateAuthFromJson(json); + factory ValidateAuth.fromJson(Map json) => _$ValidateAuthFromJson(json); final path = '/user/validate_auth'; final httpMethod = HttpMethod.get; @override - SuccessResponse responseFactory(Map json) => - SuccessResponse.fromJson(json); + SuccessResponse responseFactory(Map json) => SuccessResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -200,9 +161,7 @@ class ValidateAuth /// /// `HTTP.POST /user/totp/update` @freezed -class UpdateTotp - with _$UpdateTotp - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class UpdateTotp with _$UpdateTotp implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory UpdateTotp({ String? auth, @@ -211,16 +170,14 @@ class UpdateTotp }) = _UpdateTotp; const UpdateTotp._(); - factory UpdateTotp.fromJson(Map json) => - _$UpdateTotpFromJson(json); + factory UpdateTotp.fromJson(Map json) => _$UpdateTotpFromJson(json); final path = '/user/totp/update'; final httpMethod = HttpMethod.post; @override - UpdateTotpResponse responseFactory(Map json) => - UpdateTotpResponse.fromJson(json); + UpdateTotpResponse responseFactory(Map json) => UpdateTotpResponse.fromJson(json); } /// Register a new user. @@ -242,16 +199,14 @@ class Register with _$Register implements LemmyApiQuery { }) = _Register; const Register._(); - factory Register.fromJson(Map json) => - _$RegisterFromJson(json); + factory Register.fromJson(Map json) => _$RegisterFromJson(json); final path = '/user/register'; final httpMethod = HttpMethod.post; @override - LoginResponse responseFactory(Map json) => - LoginResponse.fromJson(json); + LoginResponse responseFactory(Map json) => LoginResponse.fromJson(json); } /// Log into lemmy. @@ -274,8 +229,7 @@ class Login with _$Login implements LemmyApiQuery { final httpMethod = HttpMethod.post; @override - LoginResponse responseFactory(Map json) => - LoginResponse.fromJson(json); + LoginResponse responseFactory(Map json) => LoginResponse.fromJson(json); } /// Only available in lemmy v0.19.0 and above @@ -296,19 +250,14 @@ class Logout with _$Logout implements LemmyApiQuery { final httpMethod = HttpMethod.post; @override - SuccessResponse responseFactory(Map json) => - SuccessResponse.fromJson(json); + SuccessResponse responseFactory(Map json) => SuccessResponse.fromJson(json); } /// Get the details for a person. /// /// `HTTP.GET /user` @freezed -class GetPersonDetails - with _$GetPersonDetails - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetPersonDetails with _$GetPersonDetails implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetPersonDetails({ int? personId, // v0.18.0 @@ -322,27 +271,21 @@ class GetPersonDetails }) = _GetPersonDetails; const GetPersonDetails._(); - factory GetPersonDetails.fromJson(Map json) => - _$GetPersonDetailsFromJson(json); + factory GetPersonDetails.fromJson(Map json) => _$GetPersonDetailsFromJson(json); final path = '/user'; final httpMethod = HttpMethod.get; @override - GetPersonDetailsResponse responseFactory(Map json) => - GetPersonDetailsResponse.fromJson(json); + GetPersonDetailsResponse responseFactory(Map json) => GetPersonDetailsResponse.fromJson(json); } /// Get mentions for your user. /// /// `HTTP.GET /user/mention` @freezed -class GetPersonMentions - with _$GetPersonMentions - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetPersonMentions with _$GetPersonMentions implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetPersonMentions({ CommentSortType? sort, // v0.18.0 @@ -353,27 +296,21 @@ class GetPersonMentions }) = _GetPersonMentions; const GetPersonMentions._(); - factory GetPersonMentions.fromJson(Map json) => - _$GetPersonMentionsFromJson(json); + factory GetPersonMentions.fromJson(Map json) => _$GetPersonMentionsFromJson(json); final path = '/user/mention'; final httpMethod = HttpMethod.get; @override - GetPersonMentionsResponse responseFactory(Map json) => - GetPersonMentionsResponse.fromJson(json); + GetPersonMentionsResponse responseFactory(Map json) => GetPersonMentionsResponse.fromJson(json); } /// Mark a person mention as read. /// /// `HTTP.POST /user/mention/mark_as_read` @freezed -class MarkPersonMentionAsRead - with _$MarkPersonMentionAsRead - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class MarkPersonMentionAsRead with _$MarkPersonMentionAsRead implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory MarkPersonMentionAsRead({ required int personMentionId, // v0.18.0 @@ -382,25 +319,21 @@ class MarkPersonMentionAsRead }) = _MarkPersonMentionAsRead; const MarkPersonMentionAsRead._(); - factory MarkPersonMentionAsRead.fromJson(Map json) => - _$MarkPersonMentionAsReadFromJson(json); + factory MarkPersonMentionAsRead.fromJson(Map json) => _$MarkPersonMentionAsReadFromJson(json); final path = '/user/mention/mark_as_read'; final httpMethod = HttpMethod.post; @override - PersonMentionResponse responseFactory(Map json) => - PersonMentionResponse.fromJson(json); + PersonMentionResponse responseFactory(Map json) => PersonMentionResponse.fromJson(json); } /// Get comment replies. /// /// `HTTP.GET /user/replies` @freezed -class GetReplies - with _$GetReplies - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetReplies with _$GetReplies implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetReplies({ CommentSortType? sort, // v0.18.0 @@ -411,25 +344,21 @@ class GetReplies }) = _GetReplies; const GetReplies._(); - factory GetReplies.fromJson(Map json) => - _$GetRepliesFromJson(json); + factory GetReplies.fromJson(Map json) => _$GetRepliesFromJson(json); final path = '/user/replies'; final httpMethod = HttpMethod.get; @override - GetRepliesResponse responseFactory(Map json) => - GetRepliesResponse.fromJson(json); + GetRepliesResponse responseFactory(Map json) => GetRepliesResponse.fromJson(json); } /// Ban a person from your site. /// /// `HTTP.POST /user/ban` @freezed -class BanPerson - with _$BanPerson - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class BanPerson with _$BanPerson implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory BanPerson({ required int personId, // v0.18.0 @@ -441,52 +370,40 @@ class BanPerson }) = _BanPerson; const BanPerson._(); - factory BanPerson.fromJson(Map json) => - _$BanPersonFromJson(json); + factory BanPerson.fromJson(Map json) => _$BanPersonFromJson(json); final path = '/user/ban'; final httpMethod = HttpMethod.post; @override - BanPersonResponse responseFactory(Map json) => - BanPersonResponse.fromJson(json); + BanPersonResponse responseFactory(Map json) => BanPersonResponse.fromJson(json); } /// Get a list of banned users /// /// `HTTP.GET /user/banned` @freezed -class GetBannedPersons - with _$GetBannedPersons - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetBannedPersons with _$GetBannedPersons implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetBannedPersons({ - String? auth, - }) = _GetBannedPersons; + const factory GetBannedPersons({String? auth}) = _GetBannedPersons; const GetBannedPersons._(); - factory GetBannedPersons.fromJson(Map json) => - _$GetBannedPersonsFromJson(json); + factory GetBannedPersons.fromJson(Map json) => _$GetBannedPersonsFromJson(json); final path = '/user/banned'; final httpMethod = HttpMethod.get; @override - BannedPersonsResponse responseFactory(Map json) => - BannedPersonsResponse.fromJson(json); + BannedPersonsResponse responseFactory(Map json) => BannedPersonsResponse.fromJson(json); } /// Block a person. /// /// `HTTP.POST /user/block` @freezed -class BlockPerson - with _$BlockPerson - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class BlockPerson with _$BlockPerson implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory BlockPerson({ required int personId, // v0.18.0 @@ -495,52 +412,40 @@ class BlockPerson }) = _BlockPerson; const BlockPerson._(); - factory BlockPerson.fromJson(Map json) => - _$BlockPersonFromJson(json); + factory BlockPerson.fromJson(Map json) => _$BlockPersonFromJson(json); final path = '/user/block'; final httpMethod = HttpMethod.post; @override - BlockPersonResponse responseFactory(Map json) => - BlockPersonResponse.fromJson(json); + BlockPersonResponse responseFactory(Map json) => BlockPersonResponse.fromJson(json); } /// Fetch a Captcha. /// /// `HTTP.GET /user/get_captcha` @freezed -class GetCaptcha - with _$GetCaptcha - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class GetCaptcha with _$GetCaptcha implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetCaptcha({ - String? auth, - }) = _GetCaptcha; + const factory GetCaptcha({String? auth}) = _GetCaptcha; const GetCaptcha._(); - factory GetCaptcha.fromJson(Map json) => - _$GetCaptchaFromJson(json); + factory GetCaptcha.fromJson(Map json) => _$GetCaptchaFromJson(json); final path = '/user/get_captcha'; final httpMethod = HttpMethod.get; @override - GetCaptchaResponse responseFactory(Map json) => - GetCaptchaResponse.fromJson(json); + GetCaptchaResponse responseFactory(Map json) => GetCaptchaResponse.fromJson(json); } /// Delete your account. /// /// `HTTP.POST /user/delete_account` @freezed -class DeleteAccount - with _$DeleteAccount - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class DeleteAccount with _$DeleteAccount implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory DeleteAccount({ required String password, // v0.18.0 @@ -549,50 +454,42 @@ class DeleteAccount }) = _DeleteAccount; const DeleteAccount._(); - factory DeleteAccount.fromJson(Map json) => - _$DeleteAccountFromJson(json); + factory DeleteAccount.fromJson(Map json) => _$DeleteAccountFromJson(json); final path = '/user/delete_account'; final httpMethod = HttpMethod.post; @override - DeleteAccountResponse responseFactory(Map json) => - DeleteAccountResponse.fromJson(json); + DeleteAccountResponse responseFactory(Map json) => DeleteAccountResponse.fromJson(json); } /// Reset your password. /// /// `HTTP.POST /user/password_reset` @freezed -class PasswordReset - with _$PasswordReset - implements LemmyApiQuery { +class PasswordReset with _$PasswordReset implements LemmyApiQuery { @apiSerde const factory PasswordReset({ required String email, // v0.18.0 }) = _PasswordReset; const PasswordReset._(); - factory PasswordReset.fromJson(Map json) => - _$PasswordResetFromJson(json); + factory PasswordReset.fromJson(Map json) => _$PasswordResetFromJson(json); final path = '/user/password_reset'; final httpMethod = HttpMethod.post; @override - PasswordResetResponse responseFactory(Map json) => - PasswordResetResponse.fromJson(json); + PasswordResetResponse responseFactory(Map json) => PasswordResetResponse.fromJson(json); } /// Change your password from an email / token based reset. /// /// `HTTP.POST /user/password_change` @freezed -class PasswordChangeAfterReset - with _$PasswordChangeAfterReset - implements LemmyApiQuery { +class PasswordChangeAfterReset with _$PasswordChangeAfterReset implements LemmyApiQuery { @apiSerde const factory PasswordChangeAfterReset({ required String token, // v0.18.0 @@ -601,52 +498,40 @@ class PasswordChangeAfterReset }) = _PasswordChangeAfterReset; const PasswordChangeAfterReset._(); - factory PasswordChangeAfterReset.fromJson(Map json) => - _$PasswordChangeAfterResetFromJson(json); + factory PasswordChangeAfterReset.fromJson(Map json) => _$PasswordChangeAfterResetFromJson(json); final path = '/user/password_change'; final httpMethod = HttpMethod.post; @override - PasswordChangeAfterResetResponse responseFactory(Map json) => - PasswordChangeAfterResetResponse.fromJson(json); + PasswordChangeAfterResetResponse responseFactory(Map json) => PasswordChangeAfterResetResponse.fromJson(json); } /// Mark all replies as read. /// /// `HTTP.POST /user/mark_all_as_read` @freezed -class MarkAllAsRead - with _$MarkAllAsRead - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class MarkAllAsRead with _$MarkAllAsRead implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory MarkAllAsRead({ - String? auth, - }) = _MarkAllAsRead; + const factory MarkAllAsRead({String? auth}) = _MarkAllAsRead; const MarkAllAsRead._(); - factory MarkAllAsRead.fromJson(Map json) => - _$MarkAllAsReadFromJson(json); + factory MarkAllAsRead.fromJson(Map json) => _$MarkAllAsReadFromJson(json); final path = '/user/mark_all_as_read'; final httpMethod = HttpMethod.post; @override - GetRepliesResponse responseFactory(Map json) => - GetRepliesResponse.fromJson(json); + GetRepliesResponse responseFactory(Map json) => GetRepliesResponse.fromJson(json); } /// Save your user settings. /// /// `HTTP.PUT /user/save_user_settings` @freezed -class SaveUserSettings - with _$SaveUserSettings - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class SaveUserSettings with _$SaveUserSettings implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory SaveUserSettings({ bool? showNsfw, // v0.18.0 @@ -684,25 +569,21 @@ class SaveUserSettings }) = _SaveUserSettings; const SaveUserSettings._(); - factory SaveUserSettings.fromJson(Map json) => - _$SaveUserSettingsFromJson(json); + factory SaveUserSettings.fromJson(Map json) => _$SaveUserSettingsFromJson(json); final path = '/user/save_user_settings'; final httpMethod = HttpMethod.put; @override - SaveUserSettingsResponse responseFactory(Map json) => - SaveUserSettingsResponse.fromJson(json); + SaveUserSettingsResponse responseFactory(Map json) => SaveUserSettingsResponse.fromJson(json); } /// Change your user password. /// /// `HTTP.PUT /user/change_password` @freezed -class ChangePassword - with _$ChangePassword - implements LemmyApiQuery, LemmyApiAuthenticatedQuery { +class ChangePassword with _$ChangePassword implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory ChangePassword({ required String newPassword, // v0.18.0 @@ -712,27 +593,21 @@ class ChangePassword }) = _ChangePassword; const ChangePassword._(); - factory ChangePassword.fromJson(Map json) => - _$ChangePasswordFromJson(json); + factory ChangePassword.fromJson(Map json) => _$ChangePasswordFromJson(json); final path = '/user/change_password'; final httpMethod = HttpMethod.put; @override - LoginResponse responseFactory(Map json) => - LoginResponse.fromJson(json); + LoginResponse responseFactory(Map json) => LoginResponse.fromJson(json); } /// Get counts for your reports /// /// `HTTP.GET /user/report_count` @freezed -class GetReportCount - with _$GetReportCount - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetReportCount with _$GetReportCount implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde const factory GetReportCount({ int? communityId, // v0.18.0 @@ -740,66 +615,52 @@ class GetReportCount }) = _GetReportCount; const GetReportCount._(); - factory GetReportCount.fromJson(Map json) => - _$GetReportCountFromJson(json); + factory GetReportCount.fromJson(Map json) => _$GetReportCountFromJson(json); final path = '/user/report_count'; final httpMethod = HttpMethod.get; @override - GetReportCountResponse responseFactory(Map json) => - GetReportCountResponse.fromJson(json); + GetReportCountResponse responseFactory(Map json) => GetReportCountResponse.fromJson(json); } /// Get your unread counts /// /// `HTTP.GET /user/unread_count` @freezed -class GetUnreadCount - with _$GetUnreadCount - implements - LemmyApiQuery, - LemmyApiAuthenticatedQuery { +class GetUnreadCount with _$GetUnreadCount implements LemmyApiQuery, LemmyApiAuthenticatedQuery { @apiSerde - const factory GetUnreadCount({ - String? auth, - }) = _GetUnreadCount; + const factory GetUnreadCount({String? auth}) = _GetUnreadCount; const GetUnreadCount._(); - factory GetUnreadCount.fromJson(Map json) => - _$GetUnreadCountFromJson(json); + factory GetUnreadCount.fromJson(Map json) => _$GetUnreadCountFromJson(json); final path = '/user/unread_count'; final httpMethod = HttpMethod.get; @override - GetUnreadCountResponse responseFactory(Map json) => - GetUnreadCountResponse.fromJson(json); + GetUnreadCountResponse responseFactory(Map json) => GetUnreadCountResponse.fromJson(json); } /// Verify your email /// /// `HTTP.POST /user/verify_email` @freezed -class VerifyEmail - with _$VerifyEmail - implements LemmyApiQuery { +class VerifyEmail with _$VerifyEmail implements LemmyApiQuery { @apiSerde const factory VerifyEmail({ required String token, // v0.18.0 }) = _VerifyEmail; const VerifyEmail._(); - factory VerifyEmail.fromJson(Map json) => - _$VerifyEmailFromJson(json); + factory VerifyEmail.fromJson(Map json) => _$VerifyEmailFromJson(json); final path = '/user/verify_email'; final httpMethod = HttpMethod.post; @override - VerifyEmailResponse responseFactory(Map json) => - VerifyEmailResponse.fromJson(json); + VerifyEmailResponse responseFactory(Map json) => VerifyEmailResponse.fromJson(json); } diff --git a/lib/src/v3/api/user/user.freezed.dart b/lib/src/v3/api/user/user.freezed.dart index 63ff0b53..ec42d5db 100644 --- a/lib/src/v3/api/user/user.freezed.dart +++ b/lib/src/v3/api/user/user.freezed.dart @@ -12,7 +12,8 @@ part of 'user.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LeaveAdmin _$LeaveAdminFromJson(Map json) { return _LeaveAdmin.fromJson(json); @@ -28,22 +29,18 @@ mixin _$LeaveAdmin { /// Create a copy of LeaveAdmin /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LeaveAdminCopyWith get copyWith => - throw _privateConstructorUsedError; + $LeaveAdminCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LeaveAdminCopyWith<$Res> { - factory $LeaveAdminCopyWith( - LeaveAdmin value, $Res Function(LeaveAdmin) then) = - _$LeaveAdminCopyWithImpl<$Res, LeaveAdmin>; + factory $LeaveAdminCopyWith(LeaveAdmin value, $Res Function(LeaveAdmin) then) = _$LeaveAdminCopyWithImpl<$Res, LeaveAdmin>; @useResult $Res call({String? auth}); } /// @nodoc -class _$LeaveAdminCopyWithImpl<$Res, $Val extends LeaveAdmin> - implements $LeaveAdminCopyWith<$Res> { +class _$LeaveAdminCopyWithImpl<$Res, $Val extends LeaveAdmin> implements $LeaveAdminCopyWith<$Res> { _$LeaveAdminCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$LeaveAdminCopyWithImpl<$Res, $Val extends LeaveAdmin> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LeaveAdminImplCopyWith<$Res> - implements $LeaveAdminCopyWith<$Res> { - factory _$$LeaveAdminImplCopyWith( - _$LeaveAdminImpl value, $Res Function(_$LeaveAdminImpl) then) = - __$$LeaveAdminImplCopyWithImpl<$Res>; +abstract class _$$LeaveAdminImplCopyWith<$Res> implements $LeaveAdminCopyWith<$Res> { + factory _$$LeaveAdminImplCopyWith(_$LeaveAdminImpl value, $Res Function(_$LeaveAdminImpl) then) = __$$LeaveAdminImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$LeaveAdminImplCopyWithImpl<$Res> - extends _$LeaveAdminCopyWithImpl<$Res, _$LeaveAdminImpl> - implements _$$LeaveAdminImplCopyWith<$Res> { - __$$LeaveAdminImplCopyWithImpl( - _$LeaveAdminImpl _value, $Res Function(_$LeaveAdminImpl) _then) - : super(_value, _then); +class __$$LeaveAdminImplCopyWithImpl<$Res> extends _$LeaveAdminCopyWithImpl<$Res, _$LeaveAdminImpl> implements _$$LeaveAdminImplCopyWith<$Res> { + __$$LeaveAdminImplCopyWithImpl(_$LeaveAdminImpl _value, $Res Function(_$LeaveAdminImpl) _then) : super(_value, _then); /// Create a copy of LeaveAdmin /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$LeaveAdminImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$LeaveAdminImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -108,8 +101,7 @@ class __$$LeaveAdminImplCopyWithImpl<$Res> class _$LeaveAdminImpl extends _LeaveAdmin { const _$LeaveAdminImpl({this.auth}) : super._(); - factory _$LeaveAdminImpl.fromJson(Map json) => - _$$LeaveAdminImplFromJson(json); + factory _$LeaveAdminImpl.fromJson(Map json) => _$$LeaveAdminImplFromJson(json); @override final String? auth; @@ -121,10 +113,7 @@ class _$LeaveAdminImpl extends _LeaveAdmin { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$LeaveAdminImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$LeaveAdminImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -136,14 +125,11 @@ class _$LeaveAdminImpl extends _LeaveAdmin { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LeaveAdminImplCopyWith<_$LeaveAdminImpl> get copyWith => - __$$LeaveAdminImplCopyWithImpl<_$LeaveAdminImpl>(this, _$identity); + _$$LeaveAdminImplCopyWith<_$LeaveAdminImpl> get copyWith => __$$LeaveAdminImplCopyWithImpl<_$LeaveAdminImpl>(this, _$identity); @override Map toJson() { - return _$$LeaveAdminImplToJson( - this, - ); + return _$$LeaveAdminImplToJson(this); } } @@ -151,8 +137,7 @@ abstract class _LeaveAdmin extends LeaveAdmin { const factory _LeaveAdmin({final String? auth}) = _$LeaveAdminImpl; const _LeaveAdmin._() : super._(); - factory _LeaveAdmin.fromJson(Map json) = - _$LeaveAdminImpl.fromJson; + factory _LeaveAdmin.fromJson(Map json) = _$LeaveAdminImpl.fromJson; @override String? get auth; @@ -161,8 +146,7 @@ abstract class _LeaveAdmin extends LeaveAdmin { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LeaveAdminImplCopyWith<_$LeaveAdminImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LeaveAdminImplCopyWith<_$LeaveAdminImpl> get copyWith => throw _privateConstructorUsedError; } ListMedia _$ListMediaFromJson(Map json) { @@ -181,21 +165,18 @@ mixin _$ListMedia { /// Create a copy of ListMedia /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListMediaCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListMediaCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListMediaCopyWith<$Res> { - factory $ListMediaCopyWith(ListMedia value, $Res Function(ListMedia) then) = - _$ListMediaCopyWithImpl<$Res, ListMedia>; + factory $ListMediaCopyWith(ListMedia value, $Res Function(ListMedia) then) = _$ListMediaCopyWithImpl<$Res, ListMedia>; @useResult $Res call({int? page, int? limit, String? auth}); } /// @nodoc -class _$ListMediaCopyWithImpl<$Res, $Val extends ListMedia> - implements $ListMediaCopyWith<$Res> { +class _$ListMediaCopyWithImpl<$Res, $Val extends ListMedia> implements $ListMediaCopyWith<$Res> { _$ListMediaCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -207,70 +188,66 @@ class _$ListMediaCopyWithImpl<$Res, $Val extends ListMedia> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ListMediaImplCopyWith<$Res> - implements $ListMediaCopyWith<$Res> { - factory _$$ListMediaImplCopyWith( - _$ListMediaImpl value, $Res Function(_$ListMediaImpl) then) = - __$$ListMediaImplCopyWithImpl<$Res>; + $Res call({Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ListMediaImplCopyWith<$Res> implements $ListMediaCopyWith<$Res> { + factory _$$ListMediaImplCopyWith(_$ListMediaImpl value, $Res Function(_$ListMediaImpl) then) = __$$ListMediaImplCopyWithImpl<$Res>; @override @useResult $Res call({int? page, int? limit, String? auth}); } /// @nodoc -class __$$ListMediaImplCopyWithImpl<$Res> - extends _$ListMediaCopyWithImpl<$Res, _$ListMediaImpl> - implements _$$ListMediaImplCopyWith<$Res> { - __$$ListMediaImplCopyWithImpl( - _$ListMediaImpl _value, $Res Function(_$ListMediaImpl) _then) - : super(_value, _then); +class __$$ListMediaImplCopyWithImpl<$Res> extends _$ListMediaCopyWithImpl<$Res, _$ListMediaImpl> implements _$$ListMediaImplCopyWith<$Res> { + __$$ListMediaImplCopyWithImpl(_$ListMediaImpl _value, $Res Function(_$ListMediaImpl) _then) : super(_value, _then); /// Create a copy of ListMedia /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? page = freezed, - Object? limit = freezed, - Object? auth = freezed, - }) { - return _then(_$ListMediaImpl( - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? page = freezed, Object? limit = freezed, Object? auth = freezed}) { + return _then( + _$ListMediaImpl( + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -280,15 +257,14 @@ class __$$ListMediaImplCopyWithImpl<$Res> class _$ListMediaImpl extends _ListMedia { const _$ListMediaImpl({this.page, this.limit, this.auth}) : super._(); - factory _$ListMediaImpl.fromJson(Map json) => - _$$ListMediaImplFromJson(json); + factory _$ListMediaImpl.fromJson(Map json) => _$$ListMediaImplFromJson(json); @override final int? page; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final int? limit; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? auth; @@ -316,26 +292,19 @@ class _$ListMediaImpl extends _ListMedia { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListMediaImplCopyWith<_$ListMediaImpl> get copyWith => - __$$ListMediaImplCopyWithImpl<_$ListMediaImpl>(this, _$identity); + _$$ListMediaImplCopyWith<_$ListMediaImpl> get copyWith => __$$ListMediaImplCopyWithImpl<_$ListMediaImpl>(this, _$identity); @override Map toJson() { - return _$$ListMediaImplToJson( - this, - ); + return _$$ListMediaImplToJson(this); } } abstract class _ListMedia extends ListMedia { - const factory _ListMedia( - {final int? page, - final int? limit, - final String? auth}) = _$ListMediaImpl; + const factory _ListMedia({final int? page, final int? limit, final String? auth}) = _$ListMediaImpl; const _ListMedia._() : super._(); - factory _ListMedia.fromJson(Map json) = - _$ListMediaImpl.fromJson; + factory _ListMedia.fromJson(Map json) = _$ListMediaImpl.fromJson; @override int? get page; // v0.19.4 (optional) @@ -348,8 +317,7 @@ abstract class _ListMedia extends ListMedia { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListMediaImplCopyWith<_$ListMediaImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListMediaImplCopyWith<_$ListMediaImpl> get copyWith => throw _privateConstructorUsedError; } GenerateTotpSecret _$GenerateTotpSecretFromJson(Map json) { @@ -366,22 +334,18 @@ mixin _$GenerateTotpSecret { /// Create a copy of GenerateTotpSecret /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GenerateTotpSecretCopyWith get copyWith => - throw _privateConstructorUsedError; + $GenerateTotpSecretCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GenerateTotpSecretCopyWith<$Res> { - factory $GenerateTotpSecretCopyWith( - GenerateTotpSecret value, $Res Function(GenerateTotpSecret) then) = - _$GenerateTotpSecretCopyWithImpl<$Res, GenerateTotpSecret>; + factory $GenerateTotpSecretCopyWith(GenerateTotpSecret value, $Res Function(GenerateTotpSecret) then) = _$GenerateTotpSecretCopyWithImpl<$Res, GenerateTotpSecret>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GenerateTotpSecretCopyWithImpl<$Res, $Val extends GenerateTotpSecret> - implements $GenerateTotpSecretCopyWith<$Res> { +class _$GenerateTotpSecretCopyWithImpl<$Res, $Val extends GenerateTotpSecret> implements $GenerateTotpSecretCopyWith<$Res> { _$GenerateTotpSecretCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -393,50 +357,46 @@ class _$GenerateTotpSecretCopyWithImpl<$Res, $Val extends GenerateTotpSecret> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GenerateTotpSecretImplCopyWith<$Res> - implements $GenerateTotpSecretCopyWith<$Res> { - factory _$$GenerateTotpSecretImplCopyWith(_$GenerateTotpSecretImpl value, - $Res Function(_$GenerateTotpSecretImpl) then) = - __$$GenerateTotpSecretImplCopyWithImpl<$Res>; +abstract class _$$GenerateTotpSecretImplCopyWith<$Res> implements $GenerateTotpSecretCopyWith<$Res> { + factory _$$GenerateTotpSecretImplCopyWith(_$GenerateTotpSecretImpl value, $Res Function(_$GenerateTotpSecretImpl) then) = __$$GenerateTotpSecretImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GenerateTotpSecretImplCopyWithImpl<$Res> - extends _$GenerateTotpSecretCopyWithImpl<$Res, _$GenerateTotpSecretImpl> - implements _$$GenerateTotpSecretImplCopyWith<$Res> { - __$$GenerateTotpSecretImplCopyWithImpl(_$GenerateTotpSecretImpl _value, - $Res Function(_$GenerateTotpSecretImpl) _then) - : super(_value, _then); +class __$$GenerateTotpSecretImplCopyWithImpl<$Res> extends _$GenerateTotpSecretCopyWithImpl<$Res, _$GenerateTotpSecretImpl> implements _$$GenerateTotpSecretImplCopyWith<$Res> { + __$$GenerateTotpSecretImplCopyWithImpl(_$GenerateTotpSecretImpl _value, $Res Function(_$GenerateTotpSecretImpl) _then) : super(_value, _then); /// Create a copy of GenerateTotpSecret /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GenerateTotpSecretImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GenerateTotpSecretImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -446,8 +406,7 @@ class __$$GenerateTotpSecretImplCopyWithImpl<$Res> class _$GenerateTotpSecretImpl extends _GenerateTotpSecret { const _$GenerateTotpSecretImpl({this.auth}) : super._(); - factory _$GenerateTotpSecretImpl.fromJson(Map json) => - _$$GenerateTotpSecretImplFromJson(json); + factory _$GenerateTotpSecretImpl.fromJson(Map json) => _$$GenerateTotpSecretImplFromJson(json); @override final String? auth; @@ -459,10 +418,7 @@ class _$GenerateTotpSecretImpl extends _GenerateTotpSecret { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GenerateTotpSecretImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GenerateTotpSecretImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -474,25 +430,19 @@ class _$GenerateTotpSecretImpl extends _GenerateTotpSecret { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GenerateTotpSecretImplCopyWith<_$GenerateTotpSecretImpl> get copyWith => - __$$GenerateTotpSecretImplCopyWithImpl<_$GenerateTotpSecretImpl>( - this, _$identity); + _$$GenerateTotpSecretImplCopyWith<_$GenerateTotpSecretImpl> get copyWith => __$$GenerateTotpSecretImplCopyWithImpl<_$GenerateTotpSecretImpl>(this, _$identity); @override Map toJson() { - return _$$GenerateTotpSecretImplToJson( - this, - ); + return _$$GenerateTotpSecretImplToJson(this); } } abstract class _GenerateTotpSecret extends GenerateTotpSecret { - const factory _GenerateTotpSecret({final String? auth}) = - _$GenerateTotpSecretImpl; + const factory _GenerateTotpSecret({final String? auth}) = _$GenerateTotpSecretImpl; const _GenerateTotpSecret._() : super._(); - factory _GenerateTotpSecret.fromJson(Map json) = - _$GenerateTotpSecretImpl.fromJson; + factory _GenerateTotpSecret.fromJson(Map json) = _$GenerateTotpSecretImpl.fromJson; @override String? get auth; @@ -501,8 +451,7 @@ abstract class _GenerateTotpSecret extends GenerateTotpSecret { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GenerateTotpSecretImplCopyWith<_$GenerateTotpSecretImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GenerateTotpSecretImplCopyWith<_$GenerateTotpSecretImpl> get copyWith => throw _privateConstructorUsedError; } ExportSettings _$ExportSettingsFromJson(Map json) { @@ -519,22 +468,18 @@ mixin _$ExportSettings { /// Create a copy of ExportSettings /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ExportSettingsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ExportSettingsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ExportSettingsCopyWith<$Res> { - factory $ExportSettingsCopyWith( - ExportSettings value, $Res Function(ExportSettings) then) = - _$ExportSettingsCopyWithImpl<$Res, ExportSettings>; + factory $ExportSettingsCopyWith(ExportSettings value, $Res Function(ExportSettings) then) = _$ExportSettingsCopyWithImpl<$Res, ExportSettings>; @useResult $Res call({String? auth}); } /// @nodoc -class _$ExportSettingsCopyWithImpl<$Res, $Val extends ExportSettings> - implements $ExportSettingsCopyWith<$Res> { +class _$ExportSettingsCopyWithImpl<$Res, $Val extends ExportSettings> implements $ExportSettingsCopyWith<$Res> { _$ExportSettingsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -546,50 +491,46 @@ class _$ExportSettingsCopyWithImpl<$Res, $Val extends ExportSettings> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ExportSettingsImplCopyWith<$Res> - implements $ExportSettingsCopyWith<$Res> { - factory _$$ExportSettingsImplCopyWith(_$ExportSettingsImpl value, - $Res Function(_$ExportSettingsImpl) then) = - __$$ExportSettingsImplCopyWithImpl<$Res>; +abstract class _$$ExportSettingsImplCopyWith<$Res> implements $ExportSettingsCopyWith<$Res> { + factory _$$ExportSettingsImplCopyWith(_$ExportSettingsImpl value, $Res Function(_$ExportSettingsImpl) then) = __$$ExportSettingsImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$ExportSettingsImplCopyWithImpl<$Res> - extends _$ExportSettingsCopyWithImpl<$Res, _$ExportSettingsImpl> - implements _$$ExportSettingsImplCopyWith<$Res> { - __$$ExportSettingsImplCopyWithImpl( - _$ExportSettingsImpl _value, $Res Function(_$ExportSettingsImpl) _then) - : super(_value, _then); +class __$$ExportSettingsImplCopyWithImpl<$Res> extends _$ExportSettingsCopyWithImpl<$Res, _$ExportSettingsImpl> implements _$$ExportSettingsImplCopyWith<$Res> { + __$$ExportSettingsImplCopyWithImpl(_$ExportSettingsImpl _value, $Res Function(_$ExportSettingsImpl) _then) : super(_value, _then); /// Create a copy of ExportSettings /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$ExportSettingsImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$ExportSettingsImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -599,8 +540,7 @@ class __$$ExportSettingsImplCopyWithImpl<$Res> class _$ExportSettingsImpl extends _ExportSettings { const _$ExportSettingsImpl({this.auth}) : super._(); - factory _$ExportSettingsImpl.fromJson(Map json) => - _$$ExportSettingsImplFromJson(json); + factory _$ExportSettingsImpl.fromJson(Map json) => _$$ExportSettingsImplFromJson(json); @override final String? auth; @@ -612,10 +552,7 @@ class _$ExportSettingsImpl extends _ExportSettings { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ExportSettingsImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ExportSettingsImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -627,15 +564,11 @@ class _$ExportSettingsImpl extends _ExportSettings { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ExportSettingsImplCopyWith<_$ExportSettingsImpl> get copyWith => - __$$ExportSettingsImplCopyWithImpl<_$ExportSettingsImpl>( - this, _$identity); + _$$ExportSettingsImplCopyWith<_$ExportSettingsImpl> get copyWith => __$$ExportSettingsImplCopyWithImpl<_$ExportSettingsImpl>(this, _$identity); @override Map toJson() { - return _$$ExportSettingsImplToJson( - this, - ); + return _$$ExportSettingsImplToJson(this); } } @@ -643,8 +576,7 @@ abstract class _ExportSettings extends ExportSettings { const factory _ExportSettings({final String? auth}) = _$ExportSettingsImpl; const _ExportSettings._() : super._(); - factory _ExportSettings.fromJson(Map json) = - _$ExportSettingsImpl.fromJson; + factory _ExportSettings.fromJson(Map json) = _$ExportSettingsImpl.fromJson; @override String? get auth; @@ -653,8 +585,7 @@ abstract class _ExportSettings extends ExportSettings { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ExportSettingsImplCopyWith<_$ExportSettingsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ExportSettingsImplCopyWith<_$ExportSettingsImpl> get copyWith => throw _privateConstructorUsedError; } ImportSettings _$ImportSettingsFromJson(Map json) { @@ -672,22 +603,18 @@ mixin _$ImportSettings { /// Create a copy of ImportSettings /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ImportSettingsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ImportSettingsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ImportSettingsCopyWith<$Res> { - factory $ImportSettingsCopyWith( - ImportSettings value, $Res Function(ImportSettings) then) = - _$ImportSettingsCopyWithImpl<$Res, ImportSettings>; + factory $ImportSettingsCopyWith(ImportSettings value, $Res Function(ImportSettings) then) = _$ImportSettingsCopyWithImpl<$Res, ImportSettings>; @useResult $Res call({String? auth, dynamic data}); } /// @nodoc -class _$ImportSettingsCopyWithImpl<$Res, $Val extends ImportSettings> - implements $ImportSettingsCopyWith<$Res> { +class _$ImportSettingsCopyWithImpl<$Res, $Val extends ImportSettings> implements $ImportSettingsCopyWith<$Res> { _$ImportSettingsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -699,60 +626,56 @@ class _$ImportSettingsCopyWithImpl<$Res, $Val extends ImportSettings> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? data = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + $Res call({Object? auth = freezed, Object? data = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + data: + freezed == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as dynamic, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ImportSettingsImplCopyWith<$Res> - implements $ImportSettingsCopyWith<$Res> { - factory _$$ImportSettingsImplCopyWith(_$ImportSettingsImpl value, - $Res Function(_$ImportSettingsImpl) then) = - __$$ImportSettingsImplCopyWithImpl<$Res>; +abstract class _$$ImportSettingsImplCopyWith<$Res> implements $ImportSettingsCopyWith<$Res> { + factory _$$ImportSettingsImplCopyWith(_$ImportSettingsImpl value, $Res Function(_$ImportSettingsImpl) then) = __$$ImportSettingsImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth, dynamic data}); } /// @nodoc -class __$$ImportSettingsImplCopyWithImpl<$Res> - extends _$ImportSettingsCopyWithImpl<$Res, _$ImportSettingsImpl> - implements _$$ImportSettingsImplCopyWith<$Res> { - __$$ImportSettingsImplCopyWithImpl( - _$ImportSettingsImpl _value, $Res Function(_$ImportSettingsImpl) _then) - : super(_value, _then); +class __$$ImportSettingsImplCopyWithImpl<$Res> extends _$ImportSettingsCopyWithImpl<$Res, _$ImportSettingsImpl> implements _$$ImportSettingsImplCopyWith<$Res> { + __$$ImportSettingsImplCopyWithImpl(_$ImportSettingsImpl _value, $Res Function(_$ImportSettingsImpl) _then) : super(_value, _then); /// Create a copy of ImportSettings /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? data = freezed, - }) { - return _then(_$ImportSettingsImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - data: freezed == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as dynamic, - )); + $Res call({Object? auth = freezed, Object? data = freezed}) { + return _then( + _$ImportSettingsImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + data: + freezed == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as dynamic, + ), + ); } } @@ -762,8 +685,7 @@ class __$$ImportSettingsImplCopyWithImpl<$Res> class _$ImportSettingsImpl extends _ImportSettings { const _$ImportSettingsImpl({this.auth, this.data}) : super._(); - factory _$ImportSettingsImpl.fromJson(Map json) => - _$$ImportSettingsImplFromJson(json); + factory _$ImportSettingsImpl.fromJson(Map json) => _$$ImportSettingsImplFromJson(json); @override final String? auth; @@ -778,41 +700,31 @@ class _$ImportSettingsImpl extends _ImportSettings { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ImportSettingsImpl && - (identical(other.auth, auth) || other.auth == auth) && - const DeepCollectionEquality().equals(other.data, data)); + (other.runtimeType == runtimeType && other is _$ImportSettingsImpl && (identical(other.auth, auth) || other.auth == auth) && const DeepCollectionEquality().equals(other.data, data)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, auth, const DeepCollectionEquality().hash(data)); + int get hashCode => Object.hash(runtimeType, auth, const DeepCollectionEquality().hash(data)); /// Create a copy of ImportSettings /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ImportSettingsImplCopyWith<_$ImportSettingsImpl> get copyWith => - __$$ImportSettingsImplCopyWithImpl<_$ImportSettingsImpl>( - this, _$identity); + _$$ImportSettingsImplCopyWith<_$ImportSettingsImpl> get copyWith => __$$ImportSettingsImplCopyWithImpl<_$ImportSettingsImpl>(this, _$identity); @override Map toJson() { - return _$$ImportSettingsImplToJson( - this, - ); + return _$$ImportSettingsImplToJson(this); } } abstract class _ImportSettings extends ImportSettings { - const factory _ImportSettings({final String? auth, final dynamic data}) = - _$ImportSettingsImpl; + const factory _ImportSettings({final String? auth, final dynamic data}) = _$ImportSettingsImpl; const _ImportSettings._() : super._(); - factory _ImportSettings.fromJson(Map json) = - _$ImportSettingsImpl.fromJson; + factory _ImportSettings.fromJson(Map json) = _$ImportSettingsImpl.fromJson; @override String? get auth; @@ -823,8 +735,7 @@ abstract class _ImportSettings extends ImportSettings { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ImportSettingsImplCopyWith<_$ImportSettingsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ImportSettingsImplCopyWith<_$ImportSettingsImpl> get copyWith => throw _privateConstructorUsedError; } ValidateAuth _$ValidateAuthFromJson(Map json) { @@ -841,22 +752,18 @@ mixin _$ValidateAuth { /// Create a copy of ValidateAuth /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ValidateAuthCopyWith get copyWith => - throw _privateConstructorUsedError; + $ValidateAuthCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ValidateAuthCopyWith<$Res> { - factory $ValidateAuthCopyWith( - ValidateAuth value, $Res Function(ValidateAuth) then) = - _$ValidateAuthCopyWithImpl<$Res, ValidateAuth>; + factory $ValidateAuthCopyWith(ValidateAuth value, $Res Function(ValidateAuth) then) = _$ValidateAuthCopyWithImpl<$Res, ValidateAuth>; @useResult $Res call({String? auth}); } /// @nodoc -class _$ValidateAuthCopyWithImpl<$Res, $Val extends ValidateAuth> - implements $ValidateAuthCopyWith<$Res> { +class _$ValidateAuthCopyWithImpl<$Res, $Val extends ValidateAuth> implements $ValidateAuthCopyWith<$Res> { _$ValidateAuthCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -868,50 +775,46 @@ class _$ValidateAuthCopyWithImpl<$Res, $Val extends ValidateAuth> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ValidateAuthImplCopyWith<$Res> - implements $ValidateAuthCopyWith<$Res> { - factory _$$ValidateAuthImplCopyWith( - _$ValidateAuthImpl value, $Res Function(_$ValidateAuthImpl) then) = - __$$ValidateAuthImplCopyWithImpl<$Res>; +abstract class _$$ValidateAuthImplCopyWith<$Res> implements $ValidateAuthCopyWith<$Res> { + factory _$$ValidateAuthImplCopyWith(_$ValidateAuthImpl value, $Res Function(_$ValidateAuthImpl) then) = __$$ValidateAuthImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$ValidateAuthImplCopyWithImpl<$Res> - extends _$ValidateAuthCopyWithImpl<$Res, _$ValidateAuthImpl> - implements _$$ValidateAuthImplCopyWith<$Res> { - __$$ValidateAuthImplCopyWithImpl( - _$ValidateAuthImpl _value, $Res Function(_$ValidateAuthImpl) _then) - : super(_value, _then); +class __$$ValidateAuthImplCopyWithImpl<$Res> extends _$ValidateAuthCopyWithImpl<$Res, _$ValidateAuthImpl> implements _$$ValidateAuthImplCopyWith<$Res> { + __$$ValidateAuthImplCopyWithImpl(_$ValidateAuthImpl _value, $Res Function(_$ValidateAuthImpl) _then) : super(_value, _then); /// Create a copy of ValidateAuth /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$ValidateAuthImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$ValidateAuthImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -921,8 +824,7 @@ class __$$ValidateAuthImplCopyWithImpl<$Res> class _$ValidateAuthImpl extends _ValidateAuth { const _$ValidateAuthImpl({this.auth}) : super._(); - factory _$ValidateAuthImpl.fromJson(Map json) => - _$$ValidateAuthImplFromJson(json); + factory _$ValidateAuthImpl.fromJson(Map json) => _$$ValidateAuthImplFromJson(json); @override final String? auth; @@ -934,10 +836,7 @@ class _$ValidateAuthImpl extends _ValidateAuth { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ValidateAuthImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ValidateAuthImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -949,14 +848,11 @@ class _$ValidateAuthImpl extends _ValidateAuth { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ValidateAuthImplCopyWith<_$ValidateAuthImpl> get copyWith => - __$$ValidateAuthImplCopyWithImpl<_$ValidateAuthImpl>(this, _$identity); + _$$ValidateAuthImplCopyWith<_$ValidateAuthImpl> get copyWith => __$$ValidateAuthImplCopyWithImpl<_$ValidateAuthImpl>(this, _$identity); @override Map toJson() { - return _$$ValidateAuthImplToJson( - this, - ); + return _$$ValidateAuthImplToJson(this); } } @@ -964,8 +860,7 @@ abstract class _ValidateAuth extends ValidateAuth { const factory _ValidateAuth({final String? auth}) = _$ValidateAuthImpl; const _ValidateAuth._() : super._(); - factory _ValidateAuth.fromJson(Map json) = - _$ValidateAuthImpl.fromJson; + factory _ValidateAuth.fromJson(Map json) = _$ValidateAuthImpl.fromJson; @override String? get auth; @@ -974,8 +869,7 @@ abstract class _ValidateAuth extends ValidateAuth { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ValidateAuthImplCopyWith<_$ValidateAuthImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ValidateAuthImplCopyWith<_$ValidateAuthImpl> get copyWith => throw _privateConstructorUsedError; } UpdateTotp _$UpdateTotpFromJson(Map json) { @@ -985,8 +879,7 @@ UpdateTotp _$UpdateTotpFromJson(Map json) { /// @nodoc mixin _$UpdateTotp { String? get auth => throw _privateConstructorUsedError; - String get totpToken => - throw _privateConstructorUsedError; // v0.19.0 (required) + String get totpToken => throw _privateConstructorUsedError; // v0.19.0 (required) bool get enabled => throw _privateConstructorUsedError; /// Serializes this UpdateTotp to a JSON map. @@ -995,22 +888,18 @@ mixin _$UpdateTotp { /// Create a copy of UpdateTotp /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $UpdateTotpCopyWith get copyWith => - throw _privateConstructorUsedError; + $UpdateTotpCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $UpdateTotpCopyWith<$Res> { - factory $UpdateTotpCopyWith( - UpdateTotp value, $Res Function(UpdateTotp) then) = - _$UpdateTotpCopyWithImpl<$Res, UpdateTotp>; + factory $UpdateTotpCopyWith(UpdateTotp value, $Res Function(UpdateTotp) then) = _$UpdateTotpCopyWithImpl<$Res, UpdateTotp>; @useResult $Res call({String? auth, String totpToken, bool enabled}); } /// @nodoc -class _$UpdateTotpCopyWithImpl<$Res, $Val extends UpdateTotp> - implements $UpdateTotpCopyWith<$Res> { +class _$UpdateTotpCopyWithImpl<$Res, $Val extends UpdateTotp> implements $UpdateTotpCopyWith<$Res> { _$UpdateTotpCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1022,70 +911,66 @@ class _$UpdateTotpCopyWithImpl<$Res, $Val extends UpdateTotp> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? totpToken = null, - Object? enabled = null, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - totpToken: null == totpToken - ? _value.totpToken - : totpToken // ignore: cast_nullable_to_non_nullable - as String, - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$UpdateTotpImplCopyWith<$Res> - implements $UpdateTotpCopyWith<$Res> { - factory _$$UpdateTotpImplCopyWith( - _$UpdateTotpImpl value, $Res Function(_$UpdateTotpImpl) then) = - __$$UpdateTotpImplCopyWithImpl<$Res>; + $Res call({Object? auth = freezed, Object? totpToken = null, Object? enabled = null}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + totpToken: + null == totpToken + ? _value.totpToken + : totpToken // ignore: cast_nullable_to_non_nullable + as String, + enabled: + null == enabled + ? _value.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$UpdateTotpImplCopyWith<$Res> implements $UpdateTotpCopyWith<$Res> { + factory _$$UpdateTotpImplCopyWith(_$UpdateTotpImpl value, $Res Function(_$UpdateTotpImpl) then) = __$$UpdateTotpImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth, String totpToken, bool enabled}); } /// @nodoc -class __$$UpdateTotpImplCopyWithImpl<$Res> - extends _$UpdateTotpCopyWithImpl<$Res, _$UpdateTotpImpl> - implements _$$UpdateTotpImplCopyWith<$Res> { - __$$UpdateTotpImplCopyWithImpl( - _$UpdateTotpImpl _value, $Res Function(_$UpdateTotpImpl) _then) - : super(_value, _then); +class __$$UpdateTotpImplCopyWithImpl<$Res> extends _$UpdateTotpCopyWithImpl<$Res, _$UpdateTotpImpl> implements _$$UpdateTotpImplCopyWith<$Res> { + __$$UpdateTotpImplCopyWithImpl(_$UpdateTotpImpl _value, $Res Function(_$UpdateTotpImpl) _then) : super(_value, _then); /// Create a copy of UpdateTotp /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - Object? totpToken = null, - Object? enabled = null, - }) { - return _then(_$UpdateTotpImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - totpToken: null == totpToken - ? _value.totpToken - : totpToken // ignore: cast_nullable_to_non_nullable - as String, - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? auth = freezed, Object? totpToken = null, Object? enabled = null}) { + return _then( + _$UpdateTotpImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + totpToken: + null == totpToken + ? _value.totpToken + : totpToken // ignore: cast_nullable_to_non_nullable + as String, + enabled: + null == enabled + ? _value.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -1093,18 +978,15 @@ class __$$UpdateTotpImplCopyWithImpl<$Res> @apiSerde class _$UpdateTotpImpl extends _UpdateTotp { - const _$UpdateTotpImpl( - {this.auth, required this.totpToken, required this.enabled}) - : super._(); + const _$UpdateTotpImpl({this.auth, required this.totpToken, required this.enabled}) : super._(); - factory _$UpdateTotpImpl.fromJson(Map json) => - _$$UpdateTotpImplFromJson(json); + factory _$UpdateTotpImpl.fromJson(Map json) => _$$UpdateTotpImplFromJson(json); @override final String? auth; @override final String totpToken; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool enabled; @@ -1119,8 +1001,7 @@ class _$UpdateTotpImpl extends _UpdateTotp { (other.runtimeType == runtimeType && other is _$UpdateTotpImpl && (identical(other.auth, auth) || other.auth == auth) && - (identical(other.totpToken, totpToken) || - other.totpToken == totpToken) && + (identical(other.totpToken, totpToken) || other.totpToken == totpToken) && (identical(other.enabled, enabled) || other.enabled == enabled)); } @@ -1133,26 +1014,19 @@ class _$UpdateTotpImpl extends _UpdateTotp { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$UpdateTotpImplCopyWith<_$UpdateTotpImpl> get copyWith => - __$$UpdateTotpImplCopyWithImpl<_$UpdateTotpImpl>(this, _$identity); + _$$UpdateTotpImplCopyWith<_$UpdateTotpImpl> get copyWith => __$$UpdateTotpImplCopyWithImpl<_$UpdateTotpImpl>(this, _$identity); @override Map toJson() { - return _$$UpdateTotpImplToJson( - this, - ); + return _$$UpdateTotpImplToJson(this); } } abstract class _UpdateTotp extends UpdateTotp { - const factory _UpdateTotp( - {final String? auth, - required final String totpToken, - required final bool enabled}) = _$UpdateTotpImpl; + const factory _UpdateTotp({final String? auth, required final String totpToken, required final bool enabled}) = _$UpdateTotpImpl; const _UpdateTotp._() : super._(); - factory _UpdateTotp.fromJson(Map json) = - _$UpdateTotpImpl.fromJson; + factory _UpdateTotp.fromJson(Map json) = _$UpdateTotpImpl.fromJson; @override String? get auth; @@ -1165,8 +1039,7 @@ abstract class _UpdateTotp extends UpdateTotp { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$UpdateTotpImplCopyWith<_$UpdateTotpImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UpdateTotpImplCopyWith<_$UpdateTotpImpl> get copyWith => throw _privateConstructorUsedError; } Register _$RegisterFromJson(Map json) { @@ -1191,30 +1064,18 @@ mixin _$Register { /// Create a copy of Register /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RegisterCopyWith get copyWith => - throw _privateConstructorUsedError; + $RegisterCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RegisterCopyWith<$Res> { - factory $RegisterCopyWith(Register value, $Res Function(Register) then) = - _$RegisterCopyWithImpl<$Res, Register>; + factory $RegisterCopyWith(Register value, $Res Function(Register) then) = _$RegisterCopyWithImpl<$Res, Register>; @useResult - $Res call( - {String username, - String password, - String passwordVerify, - bool? showNsfw, - String? email, - String? captchaUuid, - String? captchaAnswer, - String? honeypot, - String? answer}); + $Res call({String username, String password, String passwordVerify, bool? showNsfw, String? email, String? captchaUuid, String? captchaAnswer, String? honeypot, String? answer}); } /// @nodoc -class _$RegisterCopyWithImpl<$Res, $Val extends Register> - implements $RegisterCopyWith<$Res> { +class _$RegisterCopyWithImpl<$Res, $Val extends Register> implements $RegisterCopyWith<$Res> { _$RegisterCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1237,74 +1098,70 @@ class _$RegisterCopyWithImpl<$Res, $Val extends Register> Object? honeypot = freezed, Object? answer = freezed, }) { - return _then(_value.copyWith( - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordVerify: null == passwordVerify - ? _value.passwordVerify - : passwordVerify // ignore: cast_nullable_to_non_nullable - as String, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - captchaUuid: freezed == captchaUuid - ? _value.captchaUuid - : captchaUuid // ignore: cast_nullable_to_non_nullable - as String?, - captchaAnswer: freezed == captchaAnswer - ? _value.captchaAnswer - : captchaAnswer // ignore: cast_nullable_to_non_nullable - as String?, - honeypot: freezed == honeypot - ? _value.honeypot - : honeypot // ignore: cast_nullable_to_non_nullable - as String?, - answer: freezed == answer - ? _value.answer - : answer // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$RegisterImplCopyWith<$Res> - implements $RegisterCopyWith<$Res> { - factory _$$RegisterImplCopyWith( - _$RegisterImpl value, $Res Function(_$RegisterImpl) then) = - __$$RegisterImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + username: + null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordVerify: + null == passwordVerify + ? _value.passwordVerify + : passwordVerify // ignore: cast_nullable_to_non_nullable + as String, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + captchaUuid: + freezed == captchaUuid + ? _value.captchaUuid + : captchaUuid // ignore: cast_nullable_to_non_nullable + as String?, + captchaAnswer: + freezed == captchaAnswer + ? _value.captchaAnswer + : captchaAnswer // ignore: cast_nullable_to_non_nullable + as String?, + honeypot: + freezed == honeypot + ? _value.honeypot + : honeypot // ignore: cast_nullable_to_non_nullable + as String?, + answer: + freezed == answer + ? _value.answer + : answer // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$RegisterImplCopyWith<$Res> implements $RegisterCopyWith<$Res> { + factory _$$RegisterImplCopyWith(_$RegisterImpl value, $Res Function(_$RegisterImpl) then) = __$$RegisterImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String username, - String password, - String passwordVerify, - bool? showNsfw, - String? email, - String? captchaUuid, - String? captchaAnswer, - String? honeypot, - String? answer}); -} - -/// @nodoc -class __$$RegisterImplCopyWithImpl<$Res> - extends _$RegisterCopyWithImpl<$Res, _$RegisterImpl> - implements _$$RegisterImplCopyWith<$Res> { - __$$RegisterImplCopyWithImpl( - _$RegisterImpl _value, $Res Function(_$RegisterImpl) _then) - : super(_value, _then); + $Res call({String username, String password, String passwordVerify, bool? showNsfw, String? email, String? captchaUuid, String? captchaAnswer, String? honeypot, String? answer}); +} + +/// @nodoc +class __$$RegisterImplCopyWithImpl<$Res> extends _$RegisterCopyWithImpl<$Res, _$RegisterImpl> implements _$$RegisterImplCopyWith<$Res> { + __$$RegisterImplCopyWithImpl(_$RegisterImpl _value, $Res Function(_$RegisterImpl) _then) : super(_value, _then); /// Create a copy of Register /// with the given fields replaced by the non-null parameter values. @@ -1321,44 +1178,55 @@ class __$$RegisterImplCopyWithImpl<$Res> Object? honeypot = freezed, Object? answer = freezed, }) { - return _then(_$RegisterImpl( - username: null == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordVerify: null == passwordVerify - ? _value.passwordVerify - : passwordVerify // ignore: cast_nullable_to_non_nullable - as String, - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - captchaUuid: freezed == captchaUuid - ? _value.captchaUuid - : captchaUuid // ignore: cast_nullable_to_non_nullable - as String?, - captchaAnswer: freezed == captchaAnswer - ? _value.captchaAnswer - : captchaAnswer // ignore: cast_nullable_to_non_nullable - as String?, - honeypot: freezed == honeypot - ? _value.honeypot - : honeypot // ignore: cast_nullable_to_non_nullable - as String?, - answer: freezed == answer - ? _value.answer - : answer // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$RegisterImpl( + username: + null == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordVerify: + null == passwordVerify + ? _value.passwordVerify + : passwordVerify // ignore: cast_nullable_to_non_nullable + as String, + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + captchaUuid: + freezed == captchaUuid + ? _value.captchaUuid + : captchaUuid // ignore: cast_nullable_to_non_nullable + as String?, + captchaAnswer: + freezed == captchaAnswer + ? _value.captchaAnswer + : captchaAnswer // ignore: cast_nullable_to_non_nullable + as String?, + honeypot: + freezed == honeypot + ? _value.honeypot + : honeypot // ignore: cast_nullable_to_non_nullable + as String?, + answer: + freezed == answer + ? _value.answer + : answer // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1366,45 +1234,35 @@ class __$$RegisterImplCopyWithImpl<$Res> @apiSerde class _$RegisterImpl extends _Register { - const _$RegisterImpl( - {required this.username, - required this.password, - required this.passwordVerify, - this.showNsfw, - this.email, - this.captchaUuid, - this.captchaAnswer, - this.honeypot, - this.answer}) - : super._(); - - factory _$RegisterImpl.fromJson(Map json) => - _$$RegisterImplFromJson(json); + const _$RegisterImpl({required this.username, required this.password, required this.passwordVerify, this.showNsfw, this.email, this.captchaUuid, this.captchaAnswer, this.honeypot, this.answer}) + : super._(); + + factory _$RegisterImpl.fromJson(Map json) => _$$RegisterImplFromJson(json); @override final String username; -// v0.18.0 + // v0.18.0 @override final String password; -// v0.18.0 + // v0.18.0 @override final String passwordVerify; -// v0.18.0 + // v0.18.0 @override final bool? showNsfw; -// v0.18.0 + // v0.18.0 @override final String? email; -// v0.18.0 + // v0.18.0 @override final String? captchaUuid; -// v0.18.0 + // v0.18.0 @override final String? captchaAnswer; -// v0.18.0 + // v0.18.0 @override final String? honeypot; -// v0.18.0 + // v0.18.0 @override final String? answer; @@ -1418,69 +1276,49 @@ class _$RegisterImpl extends _Register { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RegisterImpl && - (identical(other.username, username) || - other.username == username) && - (identical(other.password, password) || - other.password == password) && - (identical(other.passwordVerify, passwordVerify) || - other.passwordVerify == passwordVerify) && - (identical(other.showNsfw, showNsfw) || - other.showNsfw == showNsfw) && + (identical(other.username, username) || other.username == username) && + (identical(other.password, password) || other.password == password) && + (identical(other.passwordVerify, passwordVerify) || other.passwordVerify == passwordVerify) && + (identical(other.showNsfw, showNsfw) || other.showNsfw == showNsfw) && (identical(other.email, email) || other.email == email) && - (identical(other.captchaUuid, captchaUuid) || - other.captchaUuid == captchaUuid) && - (identical(other.captchaAnswer, captchaAnswer) || - other.captchaAnswer == captchaAnswer) && - (identical(other.honeypot, honeypot) || - other.honeypot == honeypot) && + (identical(other.captchaUuid, captchaUuid) || other.captchaUuid == captchaUuid) && + (identical(other.captchaAnswer, captchaAnswer) || other.captchaAnswer == captchaAnswer) && + (identical(other.honeypot, honeypot) || other.honeypot == honeypot) && (identical(other.answer, answer) || other.answer == answer)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - username, - password, - passwordVerify, - showNsfw, - email, - captchaUuid, - captchaAnswer, - honeypot, - answer); + int get hashCode => Object.hash(runtimeType, username, password, passwordVerify, showNsfw, email, captchaUuid, captchaAnswer, honeypot, answer); /// Create a copy of Register /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RegisterImplCopyWith<_$RegisterImpl> get copyWith => - __$$RegisterImplCopyWithImpl<_$RegisterImpl>(this, _$identity); + _$$RegisterImplCopyWith<_$RegisterImpl> get copyWith => __$$RegisterImplCopyWithImpl<_$RegisterImpl>(this, _$identity); @override Map toJson() { - return _$$RegisterImplToJson( - this, - ); + return _$$RegisterImplToJson(this); } } abstract class _Register extends Register { - const factory _Register( - {required final String username, - required final String password, - required final String passwordVerify, - final bool? showNsfw, - final String? email, - final String? captchaUuid, - final String? captchaAnswer, - final String? honeypot, - final String? answer}) = _$RegisterImpl; + const factory _Register({ + required final String username, + required final String password, + required final String passwordVerify, + final bool? showNsfw, + final String? email, + final String? captchaUuid, + final String? captchaAnswer, + final String? honeypot, + final String? answer, + }) = _$RegisterImpl; const _Register._() : super._(); - factory _Register.fromJson(Map json) = - _$RegisterImpl.fromJson; + factory _Register.fromJson(Map json) = _$RegisterImpl.fromJson; @override String get username; // v0.18.0 @@ -1505,8 +1343,7 @@ abstract class _Register extends Register { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RegisterImplCopyWith<_$RegisterImpl> get copyWith => - throw _privateConstructorUsedError; + _$$RegisterImplCopyWith<_$RegisterImpl> get copyWith => throw _privateConstructorUsedError; } Login _$LoginFromJson(Map json) { @@ -1531,18 +1368,13 @@ mixin _$Login { /// @nodoc abstract class $LoginCopyWith<$Res> { - factory $LoginCopyWith(Login value, $Res Function(Login) then) = - _$LoginCopyWithImpl<$Res, Login>; + factory $LoginCopyWith(Login value, $Res Function(Login) then) = _$LoginCopyWithImpl<$Res, Login>; @useResult - $Res call( - {String usernameOrEmail, - String password, - @JsonKey(name: 'totp_2fa_token') String? totp2faToken}); + $Res call({String usernameOrEmail, String password, @JsonKey(name: 'totp_2fa_token') String? totp2faToken}); } /// @nodoc -class _$LoginCopyWithImpl<$Res, $Val extends Login> - implements $LoginCopyWith<$Res> { +class _$LoginCopyWithImpl<$Res, $Val extends Login> implements $LoginCopyWith<$Res> { _$LoginCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1554,72 +1386,66 @@ class _$LoginCopyWithImpl<$Res, $Val extends Login> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? usernameOrEmail = null, - Object? password = null, - Object? totp2faToken = freezed, - }) { - return _then(_value.copyWith( - usernameOrEmail: null == usernameOrEmail - ? _value.usernameOrEmail - : usernameOrEmail // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - totp2faToken: freezed == totp2faToken - ? _value.totp2faToken - : totp2faToken // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? usernameOrEmail = null, Object? password = null, Object? totp2faToken = freezed}) { + return _then( + _value.copyWith( + usernameOrEmail: + null == usernameOrEmail + ? _value.usernameOrEmail + : usernameOrEmail // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + totp2faToken: + freezed == totp2faToken + ? _value.totp2faToken + : totp2faToken // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$LoginImplCopyWith<$Res> implements $LoginCopyWith<$Res> { - factory _$$LoginImplCopyWith( - _$LoginImpl value, $Res Function(_$LoginImpl) then) = - __$$LoginImplCopyWithImpl<$Res>; + factory _$$LoginImplCopyWith(_$LoginImpl value, $Res Function(_$LoginImpl) then) = __$$LoginImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String usernameOrEmail, - String password, - @JsonKey(name: 'totp_2fa_token') String? totp2faToken}); + $Res call({String usernameOrEmail, String password, @JsonKey(name: 'totp_2fa_token') String? totp2faToken}); } /// @nodoc -class __$$LoginImplCopyWithImpl<$Res> - extends _$LoginCopyWithImpl<$Res, _$LoginImpl> - implements _$$LoginImplCopyWith<$Res> { - __$$LoginImplCopyWithImpl( - _$LoginImpl _value, $Res Function(_$LoginImpl) _then) - : super(_value, _then); +class __$$LoginImplCopyWithImpl<$Res> extends _$LoginCopyWithImpl<$Res, _$LoginImpl> implements _$$LoginImplCopyWith<$Res> { + __$$LoginImplCopyWithImpl(_$LoginImpl _value, $Res Function(_$LoginImpl) _then) : super(_value, _then); /// Create a copy of Login /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? usernameOrEmail = null, - Object? password = null, - Object? totp2faToken = freezed, - }) { - return _then(_$LoginImpl( - usernameOrEmail: null == usernameOrEmail - ? _value.usernameOrEmail - : usernameOrEmail // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - totp2faToken: freezed == totp2faToken - ? _value.totp2faToken - : totp2faToken // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? usernameOrEmail = null, Object? password = null, Object? totp2faToken = freezed}) { + return _then( + _$LoginImpl( + usernameOrEmail: + null == usernameOrEmail + ? _value.usernameOrEmail + : usernameOrEmail // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + totp2faToken: + freezed == totp2faToken + ? _value.totp2faToken + : totp2faToken // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1627,21 +1453,16 @@ class __$$LoginImplCopyWithImpl<$Res> @apiSerde class _$LoginImpl extends _Login { - const _$LoginImpl( - {required this.usernameOrEmail, - required this.password, - @JsonKey(name: 'totp_2fa_token') this.totp2faToken}) - : super._(); + const _$LoginImpl({required this.usernameOrEmail, required this.password, @JsonKey(name: 'totp_2fa_token') this.totp2faToken}) : super._(); - factory _$LoginImpl.fromJson(Map json) => - _$$LoginImplFromJson(json); + factory _$LoginImpl.fromJson(Map json) => _$$LoginImplFromJson(json); @override final String usernameOrEmail; -// v0.18.0 + // v0.18.0 @override final String password; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'totp_2fa_token') final String? totp2faToken; @@ -1656,41 +1477,30 @@ class _$LoginImpl extends _Login { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LoginImpl && - (identical(other.usernameOrEmail, usernameOrEmail) || - other.usernameOrEmail == usernameOrEmail) && - (identical(other.password, password) || - other.password == password) && - (identical(other.totp2faToken, totp2faToken) || - other.totp2faToken == totp2faToken)); + (identical(other.usernameOrEmail, usernameOrEmail) || other.usernameOrEmail == usernameOrEmail) && + (identical(other.password, password) || other.password == password) && + (identical(other.totp2faToken, totp2faToken) || other.totp2faToken == totp2faToken)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, usernameOrEmail, password, totp2faToken); + int get hashCode => Object.hash(runtimeType, usernameOrEmail, password, totp2faToken); /// Create a copy of Login /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LoginImplCopyWith<_$LoginImpl> get copyWith => - __$$LoginImplCopyWithImpl<_$LoginImpl>(this, _$identity); + _$$LoginImplCopyWith<_$LoginImpl> get copyWith => __$$LoginImplCopyWithImpl<_$LoginImpl>(this, _$identity); @override Map toJson() { - return _$$LoginImplToJson( - this, - ); + return _$$LoginImplToJson(this); } } abstract class _Login extends Login { - const factory _Login( - {required final String usernameOrEmail, - required final String password, - @JsonKey(name: 'totp_2fa_token') final String? totp2faToken}) = - _$LoginImpl; + const factory _Login({required final String usernameOrEmail, required final String password, @JsonKey(name: 'totp_2fa_token') final String? totp2faToken}) = _$LoginImpl; const _Login._() : super._(); factory _Login.fromJson(Map json) = _$LoginImpl.fromJson; @@ -1707,8 +1517,7 @@ abstract class _Login extends Login { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoginImplCopyWith<_$LoginImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LoginImplCopyWith<_$LoginImpl> get copyWith => throw _privateConstructorUsedError; } Logout _$LogoutFromJson(Map json) { @@ -1723,13 +1532,11 @@ mixin _$Logout { /// @nodoc abstract class $LogoutCopyWith<$Res> { - factory $LogoutCopyWith(Logout value, $Res Function(Logout) then) = - _$LogoutCopyWithImpl<$Res, Logout>; + factory $LogoutCopyWith(Logout value, $Res Function(Logout) then) = _$LogoutCopyWithImpl<$Res, Logout>; } /// @nodoc -class _$LogoutCopyWithImpl<$Res, $Val extends Logout> - implements $LogoutCopyWith<$Res> { +class _$LogoutCopyWithImpl<$Res, $Val extends Logout> implements $LogoutCopyWith<$Res> { _$LogoutCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1743,18 +1550,12 @@ class _$LogoutCopyWithImpl<$Res, $Val extends Logout> /// @nodoc abstract class _$$LogoutImplCopyWith<$Res> { - factory _$$LogoutImplCopyWith( - _$LogoutImpl value, $Res Function(_$LogoutImpl) then) = - __$$LogoutImplCopyWithImpl<$Res>; + factory _$$LogoutImplCopyWith(_$LogoutImpl value, $Res Function(_$LogoutImpl) then) = __$$LogoutImplCopyWithImpl<$Res>; } /// @nodoc -class __$$LogoutImplCopyWithImpl<$Res> - extends _$LogoutCopyWithImpl<$Res, _$LogoutImpl> - implements _$$LogoutImplCopyWith<$Res> { - __$$LogoutImplCopyWithImpl( - _$LogoutImpl _value, $Res Function(_$LogoutImpl) _then) - : super(_value, _then); +class __$$LogoutImplCopyWithImpl<$Res> extends _$LogoutCopyWithImpl<$Res, _$LogoutImpl> implements _$$LogoutImplCopyWith<$Res> { + __$$LogoutImplCopyWithImpl(_$LogoutImpl _value, $Res Function(_$LogoutImpl) _then) : super(_value, _then); /// Create a copy of Logout /// with the given fields replaced by the non-null parameter values. @@ -1766,8 +1567,7 @@ class __$$LogoutImplCopyWithImpl<$Res> class _$LogoutImpl extends _Logout { const _$LogoutImpl() : super._(); - factory _$LogoutImpl.fromJson(Map json) => - _$$LogoutImplFromJson(json); + factory _$LogoutImpl.fromJson(Map json) => _$$LogoutImplFromJson(json); @override String toString() { @@ -1776,8 +1576,7 @@ class _$LogoutImpl extends _Logout { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && other is _$LogoutImpl); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$LogoutImpl); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -1786,9 +1585,7 @@ class _$LogoutImpl extends _Logout { @override Map toJson() { - return _$$LogoutImplToJson( - this, - ); + return _$$LogoutImplToJson(this); } } @@ -1820,30 +1617,18 @@ mixin _$GetPersonDetails { /// Create a copy of GetPersonDetails /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPersonDetailsCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPersonDetailsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPersonDetailsCopyWith<$Res> { - factory $GetPersonDetailsCopyWith( - GetPersonDetails value, $Res Function(GetPersonDetails) then) = - _$GetPersonDetailsCopyWithImpl<$Res, GetPersonDetails>; + factory $GetPersonDetailsCopyWith(GetPersonDetails value, $Res Function(GetPersonDetails) then) = _$GetPersonDetailsCopyWithImpl<$Res, GetPersonDetails>; @useResult - $Res call( - {int? personId, - String? username, - SortType? sort, - int? page, - int? limit, - int? communityId, - bool? savedOnly, - String? auth}); + $Res call({int? personId, String? username, SortType? sort, int? page, int? limit, int? communityId, bool? savedOnly, String? auth}); } /// @nodoc -class _$GetPersonDetailsCopyWithImpl<$Res, $Val extends GetPersonDetails> - implements $GetPersonDetailsCopyWith<$Res> { +class _$GetPersonDetailsCopyWithImpl<$Res, $Val extends GetPersonDetails> implements $GetPersonDetailsCopyWith<$Res> { _$GetPersonDetailsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -1865,69 +1650,65 @@ class _$GetPersonDetailsCopyWithImpl<$Res, $Val extends GetPersonDetails> Object? savedOnly = freezed, Object? auth = freezed, }) { - return _then(_value.copyWith( - personId: freezed == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int?, - username: freezed == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$GetPersonDetailsImplCopyWith<$Res> - implements $GetPersonDetailsCopyWith<$Res> { - factory _$$GetPersonDetailsImplCopyWith(_$GetPersonDetailsImpl value, - $Res Function(_$GetPersonDetailsImpl) then) = - __$$GetPersonDetailsImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + personId: + freezed == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int?, + username: + freezed == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$GetPersonDetailsImplCopyWith<$Res> implements $GetPersonDetailsCopyWith<$Res> { + factory _$$GetPersonDetailsImplCopyWith(_$GetPersonDetailsImpl value, $Res Function(_$GetPersonDetailsImpl) then) = __$$GetPersonDetailsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? personId, - String? username, - SortType? sort, - int? page, - int? limit, - int? communityId, - bool? savedOnly, - String? auth}); + $Res call({int? personId, String? username, SortType? sort, int? page, int? limit, int? communityId, bool? savedOnly, String? auth}); } /// @nodoc -class __$$GetPersonDetailsImplCopyWithImpl<$Res> - extends _$GetPersonDetailsCopyWithImpl<$Res, _$GetPersonDetailsImpl> - implements _$$GetPersonDetailsImplCopyWith<$Res> { - __$$GetPersonDetailsImplCopyWithImpl(_$GetPersonDetailsImpl _value, - $Res Function(_$GetPersonDetailsImpl) _then) - : super(_value, _then); +class __$$GetPersonDetailsImplCopyWithImpl<$Res> extends _$GetPersonDetailsCopyWithImpl<$Res, _$GetPersonDetailsImpl> implements _$$GetPersonDetailsImplCopyWith<$Res> { + __$$GetPersonDetailsImplCopyWithImpl(_$GetPersonDetailsImpl _value, $Res Function(_$GetPersonDetailsImpl) _then) : super(_value, _then); /// Create a copy of GetPersonDetails /// with the given fields replaced by the non-null parameter values. @@ -1943,40 +1724,50 @@ class __$$GetPersonDetailsImplCopyWithImpl<$Res> Object? savedOnly = freezed, Object? auth = freezed, }) { - return _then(_$GetPersonDetailsImpl( - personId: freezed == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int?, - username: freezed == username - ? _value.username - : username // ignore: cast_nullable_to_non_nullable - as String?, - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as SortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - savedOnly: freezed == savedOnly - ? _value.savedOnly - : savedOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$GetPersonDetailsImpl( + personId: + freezed == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int?, + username: + freezed == username + ? _value.username + : username // ignore: cast_nullable_to_non_nullable + as String?, + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as SortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + savedOnly: + freezed == savedOnly + ? _value.savedOnly + : savedOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -1984,41 +1775,31 @@ class __$$GetPersonDetailsImplCopyWithImpl<$Res> @apiSerde class _$GetPersonDetailsImpl extends _GetPersonDetails { - const _$GetPersonDetailsImpl( - {this.personId, - this.username, - this.sort, - this.page, - this.limit, - this.communityId, - this.savedOnly, - this.auth}) - : super._(); + const _$GetPersonDetailsImpl({this.personId, this.username, this.sort, this.page, this.limit, this.communityId, this.savedOnly, this.auth}) : super._(); - factory _$GetPersonDetailsImpl.fromJson(Map json) => - _$$GetPersonDetailsImplFromJson(json); + factory _$GetPersonDetailsImpl.fromJson(Map json) => _$$GetPersonDetailsImplFromJson(json); @override final int? personId; -// v0.18.0 + // v0.18.0 @override final String? username; -// v0.18.0 + // v0.18.0 @override final SortType? sort; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final bool? savedOnly; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2032,56 +1813,47 @@ class _$GetPersonDetailsImpl extends _GetPersonDetails { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetPersonDetailsImpl && - (identical(other.personId, personId) || - other.personId == personId) && - (identical(other.username, username) || - other.username == username) && + (identical(other.personId, personId) || other.personId == personId) && + (identical(other.username, username) || other.username == username) && (identical(other.sort, sort) || other.sort == sort) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.savedOnly, savedOnly) || - other.savedOnly == savedOnly) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.savedOnly, savedOnly) || other.savedOnly == savedOnly) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, personId, username, sort, page, - limit, communityId, savedOnly, auth); + int get hashCode => Object.hash(runtimeType, personId, username, sort, page, limit, communityId, savedOnly, auth); /// Create a copy of GetPersonDetails /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPersonDetailsImplCopyWith<_$GetPersonDetailsImpl> get copyWith => - __$$GetPersonDetailsImplCopyWithImpl<_$GetPersonDetailsImpl>( - this, _$identity); + _$$GetPersonDetailsImplCopyWith<_$GetPersonDetailsImpl> get copyWith => __$$GetPersonDetailsImplCopyWithImpl<_$GetPersonDetailsImpl>(this, _$identity); @override Map toJson() { - return _$$GetPersonDetailsImplToJson( - this, - ); + return _$$GetPersonDetailsImplToJson(this); } } abstract class _GetPersonDetails extends GetPersonDetails { - const factory _GetPersonDetails( - {final int? personId, - final String? username, - final SortType? sort, - final int? page, - final int? limit, - final int? communityId, - final bool? savedOnly, - final String? auth}) = _$GetPersonDetailsImpl; + const factory _GetPersonDetails({ + final int? personId, + final String? username, + final SortType? sort, + final int? page, + final int? limit, + final int? communityId, + final bool? savedOnly, + final String? auth, + }) = _$GetPersonDetailsImpl; const _GetPersonDetails._() : super._(); - factory _GetPersonDetails.fromJson(Map json) = - _$GetPersonDetailsImpl.fromJson; + factory _GetPersonDetails.fromJson(Map json) = _$GetPersonDetailsImpl.fromJson; @override int? get personId; // v0.18.0 @@ -2104,8 +1876,7 @@ abstract class _GetPersonDetails extends GetPersonDetails { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPersonDetailsImplCopyWith<_$GetPersonDetailsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPersonDetailsImplCopyWith<_$GetPersonDetailsImpl> get copyWith => throw _privateConstructorUsedError; } GetPersonMentions _$GetPersonMentionsFromJson(Map json) { @@ -2126,27 +1897,18 @@ mixin _$GetPersonMentions { /// Create a copy of GetPersonMentions /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPersonMentionsCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPersonMentionsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPersonMentionsCopyWith<$Res> { - factory $GetPersonMentionsCopyWith( - GetPersonMentions value, $Res Function(GetPersonMentions) then) = - _$GetPersonMentionsCopyWithImpl<$Res, GetPersonMentions>; + factory $GetPersonMentionsCopyWith(GetPersonMentions value, $Res Function(GetPersonMentions) then) = _$GetPersonMentionsCopyWithImpl<$Res, GetPersonMentions>; @useResult - $Res call( - {CommentSortType? sort, - int? page, - int? limit, - bool? unreadOnly, - String? auth}); + $Res call({CommentSortType? sort, int? page, int? limit, bool? unreadOnly, String? auth}); } /// @nodoc -class _$GetPersonMentionsCopyWithImpl<$Res, $Val extends GetPersonMentions> - implements $GetPersonMentionsCopyWith<$Res> { +class _$GetPersonMentionsCopyWithImpl<$Res, $Val extends GetPersonMentions> implements $GetPersonMentionsCopyWith<$Res> { _$GetPersonMentionsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2158,95 +1920,86 @@ class _$GetPersonMentionsCopyWithImpl<$Res, $Val extends GetPersonMentions> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unreadOnly = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$GetPersonMentionsImplCopyWith<$Res> - implements $GetPersonMentionsCopyWith<$Res> { - factory _$$GetPersonMentionsImplCopyWith(_$GetPersonMentionsImpl value, - $Res Function(_$GetPersonMentionsImpl) then) = - __$$GetPersonMentionsImplCopyWithImpl<$Res>; + $Res call({Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? unreadOnly = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$GetPersonMentionsImplCopyWith<$Res> implements $GetPersonMentionsCopyWith<$Res> { + factory _$$GetPersonMentionsImplCopyWith(_$GetPersonMentionsImpl value, $Res Function(_$GetPersonMentionsImpl) then) = __$$GetPersonMentionsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentSortType? sort, - int? page, - int? limit, - bool? unreadOnly, - String? auth}); + $Res call({CommentSortType? sort, int? page, int? limit, bool? unreadOnly, String? auth}); } /// @nodoc -class __$$GetPersonMentionsImplCopyWithImpl<$Res> - extends _$GetPersonMentionsCopyWithImpl<$Res, _$GetPersonMentionsImpl> - implements _$$GetPersonMentionsImplCopyWith<$Res> { - __$$GetPersonMentionsImplCopyWithImpl(_$GetPersonMentionsImpl _value, - $Res Function(_$GetPersonMentionsImpl) _then) - : super(_value, _then); +class __$$GetPersonMentionsImplCopyWithImpl<$Res> extends _$GetPersonMentionsCopyWithImpl<$Res, _$GetPersonMentionsImpl> implements _$$GetPersonMentionsImplCopyWith<$Res> { + __$$GetPersonMentionsImplCopyWithImpl(_$GetPersonMentionsImpl _value, $Res Function(_$GetPersonMentionsImpl) _then) : super(_value, _then); /// Create a copy of GetPersonMentions /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unreadOnly = freezed, - Object? auth = freezed, - }) { - return _then(_$GetPersonMentionsImpl( - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? unreadOnly = freezed, Object? auth = freezed}) { + return _then( + _$GetPersonMentionsImpl( + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2254,25 +2007,22 @@ class __$$GetPersonMentionsImplCopyWithImpl<$Res> @apiSerde class _$GetPersonMentionsImpl extends _GetPersonMentions { - const _$GetPersonMentionsImpl( - {this.sort, this.page, this.limit, this.unreadOnly, this.auth}) - : super._(); + const _$GetPersonMentionsImpl({this.sort, this.page, this.limit, this.unreadOnly, this.auth}) : super._(); - factory _$GetPersonMentionsImpl.fromJson(Map json) => - _$$GetPersonMentionsImplFromJson(json); + factory _$GetPersonMentionsImpl.fromJson(Map json) => _$$GetPersonMentionsImplFromJson(json); @override final CommentSortType? sort; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? unreadOnly; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2289,44 +2039,32 @@ class _$GetPersonMentionsImpl extends _GetPersonMentions { (identical(other.sort, sort) || other.sort == sort) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.unreadOnly, unreadOnly) || - other.unreadOnly == unreadOnly) && + (identical(other.unreadOnly, unreadOnly) || other.unreadOnly == unreadOnly) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, sort, page, limit, unreadOnly, auth); + int get hashCode => Object.hash(runtimeType, sort, page, limit, unreadOnly, auth); /// Create a copy of GetPersonMentions /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPersonMentionsImplCopyWith<_$GetPersonMentionsImpl> get copyWith => - __$$GetPersonMentionsImplCopyWithImpl<_$GetPersonMentionsImpl>( - this, _$identity); + _$$GetPersonMentionsImplCopyWith<_$GetPersonMentionsImpl> get copyWith => __$$GetPersonMentionsImplCopyWithImpl<_$GetPersonMentionsImpl>(this, _$identity); @override Map toJson() { - return _$$GetPersonMentionsImplToJson( - this, - ); + return _$$GetPersonMentionsImplToJson(this); } } abstract class _GetPersonMentions extends GetPersonMentions { - const factory _GetPersonMentions( - {final CommentSortType? sort, - final int? page, - final int? limit, - final bool? unreadOnly, - final String? auth}) = _$GetPersonMentionsImpl; + const factory _GetPersonMentions({final CommentSortType? sort, final int? page, final int? limit, final bool? unreadOnly, final String? auth}) = _$GetPersonMentionsImpl; const _GetPersonMentions._() : super._(); - factory _GetPersonMentions.fromJson(Map json) = - _$GetPersonMentionsImpl.fromJson; + factory _GetPersonMentions.fromJson(Map json) = _$GetPersonMentionsImpl.fromJson; @override CommentSortType? get sort; // v0.18.0 @@ -2343,12 +2081,10 @@ abstract class _GetPersonMentions extends GetPersonMentions { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPersonMentionsImplCopyWith<_$GetPersonMentionsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPersonMentionsImplCopyWith<_$GetPersonMentionsImpl> get copyWith => throw _privateConstructorUsedError; } -MarkPersonMentionAsRead _$MarkPersonMentionAsReadFromJson( - Map json) { +MarkPersonMentionAsRead _$MarkPersonMentionAsReadFromJson(Map json) { return _MarkPersonMentionAsRead.fromJson(json); } @@ -2364,23 +2100,18 @@ mixin _$MarkPersonMentionAsRead { /// Create a copy of MarkPersonMentionAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkPersonMentionAsReadCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkPersonMentionAsReadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkPersonMentionAsReadCopyWith<$Res> { - factory $MarkPersonMentionAsReadCopyWith(MarkPersonMentionAsRead value, - $Res Function(MarkPersonMentionAsRead) then) = - _$MarkPersonMentionAsReadCopyWithImpl<$Res, MarkPersonMentionAsRead>; + factory $MarkPersonMentionAsReadCopyWith(MarkPersonMentionAsRead value, $Res Function(MarkPersonMentionAsRead) then) = _$MarkPersonMentionAsReadCopyWithImpl<$Res, MarkPersonMentionAsRead>; @useResult $Res call({int personMentionId, bool read, String? auth}); } /// @nodoc -class _$MarkPersonMentionAsReadCopyWithImpl<$Res, - $Val extends MarkPersonMentionAsRead> - implements $MarkPersonMentionAsReadCopyWith<$Res> { +class _$MarkPersonMentionAsReadCopyWithImpl<$Res, $Val extends MarkPersonMentionAsRead> implements $MarkPersonMentionAsReadCopyWith<$Res> { _$MarkPersonMentionAsReadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2392,73 +2123,66 @@ class _$MarkPersonMentionAsReadCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personMentionId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personMentionId: null == personMentionId - ? _value.personMentionId - : personMentionId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$MarkPersonMentionAsReadImplCopyWith<$Res> - implements $MarkPersonMentionAsReadCopyWith<$Res> { - factory _$$MarkPersonMentionAsReadImplCopyWith( - _$MarkPersonMentionAsReadImpl value, - $Res Function(_$MarkPersonMentionAsReadImpl) then) = - __$$MarkPersonMentionAsReadImplCopyWithImpl<$Res>; + $Res call({Object? personMentionId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + personMentionId: + null == personMentionId + ? _value.personMentionId + : personMentionId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$MarkPersonMentionAsReadImplCopyWith<$Res> implements $MarkPersonMentionAsReadCopyWith<$Res> { + factory _$$MarkPersonMentionAsReadImplCopyWith(_$MarkPersonMentionAsReadImpl value, $Res Function(_$MarkPersonMentionAsReadImpl) then) = __$$MarkPersonMentionAsReadImplCopyWithImpl<$Res>; @override @useResult $Res call({int personMentionId, bool read, String? auth}); } /// @nodoc -class __$$MarkPersonMentionAsReadImplCopyWithImpl<$Res> - extends _$MarkPersonMentionAsReadCopyWithImpl<$Res, - _$MarkPersonMentionAsReadImpl> - implements _$$MarkPersonMentionAsReadImplCopyWith<$Res> { - __$$MarkPersonMentionAsReadImplCopyWithImpl( - _$MarkPersonMentionAsReadImpl _value, - $Res Function(_$MarkPersonMentionAsReadImpl) _then) - : super(_value, _then); +class __$$MarkPersonMentionAsReadImplCopyWithImpl<$Res> extends _$MarkPersonMentionAsReadCopyWithImpl<$Res, _$MarkPersonMentionAsReadImpl> implements _$$MarkPersonMentionAsReadImplCopyWith<$Res> { + __$$MarkPersonMentionAsReadImplCopyWithImpl(_$MarkPersonMentionAsReadImpl _value, $Res Function(_$MarkPersonMentionAsReadImpl) _then) : super(_value, _then); /// Create a copy of MarkPersonMentionAsRead /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personMentionId = null, - Object? read = null, - Object? auth = freezed, - }) { - return _then(_$MarkPersonMentionAsReadImpl( - personMentionId: null == personMentionId - ? _value.personMentionId - : personMentionId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personMentionId = null, Object? read = null, Object? auth = freezed}) { + return _then( + _$MarkPersonMentionAsReadImpl( + personMentionId: + null == personMentionId + ? _value.personMentionId + : personMentionId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2466,19 +2190,16 @@ class __$$MarkPersonMentionAsReadImplCopyWithImpl<$Res> @apiSerde class _$MarkPersonMentionAsReadImpl extends _MarkPersonMentionAsRead { - const _$MarkPersonMentionAsReadImpl( - {required this.personMentionId, required this.read, this.auth}) - : super._(); + const _$MarkPersonMentionAsReadImpl({required this.personMentionId, required this.read, this.auth}) : super._(); - factory _$MarkPersonMentionAsReadImpl.fromJson(Map json) => - _$$MarkPersonMentionAsReadImplFromJson(json); + factory _$MarkPersonMentionAsReadImpl.fromJson(Map json) => _$$MarkPersonMentionAsReadImplFromJson(json); @override final int personMentionId; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2492,8 +2213,7 @@ class _$MarkPersonMentionAsReadImpl extends _MarkPersonMentionAsRead { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MarkPersonMentionAsReadImpl && - (identical(other.personMentionId, personMentionId) || - other.personMentionId == personMentionId) && + (identical(other.personMentionId, personMentionId) || other.personMentionId == personMentionId) && (identical(other.read, read) || other.read == read) && (identical(other.auth, auth) || other.auth == auth)); } @@ -2507,27 +2227,19 @@ class _$MarkPersonMentionAsReadImpl extends _MarkPersonMentionAsRead { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkPersonMentionAsReadImplCopyWith<_$MarkPersonMentionAsReadImpl> - get copyWith => __$$MarkPersonMentionAsReadImplCopyWithImpl< - _$MarkPersonMentionAsReadImpl>(this, _$identity); + _$$MarkPersonMentionAsReadImplCopyWith<_$MarkPersonMentionAsReadImpl> get copyWith => __$$MarkPersonMentionAsReadImplCopyWithImpl<_$MarkPersonMentionAsReadImpl>(this, _$identity); @override Map toJson() { - return _$$MarkPersonMentionAsReadImplToJson( - this, - ); + return _$$MarkPersonMentionAsReadImplToJson(this); } } abstract class _MarkPersonMentionAsRead extends MarkPersonMentionAsRead { - const factory _MarkPersonMentionAsRead( - {required final int personMentionId, - required final bool read, - final String? auth}) = _$MarkPersonMentionAsReadImpl; + const factory _MarkPersonMentionAsRead({required final int personMentionId, required final bool read, final String? auth}) = _$MarkPersonMentionAsReadImpl; const _MarkPersonMentionAsRead._() : super._(); - factory _MarkPersonMentionAsRead.fromJson(Map json) = - _$MarkPersonMentionAsReadImpl.fromJson; + factory _MarkPersonMentionAsRead.fromJson(Map json) = _$MarkPersonMentionAsReadImpl.fromJson; @override int get personMentionId; // v0.18.0 @@ -2540,8 +2252,7 @@ abstract class _MarkPersonMentionAsRead extends MarkPersonMentionAsRead { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkPersonMentionAsReadImplCopyWith<_$MarkPersonMentionAsReadImpl> - get copyWith => throw _privateConstructorUsedError; + _$$MarkPersonMentionAsReadImplCopyWith<_$MarkPersonMentionAsReadImpl> get copyWith => throw _privateConstructorUsedError; } GetReplies _$GetRepliesFromJson(Map json) { @@ -2562,27 +2273,18 @@ mixin _$GetReplies { /// Create a copy of GetReplies /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetRepliesCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetRepliesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetRepliesCopyWith<$Res> { - factory $GetRepliesCopyWith( - GetReplies value, $Res Function(GetReplies) then) = - _$GetRepliesCopyWithImpl<$Res, GetReplies>; + factory $GetRepliesCopyWith(GetReplies value, $Res Function(GetReplies) then) = _$GetRepliesCopyWithImpl<$Res, GetReplies>; @useResult - $Res call( - {CommentSortType? sort, - int? page, - int? limit, - bool? unreadOnly, - String? auth}); + $Res call({CommentSortType? sort, int? page, int? limit, bool? unreadOnly, String? auth}); } /// @nodoc -class _$GetRepliesCopyWithImpl<$Res, $Val extends GetReplies> - implements $GetRepliesCopyWith<$Res> { +class _$GetRepliesCopyWithImpl<$Res, $Val extends GetReplies> implements $GetRepliesCopyWith<$Res> { _$GetRepliesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2594,95 +2296,86 @@ class _$GetRepliesCopyWithImpl<$Res, $Val extends GetReplies> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unreadOnly = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$GetRepliesImplCopyWith<$Res> - implements $GetRepliesCopyWith<$Res> { - factory _$$GetRepliesImplCopyWith( - _$GetRepliesImpl value, $Res Function(_$GetRepliesImpl) then) = - __$$GetRepliesImplCopyWithImpl<$Res>; + $Res call({Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? unreadOnly = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$GetRepliesImplCopyWith<$Res> implements $GetRepliesCopyWith<$Res> { + factory _$$GetRepliesImplCopyWith(_$GetRepliesImpl value, $Res Function(_$GetRepliesImpl) then) = __$$GetRepliesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentSortType? sort, - int? page, - int? limit, - bool? unreadOnly, - String? auth}); + $Res call({CommentSortType? sort, int? page, int? limit, bool? unreadOnly, String? auth}); } /// @nodoc -class __$$GetRepliesImplCopyWithImpl<$Res> - extends _$GetRepliesCopyWithImpl<$Res, _$GetRepliesImpl> - implements _$$GetRepliesImplCopyWith<$Res> { - __$$GetRepliesImplCopyWithImpl( - _$GetRepliesImpl _value, $Res Function(_$GetRepliesImpl) _then) - : super(_value, _then); +class __$$GetRepliesImplCopyWithImpl<$Res> extends _$GetRepliesCopyWithImpl<$Res, _$GetRepliesImpl> implements _$$GetRepliesImplCopyWith<$Res> { + __$$GetRepliesImplCopyWithImpl(_$GetRepliesImpl _value, $Res Function(_$GetRepliesImpl) _then) : super(_value, _then); /// Create a copy of GetReplies /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sort = freezed, - Object? page = freezed, - Object? limit = freezed, - Object? unreadOnly = freezed, - Object? auth = freezed, - }) { - return _then(_$GetRepliesImpl( - sort: freezed == sort - ? _value.sort - : sort // ignore: cast_nullable_to_non_nullable - as CommentSortType?, - page: freezed == page - ? _value.page - : page // ignore: cast_nullable_to_non_nullable - as int?, - limit: freezed == limit - ? _value.limit - : limit // ignore: cast_nullable_to_non_nullable - as int?, - unreadOnly: freezed == unreadOnly - ? _value.unreadOnly - : unreadOnly // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? sort = freezed, Object? page = freezed, Object? limit = freezed, Object? unreadOnly = freezed, Object? auth = freezed}) { + return _then( + _$GetRepliesImpl( + sort: + freezed == sort + ? _value.sort + : sort // ignore: cast_nullable_to_non_nullable + as CommentSortType?, + page: + freezed == page + ? _value.page + : page // ignore: cast_nullable_to_non_nullable + as int?, + limit: + freezed == limit + ? _value.limit + : limit // ignore: cast_nullable_to_non_nullable + as int?, + unreadOnly: + freezed == unreadOnly + ? _value.unreadOnly + : unreadOnly // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2690,25 +2383,22 @@ class __$$GetRepliesImplCopyWithImpl<$Res> @apiSerde class _$GetRepliesImpl extends _GetReplies { - const _$GetRepliesImpl( - {this.sort, this.page, this.limit, this.unreadOnly, this.auth}) - : super._(); + const _$GetRepliesImpl({this.sort, this.page, this.limit, this.unreadOnly, this.auth}) : super._(); - factory _$GetRepliesImpl.fromJson(Map json) => - _$$GetRepliesImplFromJson(json); + factory _$GetRepliesImpl.fromJson(Map json) => _$$GetRepliesImplFromJson(json); @override final CommentSortType? sort; -// v0.18.0 + // v0.18.0 @override final int? page; -// v0.18.0 + // v0.18.0 @override final int? limit; -// v0.18.0 + // v0.18.0 @override final bool? unreadOnly; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2725,43 +2415,32 @@ class _$GetRepliesImpl extends _GetReplies { (identical(other.sort, sort) || other.sort == sort) && (identical(other.page, page) || other.page == page) && (identical(other.limit, limit) || other.limit == limit) && - (identical(other.unreadOnly, unreadOnly) || - other.unreadOnly == unreadOnly) && + (identical(other.unreadOnly, unreadOnly) || other.unreadOnly == unreadOnly) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, sort, page, limit, unreadOnly, auth); + int get hashCode => Object.hash(runtimeType, sort, page, limit, unreadOnly, auth); /// Create a copy of GetReplies /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetRepliesImplCopyWith<_$GetRepliesImpl> get copyWith => - __$$GetRepliesImplCopyWithImpl<_$GetRepliesImpl>(this, _$identity); + _$$GetRepliesImplCopyWith<_$GetRepliesImpl> get copyWith => __$$GetRepliesImplCopyWithImpl<_$GetRepliesImpl>(this, _$identity); @override Map toJson() { - return _$$GetRepliesImplToJson( - this, - ); + return _$$GetRepliesImplToJson(this); } } abstract class _GetReplies extends GetReplies { - const factory _GetReplies( - {final CommentSortType? sort, - final int? page, - final int? limit, - final bool? unreadOnly, - final String? auth}) = _$GetRepliesImpl; + const factory _GetReplies({final CommentSortType? sort, final int? page, final int? limit, final bool? unreadOnly, final String? auth}) = _$GetRepliesImpl; const _GetReplies._() : super._(); - factory _GetReplies.fromJson(Map json) = - _$GetRepliesImpl.fromJson; + factory _GetReplies.fromJson(Map json) = _$GetRepliesImpl.fromJson; @override CommentSortType? get sort; // v0.18.0 @@ -2778,8 +2457,7 @@ abstract class _GetReplies extends GetReplies { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetRepliesImplCopyWith<_$GetRepliesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetRepliesImplCopyWith<_$GetRepliesImpl> get copyWith => throw _privateConstructorUsedError; } BanPerson _$BanPersonFromJson(Map json) { @@ -2801,27 +2479,18 @@ mixin _$BanPerson { /// Create a copy of BanPerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BanPersonCopyWith get copyWith => - throw _privateConstructorUsedError; + $BanPersonCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BanPersonCopyWith<$Res> { - factory $BanPersonCopyWith(BanPerson value, $Res Function(BanPerson) then) = - _$BanPersonCopyWithImpl<$Res, BanPerson>; + factory $BanPersonCopyWith(BanPerson value, $Res Function(BanPerson) then) = _$BanPersonCopyWithImpl<$Res, BanPerson>; @useResult - $Res call( - {int personId, - bool ban, - bool? removeData, - String? reason, - int? expires, - String? auth}); + $Res call({int personId, bool ban, bool? removeData, String? reason, int? expires, String? auth}); } /// @nodoc -class _$BanPersonCopyWithImpl<$Res, $Val extends BanPerson> - implements $BanPersonCopyWith<$Res> { +class _$BanPersonCopyWithImpl<$Res, $Val extends BanPerson> implements $BanPersonCopyWith<$Res> { _$BanPersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -2833,106 +2502,96 @@ class _$BanPersonCopyWithImpl<$Res, $Val extends BanPerson> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? ban = null, - Object? removeData = freezed, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - ban: null == ban - ? _value.ban - : ban // ignore: cast_nullable_to_non_nullable - as bool, - removeData: freezed == removeData - ? _value.removeData - : removeData // ignore: cast_nullable_to_non_nullable - as bool?, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$BanPersonImplCopyWith<$Res> - implements $BanPersonCopyWith<$Res> { - factory _$$BanPersonImplCopyWith( - _$BanPersonImpl value, $Res Function(_$BanPersonImpl) then) = - __$$BanPersonImplCopyWithImpl<$Res>; + $Res call({Object? personId = null, Object? ban = null, Object? removeData = freezed, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + ban: + null == ban + ? _value.ban + : ban // ignore: cast_nullable_to_non_nullable + as bool, + removeData: + freezed == removeData + ? _value.removeData + : removeData // ignore: cast_nullable_to_non_nullable + as bool?, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$BanPersonImplCopyWith<$Res> implements $BanPersonCopyWith<$Res> { + factory _$$BanPersonImplCopyWith(_$BanPersonImpl value, $Res Function(_$BanPersonImpl) then) = __$$BanPersonImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int personId, - bool ban, - bool? removeData, - String? reason, - int? expires, - String? auth}); + $Res call({int personId, bool ban, bool? removeData, String? reason, int? expires, String? auth}); } /// @nodoc -class __$$BanPersonImplCopyWithImpl<$Res> - extends _$BanPersonCopyWithImpl<$Res, _$BanPersonImpl> - implements _$$BanPersonImplCopyWith<$Res> { - __$$BanPersonImplCopyWithImpl( - _$BanPersonImpl _value, $Res Function(_$BanPersonImpl) _then) - : super(_value, _then); +class __$$BanPersonImplCopyWithImpl<$Res> extends _$BanPersonCopyWithImpl<$Res, _$BanPersonImpl> implements _$$BanPersonImplCopyWith<$Res> { + __$$BanPersonImplCopyWithImpl(_$BanPersonImpl _value, $Res Function(_$BanPersonImpl) _then) : super(_value, _then); /// Create a copy of BanPerson /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? ban = null, - Object? removeData = freezed, - Object? reason = freezed, - Object? expires = freezed, - Object? auth = freezed, - }) { - return _then(_$BanPersonImpl( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - ban: null == ban - ? _value.ban - : ban // ignore: cast_nullable_to_non_nullable - as bool, - removeData: freezed == removeData - ? _value.removeData - : removeData // ignore: cast_nullable_to_non_nullable - as bool?, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personId = null, Object? ban = null, Object? removeData = freezed, Object? reason = freezed, Object? expires = freezed, Object? auth = freezed}) { + return _then( + _$BanPersonImpl( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + ban: + null == ban + ? _value.ban + : ban // ignore: cast_nullable_to_non_nullable + as bool, + removeData: + freezed == removeData + ? _value.removeData + : removeData // ignore: cast_nullable_to_non_nullable + as bool?, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -2940,33 +2599,25 @@ class __$$BanPersonImplCopyWithImpl<$Res> @apiSerde class _$BanPersonImpl extends _BanPerson { - const _$BanPersonImpl( - {required this.personId, - required this.ban, - this.removeData, - this.reason, - this.expires, - this.auth}) - : super._(); + const _$BanPersonImpl({required this.personId, required this.ban, this.removeData, this.reason, this.expires, this.auth}) : super._(); - factory _$BanPersonImpl.fromJson(Map json) => - _$$BanPersonImplFromJson(json); + factory _$BanPersonImpl.fromJson(Map json) => _$$BanPersonImplFromJson(json); @override final int personId; -// v0.18.0 + // v0.18.0 @override final bool ban; -// v0.18.0 + // v0.18.0 @override final bool? removeData; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final int? expires; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -2980,11 +2631,9 @@ class _$BanPersonImpl extends _BanPerson { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BanPersonImpl && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.ban, ban) || other.ban == ban) && - (identical(other.removeData, removeData) || - other.removeData == removeData) && + (identical(other.removeData, removeData) || other.removeData == removeData) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.expires, expires) || other.expires == expires) && (identical(other.auth, auth) || other.auth == auth)); @@ -2992,37 +2641,26 @@ class _$BanPersonImpl extends _BanPerson { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, personId, ban, removeData, reason, expires, auth); + int get hashCode => Object.hash(runtimeType, personId, ban, removeData, reason, expires, auth); /// Create a copy of BanPerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BanPersonImplCopyWith<_$BanPersonImpl> get copyWith => - __$$BanPersonImplCopyWithImpl<_$BanPersonImpl>(this, _$identity); + _$$BanPersonImplCopyWith<_$BanPersonImpl> get copyWith => __$$BanPersonImplCopyWithImpl<_$BanPersonImpl>(this, _$identity); @override Map toJson() { - return _$$BanPersonImplToJson( - this, - ); + return _$$BanPersonImplToJson(this); } } abstract class _BanPerson extends BanPerson { - const factory _BanPerson( - {required final int personId, - required final bool ban, - final bool? removeData, - final String? reason, - final int? expires, - final String? auth}) = _$BanPersonImpl; + const factory _BanPerson({required final int personId, required final bool ban, final bool? removeData, final String? reason, final int? expires, final String? auth}) = _$BanPersonImpl; const _BanPerson._() : super._(); - factory _BanPerson.fromJson(Map json) = - _$BanPersonImpl.fromJson; + factory _BanPerson.fromJson(Map json) = _$BanPersonImpl.fromJson; @override int get personId; // v0.18.0 @@ -3041,8 +2679,7 @@ abstract class _BanPerson extends BanPerson { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BanPersonImplCopyWith<_$BanPersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BanPersonImplCopyWith<_$BanPersonImpl> get copyWith => throw _privateConstructorUsedError; } GetBannedPersons _$GetBannedPersonsFromJson(Map json) { @@ -3059,22 +2696,18 @@ mixin _$GetBannedPersons { /// Create a copy of GetBannedPersons /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetBannedPersonsCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetBannedPersonsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetBannedPersonsCopyWith<$Res> { - factory $GetBannedPersonsCopyWith( - GetBannedPersons value, $Res Function(GetBannedPersons) then) = - _$GetBannedPersonsCopyWithImpl<$Res, GetBannedPersons>; + factory $GetBannedPersonsCopyWith(GetBannedPersons value, $Res Function(GetBannedPersons) then) = _$GetBannedPersonsCopyWithImpl<$Res, GetBannedPersons>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetBannedPersonsCopyWithImpl<$Res, $Val extends GetBannedPersons> - implements $GetBannedPersonsCopyWith<$Res> { +class _$GetBannedPersonsCopyWithImpl<$Res, $Val extends GetBannedPersons> implements $GetBannedPersonsCopyWith<$Res> { _$GetBannedPersonsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3086,50 +2719,46 @@ class _$GetBannedPersonsCopyWithImpl<$Res, $Val extends GetBannedPersons> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetBannedPersonsImplCopyWith<$Res> - implements $GetBannedPersonsCopyWith<$Res> { - factory _$$GetBannedPersonsImplCopyWith(_$GetBannedPersonsImpl value, - $Res Function(_$GetBannedPersonsImpl) then) = - __$$GetBannedPersonsImplCopyWithImpl<$Res>; +abstract class _$$GetBannedPersonsImplCopyWith<$Res> implements $GetBannedPersonsCopyWith<$Res> { + factory _$$GetBannedPersonsImplCopyWith(_$GetBannedPersonsImpl value, $Res Function(_$GetBannedPersonsImpl) then) = __$$GetBannedPersonsImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GetBannedPersonsImplCopyWithImpl<$Res> - extends _$GetBannedPersonsCopyWithImpl<$Res, _$GetBannedPersonsImpl> - implements _$$GetBannedPersonsImplCopyWith<$Res> { - __$$GetBannedPersonsImplCopyWithImpl(_$GetBannedPersonsImpl _value, - $Res Function(_$GetBannedPersonsImpl) _then) - : super(_value, _then); +class __$$GetBannedPersonsImplCopyWithImpl<$Res> extends _$GetBannedPersonsCopyWithImpl<$Res, _$GetBannedPersonsImpl> implements _$$GetBannedPersonsImplCopyWith<$Res> { + __$$GetBannedPersonsImplCopyWithImpl(_$GetBannedPersonsImpl _value, $Res Function(_$GetBannedPersonsImpl) _then) : super(_value, _then); /// Create a copy of GetBannedPersons /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetBannedPersonsImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetBannedPersonsImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3139,8 +2768,7 @@ class __$$GetBannedPersonsImplCopyWithImpl<$Res> class _$GetBannedPersonsImpl extends _GetBannedPersons { const _$GetBannedPersonsImpl({this.auth}) : super._(); - factory _$GetBannedPersonsImpl.fromJson(Map json) => - _$$GetBannedPersonsImplFromJson(json); + factory _$GetBannedPersonsImpl.fromJson(Map json) => _$$GetBannedPersonsImplFromJson(json); @override final String? auth; @@ -3152,10 +2780,7 @@ class _$GetBannedPersonsImpl extends _GetBannedPersons { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetBannedPersonsImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetBannedPersonsImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -3167,25 +2792,19 @@ class _$GetBannedPersonsImpl extends _GetBannedPersons { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetBannedPersonsImplCopyWith<_$GetBannedPersonsImpl> get copyWith => - __$$GetBannedPersonsImplCopyWithImpl<_$GetBannedPersonsImpl>( - this, _$identity); + _$$GetBannedPersonsImplCopyWith<_$GetBannedPersonsImpl> get copyWith => __$$GetBannedPersonsImplCopyWithImpl<_$GetBannedPersonsImpl>(this, _$identity); @override Map toJson() { - return _$$GetBannedPersonsImplToJson( - this, - ); + return _$$GetBannedPersonsImplToJson(this); } } abstract class _GetBannedPersons extends GetBannedPersons { - const factory _GetBannedPersons({final String? auth}) = - _$GetBannedPersonsImpl; + const factory _GetBannedPersons({final String? auth}) = _$GetBannedPersonsImpl; const _GetBannedPersons._() : super._(); - factory _GetBannedPersons.fromJson(Map json) = - _$GetBannedPersonsImpl.fromJson; + factory _GetBannedPersons.fromJson(Map json) = _$GetBannedPersonsImpl.fromJson; @override String? get auth; @@ -3194,8 +2813,7 @@ abstract class _GetBannedPersons extends GetBannedPersons { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetBannedPersonsImplCopyWith<_$GetBannedPersonsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetBannedPersonsImplCopyWith<_$GetBannedPersonsImpl> get copyWith => throw _privateConstructorUsedError; } BlockPerson _$BlockPersonFromJson(Map json) { @@ -3214,22 +2832,18 @@ mixin _$BlockPerson { /// Create a copy of BlockPerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockPersonCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockPersonCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockPersonCopyWith<$Res> { - factory $BlockPersonCopyWith( - BlockPerson value, $Res Function(BlockPerson) then) = - _$BlockPersonCopyWithImpl<$Res, BlockPerson>; + factory $BlockPersonCopyWith(BlockPerson value, $Res Function(BlockPerson) then) = _$BlockPersonCopyWithImpl<$Res, BlockPerson>; @useResult $Res call({int personId, bool block, String? auth}); } /// @nodoc -class _$BlockPersonCopyWithImpl<$Res, $Val extends BlockPerson> - implements $BlockPersonCopyWith<$Res> { +class _$BlockPersonCopyWithImpl<$Res, $Val extends BlockPerson> implements $BlockPersonCopyWith<$Res> { _$BlockPersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3241,70 +2855,66 @@ class _$BlockPersonCopyWithImpl<$Res, $Val extends BlockPerson> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? block = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$BlockPersonImplCopyWith<$Res> - implements $BlockPersonCopyWith<$Res> { - factory _$$BlockPersonImplCopyWith( - _$BlockPersonImpl value, $Res Function(_$BlockPersonImpl) then) = - __$$BlockPersonImplCopyWithImpl<$Res>; + $Res call({Object? personId = null, Object? block = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$BlockPersonImplCopyWith<$Res> implements $BlockPersonCopyWith<$Res> { + factory _$$BlockPersonImplCopyWith(_$BlockPersonImpl value, $Res Function(_$BlockPersonImpl) then) = __$$BlockPersonImplCopyWithImpl<$Res>; @override @useResult $Res call({int personId, bool block, String? auth}); } /// @nodoc -class __$$BlockPersonImplCopyWithImpl<$Res> - extends _$BlockPersonCopyWithImpl<$Res, _$BlockPersonImpl> - implements _$$BlockPersonImplCopyWith<$Res> { - __$$BlockPersonImplCopyWithImpl( - _$BlockPersonImpl _value, $Res Function(_$BlockPersonImpl) _then) - : super(_value, _then); +class __$$BlockPersonImplCopyWithImpl<$Res> extends _$BlockPersonCopyWithImpl<$Res, _$BlockPersonImpl> implements _$$BlockPersonImplCopyWith<$Res> { + __$$BlockPersonImplCopyWithImpl(_$BlockPersonImpl _value, $Res Function(_$BlockPersonImpl) _then) : super(_value, _then); /// Create a copy of BlockPerson /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personId = null, - Object? block = null, - Object? auth = freezed, - }) { - return _then(_$BlockPersonImpl( - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - block: null == block - ? _value.block - : block // ignore: cast_nullable_to_non_nullable - as bool, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? personId = null, Object? block = null, Object? auth = freezed}) { + return _then( + _$BlockPersonImpl( + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + block: + null == block + ? _value.block + : block // ignore: cast_nullable_to_non_nullable + as bool, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3312,19 +2922,16 @@ class __$$BlockPersonImplCopyWithImpl<$Res> @apiSerde class _$BlockPersonImpl extends _BlockPerson { - const _$BlockPersonImpl( - {required this.personId, required this.block, this.auth}) - : super._(); + const _$BlockPersonImpl({required this.personId, required this.block, this.auth}) : super._(); - factory _$BlockPersonImpl.fromJson(Map json) => - _$$BlockPersonImplFromJson(json); + factory _$BlockPersonImpl.fromJson(Map json) => _$$BlockPersonImplFromJson(json); @override final int personId; -// v0.18.0 + // v0.18.0 @override final bool block; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -3338,8 +2945,7 @@ class _$BlockPersonImpl extends _BlockPerson { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlockPersonImpl && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.block, block) || other.block == block) && (identical(other.auth, auth) || other.auth == auth)); } @@ -3353,26 +2959,19 @@ class _$BlockPersonImpl extends _BlockPerson { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockPersonImplCopyWith<_$BlockPersonImpl> get copyWith => - __$$BlockPersonImplCopyWithImpl<_$BlockPersonImpl>(this, _$identity); + _$$BlockPersonImplCopyWith<_$BlockPersonImpl> get copyWith => __$$BlockPersonImplCopyWithImpl<_$BlockPersonImpl>(this, _$identity); @override Map toJson() { - return _$$BlockPersonImplToJson( - this, - ); + return _$$BlockPersonImplToJson(this); } } abstract class _BlockPerson extends BlockPerson { - const factory _BlockPerson( - {required final int personId, - required final bool block, - final String? auth}) = _$BlockPersonImpl; + const factory _BlockPerson({required final int personId, required final bool block, final String? auth}) = _$BlockPersonImpl; const _BlockPerson._() : super._(); - factory _BlockPerson.fromJson(Map json) = - _$BlockPersonImpl.fromJson; + factory _BlockPerson.fromJson(Map json) = _$BlockPersonImpl.fromJson; @override int get personId; // v0.18.0 @@ -3385,8 +2984,7 @@ abstract class _BlockPerson extends BlockPerson { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockPersonImplCopyWith<_$BlockPersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BlockPersonImplCopyWith<_$BlockPersonImpl> get copyWith => throw _privateConstructorUsedError; } GetCaptcha _$GetCaptchaFromJson(Map json) { @@ -3403,22 +3001,18 @@ mixin _$GetCaptcha { /// Create a copy of GetCaptcha /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCaptchaCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCaptchaCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCaptchaCopyWith<$Res> { - factory $GetCaptchaCopyWith( - GetCaptcha value, $Res Function(GetCaptcha) then) = - _$GetCaptchaCopyWithImpl<$Res, GetCaptcha>; + factory $GetCaptchaCopyWith(GetCaptcha value, $Res Function(GetCaptcha) then) = _$GetCaptchaCopyWithImpl<$Res, GetCaptcha>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetCaptchaCopyWithImpl<$Res, $Val extends GetCaptcha> - implements $GetCaptchaCopyWith<$Res> { +class _$GetCaptchaCopyWithImpl<$Res, $Val extends GetCaptcha> implements $GetCaptchaCopyWith<$Res> { _$GetCaptchaCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3430,50 +3024,46 @@ class _$GetCaptchaCopyWithImpl<$Res, $Val extends GetCaptcha> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetCaptchaImplCopyWith<$Res> - implements $GetCaptchaCopyWith<$Res> { - factory _$$GetCaptchaImplCopyWith( - _$GetCaptchaImpl value, $Res Function(_$GetCaptchaImpl) then) = - __$$GetCaptchaImplCopyWithImpl<$Res>; +abstract class _$$GetCaptchaImplCopyWith<$Res> implements $GetCaptchaCopyWith<$Res> { + factory _$$GetCaptchaImplCopyWith(_$GetCaptchaImpl value, $Res Function(_$GetCaptchaImpl) then) = __$$GetCaptchaImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GetCaptchaImplCopyWithImpl<$Res> - extends _$GetCaptchaCopyWithImpl<$Res, _$GetCaptchaImpl> - implements _$$GetCaptchaImplCopyWith<$Res> { - __$$GetCaptchaImplCopyWithImpl( - _$GetCaptchaImpl _value, $Res Function(_$GetCaptchaImpl) _then) - : super(_value, _then); +class __$$GetCaptchaImplCopyWithImpl<$Res> extends _$GetCaptchaCopyWithImpl<$Res, _$GetCaptchaImpl> implements _$$GetCaptchaImplCopyWith<$Res> { + __$$GetCaptchaImplCopyWithImpl(_$GetCaptchaImpl _value, $Res Function(_$GetCaptchaImpl) _then) : super(_value, _then); /// Create a copy of GetCaptcha /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetCaptchaImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetCaptchaImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3483,8 +3073,7 @@ class __$$GetCaptchaImplCopyWithImpl<$Res> class _$GetCaptchaImpl extends _GetCaptcha { const _$GetCaptchaImpl({this.auth}) : super._(); - factory _$GetCaptchaImpl.fromJson(Map json) => - _$$GetCaptchaImplFromJson(json); + factory _$GetCaptchaImpl.fromJson(Map json) => _$$GetCaptchaImplFromJson(json); @override final String? auth; @@ -3496,10 +3085,7 @@ class _$GetCaptchaImpl extends _GetCaptcha { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetCaptchaImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetCaptchaImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -3511,14 +3097,11 @@ class _$GetCaptchaImpl extends _GetCaptcha { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCaptchaImplCopyWith<_$GetCaptchaImpl> get copyWith => - __$$GetCaptchaImplCopyWithImpl<_$GetCaptchaImpl>(this, _$identity); + _$$GetCaptchaImplCopyWith<_$GetCaptchaImpl> get copyWith => __$$GetCaptchaImplCopyWithImpl<_$GetCaptchaImpl>(this, _$identity); @override Map toJson() { - return _$$GetCaptchaImplToJson( - this, - ); + return _$$GetCaptchaImplToJson(this); } } @@ -3526,8 +3109,7 @@ abstract class _GetCaptcha extends GetCaptcha { const factory _GetCaptcha({final String? auth}) = _$GetCaptchaImpl; const _GetCaptcha._() : super._(); - factory _GetCaptcha.fromJson(Map json) = - _$GetCaptchaImpl.fromJson; + factory _GetCaptcha.fromJson(Map json) = _$GetCaptchaImpl.fromJson; @override String? get auth; @@ -3536,8 +3118,7 @@ abstract class _GetCaptcha extends GetCaptcha { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCaptchaImplCopyWith<_$GetCaptchaImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCaptchaImplCopyWith<_$GetCaptchaImpl> get copyWith => throw _privateConstructorUsedError; } DeleteAccount _$DeleteAccountFromJson(Map json) { @@ -3547,8 +3128,7 @@ DeleteAccount _$DeleteAccountFromJson(Map json) { /// @nodoc mixin _$DeleteAccount { String get password => throw _privateConstructorUsedError; // v0.18.0 - bool? get deleteContent => - throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get deleteContent => throw _privateConstructorUsedError; // v0.19.0 (required) String? get auth => throw _privateConstructorUsedError; /// Serializes this DeleteAccount to a JSON map. @@ -3557,22 +3137,18 @@ mixin _$DeleteAccount { /// Create a copy of DeleteAccount /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteAccountCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteAccountCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteAccountCopyWith<$Res> { - factory $DeleteAccountCopyWith( - DeleteAccount value, $Res Function(DeleteAccount) then) = - _$DeleteAccountCopyWithImpl<$Res, DeleteAccount>; + factory $DeleteAccountCopyWith(DeleteAccount value, $Res Function(DeleteAccount) then) = _$DeleteAccountCopyWithImpl<$Res, DeleteAccount>; @useResult $Res call({String password, bool? deleteContent, String? auth}); } /// @nodoc -class _$DeleteAccountCopyWithImpl<$Res, $Val extends DeleteAccount> - implements $DeleteAccountCopyWith<$Res> { +class _$DeleteAccountCopyWithImpl<$Res, $Val extends DeleteAccount> implements $DeleteAccountCopyWith<$Res> { _$DeleteAccountCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3584,70 +3160,66 @@ class _$DeleteAccountCopyWithImpl<$Res, $Val extends DeleteAccount> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? password = null, - Object? deleteContent = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - deleteContent: freezed == deleteContent - ? _value.deleteContent - : deleteContent // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$DeleteAccountImplCopyWith<$Res> - implements $DeleteAccountCopyWith<$Res> { - factory _$$DeleteAccountImplCopyWith( - _$DeleteAccountImpl value, $Res Function(_$DeleteAccountImpl) then) = - __$$DeleteAccountImplCopyWithImpl<$Res>; + $Res call({Object? password = null, Object? deleteContent = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + deleteContent: + freezed == deleteContent + ? _value.deleteContent + : deleteContent // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$DeleteAccountImplCopyWith<$Res> implements $DeleteAccountCopyWith<$Res> { + factory _$$DeleteAccountImplCopyWith(_$DeleteAccountImpl value, $Res Function(_$DeleteAccountImpl) then) = __$$DeleteAccountImplCopyWithImpl<$Res>; @override @useResult $Res call({String password, bool? deleteContent, String? auth}); } /// @nodoc -class __$$DeleteAccountImplCopyWithImpl<$Res> - extends _$DeleteAccountCopyWithImpl<$Res, _$DeleteAccountImpl> - implements _$$DeleteAccountImplCopyWith<$Res> { - __$$DeleteAccountImplCopyWithImpl( - _$DeleteAccountImpl _value, $Res Function(_$DeleteAccountImpl) _then) - : super(_value, _then); +class __$$DeleteAccountImplCopyWithImpl<$Res> extends _$DeleteAccountCopyWithImpl<$Res, _$DeleteAccountImpl> implements _$$DeleteAccountImplCopyWith<$Res> { + __$$DeleteAccountImplCopyWithImpl(_$DeleteAccountImpl _value, $Res Function(_$DeleteAccountImpl) _then) : super(_value, _then); /// Create a copy of DeleteAccount /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? password = null, - Object? deleteContent = freezed, - Object? auth = freezed, - }) { - return _then(_$DeleteAccountImpl( - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - deleteContent: freezed == deleteContent - ? _value.deleteContent - : deleteContent // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? password = null, Object? deleteContent = freezed, Object? auth = freezed}) { + return _then( + _$DeleteAccountImpl( + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + deleteContent: + freezed == deleteContent + ? _value.deleteContent + : deleteContent // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -3655,19 +3227,16 @@ class __$$DeleteAccountImplCopyWithImpl<$Res> @apiSerde class _$DeleteAccountImpl extends _DeleteAccount { - const _$DeleteAccountImpl( - {required this.password, this.deleteContent, this.auth}) - : super._(); + const _$DeleteAccountImpl({required this.password, this.deleteContent, this.auth}) : super._(); - factory _$DeleteAccountImpl.fromJson(Map json) => - _$$DeleteAccountImplFromJson(json); + factory _$DeleteAccountImpl.fromJson(Map json) => _$$DeleteAccountImplFromJson(json); @override final String password; -// v0.18.0 + // v0.18.0 @override final bool? deleteContent; -// v0.19.0 (required) + // v0.19.0 (required) @override final String? auth; @@ -3681,10 +3250,8 @@ class _$DeleteAccountImpl extends _DeleteAccount { return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeleteAccountImpl && - (identical(other.password, password) || - other.password == password) && - (identical(other.deleteContent, deleteContent) || - other.deleteContent == deleteContent) && + (identical(other.password, password) || other.password == password) && + (identical(other.deleteContent, deleteContent) || other.deleteContent == deleteContent) && (identical(other.auth, auth) || other.auth == auth)); } @@ -3697,26 +3264,19 @@ class _$DeleteAccountImpl extends _DeleteAccount { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteAccountImplCopyWith<_$DeleteAccountImpl> get copyWith => - __$$DeleteAccountImplCopyWithImpl<_$DeleteAccountImpl>(this, _$identity); + _$$DeleteAccountImplCopyWith<_$DeleteAccountImpl> get copyWith => __$$DeleteAccountImplCopyWithImpl<_$DeleteAccountImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteAccountImplToJson( - this, - ); + return _$$DeleteAccountImplToJson(this); } } abstract class _DeleteAccount extends DeleteAccount { - const factory _DeleteAccount( - {required final String password, - final bool? deleteContent, - final String? auth}) = _$DeleteAccountImpl; + const factory _DeleteAccount({required final String password, final bool? deleteContent, final String? auth}) = _$DeleteAccountImpl; const _DeleteAccount._() : super._(); - factory _DeleteAccount.fromJson(Map json) = - _$DeleteAccountImpl.fromJson; + factory _DeleteAccount.fromJson(Map json) = _$DeleteAccountImpl.fromJson; @override String get password; // v0.18.0 @@ -3729,8 +3289,7 @@ abstract class _DeleteAccount extends DeleteAccount { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteAccountImplCopyWith<_$DeleteAccountImpl> get copyWith => - throw _privateConstructorUsedError; + _$$DeleteAccountImplCopyWith<_$DeleteAccountImpl> get copyWith => throw _privateConstructorUsedError; } PasswordReset _$PasswordResetFromJson(Map json) { @@ -3747,22 +3306,18 @@ mixin _$PasswordReset { /// Create a copy of PasswordReset /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PasswordResetCopyWith get copyWith => - throw _privateConstructorUsedError; + $PasswordResetCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PasswordResetCopyWith<$Res> { - factory $PasswordResetCopyWith( - PasswordReset value, $Res Function(PasswordReset) then) = - _$PasswordResetCopyWithImpl<$Res, PasswordReset>; + factory $PasswordResetCopyWith(PasswordReset value, $Res Function(PasswordReset) then) = _$PasswordResetCopyWithImpl<$Res, PasswordReset>; @useResult $Res call({String email}); } /// @nodoc -class _$PasswordResetCopyWithImpl<$Res, $Val extends PasswordReset> - implements $PasswordResetCopyWith<$Res> { +class _$PasswordResetCopyWithImpl<$Res, $Val extends PasswordReset> implements $PasswordResetCopyWith<$Res> { _$PasswordResetCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3774,50 +3329,46 @@ class _$PasswordResetCopyWithImpl<$Res, $Val extends PasswordReset> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? email = null, - }) { - return _then(_value.copyWith( - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? email = null}) { + return _then( + _value.copyWith( + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PasswordResetImplCopyWith<$Res> - implements $PasswordResetCopyWith<$Res> { - factory _$$PasswordResetImplCopyWith( - _$PasswordResetImpl value, $Res Function(_$PasswordResetImpl) then) = - __$$PasswordResetImplCopyWithImpl<$Res>; +abstract class _$$PasswordResetImplCopyWith<$Res> implements $PasswordResetCopyWith<$Res> { + factory _$$PasswordResetImplCopyWith(_$PasswordResetImpl value, $Res Function(_$PasswordResetImpl) then) = __$$PasswordResetImplCopyWithImpl<$Res>; @override @useResult $Res call({String email}); } /// @nodoc -class __$$PasswordResetImplCopyWithImpl<$Res> - extends _$PasswordResetCopyWithImpl<$Res, _$PasswordResetImpl> - implements _$$PasswordResetImplCopyWith<$Res> { - __$$PasswordResetImplCopyWithImpl( - _$PasswordResetImpl _value, $Res Function(_$PasswordResetImpl) _then) - : super(_value, _then); +class __$$PasswordResetImplCopyWithImpl<$Res> extends _$PasswordResetCopyWithImpl<$Res, _$PasswordResetImpl> implements _$$PasswordResetImplCopyWith<$Res> { + __$$PasswordResetImplCopyWithImpl(_$PasswordResetImpl _value, $Res Function(_$PasswordResetImpl) _then) : super(_value, _then); /// Create a copy of PasswordReset /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? email = null, - }) { - return _then(_$PasswordResetImpl( - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? email = null}) { + return _then( + _$PasswordResetImpl( + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -3827,8 +3378,7 @@ class __$$PasswordResetImplCopyWithImpl<$Res> class _$PasswordResetImpl extends _PasswordReset { const _$PasswordResetImpl({required this.email}) : super._(); - factory _$PasswordResetImpl.fromJson(Map json) => - _$$PasswordResetImplFromJson(json); + factory _$PasswordResetImpl.fromJson(Map json) => _$$PasswordResetImplFromJson(json); @override final String email; @@ -3840,10 +3390,7 @@ class _$PasswordResetImpl extends _PasswordReset { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PasswordResetImpl && - (identical(other.email, email) || other.email == email)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$PasswordResetImpl && (identical(other.email, email) || other.email == email)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -3855,24 +3402,19 @@ class _$PasswordResetImpl extends _PasswordReset { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PasswordResetImplCopyWith<_$PasswordResetImpl> get copyWith => - __$$PasswordResetImplCopyWithImpl<_$PasswordResetImpl>(this, _$identity); + _$$PasswordResetImplCopyWith<_$PasswordResetImpl> get copyWith => __$$PasswordResetImplCopyWithImpl<_$PasswordResetImpl>(this, _$identity); @override Map toJson() { - return _$$PasswordResetImplToJson( - this, - ); + return _$$PasswordResetImplToJson(this); } } abstract class _PasswordReset extends PasswordReset { - const factory _PasswordReset({required final String email}) = - _$PasswordResetImpl; + const factory _PasswordReset({required final String email}) = _$PasswordResetImpl; const _PasswordReset._() : super._(); - factory _PasswordReset.fromJson(Map json) = - _$PasswordResetImpl.fromJson; + factory _PasswordReset.fromJson(Map json) = _$PasswordResetImpl.fromJson; @override String get email; @@ -3881,12 +3423,10 @@ abstract class _PasswordReset extends PasswordReset { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PasswordResetImplCopyWith<_$PasswordResetImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PasswordResetImplCopyWith<_$PasswordResetImpl> get copyWith => throw _privateConstructorUsedError; } -PasswordChangeAfterReset _$PasswordChangeAfterResetFromJson( - Map json) { +PasswordChangeAfterReset _$PasswordChangeAfterResetFromJson(Map json) { return _PasswordChangeAfterReset.fromJson(json); } @@ -3902,23 +3442,18 @@ mixin _$PasswordChangeAfterReset { /// Create a copy of PasswordChangeAfterReset /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PasswordChangeAfterResetCopyWith get copyWith => - throw _privateConstructorUsedError; + $PasswordChangeAfterResetCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PasswordChangeAfterResetCopyWith<$Res> { - factory $PasswordChangeAfterResetCopyWith(PasswordChangeAfterReset value, - $Res Function(PasswordChangeAfterReset) then) = - _$PasswordChangeAfterResetCopyWithImpl<$Res, PasswordChangeAfterReset>; + factory $PasswordChangeAfterResetCopyWith(PasswordChangeAfterReset value, $Res Function(PasswordChangeAfterReset) then) = _$PasswordChangeAfterResetCopyWithImpl<$Res, PasswordChangeAfterReset>; @useResult $Res call({String token, String password, String passwordVerify}); } /// @nodoc -class _$PasswordChangeAfterResetCopyWithImpl<$Res, - $Val extends PasswordChangeAfterReset> - implements $PasswordChangeAfterResetCopyWith<$Res> { +class _$PasswordChangeAfterResetCopyWithImpl<$Res, $Val extends PasswordChangeAfterReset> implements $PasswordChangeAfterResetCopyWith<$Res> { _$PasswordChangeAfterResetCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -3930,73 +3465,66 @@ class _$PasswordChangeAfterResetCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - Object? password = null, - Object? passwordVerify = null, - }) { - return _then(_value.copyWith( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordVerify: null == passwordVerify - ? _value.passwordVerify - : passwordVerify // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$PasswordChangeAfterResetImplCopyWith<$Res> - implements $PasswordChangeAfterResetCopyWith<$Res> { - factory _$$PasswordChangeAfterResetImplCopyWith( - _$PasswordChangeAfterResetImpl value, - $Res Function(_$PasswordChangeAfterResetImpl) then) = - __$$PasswordChangeAfterResetImplCopyWithImpl<$Res>; + $Res call({Object? token = null, Object? password = null, Object? passwordVerify = null}) { + return _then( + _value.copyWith( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordVerify: + null == passwordVerify + ? _value.passwordVerify + : passwordVerify // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$PasswordChangeAfterResetImplCopyWith<$Res> implements $PasswordChangeAfterResetCopyWith<$Res> { + factory _$$PasswordChangeAfterResetImplCopyWith(_$PasswordChangeAfterResetImpl value, $Res Function(_$PasswordChangeAfterResetImpl) then) = __$$PasswordChangeAfterResetImplCopyWithImpl<$Res>; @override @useResult $Res call({String token, String password, String passwordVerify}); } /// @nodoc -class __$$PasswordChangeAfterResetImplCopyWithImpl<$Res> - extends _$PasswordChangeAfterResetCopyWithImpl<$Res, - _$PasswordChangeAfterResetImpl> - implements _$$PasswordChangeAfterResetImplCopyWith<$Res> { - __$$PasswordChangeAfterResetImplCopyWithImpl( - _$PasswordChangeAfterResetImpl _value, - $Res Function(_$PasswordChangeAfterResetImpl) _then) - : super(_value, _then); +class __$$PasswordChangeAfterResetImplCopyWithImpl<$Res> extends _$PasswordChangeAfterResetCopyWithImpl<$Res, _$PasswordChangeAfterResetImpl> implements _$$PasswordChangeAfterResetImplCopyWith<$Res> { + __$$PasswordChangeAfterResetImplCopyWithImpl(_$PasswordChangeAfterResetImpl _value, $Res Function(_$PasswordChangeAfterResetImpl) _then) : super(_value, _then); /// Create a copy of PasswordChangeAfterReset /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - Object? password = null, - Object? passwordVerify = null, - }) { - return _then(_$PasswordChangeAfterResetImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordVerify: null == passwordVerify - ? _value.passwordVerify - : passwordVerify // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? token = null, Object? password = null, Object? passwordVerify = null}) { + return _then( + _$PasswordChangeAfterResetImpl( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordVerify: + null == passwordVerify + ? _value.passwordVerify + : passwordVerify // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -4004,21 +3532,16 @@ class __$$PasswordChangeAfterResetImplCopyWithImpl<$Res> @apiSerde class _$PasswordChangeAfterResetImpl extends _PasswordChangeAfterReset { - const _$PasswordChangeAfterResetImpl( - {required this.token, - required this.password, - required this.passwordVerify}) - : super._(); + const _$PasswordChangeAfterResetImpl({required this.token, required this.password, required this.passwordVerify}) : super._(); - factory _$PasswordChangeAfterResetImpl.fromJson(Map json) => - _$$PasswordChangeAfterResetImplFromJson(json); + factory _$PasswordChangeAfterResetImpl.fromJson(Map json) => _$$PasswordChangeAfterResetImplFromJson(json); @override final String token; -// v0.18.0 + // v0.18.0 @override final String password; -// v0.18.0 + // v0.18.0 @override final String passwordVerify; @@ -4033,10 +3556,8 @@ class _$PasswordChangeAfterResetImpl extends _PasswordChangeAfterReset { (other.runtimeType == runtimeType && other is _$PasswordChangeAfterResetImpl && (identical(other.token, token) || other.token == token) && - (identical(other.password, password) || - other.password == password) && - (identical(other.passwordVerify, passwordVerify) || - other.passwordVerify == passwordVerify)); + (identical(other.password, password) || other.password == password) && + (identical(other.passwordVerify, passwordVerify) || other.passwordVerify == passwordVerify)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -4048,27 +3569,19 @@ class _$PasswordChangeAfterResetImpl extends _PasswordChangeAfterReset { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PasswordChangeAfterResetImplCopyWith<_$PasswordChangeAfterResetImpl> - get copyWith => __$$PasswordChangeAfterResetImplCopyWithImpl< - _$PasswordChangeAfterResetImpl>(this, _$identity); + _$$PasswordChangeAfterResetImplCopyWith<_$PasswordChangeAfterResetImpl> get copyWith => __$$PasswordChangeAfterResetImplCopyWithImpl<_$PasswordChangeAfterResetImpl>(this, _$identity); @override Map toJson() { - return _$$PasswordChangeAfterResetImplToJson( - this, - ); + return _$$PasswordChangeAfterResetImplToJson(this); } } abstract class _PasswordChangeAfterReset extends PasswordChangeAfterReset { - const factory _PasswordChangeAfterReset( - {required final String token, - required final String password, - required final String passwordVerify}) = _$PasswordChangeAfterResetImpl; + const factory _PasswordChangeAfterReset({required final String token, required final String password, required final String passwordVerify}) = _$PasswordChangeAfterResetImpl; const _PasswordChangeAfterReset._() : super._(); - factory _PasswordChangeAfterReset.fromJson(Map json) = - _$PasswordChangeAfterResetImpl.fromJson; + factory _PasswordChangeAfterReset.fromJson(Map json) = _$PasswordChangeAfterResetImpl.fromJson; @override String get token; // v0.18.0 @@ -4081,8 +3594,7 @@ abstract class _PasswordChangeAfterReset extends PasswordChangeAfterReset { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PasswordChangeAfterResetImplCopyWith<_$PasswordChangeAfterResetImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PasswordChangeAfterResetImplCopyWith<_$PasswordChangeAfterResetImpl> get copyWith => throw _privateConstructorUsedError; } MarkAllAsRead _$MarkAllAsReadFromJson(Map json) { @@ -4099,22 +3611,18 @@ mixin _$MarkAllAsRead { /// Create a copy of MarkAllAsRead /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkAllAsReadCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkAllAsReadCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkAllAsReadCopyWith<$Res> { - factory $MarkAllAsReadCopyWith( - MarkAllAsRead value, $Res Function(MarkAllAsRead) then) = - _$MarkAllAsReadCopyWithImpl<$Res, MarkAllAsRead>; + factory $MarkAllAsReadCopyWith(MarkAllAsRead value, $Res Function(MarkAllAsRead) then) = _$MarkAllAsReadCopyWithImpl<$Res, MarkAllAsRead>; @useResult $Res call({String? auth}); } /// @nodoc -class _$MarkAllAsReadCopyWithImpl<$Res, $Val extends MarkAllAsRead> - implements $MarkAllAsReadCopyWith<$Res> { +class _$MarkAllAsReadCopyWithImpl<$Res, $Val extends MarkAllAsRead> implements $MarkAllAsReadCopyWith<$Res> { _$MarkAllAsReadCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -4126,50 +3634,46 @@ class _$MarkAllAsReadCopyWithImpl<$Res, $Val extends MarkAllAsRead> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$MarkAllAsReadImplCopyWith<$Res> - implements $MarkAllAsReadCopyWith<$Res> { - factory _$$MarkAllAsReadImplCopyWith( - _$MarkAllAsReadImpl value, $Res Function(_$MarkAllAsReadImpl) then) = - __$$MarkAllAsReadImplCopyWithImpl<$Res>; +abstract class _$$MarkAllAsReadImplCopyWith<$Res> implements $MarkAllAsReadCopyWith<$Res> { + factory _$$MarkAllAsReadImplCopyWith(_$MarkAllAsReadImpl value, $Res Function(_$MarkAllAsReadImpl) then) = __$$MarkAllAsReadImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$MarkAllAsReadImplCopyWithImpl<$Res> - extends _$MarkAllAsReadCopyWithImpl<$Res, _$MarkAllAsReadImpl> - implements _$$MarkAllAsReadImplCopyWith<$Res> { - __$$MarkAllAsReadImplCopyWithImpl( - _$MarkAllAsReadImpl _value, $Res Function(_$MarkAllAsReadImpl) _then) - : super(_value, _then); +class __$$MarkAllAsReadImplCopyWithImpl<$Res> extends _$MarkAllAsReadCopyWithImpl<$Res, _$MarkAllAsReadImpl> implements _$$MarkAllAsReadImplCopyWith<$Res> { + __$$MarkAllAsReadImplCopyWithImpl(_$MarkAllAsReadImpl _value, $Res Function(_$MarkAllAsReadImpl) _then) : super(_value, _then); /// Create a copy of MarkAllAsRead /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$MarkAllAsReadImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$MarkAllAsReadImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -4179,8 +3683,7 @@ class __$$MarkAllAsReadImplCopyWithImpl<$Res> class _$MarkAllAsReadImpl extends _MarkAllAsRead { const _$MarkAllAsReadImpl({this.auth}) : super._(); - factory _$MarkAllAsReadImpl.fromJson(Map json) => - _$$MarkAllAsReadImplFromJson(json); + factory _$MarkAllAsReadImpl.fromJson(Map json) => _$$MarkAllAsReadImplFromJson(json); @override final String? auth; @@ -4192,10 +3695,7 @@ class _$MarkAllAsReadImpl extends _MarkAllAsRead { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$MarkAllAsReadImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$MarkAllAsReadImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -4207,14 +3707,11 @@ class _$MarkAllAsReadImpl extends _MarkAllAsRead { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkAllAsReadImplCopyWith<_$MarkAllAsReadImpl> get copyWith => - __$$MarkAllAsReadImplCopyWithImpl<_$MarkAllAsReadImpl>(this, _$identity); + _$$MarkAllAsReadImplCopyWith<_$MarkAllAsReadImpl> get copyWith => __$$MarkAllAsReadImplCopyWithImpl<_$MarkAllAsReadImpl>(this, _$identity); @override Map toJson() { - return _$$MarkAllAsReadImplToJson( - this, - ); + return _$$MarkAllAsReadImplToJson(this); } } @@ -4222,8 +3719,7 @@ abstract class _MarkAllAsRead extends MarkAllAsRead { const factory _MarkAllAsRead({final String? auth}) = _$MarkAllAsReadImpl; const _MarkAllAsRead._() : super._(); - factory _MarkAllAsRead.fromJson(Map json) = - _$MarkAllAsReadImpl.fromJson; + factory _MarkAllAsRead.fromJson(Map json) = _$MarkAllAsReadImpl.fromJson; @override String? get auth; @@ -4232,8 +3728,7 @@ abstract class _MarkAllAsRead extends MarkAllAsRead { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkAllAsReadImplCopyWith<_$MarkAllAsReadImpl> get copyWith => - throw _privateConstructorUsedError; + _$$MarkAllAsReadImplCopyWith<_$MarkAllAsReadImpl> get copyWith => throw _privateConstructorUsedError; } SaveUserSettings _$SaveUserSettingsFromJson(Map json) { @@ -4246,12 +3741,9 @@ mixin _$SaveUserSettings { bool? get blurNsfw => throw _privateConstructorUsedError; // v0.18.3 bool? get autoExpand => throw _privateConstructorUsedError; // v0.18.3 String? get theme => throw _privateConstructorUsedError; // v0.18.0 - SortType? get defaultSortType => - throw _privateConstructorUsedError; // v0.18.0 - ListingType? get defaultListingType => - throw _privateConstructorUsedError; // v0.18.0 - String? get interfaceLanguage => - throw _privateConstructorUsedError; // v0.18.0 + SortType? get defaultSortType => throw _privateConstructorUsedError; // v0.18.0 + ListingType? get defaultListingType => throw _privateConstructorUsedError; // v0.18.0 + String? get interfaceLanguage => throw _privateConstructorUsedError; // v0.18.0 String? get avatar => throw _privateConstructorUsedError; // v0.18.0 String? get banner => throw _privateConstructorUsedError; // v0.18.0 String? get displayName => throw _privateConstructorUsedError; // v0.18.0 @@ -4259,37 +3751,25 @@ mixin _$SaveUserSettings { String? get bio => throw _privateConstructorUsedError; // v0.18.0 String? get matrixUserId => throw _privateConstructorUsedError; // v0.18.0 bool? get showAvatars => throw _privateConstructorUsedError; // v0.18.0 - bool? get sendNotificationsToEmail => - throw _privateConstructorUsedError; // v0.18.0 + bool? get sendNotificationsToEmail => throw _privateConstructorUsedError; // v0.18.0 bool? get botAccount => throw _privateConstructorUsedError; // v0.18.0 bool? get showBotAccounts => throw _privateConstructorUsedError; // v0.18.0 bool? get showReadPosts => throw _privateConstructorUsedError; // v0.18.0 @deprecated - bool? get showNewPostNotifs => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] - List? get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 + bool? get showNewPostNotifs => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + List? get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 @deprecated - bool? get generateTotp2fa => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + bool? get generateTotp2fa => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] String? get auth => throw _privateConstructorUsedError; bool? get openLinksInNewTab => throw _privateConstructorUsedError; // v0.18.1 - bool? get infiniteScrollEnabled => - throw _privateConstructorUsedError; // v0.19.0 (optional) - String? get postListingMode => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get enableKeyboardNavigation => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get enableAnimatedImages => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get collapseBotComments => - throw _privateConstructorUsedError; // v0.19.0 (optional) - bool? get showScores => - throw _privateConstructorUsedError; // v0.18.0 (optional) - bool? get showUpvotes => - throw _privateConstructorUsedError; // v0.19.4 (optional) - bool? get showDownvotes => - throw _privateConstructorUsedError; // v0.19.4 (optional) + bool? get infiniteScrollEnabled => throw _privateConstructorUsedError; // v0.19.0 (optional) + String? get postListingMode => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get enableKeyboardNavigation => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get enableAnimatedImages => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get collapseBotComments => throw _privateConstructorUsedError; // v0.19.0 (optional) + bool? get showScores => throw _privateConstructorUsedError; // v0.18.0 (optional) + bool? get showUpvotes => throw _privateConstructorUsedError; // v0.19.4 (optional) + bool? get showDownvotes => throw _privateConstructorUsedError; // v0.19.4 (optional) bool? get showUpvotePercentage => throw _privateConstructorUsedError; /// Serializes this SaveUserSettings to a JSON map. @@ -4298,54 +3778,51 @@ mixin _$SaveUserSettings { /// Create a copy of SaveUserSettings /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SaveUserSettingsCopyWith get copyWith => - throw _privateConstructorUsedError; + $SaveUserSettingsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SaveUserSettingsCopyWith<$Res> { - factory $SaveUserSettingsCopyWith( - SaveUserSettings value, $Res Function(SaveUserSettings) then) = - _$SaveUserSettingsCopyWithImpl<$Res, SaveUserSettings>; + factory $SaveUserSettingsCopyWith(SaveUserSettings value, $Res Function(SaveUserSettings) then) = _$SaveUserSettingsCopyWithImpl<$Res, SaveUserSettings>; @useResult - $Res call( - {bool? showNsfw, - bool? blurNsfw, - bool? autoExpand, - String? theme, - SortType? defaultSortType, - ListingType? defaultListingType, - String? interfaceLanguage, - String? avatar, - String? banner, - String? displayName, - String? email, - String? bio, - String? matrixUserId, - bool? showAvatars, - bool? sendNotificationsToEmail, - bool? botAccount, - bool? showBotAccounts, - bool? showReadPosts, - @deprecated bool? showNewPostNotifs, - List? discussionLanguages, - @deprecated bool? generateTotp2fa, - String? auth, - bool? openLinksInNewTab, - bool? infiniteScrollEnabled, - String? postListingMode, - bool? enableKeyboardNavigation, - bool? enableAnimatedImages, - bool? collapseBotComments, - bool? showScores, - bool? showUpvotes, - bool? showDownvotes, - bool? showUpvotePercentage}); -} - -/// @nodoc -class _$SaveUserSettingsCopyWithImpl<$Res, $Val extends SaveUserSettings> - implements $SaveUserSettingsCopyWith<$Res> { + $Res call({ + bool? showNsfw, + bool? blurNsfw, + bool? autoExpand, + String? theme, + SortType? defaultSortType, + ListingType? defaultListingType, + String? interfaceLanguage, + String? avatar, + String? banner, + String? displayName, + String? email, + String? bio, + String? matrixUserId, + bool? showAvatars, + bool? sendNotificationsToEmail, + bool? botAccount, + bool? showBotAccounts, + bool? showReadPosts, + @deprecated bool? showNewPostNotifs, + List? discussionLanguages, + @deprecated bool? generateTotp2fa, + String? auth, + bool? openLinksInNewTab, + bool? infiniteScrollEnabled, + String? postListingMode, + bool? enableKeyboardNavigation, + bool? enableAnimatedImages, + bool? collapseBotComments, + bool? showScores, + bool? showUpvotes, + bool? showDownvotes, + bool? showUpvotePercentage, + }); +} + +/// @nodoc +class _$SaveUserSettingsCopyWithImpl<$Res, $Val extends SaveUserSettings> implements $SaveUserSettingsCopyWith<$Res> { _$SaveUserSettingsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -4391,189 +3868,218 @@ class _$SaveUserSettingsCopyWithImpl<$Res, $Val extends SaveUserSettings> Object? showDownvotes = freezed, Object? showUpvotePercentage = freezed, }) { - return _then(_value.copyWith( - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - blurNsfw: freezed == blurNsfw - ? _value.blurNsfw - : blurNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoExpand: freezed == autoExpand - ? _value.autoExpand - : autoExpand // ignore: cast_nullable_to_non_nullable - as bool?, - theme: freezed == theme - ? _value.theme - : theme // ignore: cast_nullable_to_non_nullable - as String?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - defaultListingType: freezed == defaultListingType - ? _value.defaultListingType - : defaultListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - interfaceLanguage: freezed == interfaceLanguage - ? _value.interfaceLanguage - : interfaceLanguage // ignore: cast_nullable_to_non_nullable - as String?, - avatar: freezed == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - displayName: freezed == displayName - ? _value.displayName - : displayName // ignore: cast_nullable_to_non_nullable - as String?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - bio: freezed == bio - ? _value.bio - : bio // ignore: cast_nullable_to_non_nullable - as String?, - matrixUserId: freezed == matrixUserId - ? _value.matrixUserId - : matrixUserId // ignore: cast_nullable_to_non_nullable - as String?, - showAvatars: freezed == showAvatars - ? _value.showAvatars - : showAvatars // ignore: cast_nullable_to_non_nullable - as bool?, - sendNotificationsToEmail: freezed == sendNotificationsToEmail - ? _value.sendNotificationsToEmail - : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable - as bool?, - botAccount: freezed == botAccount - ? _value.botAccount - : botAccount // ignore: cast_nullable_to_non_nullable - as bool?, - showBotAccounts: freezed == showBotAccounts - ? _value.showBotAccounts - : showBotAccounts // ignore: cast_nullable_to_non_nullable - as bool?, - showReadPosts: freezed == showReadPosts - ? _value.showReadPosts - : showReadPosts // ignore: cast_nullable_to_non_nullable - as bool?, - showNewPostNotifs: freezed == showNewPostNotifs - ? _value.showNewPostNotifs - : showNewPostNotifs // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - generateTotp2fa: freezed == generateTotp2fa - ? _value.generateTotp2fa - : generateTotp2fa // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - openLinksInNewTab: freezed == openLinksInNewTab - ? _value.openLinksInNewTab - : openLinksInNewTab // ignore: cast_nullable_to_non_nullable - as bool?, - infiniteScrollEnabled: freezed == infiniteScrollEnabled - ? _value.infiniteScrollEnabled - : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - postListingMode: freezed == postListingMode - ? _value.postListingMode - : postListingMode // ignore: cast_nullable_to_non_nullable - as String?, - enableKeyboardNavigation: freezed == enableKeyboardNavigation - ? _value.enableKeyboardNavigation - : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable - as bool?, - enableAnimatedImages: freezed == enableAnimatedImages - ? _value.enableAnimatedImages - : enableAnimatedImages // ignore: cast_nullable_to_non_nullable - as bool?, - collapseBotComments: freezed == collapseBotComments - ? _value.collapseBotComments - : collapseBotComments // ignore: cast_nullable_to_non_nullable - as bool?, - showScores: freezed == showScores - ? _value.showScores - : showScores // ignore: cast_nullable_to_non_nullable - as bool?, - showUpvotes: freezed == showUpvotes - ? _value.showUpvotes - : showUpvotes // ignore: cast_nullable_to_non_nullable - as bool?, - showDownvotes: freezed == showDownvotes - ? _value.showDownvotes - : showDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - showUpvotePercentage: freezed == showUpvotePercentage - ? _value.showUpvotePercentage - : showUpvotePercentage // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$SaveUserSettingsImplCopyWith<$Res> - implements $SaveUserSettingsCopyWith<$Res> { - factory _$$SaveUserSettingsImplCopyWith(_$SaveUserSettingsImpl value, - $Res Function(_$SaveUserSettingsImpl) then) = - __$$SaveUserSettingsImplCopyWithImpl<$Res>; + return _then( + _value.copyWith( + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + blurNsfw: + freezed == blurNsfw + ? _value.blurNsfw + : blurNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + autoExpand: + freezed == autoExpand + ? _value.autoExpand + : autoExpand // ignore: cast_nullable_to_non_nullable + as bool?, + theme: + freezed == theme + ? _value.theme + : theme // ignore: cast_nullable_to_non_nullable + as String?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + defaultListingType: + freezed == defaultListingType + ? _value.defaultListingType + : defaultListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + interfaceLanguage: + freezed == interfaceLanguage + ? _value.interfaceLanguage + : interfaceLanguage // ignore: cast_nullable_to_non_nullable + as String?, + avatar: + freezed == avatar + ? _value.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + displayName: + freezed == displayName + ? _value.displayName + : displayName // ignore: cast_nullable_to_non_nullable + as String?, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + bio: + freezed == bio + ? _value.bio + : bio // ignore: cast_nullable_to_non_nullable + as String?, + matrixUserId: + freezed == matrixUserId + ? _value.matrixUserId + : matrixUserId // ignore: cast_nullable_to_non_nullable + as String?, + showAvatars: + freezed == showAvatars + ? _value.showAvatars + : showAvatars // ignore: cast_nullable_to_non_nullable + as bool?, + sendNotificationsToEmail: + freezed == sendNotificationsToEmail + ? _value.sendNotificationsToEmail + : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable + as bool?, + botAccount: + freezed == botAccount + ? _value.botAccount + : botAccount // ignore: cast_nullable_to_non_nullable + as bool?, + showBotAccounts: + freezed == showBotAccounts + ? _value.showBotAccounts + : showBotAccounts // ignore: cast_nullable_to_non_nullable + as bool?, + showReadPosts: + freezed == showReadPosts + ? _value.showReadPosts + : showReadPosts // ignore: cast_nullable_to_non_nullable + as bool?, + showNewPostNotifs: + freezed == showNewPostNotifs + ? _value.showNewPostNotifs + : showNewPostNotifs // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + generateTotp2fa: + freezed == generateTotp2fa + ? _value.generateTotp2fa + : generateTotp2fa // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + openLinksInNewTab: + freezed == openLinksInNewTab + ? _value.openLinksInNewTab + : openLinksInNewTab // ignore: cast_nullable_to_non_nullable + as bool?, + infiniteScrollEnabled: + freezed == infiniteScrollEnabled + ? _value.infiniteScrollEnabled + : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + postListingMode: + freezed == postListingMode + ? _value.postListingMode + : postListingMode // ignore: cast_nullable_to_non_nullable + as String?, + enableKeyboardNavigation: + freezed == enableKeyboardNavigation + ? _value.enableKeyboardNavigation + : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable + as bool?, + enableAnimatedImages: + freezed == enableAnimatedImages + ? _value.enableAnimatedImages + : enableAnimatedImages // ignore: cast_nullable_to_non_nullable + as bool?, + collapseBotComments: + freezed == collapseBotComments + ? _value.collapseBotComments + : collapseBotComments // ignore: cast_nullable_to_non_nullable + as bool?, + showScores: + freezed == showScores + ? _value.showScores + : showScores // ignore: cast_nullable_to_non_nullable + as bool?, + showUpvotes: + freezed == showUpvotes + ? _value.showUpvotes + : showUpvotes // ignore: cast_nullable_to_non_nullable + as bool?, + showDownvotes: + freezed == showDownvotes + ? _value.showDownvotes + : showDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + showUpvotePercentage: + freezed == showUpvotePercentage + ? _value.showUpvotePercentage + : showUpvotePercentage // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$SaveUserSettingsImplCopyWith<$Res> implements $SaveUserSettingsCopyWith<$Res> { + factory _$$SaveUserSettingsImplCopyWith(_$SaveUserSettingsImpl value, $Res Function(_$SaveUserSettingsImpl) then) = __$$SaveUserSettingsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool? showNsfw, - bool? blurNsfw, - bool? autoExpand, - String? theme, - SortType? defaultSortType, - ListingType? defaultListingType, - String? interfaceLanguage, - String? avatar, - String? banner, - String? displayName, - String? email, - String? bio, - String? matrixUserId, - bool? showAvatars, - bool? sendNotificationsToEmail, - bool? botAccount, - bool? showBotAccounts, - bool? showReadPosts, - @deprecated bool? showNewPostNotifs, - List? discussionLanguages, - @deprecated bool? generateTotp2fa, - String? auth, - bool? openLinksInNewTab, - bool? infiniteScrollEnabled, - String? postListingMode, - bool? enableKeyboardNavigation, - bool? enableAnimatedImages, - bool? collapseBotComments, - bool? showScores, - bool? showUpvotes, - bool? showDownvotes, - bool? showUpvotePercentage}); -} - -/// @nodoc -class __$$SaveUserSettingsImplCopyWithImpl<$Res> - extends _$SaveUserSettingsCopyWithImpl<$Res, _$SaveUserSettingsImpl> - implements _$$SaveUserSettingsImplCopyWith<$Res> { - __$$SaveUserSettingsImplCopyWithImpl(_$SaveUserSettingsImpl _value, - $Res Function(_$SaveUserSettingsImpl) _then) - : super(_value, _then); + $Res call({ + bool? showNsfw, + bool? blurNsfw, + bool? autoExpand, + String? theme, + SortType? defaultSortType, + ListingType? defaultListingType, + String? interfaceLanguage, + String? avatar, + String? banner, + String? displayName, + String? email, + String? bio, + String? matrixUserId, + bool? showAvatars, + bool? sendNotificationsToEmail, + bool? botAccount, + bool? showBotAccounts, + bool? showReadPosts, + @deprecated bool? showNewPostNotifs, + List? discussionLanguages, + @deprecated bool? generateTotp2fa, + String? auth, + bool? openLinksInNewTab, + bool? infiniteScrollEnabled, + String? postListingMode, + bool? enableKeyboardNavigation, + bool? enableAnimatedImages, + bool? collapseBotComments, + bool? showScores, + bool? showUpvotes, + bool? showDownvotes, + bool? showUpvotePercentage, + }); +} + +/// @nodoc +class __$$SaveUserSettingsImplCopyWithImpl<$Res> extends _$SaveUserSettingsCopyWithImpl<$Res, _$SaveUserSettingsImpl> implements _$$SaveUserSettingsImplCopyWith<$Res> { + __$$SaveUserSettingsImplCopyWithImpl(_$SaveUserSettingsImpl _value, $Res Function(_$SaveUserSettingsImpl) _then) : super(_value, _then); /// Create a copy of SaveUserSettings /// with the given fields replaced by the non-null parameter values. @@ -4613,136 +4119,170 @@ class __$$SaveUserSettingsImplCopyWithImpl<$Res> Object? showDownvotes = freezed, Object? showUpvotePercentage = freezed, }) { - return _then(_$SaveUserSettingsImpl( - showNsfw: freezed == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - blurNsfw: freezed == blurNsfw - ? _value.blurNsfw - : blurNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoExpand: freezed == autoExpand - ? _value.autoExpand - : autoExpand // ignore: cast_nullable_to_non_nullable - as bool?, - theme: freezed == theme - ? _value.theme - : theme // ignore: cast_nullable_to_non_nullable - as String?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - defaultListingType: freezed == defaultListingType - ? _value.defaultListingType - : defaultListingType // ignore: cast_nullable_to_non_nullable - as ListingType?, - interfaceLanguage: freezed == interfaceLanguage - ? _value.interfaceLanguage - : interfaceLanguage // ignore: cast_nullable_to_non_nullable - as String?, - avatar: freezed == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - displayName: freezed == displayName - ? _value.displayName - : displayName // ignore: cast_nullable_to_non_nullable - as String?, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - bio: freezed == bio - ? _value.bio - : bio // ignore: cast_nullable_to_non_nullable - as String?, - matrixUserId: freezed == matrixUserId - ? _value.matrixUserId - : matrixUserId // ignore: cast_nullable_to_non_nullable - as String?, - showAvatars: freezed == showAvatars - ? _value.showAvatars - : showAvatars // ignore: cast_nullable_to_non_nullable - as bool?, - sendNotificationsToEmail: freezed == sendNotificationsToEmail - ? _value.sendNotificationsToEmail - : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable - as bool?, - botAccount: freezed == botAccount - ? _value.botAccount - : botAccount // ignore: cast_nullable_to_non_nullable - as bool?, - showBotAccounts: freezed == showBotAccounts - ? _value.showBotAccounts - : showBotAccounts // ignore: cast_nullable_to_non_nullable - as bool?, - showReadPosts: freezed == showReadPosts - ? _value.showReadPosts - : showReadPosts // ignore: cast_nullable_to_non_nullable - as bool?, - showNewPostNotifs: freezed == showNewPostNotifs - ? _value.showNewPostNotifs - : showNewPostNotifs // ignore: cast_nullable_to_non_nullable - as bool?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - generateTotp2fa: freezed == generateTotp2fa - ? _value.generateTotp2fa - : generateTotp2fa // ignore: cast_nullable_to_non_nullable - as bool?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - openLinksInNewTab: freezed == openLinksInNewTab - ? _value.openLinksInNewTab - : openLinksInNewTab // ignore: cast_nullable_to_non_nullable - as bool?, - infiniteScrollEnabled: freezed == infiniteScrollEnabled - ? _value.infiniteScrollEnabled - : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - postListingMode: freezed == postListingMode - ? _value.postListingMode - : postListingMode // ignore: cast_nullable_to_non_nullable - as String?, - enableKeyboardNavigation: freezed == enableKeyboardNavigation - ? _value.enableKeyboardNavigation - : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable - as bool?, - enableAnimatedImages: freezed == enableAnimatedImages - ? _value.enableAnimatedImages - : enableAnimatedImages // ignore: cast_nullable_to_non_nullable - as bool?, - collapseBotComments: freezed == collapseBotComments - ? _value.collapseBotComments - : collapseBotComments // ignore: cast_nullable_to_non_nullable - as bool?, - showScores: freezed == showScores - ? _value.showScores - : showScores // ignore: cast_nullable_to_non_nullable - as bool?, - showUpvotes: freezed == showUpvotes - ? _value.showUpvotes - : showUpvotes // ignore: cast_nullable_to_non_nullable - as bool?, - showDownvotes: freezed == showDownvotes - ? _value.showDownvotes - : showDownvotes // ignore: cast_nullable_to_non_nullable - as bool?, - showUpvotePercentage: freezed == showUpvotePercentage - ? _value.showUpvotePercentage - : showUpvotePercentage // ignore: cast_nullable_to_non_nullable - as bool?, - )); + return _then( + _$SaveUserSettingsImpl( + showNsfw: + freezed == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + blurNsfw: + freezed == blurNsfw + ? _value.blurNsfw + : blurNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + autoExpand: + freezed == autoExpand + ? _value.autoExpand + : autoExpand // ignore: cast_nullable_to_non_nullable + as bool?, + theme: + freezed == theme + ? _value.theme + : theme // ignore: cast_nullable_to_non_nullable + as String?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + defaultListingType: + freezed == defaultListingType + ? _value.defaultListingType + : defaultListingType // ignore: cast_nullable_to_non_nullable + as ListingType?, + interfaceLanguage: + freezed == interfaceLanguage + ? _value.interfaceLanguage + : interfaceLanguage // ignore: cast_nullable_to_non_nullable + as String?, + avatar: + freezed == avatar + ? _value.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + displayName: + freezed == displayName + ? _value.displayName + : displayName // ignore: cast_nullable_to_non_nullable + as String?, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + bio: + freezed == bio + ? _value.bio + : bio // ignore: cast_nullable_to_non_nullable + as String?, + matrixUserId: + freezed == matrixUserId + ? _value.matrixUserId + : matrixUserId // ignore: cast_nullable_to_non_nullable + as String?, + showAvatars: + freezed == showAvatars + ? _value.showAvatars + : showAvatars // ignore: cast_nullable_to_non_nullable + as bool?, + sendNotificationsToEmail: + freezed == sendNotificationsToEmail + ? _value.sendNotificationsToEmail + : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable + as bool?, + botAccount: + freezed == botAccount + ? _value.botAccount + : botAccount // ignore: cast_nullable_to_non_nullable + as bool?, + showBotAccounts: + freezed == showBotAccounts + ? _value.showBotAccounts + : showBotAccounts // ignore: cast_nullable_to_non_nullable + as bool?, + showReadPosts: + freezed == showReadPosts + ? _value.showReadPosts + : showReadPosts // ignore: cast_nullable_to_non_nullable + as bool?, + showNewPostNotifs: + freezed == showNewPostNotifs + ? _value.showNewPostNotifs + : showNewPostNotifs // ignore: cast_nullable_to_non_nullable + as bool?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + generateTotp2fa: + freezed == generateTotp2fa + ? _value.generateTotp2fa + : generateTotp2fa // ignore: cast_nullable_to_non_nullable + as bool?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + openLinksInNewTab: + freezed == openLinksInNewTab + ? _value.openLinksInNewTab + : openLinksInNewTab // ignore: cast_nullable_to_non_nullable + as bool?, + infiniteScrollEnabled: + freezed == infiniteScrollEnabled + ? _value.infiniteScrollEnabled + : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + postListingMode: + freezed == postListingMode + ? _value.postListingMode + : postListingMode // ignore: cast_nullable_to_non_nullable + as String?, + enableKeyboardNavigation: + freezed == enableKeyboardNavigation + ? _value.enableKeyboardNavigation + : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable + as bool?, + enableAnimatedImages: + freezed == enableAnimatedImages + ? _value.enableAnimatedImages + : enableAnimatedImages // ignore: cast_nullable_to_non_nullable + as bool?, + collapseBotComments: + freezed == collapseBotComments + ? _value.collapseBotComments + : collapseBotComments // ignore: cast_nullable_to_non_nullable + as bool?, + showScores: + freezed == showScores + ? _value.showScores + : showScores // ignore: cast_nullable_to_non_nullable + as bool?, + showUpvotes: + freezed == showUpvotes + ? _value.showUpvotes + : showUpvotes // ignore: cast_nullable_to_non_nullable + as bool?, + showDownvotes: + freezed == showDownvotes + ? _value.showDownvotes + : showDownvotes // ignore: cast_nullable_to_non_nullable + as bool?, + showUpvotePercentage: + freezed == showUpvotePercentage + ? _value.showUpvotePercentage + : showUpvotePercentage // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -4750,149 +4290,147 @@ class __$$SaveUserSettingsImplCopyWithImpl<$Res> @apiSerde class _$SaveUserSettingsImpl extends _SaveUserSettings { - const _$SaveUserSettingsImpl( - {this.showNsfw, - this.blurNsfw, - this.autoExpand, - this.theme, - this.defaultSortType, - this.defaultListingType, - this.interfaceLanguage, - this.avatar, - this.banner, - this.displayName, - this.email, - this.bio, - this.matrixUserId, - this.showAvatars, - this.sendNotificationsToEmail, - this.botAccount, - this.showBotAccounts, - this.showReadPosts, - @deprecated this.showNewPostNotifs, - final List? discussionLanguages, - @deprecated this.generateTotp2fa, - this.auth, - this.openLinksInNewTab, - this.infiniteScrollEnabled, - this.postListingMode, - this.enableKeyboardNavigation, - this.enableAnimatedImages, - this.collapseBotComments, - this.showScores, - this.showUpvotes, - this.showDownvotes, - this.showUpvotePercentage}) - : _discussionLanguages = discussionLanguages, - super._(); - - factory _$SaveUserSettingsImpl.fromJson(Map json) => - _$$SaveUserSettingsImplFromJson(json); + const _$SaveUserSettingsImpl({ + this.showNsfw, + this.blurNsfw, + this.autoExpand, + this.theme, + this.defaultSortType, + this.defaultListingType, + this.interfaceLanguage, + this.avatar, + this.banner, + this.displayName, + this.email, + this.bio, + this.matrixUserId, + this.showAvatars, + this.sendNotificationsToEmail, + this.botAccount, + this.showBotAccounts, + this.showReadPosts, + @deprecated this.showNewPostNotifs, + final List? discussionLanguages, + @deprecated this.generateTotp2fa, + this.auth, + this.openLinksInNewTab, + this.infiniteScrollEnabled, + this.postListingMode, + this.enableKeyboardNavigation, + this.enableAnimatedImages, + this.collapseBotComments, + this.showScores, + this.showUpvotes, + this.showDownvotes, + this.showUpvotePercentage, + }) : _discussionLanguages = discussionLanguages, + super._(); + + factory _$SaveUserSettingsImpl.fromJson(Map json) => _$$SaveUserSettingsImplFromJson(json); @override final bool? showNsfw; -// v0.18.0 + // v0.18.0 @override final bool? blurNsfw; -// v0.18.3 + // v0.18.3 @override final bool? autoExpand; -// v0.18.3 + // v0.18.3 @override final String? theme; -// v0.18.0 + // v0.18.0 @override final SortType? defaultSortType; -// v0.18.0 + // v0.18.0 @override final ListingType? defaultListingType; -// v0.18.0 + // v0.18.0 @override final String? interfaceLanguage; -// v0.18.0 + // v0.18.0 @override final String? avatar; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final String? displayName; -// v0.18.0 + // v0.18.0 @override final String? email; -// v0.18.0 + // v0.18.0 @override final String? bio; -// v0.18.0 + // v0.18.0 @override final String? matrixUserId; -// v0.18.0 + // v0.18.0 @override final bool? showAvatars; -// v0.18.0 + // v0.18.0 @override final bool? sendNotificationsToEmail; -// v0.18.0 + // v0.18.0 @override final bool? botAccount; -// v0.18.0 + // v0.18.0 @override final bool? showBotAccounts; -// v0.18.0 + // v0.18.0 @override final bool? showReadPosts; -// v0.18.0 + // v0.18.0 @override @deprecated final bool? showNewPostNotifs; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] final List? _discussionLanguages; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } -// v0.18.0 + // v0.18.0 @override @deprecated final bool? generateTotp2fa; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final String? auth; @override final bool? openLinksInNewTab; -// v0.18.1 + // v0.18.1 @override final bool? infiniteScrollEnabled; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String? postListingMode; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? enableKeyboardNavigation; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? enableAnimatedImages; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? collapseBotComments; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final bool? showScores; -// v0.18.0 (optional) + // v0.18.0 (optional) @override final bool? showUpvotes; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final bool? showDownvotes; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final bool? showUpvotePercentage; @@ -4906,161 +4444,129 @@ class _$SaveUserSettingsImpl extends _SaveUserSettings { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SaveUserSettingsImpl && - (identical(other.showNsfw, showNsfw) || - other.showNsfw == showNsfw) && - (identical(other.blurNsfw, blurNsfw) || - other.blurNsfw == blurNsfw) && - (identical(other.autoExpand, autoExpand) || - other.autoExpand == autoExpand) && + (identical(other.showNsfw, showNsfw) || other.showNsfw == showNsfw) && + (identical(other.blurNsfw, blurNsfw) || other.blurNsfw == blurNsfw) && + (identical(other.autoExpand, autoExpand) || other.autoExpand == autoExpand) && (identical(other.theme, theme) || other.theme == theme) && - (identical(other.defaultSortType, defaultSortType) || - other.defaultSortType == defaultSortType) && - (identical(other.defaultListingType, defaultListingType) || - other.defaultListingType == defaultListingType) && - (identical(other.interfaceLanguage, interfaceLanguage) || - other.interfaceLanguage == interfaceLanguage) && + (identical(other.defaultSortType, defaultSortType) || other.defaultSortType == defaultSortType) && + (identical(other.defaultListingType, defaultListingType) || other.defaultListingType == defaultListingType) && + (identical(other.interfaceLanguage, interfaceLanguage) || other.interfaceLanguage == interfaceLanguage) && (identical(other.avatar, avatar) || other.avatar == avatar) && (identical(other.banner, banner) || other.banner == banner) && - (identical(other.displayName, displayName) || - other.displayName == displayName) && + (identical(other.displayName, displayName) || other.displayName == displayName) && (identical(other.email, email) || other.email == email) && (identical(other.bio, bio) || other.bio == bio) && - (identical(other.matrixUserId, matrixUserId) || - other.matrixUserId == matrixUserId) && - (identical(other.showAvatars, showAvatars) || - other.showAvatars == showAvatars) && - (identical( - other.sendNotificationsToEmail, sendNotificationsToEmail) || - other.sendNotificationsToEmail == sendNotificationsToEmail) && - (identical(other.botAccount, botAccount) || - other.botAccount == botAccount) && - (identical(other.showBotAccounts, showBotAccounts) || - other.showBotAccounts == showBotAccounts) && - (identical(other.showReadPosts, showReadPosts) || - other.showReadPosts == showReadPosts) && - (identical(other.showNewPostNotifs, showNewPostNotifs) || - other.showNewPostNotifs == showNewPostNotifs) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && - (identical(other.generateTotp2fa, generateTotp2fa) || - other.generateTotp2fa == generateTotp2fa) && + (identical(other.matrixUserId, matrixUserId) || other.matrixUserId == matrixUserId) && + (identical(other.showAvatars, showAvatars) || other.showAvatars == showAvatars) && + (identical(other.sendNotificationsToEmail, sendNotificationsToEmail) || other.sendNotificationsToEmail == sendNotificationsToEmail) && + (identical(other.botAccount, botAccount) || other.botAccount == botAccount) && + (identical(other.showBotAccounts, showBotAccounts) || other.showBotAccounts == showBotAccounts) && + (identical(other.showReadPosts, showReadPosts) || other.showReadPosts == showReadPosts) && + (identical(other.showNewPostNotifs, showNewPostNotifs) || other.showNewPostNotifs == showNewPostNotifs) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.generateTotp2fa, generateTotp2fa) || other.generateTotp2fa == generateTotp2fa) && (identical(other.auth, auth) || other.auth == auth) && - (identical(other.openLinksInNewTab, openLinksInNewTab) || - other.openLinksInNewTab == openLinksInNewTab) && - (identical(other.infiniteScrollEnabled, infiniteScrollEnabled) || - other.infiniteScrollEnabled == infiniteScrollEnabled) && - (identical(other.postListingMode, postListingMode) || - other.postListingMode == postListingMode) && - (identical( - other.enableKeyboardNavigation, enableKeyboardNavigation) || - other.enableKeyboardNavigation == enableKeyboardNavigation) && - (identical(other.enableAnimatedImages, enableAnimatedImages) || - other.enableAnimatedImages == enableAnimatedImages) && - (identical(other.collapseBotComments, collapseBotComments) || - other.collapseBotComments == collapseBotComments) && - (identical(other.showScores, showScores) || - other.showScores == showScores) && - (identical(other.showUpvotes, showUpvotes) || - other.showUpvotes == showUpvotes) && - (identical(other.showDownvotes, showDownvotes) || - other.showDownvotes == showDownvotes) && - (identical(other.showUpvotePercentage, showUpvotePercentage) || - other.showUpvotePercentage == showUpvotePercentage)); + (identical(other.openLinksInNewTab, openLinksInNewTab) || other.openLinksInNewTab == openLinksInNewTab) && + (identical(other.infiniteScrollEnabled, infiniteScrollEnabled) || other.infiniteScrollEnabled == infiniteScrollEnabled) && + (identical(other.postListingMode, postListingMode) || other.postListingMode == postListingMode) && + (identical(other.enableKeyboardNavigation, enableKeyboardNavigation) || other.enableKeyboardNavigation == enableKeyboardNavigation) && + (identical(other.enableAnimatedImages, enableAnimatedImages) || other.enableAnimatedImages == enableAnimatedImages) && + (identical(other.collapseBotComments, collapseBotComments) || other.collapseBotComments == collapseBotComments) && + (identical(other.showScores, showScores) || other.showScores == showScores) && + (identical(other.showUpvotes, showUpvotes) || other.showUpvotes == showUpvotes) && + (identical(other.showDownvotes, showDownvotes) || other.showDownvotes == showDownvotes) && + (identical(other.showUpvotePercentage, showUpvotePercentage) || other.showUpvotePercentage == showUpvotePercentage)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - showNsfw, - blurNsfw, - autoExpand, - theme, - defaultSortType, - defaultListingType, - interfaceLanguage, - avatar, - banner, - displayName, - email, - bio, - matrixUserId, - showAvatars, - sendNotificationsToEmail, - botAccount, - showBotAccounts, - showReadPosts, - showNewPostNotifs, - const DeepCollectionEquality().hash(_discussionLanguages), - generateTotp2fa, - auth, - openLinksInNewTab, - infiniteScrollEnabled, - postListingMode, - enableKeyboardNavigation, - enableAnimatedImages, - collapseBotComments, - showScores, - showUpvotes, - showDownvotes, - showUpvotePercentage - ]); + runtimeType, + showNsfw, + blurNsfw, + autoExpand, + theme, + defaultSortType, + defaultListingType, + interfaceLanguage, + avatar, + banner, + displayName, + email, + bio, + matrixUserId, + showAvatars, + sendNotificationsToEmail, + botAccount, + showBotAccounts, + showReadPosts, + showNewPostNotifs, + const DeepCollectionEquality().hash(_discussionLanguages), + generateTotp2fa, + auth, + openLinksInNewTab, + infiniteScrollEnabled, + postListingMode, + enableKeyboardNavigation, + enableAnimatedImages, + collapseBotComments, + showScores, + showUpvotes, + showDownvotes, + showUpvotePercentage, + ]); /// Create a copy of SaveUserSettings /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SaveUserSettingsImplCopyWith<_$SaveUserSettingsImpl> get copyWith => - __$$SaveUserSettingsImplCopyWithImpl<_$SaveUserSettingsImpl>( - this, _$identity); + _$$SaveUserSettingsImplCopyWith<_$SaveUserSettingsImpl> get copyWith => __$$SaveUserSettingsImplCopyWithImpl<_$SaveUserSettingsImpl>(this, _$identity); @override Map toJson() { - return _$$SaveUserSettingsImplToJson( - this, - ); + return _$$SaveUserSettingsImplToJson(this); } } abstract class _SaveUserSettings extends SaveUserSettings { - const factory _SaveUserSettings( - {final bool? showNsfw, - final bool? blurNsfw, - final bool? autoExpand, - final String? theme, - final SortType? defaultSortType, - final ListingType? defaultListingType, - final String? interfaceLanguage, - final String? avatar, - final String? banner, - final String? displayName, - final String? email, - final String? bio, - final String? matrixUserId, - final bool? showAvatars, - final bool? sendNotificationsToEmail, - final bool? botAccount, - final bool? showBotAccounts, - final bool? showReadPosts, - @deprecated final bool? showNewPostNotifs, - final List? discussionLanguages, - @deprecated final bool? generateTotp2fa, - final String? auth, - final bool? openLinksInNewTab, - final bool? infiniteScrollEnabled, - final String? postListingMode, - final bool? enableKeyboardNavigation, - final bool? enableAnimatedImages, - final bool? collapseBotComments, - final bool? showScores, - final bool? showUpvotes, - final bool? showDownvotes, - final bool? showUpvotePercentage}) = _$SaveUserSettingsImpl; + const factory _SaveUserSettings({ + final bool? showNsfw, + final bool? blurNsfw, + final bool? autoExpand, + final String? theme, + final SortType? defaultSortType, + final ListingType? defaultListingType, + final String? interfaceLanguage, + final String? avatar, + final String? banner, + final String? displayName, + final String? email, + final String? bio, + final String? matrixUserId, + final bool? showAvatars, + final bool? sendNotificationsToEmail, + final bool? botAccount, + final bool? showBotAccounts, + final bool? showReadPosts, + @deprecated final bool? showNewPostNotifs, + final List? discussionLanguages, + @deprecated final bool? generateTotp2fa, + final String? auth, + final bool? openLinksInNewTab, + final bool? infiniteScrollEnabled, + final String? postListingMode, + final bool? enableKeyboardNavigation, + final bool? enableAnimatedImages, + final bool? collapseBotComments, + final bool? showScores, + final bool? showUpvotes, + final bool? showDownvotes, + final bool? showUpvotePercentage, + }) = _$SaveUserSettingsImpl; const _SaveUserSettings._() : super._(); - factory _SaveUserSettings.fromJson(Map json) = - _$SaveUserSettingsImpl.fromJson; + factory _SaveUserSettings.fromJson(Map json) = _$SaveUserSettingsImpl.fromJson; @override bool? get showNsfw; // v0.18.0 @@ -5133,8 +4639,7 @@ abstract class _SaveUserSettings extends SaveUserSettings { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SaveUserSettingsImplCopyWith<_$SaveUserSettingsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SaveUserSettingsImplCopyWith<_$SaveUserSettingsImpl> get copyWith => throw _privateConstructorUsedError; } ChangePassword _$ChangePasswordFromJson(Map json) { @@ -5154,26 +4659,18 @@ mixin _$ChangePassword { /// Create a copy of ChangePassword /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ChangePasswordCopyWith get copyWith => - throw _privateConstructorUsedError; + $ChangePasswordCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ChangePasswordCopyWith<$Res> { - factory $ChangePasswordCopyWith( - ChangePassword value, $Res Function(ChangePassword) then) = - _$ChangePasswordCopyWithImpl<$Res, ChangePassword>; + factory $ChangePasswordCopyWith(ChangePassword value, $Res Function(ChangePassword) then) = _$ChangePasswordCopyWithImpl<$Res, ChangePassword>; @useResult - $Res call( - {String newPassword, - String newPasswordVerify, - String oldPassword, - String? auth}); + $Res call({String newPassword, String newPasswordVerify, String oldPassword, String? auth}); } /// @nodoc -class _$ChangePasswordCopyWithImpl<$Res, $Val extends ChangePassword> - implements $ChangePasswordCopyWith<$Res> { +class _$ChangePasswordCopyWithImpl<$Res, $Val extends ChangePassword> implements $ChangePasswordCopyWith<$Res> { _$ChangePasswordCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -5185,84 +4682,76 @@ class _$ChangePasswordCopyWithImpl<$Res, $Val extends ChangePassword> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? newPassword = null, - Object? newPasswordVerify = null, - Object? oldPassword = null, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - newPassword: null == newPassword - ? _value.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as String, - newPasswordVerify: null == newPasswordVerify - ? _value.newPasswordVerify - : newPasswordVerify // ignore: cast_nullable_to_non_nullable - as String, - oldPassword: null == oldPassword - ? _value.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); - } -} - -/// @nodoc -abstract class _$$ChangePasswordImplCopyWith<$Res> - implements $ChangePasswordCopyWith<$Res> { - factory _$$ChangePasswordImplCopyWith(_$ChangePasswordImpl value, - $Res Function(_$ChangePasswordImpl) then) = - __$$ChangePasswordImplCopyWithImpl<$Res>; + $Res call({Object? newPassword = null, Object? newPasswordVerify = null, Object? oldPassword = null, Object? auth = freezed}) { + return _then( + _value.copyWith( + newPassword: + null == newPassword + ? _value.newPassword + : newPassword // ignore: cast_nullable_to_non_nullable + as String, + newPasswordVerify: + null == newPasswordVerify + ? _value.newPasswordVerify + : newPasswordVerify // ignore: cast_nullable_to_non_nullable + as String, + oldPassword: + null == oldPassword + ? _value.oldPassword + : oldPassword // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); + } +} + +/// @nodoc +abstract class _$$ChangePasswordImplCopyWith<$Res> implements $ChangePasswordCopyWith<$Res> { + factory _$$ChangePasswordImplCopyWith(_$ChangePasswordImpl value, $Res Function(_$ChangePasswordImpl) then) = __$$ChangePasswordImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String newPassword, - String newPasswordVerify, - String oldPassword, - String? auth}); + $Res call({String newPassword, String newPasswordVerify, String oldPassword, String? auth}); } /// @nodoc -class __$$ChangePasswordImplCopyWithImpl<$Res> - extends _$ChangePasswordCopyWithImpl<$Res, _$ChangePasswordImpl> - implements _$$ChangePasswordImplCopyWith<$Res> { - __$$ChangePasswordImplCopyWithImpl( - _$ChangePasswordImpl _value, $Res Function(_$ChangePasswordImpl) _then) - : super(_value, _then); +class __$$ChangePasswordImplCopyWithImpl<$Res> extends _$ChangePasswordCopyWithImpl<$Res, _$ChangePasswordImpl> implements _$$ChangePasswordImplCopyWith<$Res> { + __$$ChangePasswordImplCopyWithImpl(_$ChangePasswordImpl _value, $Res Function(_$ChangePasswordImpl) _then) : super(_value, _then); /// Create a copy of ChangePassword /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? newPassword = null, - Object? newPasswordVerify = null, - Object? oldPassword = null, - Object? auth = freezed, - }) { - return _then(_$ChangePasswordImpl( - newPassword: null == newPassword - ? _value.newPassword - : newPassword // ignore: cast_nullable_to_non_nullable - as String, - newPasswordVerify: null == newPasswordVerify - ? _value.newPasswordVerify - : newPasswordVerify // ignore: cast_nullable_to_non_nullable - as String, - oldPassword: null == oldPassword - ? _value.oldPassword - : oldPassword // ignore: cast_nullable_to_non_nullable - as String, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? newPassword = null, Object? newPasswordVerify = null, Object? oldPassword = null, Object? auth = freezed}) { + return _then( + _$ChangePasswordImpl( + newPassword: + null == newPassword + ? _value.newPassword + : newPassword // ignore: cast_nullable_to_non_nullable + as String, + newPasswordVerify: + null == newPasswordVerify + ? _value.newPasswordVerify + : newPasswordVerify // ignore: cast_nullable_to_non_nullable + as String, + oldPassword: + null == oldPassword + ? _value.oldPassword + : oldPassword // ignore: cast_nullable_to_non_nullable + as String, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -5270,25 +4759,19 @@ class __$$ChangePasswordImplCopyWithImpl<$Res> @apiSerde class _$ChangePasswordImpl extends _ChangePassword { - const _$ChangePasswordImpl( - {required this.newPassword, - required this.newPasswordVerify, - required this.oldPassword, - this.auth}) - : super._(); + const _$ChangePasswordImpl({required this.newPassword, required this.newPasswordVerify, required this.oldPassword, this.auth}) : super._(); - factory _$ChangePasswordImpl.fromJson(Map json) => - _$$ChangePasswordImplFromJson(json); + factory _$ChangePasswordImpl.fromJson(Map json) => _$$ChangePasswordImplFromJson(json); @override final String newPassword; -// v0.18.0 + // v0.18.0 @override final String newPasswordVerify; -// v0.18.0 + // v0.18.0 @override final String oldPassword; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -5302,47 +4785,34 @@ class _$ChangePasswordImpl extends _ChangePassword { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChangePasswordImpl && - (identical(other.newPassword, newPassword) || - other.newPassword == newPassword) && - (identical(other.newPasswordVerify, newPasswordVerify) || - other.newPasswordVerify == newPasswordVerify) && - (identical(other.oldPassword, oldPassword) || - other.oldPassword == oldPassword) && + (identical(other.newPassword, newPassword) || other.newPassword == newPassword) && + (identical(other.newPasswordVerify, newPasswordVerify) || other.newPasswordVerify == newPasswordVerify) && + (identical(other.oldPassword, oldPassword) || other.oldPassword == oldPassword) && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, newPassword, newPasswordVerify, oldPassword, auth); + int get hashCode => Object.hash(runtimeType, newPassword, newPasswordVerify, oldPassword, auth); /// Create a copy of ChangePassword /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ChangePasswordImplCopyWith<_$ChangePasswordImpl> get copyWith => - __$$ChangePasswordImplCopyWithImpl<_$ChangePasswordImpl>( - this, _$identity); + _$$ChangePasswordImplCopyWith<_$ChangePasswordImpl> get copyWith => __$$ChangePasswordImplCopyWithImpl<_$ChangePasswordImpl>(this, _$identity); @override Map toJson() { - return _$$ChangePasswordImplToJson( - this, - ); + return _$$ChangePasswordImplToJson(this); } } abstract class _ChangePassword extends ChangePassword { - const factory _ChangePassword( - {required final String newPassword, - required final String newPasswordVerify, - required final String oldPassword, - final String? auth}) = _$ChangePasswordImpl; + const factory _ChangePassword({required final String newPassword, required final String newPasswordVerify, required final String oldPassword, final String? auth}) = _$ChangePasswordImpl; const _ChangePassword._() : super._(); - factory _ChangePassword.fromJson(Map json) = - _$ChangePasswordImpl.fromJson; + factory _ChangePassword.fromJson(Map json) = _$ChangePasswordImpl.fromJson; @override String get newPassword; // v0.18.0 @@ -5357,8 +4827,7 @@ abstract class _ChangePassword extends ChangePassword { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ChangePasswordImplCopyWith<_$ChangePasswordImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ChangePasswordImplCopyWith<_$ChangePasswordImpl> get copyWith => throw _privateConstructorUsedError; } GetReportCount _$GetReportCountFromJson(Map json) { @@ -5376,22 +4845,18 @@ mixin _$GetReportCount { /// Create a copy of GetReportCount /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetReportCountCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetReportCountCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetReportCountCopyWith<$Res> { - factory $GetReportCountCopyWith( - GetReportCount value, $Res Function(GetReportCount) then) = - _$GetReportCountCopyWithImpl<$Res, GetReportCount>; + factory $GetReportCountCopyWith(GetReportCount value, $Res Function(GetReportCount) then) = _$GetReportCountCopyWithImpl<$Res, GetReportCount>; @useResult $Res call({int? communityId, String? auth}); } /// @nodoc -class _$GetReportCountCopyWithImpl<$Res, $Val extends GetReportCount> - implements $GetReportCountCopyWith<$Res> { +class _$GetReportCountCopyWithImpl<$Res, $Val extends GetReportCount> implements $GetReportCountCopyWith<$Res> { _$GetReportCountCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -5403,60 +4868,56 @@ class _$GetReportCountCopyWithImpl<$Res, $Val extends GetReportCount> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_value.copyWith( - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _value.copyWith( + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetReportCountImplCopyWith<$Res> - implements $GetReportCountCopyWith<$Res> { - factory _$$GetReportCountImplCopyWith(_$GetReportCountImpl value, - $Res Function(_$GetReportCountImpl) then) = - __$$GetReportCountImplCopyWithImpl<$Res>; +abstract class _$$GetReportCountImplCopyWith<$Res> implements $GetReportCountCopyWith<$Res> { + factory _$$GetReportCountImplCopyWith(_$GetReportCountImpl value, $Res Function(_$GetReportCountImpl) then) = __$$GetReportCountImplCopyWithImpl<$Res>; @override @useResult $Res call({int? communityId, String? auth}); } /// @nodoc -class __$$GetReportCountImplCopyWithImpl<$Res> - extends _$GetReportCountCopyWithImpl<$Res, _$GetReportCountImpl> - implements _$$GetReportCountImplCopyWith<$Res> { - __$$GetReportCountImplCopyWithImpl( - _$GetReportCountImpl _value, $Res Function(_$GetReportCountImpl) _then) - : super(_value, _then); +class __$$GetReportCountImplCopyWithImpl<$Res> extends _$GetReportCountCopyWithImpl<$Res, _$GetReportCountImpl> implements _$$GetReportCountImplCopyWith<$Res> { + __$$GetReportCountImplCopyWithImpl(_$GetReportCountImpl _value, $Res Function(_$GetReportCountImpl) _then) : super(_value, _then); /// Create a copy of GetReportCount /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = freezed, - Object? auth = freezed, - }) { - return _then(_$GetReportCountImpl( - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? communityId = freezed, Object? auth = freezed}) { + return _then( + _$GetReportCountImpl( + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -5466,12 +4927,11 @@ class __$$GetReportCountImplCopyWithImpl<$Res> class _$GetReportCountImpl extends _GetReportCount { const _$GetReportCountImpl({this.communityId, this.auth}) : super._(); - factory _$GetReportCountImpl.fromJson(Map json) => - _$$GetReportCountImplFromJson(json); + factory _$GetReportCountImpl.fromJson(Map json) => _$$GetReportCountImplFromJson(json); @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final String? auth; @@ -5485,8 +4945,7 @@ class _$GetReportCountImpl extends _GetReportCount { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetReportCountImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.auth, auth) || other.auth == auth)); } @@ -5499,25 +4958,19 @@ class _$GetReportCountImpl extends _GetReportCount { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetReportCountImplCopyWith<_$GetReportCountImpl> get copyWith => - __$$GetReportCountImplCopyWithImpl<_$GetReportCountImpl>( - this, _$identity); + _$$GetReportCountImplCopyWith<_$GetReportCountImpl> get copyWith => __$$GetReportCountImplCopyWithImpl<_$GetReportCountImpl>(this, _$identity); @override Map toJson() { - return _$$GetReportCountImplToJson( - this, - ); + return _$$GetReportCountImplToJson(this); } } abstract class _GetReportCount extends GetReportCount { - const factory _GetReportCount({final int? communityId, final String? auth}) = - _$GetReportCountImpl; + const factory _GetReportCount({final int? communityId, final String? auth}) = _$GetReportCountImpl; const _GetReportCount._() : super._(); - factory _GetReportCount.fromJson(Map json) = - _$GetReportCountImpl.fromJson; + factory _GetReportCount.fromJson(Map json) = _$GetReportCountImpl.fromJson; @override int? get communityId; // v0.18.0 @@ -5528,8 +4981,7 @@ abstract class _GetReportCount extends GetReportCount { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetReportCountImplCopyWith<_$GetReportCountImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetReportCountImplCopyWith<_$GetReportCountImpl> get copyWith => throw _privateConstructorUsedError; } GetUnreadCount _$GetUnreadCountFromJson(Map json) { @@ -5546,22 +4998,18 @@ mixin _$GetUnreadCount { /// Create a copy of GetUnreadCount /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetUnreadCountCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetUnreadCountCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetUnreadCountCopyWith<$Res> { - factory $GetUnreadCountCopyWith( - GetUnreadCount value, $Res Function(GetUnreadCount) then) = - _$GetUnreadCountCopyWithImpl<$Res, GetUnreadCount>; + factory $GetUnreadCountCopyWith(GetUnreadCount value, $Res Function(GetUnreadCount) then) = _$GetUnreadCountCopyWithImpl<$Res, GetUnreadCount>; @useResult $Res call({String? auth}); } /// @nodoc -class _$GetUnreadCountCopyWithImpl<$Res, $Val extends GetUnreadCount> - implements $GetUnreadCountCopyWith<$Res> { +class _$GetUnreadCountCopyWithImpl<$Res, $Val extends GetUnreadCount> implements $GetUnreadCountCopyWith<$Res> { _$GetUnreadCountCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -5573,50 +5021,46 @@ class _$GetUnreadCountCopyWithImpl<$Res, $Val extends GetUnreadCount> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_value.copyWith( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? auth = freezed}) { + return _then( + _value.copyWith( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetUnreadCountImplCopyWith<$Res> - implements $GetUnreadCountCopyWith<$Res> { - factory _$$GetUnreadCountImplCopyWith(_$GetUnreadCountImpl value, - $Res Function(_$GetUnreadCountImpl) then) = - __$$GetUnreadCountImplCopyWithImpl<$Res>; +abstract class _$$GetUnreadCountImplCopyWith<$Res> implements $GetUnreadCountCopyWith<$Res> { + factory _$$GetUnreadCountImplCopyWith(_$GetUnreadCountImpl value, $Res Function(_$GetUnreadCountImpl) then) = __$$GetUnreadCountImplCopyWithImpl<$Res>; @override @useResult $Res call({String? auth}); } /// @nodoc -class __$$GetUnreadCountImplCopyWithImpl<$Res> - extends _$GetUnreadCountCopyWithImpl<$Res, _$GetUnreadCountImpl> - implements _$$GetUnreadCountImplCopyWith<$Res> { - __$$GetUnreadCountImplCopyWithImpl( - _$GetUnreadCountImpl _value, $Res Function(_$GetUnreadCountImpl) _then) - : super(_value, _then); +class __$$GetUnreadCountImplCopyWithImpl<$Res> extends _$GetUnreadCountCopyWithImpl<$Res, _$GetUnreadCountImpl> implements _$$GetUnreadCountImplCopyWith<$Res> { + __$$GetUnreadCountImplCopyWithImpl(_$GetUnreadCountImpl _value, $Res Function(_$GetUnreadCountImpl) _then) : super(_value, _then); /// Create a copy of GetUnreadCount /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? auth = freezed, - }) { - return _then(_$GetUnreadCountImpl( - auth: freezed == auth - ? _value.auth - : auth // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? auth = freezed}) { + return _then( + _$GetUnreadCountImpl( + auth: + freezed == auth + ? _value.auth + : auth // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -5626,8 +5070,7 @@ class __$$GetUnreadCountImplCopyWithImpl<$Res> class _$GetUnreadCountImpl extends _GetUnreadCount { const _$GetUnreadCountImpl({this.auth}) : super._(); - factory _$GetUnreadCountImpl.fromJson(Map json) => - _$$GetUnreadCountImplFromJson(json); + factory _$GetUnreadCountImpl.fromJson(Map json) => _$$GetUnreadCountImplFromJson(json); @override final String? auth; @@ -5639,10 +5082,7 @@ class _$GetUnreadCountImpl extends _GetUnreadCount { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetUnreadCountImpl && - (identical(other.auth, auth) || other.auth == auth)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetUnreadCountImpl && (identical(other.auth, auth) || other.auth == auth)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -5654,15 +5094,11 @@ class _$GetUnreadCountImpl extends _GetUnreadCount { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetUnreadCountImplCopyWith<_$GetUnreadCountImpl> get copyWith => - __$$GetUnreadCountImplCopyWithImpl<_$GetUnreadCountImpl>( - this, _$identity); + _$$GetUnreadCountImplCopyWith<_$GetUnreadCountImpl> get copyWith => __$$GetUnreadCountImplCopyWithImpl<_$GetUnreadCountImpl>(this, _$identity); @override Map toJson() { - return _$$GetUnreadCountImplToJson( - this, - ); + return _$$GetUnreadCountImplToJson(this); } } @@ -5670,8 +5106,7 @@ abstract class _GetUnreadCount extends GetUnreadCount { const factory _GetUnreadCount({final String? auth}) = _$GetUnreadCountImpl; const _GetUnreadCount._() : super._(); - factory _GetUnreadCount.fromJson(Map json) = - _$GetUnreadCountImpl.fromJson; + factory _GetUnreadCount.fromJson(Map json) = _$GetUnreadCountImpl.fromJson; @override String? get auth; @@ -5680,8 +5115,7 @@ abstract class _GetUnreadCount extends GetUnreadCount { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetUnreadCountImplCopyWith<_$GetUnreadCountImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetUnreadCountImplCopyWith<_$GetUnreadCountImpl> get copyWith => throw _privateConstructorUsedError; } VerifyEmail _$VerifyEmailFromJson(Map json) { @@ -5698,22 +5132,18 @@ mixin _$VerifyEmail { /// Create a copy of VerifyEmail /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $VerifyEmailCopyWith get copyWith => - throw _privateConstructorUsedError; + $VerifyEmailCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $VerifyEmailCopyWith<$Res> { - factory $VerifyEmailCopyWith( - VerifyEmail value, $Res Function(VerifyEmail) then) = - _$VerifyEmailCopyWithImpl<$Res, VerifyEmail>; + factory $VerifyEmailCopyWith(VerifyEmail value, $Res Function(VerifyEmail) then) = _$VerifyEmailCopyWithImpl<$Res, VerifyEmail>; @useResult $Res call({String token}); } /// @nodoc -class _$VerifyEmailCopyWithImpl<$Res, $Val extends VerifyEmail> - implements $VerifyEmailCopyWith<$Res> { +class _$VerifyEmailCopyWithImpl<$Res, $Val extends VerifyEmail> implements $VerifyEmailCopyWith<$Res> { _$VerifyEmailCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -5725,50 +5155,46 @@ class _$VerifyEmailCopyWithImpl<$Res, $Val extends VerifyEmail> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - }) { - return _then(_value.copyWith( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? token = null}) { + return _then( + _value.copyWith( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$VerifyEmailImplCopyWith<$Res> - implements $VerifyEmailCopyWith<$Res> { - factory _$$VerifyEmailImplCopyWith( - _$VerifyEmailImpl value, $Res Function(_$VerifyEmailImpl) then) = - __$$VerifyEmailImplCopyWithImpl<$Res>; +abstract class _$$VerifyEmailImplCopyWith<$Res> implements $VerifyEmailCopyWith<$Res> { + factory _$$VerifyEmailImplCopyWith(_$VerifyEmailImpl value, $Res Function(_$VerifyEmailImpl) then) = __$$VerifyEmailImplCopyWithImpl<$Res>; @override @useResult $Res call({String token}); } /// @nodoc -class __$$VerifyEmailImplCopyWithImpl<$Res> - extends _$VerifyEmailCopyWithImpl<$Res, _$VerifyEmailImpl> - implements _$$VerifyEmailImplCopyWith<$Res> { - __$$VerifyEmailImplCopyWithImpl( - _$VerifyEmailImpl _value, $Res Function(_$VerifyEmailImpl) _then) - : super(_value, _then); +class __$$VerifyEmailImplCopyWithImpl<$Res> extends _$VerifyEmailCopyWithImpl<$Res, _$VerifyEmailImpl> implements _$$VerifyEmailImplCopyWith<$Res> { + __$$VerifyEmailImplCopyWithImpl(_$VerifyEmailImpl _value, $Res Function(_$VerifyEmailImpl) _then) : super(_value, _then); /// Create a copy of VerifyEmail /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - }) { - return _then(_$VerifyEmailImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? token = null}) { + return _then( + _$VerifyEmailImpl( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -5778,8 +5204,7 @@ class __$$VerifyEmailImplCopyWithImpl<$Res> class _$VerifyEmailImpl extends _VerifyEmail { const _$VerifyEmailImpl({required this.token}) : super._(); - factory _$VerifyEmailImpl.fromJson(Map json) => - _$$VerifyEmailImplFromJson(json); + factory _$VerifyEmailImpl.fromJson(Map json) => _$$VerifyEmailImplFromJson(json); @override final String token; @@ -5791,10 +5216,7 @@ class _$VerifyEmailImpl extends _VerifyEmail { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$VerifyEmailImpl && - (identical(other.token, token) || other.token == token)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$VerifyEmailImpl && (identical(other.token, token) || other.token == token)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -5806,14 +5228,11 @@ class _$VerifyEmailImpl extends _VerifyEmail { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$VerifyEmailImplCopyWith<_$VerifyEmailImpl> get copyWith => - __$$VerifyEmailImplCopyWithImpl<_$VerifyEmailImpl>(this, _$identity); + _$$VerifyEmailImplCopyWith<_$VerifyEmailImpl> get copyWith => __$$VerifyEmailImplCopyWithImpl<_$VerifyEmailImpl>(this, _$identity); @override Map toJson() { - return _$$VerifyEmailImplToJson( - this, - ); + return _$$VerifyEmailImplToJson(this); } } @@ -5821,8 +5240,7 @@ abstract class _VerifyEmail extends VerifyEmail { const factory _VerifyEmail({required final String token}) = _$VerifyEmailImpl; const _VerifyEmail._() : super._(); - factory _VerifyEmail.fromJson(Map json) = - _$VerifyEmailImpl.fromJson; + factory _VerifyEmail.fromJson(Map json) = _$VerifyEmailImpl.fromJson; @override String get token; @@ -5831,6 +5249,5 @@ abstract class _VerifyEmail extends VerifyEmail { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$VerifyEmailImplCopyWith<_$VerifyEmailImpl> get copyWith => - throw _privateConstructorUsedError; + _$$VerifyEmailImplCopyWith<_$VerifyEmailImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/api/user/user.g.dart b/lib/src/v3/api/user/user.g.dart index 5b6a7e63..a6333347 100644 --- a/lib/src/v3/api/user/user.g.dart +++ b/lib/src/v3/api/user/user.g.dart @@ -6,641 +6,300 @@ part of 'user.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LeaveAdminImpl _$$LeaveAdminImplFromJson(Map json) => - _$LeaveAdminImpl( - auth: json['auth'] as String?, - ); - -Map _$$LeaveAdminImplToJson(_$LeaveAdminImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ListMediaImpl _$$ListMediaImplFromJson(Map json) => - _$ListMediaImpl( - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$ListMediaImplToJson(_$ListMediaImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('auth', instance.auth); - return val; -} - -_$GenerateTotpSecretImpl _$$GenerateTotpSecretImplFromJson( - Map json) => - _$GenerateTotpSecretImpl( - auth: json['auth'] as String?, - ); - -Map _$$GenerateTotpSecretImplToJson( - _$GenerateTotpSecretImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ExportSettingsImpl _$$ExportSettingsImplFromJson(Map json) => - _$ExportSettingsImpl( - auth: json['auth'] as String?, - ); - -Map _$$ExportSettingsImplToJson( - _$ExportSettingsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$ImportSettingsImpl _$$ImportSettingsImplFromJson(Map json) => - _$ImportSettingsImpl( - auth: json['auth'] as String?, - data: json['data'], - ); - -Map _$$ImportSettingsImplToJson( - _$ImportSettingsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - writeNotNull('data', instance.data); - return val; -} - -_$ValidateAuthImpl _$$ValidateAuthImplFromJson(Map json) => - _$ValidateAuthImpl( - auth: json['auth'] as String?, - ); - -Map _$$ValidateAuthImplToJson(_$ValidateAuthImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$UpdateTotpImpl _$$UpdateTotpImplFromJson(Map json) => - _$UpdateTotpImpl( - auth: json['auth'] as String?, - totpToken: json['totp_token'] as String, - enabled: json['enabled'] as bool, - ); - -Map _$$UpdateTotpImplToJson(_$UpdateTotpImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - val['totp_token'] = instance.totpToken; - val['enabled'] = instance.enabled; - return val; -} - -_$RegisterImpl _$$RegisterImplFromJson(Map json) => - _$RegisterImpl( - username: json['username'] as String, - password: json['password'] as String, - passwordVerify: json['password_verify'] as String, - showNsfw: json['show_nsfw'] as bool?, - email: json['email'] as String?, - captchaUuid: json['captcha_uuid'] as String?, - captchaAnswer: json['captcha_answer'] as String?, - honeypot: json['honeypot'] as String?, - answer: json['answer'] as String?, - ); - -Map _$$RegisterImplToJson(_$RegisterImpl instance) { - final val = { - 'username': instance.username, - 'password': instance.password, - 'password_verify': instance.passwordVerify, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('show_nsfw', instance.showNsfw); - writeNotNull('email', instance.email); - writeNotNull('captcha_uuid', instance.captchaUuid); - writeNotNull('captcha_answer', instance.captchaAnswer); - writeNotNull('honeypot', instance.honeypot); - writeNotNull('answer', instance.answer); - return val; -} - -_$LoginImpl _$$LoginImplFromJson(Map json) => _$LoginImpl( - usernameOrEmail: json['username_or_email'] as String, - password: json['password'] as String, - totp2faToken: json['totp_2fa_token'] as String?, - ); - -Map _$$LoginImplToJson(_$LoginImpl instance) { - final val = { - 'username_or_email': instance.usernameOrEmail, - 'password': instance.password, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('totp_2fa_token', instance.totp2faToken); - return val; -} +_$LeaveAdminImpl _$$LeaveAdminImplFromJson(Map json) => _$LeaveAdminImpl(auth: json['auth'] as String?); + +Map _$$LeaveAdminImplToJson(_$LeaveAdminImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$ListMediaImpl _$$ListMediaImplFromJson(Map json) => _$ListMediaImpl(page: (json['page'] as num?)?.toInt(), limit: (json['limit'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$ListMediaImplToJson(_$ListMediaImpl instance) => { + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GenerateTotpSecretImpl _$$GenerateTotpSecretImplFromJson(Map json) => _$GenerateTotpSecretImpl(auth: json['auth'] as String?); + +Map _$$GenerateTotpSecretImplToJson(_$GenerateTotpSecretImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$ExportSettingsImpl _$$ExportSettingsImplFromJson(Map json) => _$ExportSettingsImpl(auth: json['auth'] as String?); + +Map _$$ExportSettingsImplToJson(_$ExportSettingsImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$ImportSettingsImpl _$$ImportSettingsImplFromJson(Map json) => _$ImportSettingsImpl(auth: json['auth'] as String?, data: json['data']); + +Map _$$ImportSettingsImplToJson(_$ImportSettingsImpl instance) => { + if (instance.auth case final value?) 'auth': value, + if (instance.data case final value?) 'data': value, +}; + +_$ValidateAuthImpl _$$ValidateAuthImplFromJson(Map json) => _$ValidateAuthImpl(auth: json['auth'] as String?); + +Map _$$ValidateAuthImplToJson(_$ValidateAuthImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$UpdateTotpImpl _$$UpdateTotpImplFromJson(Map json) => _$UpdateTotpImpl(auth: json['auth'] as String?, totpToken: json['totp_token'] as String, enabled: json['enabled'] as bool); + +Map _$$UpdateTotpImplToJson(_$UpdateTotpImpl instance) => { + if (instance.auth case final value?) 'auth': value, + 'totp_token': instance.totpToken, + 'enabled': instance.enabled, +}; + +_$RegisterImpl _$$RegisterImplFromJson(Map json) => _$RegisterImpl( + username: json['username'] as String, + password: json['password'] as String, + passwordVerify: json['password_verify'] as String, + showNsfw: json['show_nsfw'] as bool?, + email: json['email'] as String?, + captchaUuid: json['captcha_uuid'] as String?, + captchaAnswer: json['captcha_answer'] as String?, + honeypot: json['honeypot'] as String?, + answer: json['answer'] as String?, +); + +Map _$$RegisterImplToJson(_$RegisterImpl instance) => { + 'username': instance.username, + 'password': instance.password, + 'password_verify': instance.passwordVerify, + if (instance.showNsfw case final value?) 'show_nsfw': value, + if (instance.email case final value?) 'email': value, + if (instance.captchaUuid case final value?) 'captcha_uuid': value, + if (instance.captchaAnswer case final value?) 'captcha_answer': value, + if (instance.honeypot case final value?) 'honeypot': value, + if (instance.answer case final value?) 'answer': value, +}; + +_$LoginImpl _$$LoginImplFromJson(Map json) => + _$LoginImpl(usernameOrEmail: json['username_or_email'] as String, password: json['password'] as String, totp2faToken: json['totp_2fa_token'] as String?); + +Map _$$LoginImplToJson(_$LoginImpl instance) => { + 'username_or_email': instance.usernameOrEmail, + 'password': instance.password, + if (instance.totp2faToken case final value?) 'totp_2fa_token': value, +}; _$LogoutImpl _$$LogoutImplFromJson(Map json) => _$LogoutImpl(); -Map _$$LogoutImplToJson(_$LogoutImpl instance) => - {}; - -_$GetPersonDetailsImpl _$$GetPersonDetailsImplFromJson( - Map json) => - _$GetPersonDetailsImpl( - personId: (json['person_id'] as num?)?.toInt(), - username: json['username'] as String?, - sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - communityId: (json['community_id'] as num?)?.toInt(), - savedOnly: json['saved_only'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$GetPersonDetailsImplToJson( - _$GetPersonDetailsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('person_id', instance.personId); - writeNotNull('username', instance.username); - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('community_id', instance.communityId); - writeNotNull('saved_only', instance.savedOnly); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetPersonMentionsImpl _$$GetPersonMentionsImplFromJson( - Map json) => - _$GetPersonMentionsImpl( - sort: - json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - unreadOnly: json['unread_only'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$GetPersonMentionsImplToJson( - _$GetPersonMentionsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('unread_only', instance.unreadOnly); - writeNotNull('auth', instance.auth); - return val; -} - -_$MarkPersonMentionAsReadImpl _$$MarkPersonMentionAsReadImplFromJson( - Map json) => - _$MarkPersonMentionAsReadImpl( - personMentionId: (json['person_mention_id'] as num).toInt(), - read: json['read'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$MarkPersonMentionAsReadImplToJson( - _$MarkPersonMentionAsReadImpl instance) { - final val = { - 'person_mention_id': instance.personMentionId, - 'read': instance.read, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetRepliesImpl _$$GetRepliesImplFromJson(Map json) => - _$GetRepliesImpl( - sort: - json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), - page: (json['page'] as num?)?.toInt(), - limit: (json['limit'] as num?)?.toInt(), - unreadOnly: json['unread_only'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$GetRepliesImplToJson(_$GetRepliesImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('sort', instance.sort?.toJson()); - writeNotNull('page', instance.page); - writeNotNull('limit', instance.limit); - writeNotNull('unread_only', instance.unreadOnly); - writeNotNull('auth', instance.auth); - return val; -} - -_$BanPersonImpl _$$BanPersonImplFromJson(Map json) => - _$BanPersonImpl( - personId: (json['person_id'] as num).toInt(), - ban: json['ban'] as bool, - removeData: json['remove_data'] as bool?, - reason: json['reason'] as String?, - expires: (json['expires'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$BanPersonImplToJson(_$BanPersonImpl instance) { - final val = { - 'person_id': instance.personId, - 'ban': instance.ban, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('remove_data', instance.removeData); - writeNotNull('reason', instance.reason); - writeNotNull('expires', instance.expires); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetBannedPersonsImpl _$$GetBannedPersonsImplFromJson( - Map json) => - _$GetBannedPersonsImpl( - auth: json['auth'] as String?, - ); - -Map _$$GetBannedPersonsImplToJson( - _$GetBannedPersonsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$BlockPersonImpl _$$BlockPersonImplFromJson(Map json) => - _$BlockPersonImpl( - personId: (json['person_id'] as num).toInt(), - block: json['block'] as bool, - auth: json['auth'] as String?, - ); - -Map _$$BlockPersonImplToJson(_$BlockPersonImpl instance) { - final val = { - 'person_id': instance.personId, - 'block': instance.block, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetCaptchaImpl _$$GetCaptchaImplFromJson(Map json) => - _$GetCaptchaImpl( - auth: json['auth'] as String?, - ); - -Map _$$GetCaptchaImplToJson(_$GetCaptchaImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} +Map _$$LogoutImplToJson(_$LogoutImpl instance) => {}; + +_$GetPersonDetailsImpl _$$GetPersonDetailsImplFromJson(Map json) => _$GetPersonDetailsImpl( + personId: (json['person_id'] as num?)?.toInt(), + username: json['username'] as String?, + sort: json['sort'] == null ? null : SortType.fromJson(json['sort']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + communityId: (json['community_id'] as num?)?.toInt(), + savedOnly: json['saved_only'] as bool?, + auth: json['auth'] as String?, +); + +Map _$$GetPersonDetailsImplToJson(_$GetPersonDetailsImpl instance) => { + if (instance.personId case final value?) 'person_id': value, + if (instance.username case final value?) 'username': value, + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.communityId case final value?) 'community_id': value, + if (instance.savedOnly case final value?) 'saved_only': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetPersonMentionsImpl _$$GetPersonMentionsImplFromJson(Map json) => _$GetPersonMentionsImpl( + sort: json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + unreadOnly: json['unread_only'] as bool?, + auth: json['auth'] as String?, +); + +Map _$$GetPersonMentionsImplToJson(_$GetPersonMentionsImpl instance) => { + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.unreadOnly case final value?) 'unread_only': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$MarkPersonMentionAsReadImpl _$$MarkPersonMentionAsReadImplFromJson(Map json) => + _$MarkPersonMentionAsReadImpl(personMentionId: (json['person_mention_id'] as num).toInt(), read: json['read'] as bool, auth: json['auth'] as String?); + +Map _$$MarkPersonMentionAsReadImplToJson(_$MarkPersonMentionAsReadImpl instance) => { + 'person_mention_id': instance.personMentionId, + 'read': instance.read, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetRepliesImpl _$$GetRepliesImplFromJson(Map json) => _$GetRepliesImpl( + sort: json['sort'] == null ? null : CommentSortType.fromJson(json['sort']), + page: (json['page'] as num?)?.toInt(), + limit: (json['limit'] as num?)?.toInt(), + unreadOnly: json['unread_only'] as bool?, + auth: json['auth'] as String?, +); + +Map _$$GetRepliesImplToJson(_$GetRepliesImpl instance) => { + if (instance.sort?.toJson() case final value?) 'sort': value, + if (instance.page case final value?) 'page': value, + if (instance.limit case final value?) 'limit': value, + if (instance.unreadOnly case final value?) 'unread_only': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$BanPersonImpl _$$BanPersonImplFromJson(Map json) => _$BanPersonImpl( + personId: (json['person_id'] as num).toInt(), + ban: json['ban'] as bool, + removeData: json['remove_data'] as bool?, + reason: json['reason'] as String?, + expires: (json['expires'] as num?)?.toInt(), + auth: json['auth'] as String?, +); + +Map _$$BanPersonImplToJson(_$BanPersonImpl instance) => { + 'person_id': instance.personId, + 'ban': instance.ban, + if (instance.removeData case final value?) 'remove_data': value, + if (instance.reason case final value?) 'reason': value, + if (instance.expires case final value?) 'expires': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetBannedPersonsImpl _$$GetBannedPersonsImplFromJson(Map json) => _$GetBannedPersonsImpl(auth: json['auth'] as String?); + +Map _$$GetBannedPersonsImplToJson(_$GetBannedPersonsImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$BlockPersonImpl _$$BlockPersonImplFromJson(Map json) => _$BlockPersonImpl(personId: (json['person_id'] as num).toInt(), block: json['block'] as bool, auth: json['auth'] as String?); + +Map _$$BlockPersonImplToJson(_$BlockPersonImpl instance) => { + 'person_id': instance.personId, + 'block': instance.block, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetCaptchaImpl _$$GetCaptchaImplFromJson(Map json) => _$GetCaptchaImpl(auth: json['auth'] as String?); + +Map _$$GetCaptchaImplToJson(_$GetCaptchaImpl instance) => {if (instance.auth case final value?) 'auth': value}; _$DeleteAccountImpl _$$DeleteAccountImplFromJson(Map json) => - _$DeleteAccountImpl( - password: json['password'] as String, - deleteContent: json['delete_content'] as bool?, - auth: json['auth'] as String?, - ); - -Map _$$DeleteAccountImplToJson(_$DeleteAccountImpl instance) { - final val = { - 'password': instance.password, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('delete_content', instance.deleteContent); - writeNotNull('auth', instance.auth); - return val; -} - -_$PasswordResetImpl _$$PasswordResetImplFromJson(Map json) => - _$PasswordResetImpl( - email: json['email'] as String, - ); - -Map _$$PasswordResetImplToJson(_$PasswordResetImpl instance) => - { - 'email': instance.email, - }; - -_$PasswordChangeAfterResetImpl _$$PasswordChangeAfterResetImplFromJson( - Map json) => - _$PasswordChangeAfterResetImpl( - token: json['token'] as String, - password: json['password'] as String, - passwordVerify: json['password_verify'] as String, - ); - -Map _$$PasswordChangeAfterResetImplToJson( - _$PasswordChangeAfterResetImpl instance) => - { - 'token': instance.token, - 'password': instance.password, - 'password_verify': instance.passwordVerify, - }; - -_$MarkAllAsReadImpl _$$MarkAllAsReadImplFromJson(Map json) => - _$MarkAllAsReadImpl( - auth: json['auth'] as String?, - ); - -Map _$$MarkAllAsReadImplToJson(_$MarkAllAsReadImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$SaveUserSettingsImpl _$$SaveUserSettingsImplFromJson( - Map json) => - _$SaveUserSettingsImpl( - showNsfw: json['show_nsfw'] as bool?, - blurNsfw: json['blur_nsfw'] as bool?, - autoExpand: json['auto_expand'] as bool?, - theme: json['theme'] as String?, - defaultSortType: json['default_sort_type'] == null - ? null - : SortType.fromJson(json['default_sort_type']), - defaultListingType: json['default_listing_type'] == null - ? null - : ListingType.fromJson(json['default_listing_type']), - interfaceLanguage: json['interface_language'] as String?, - avatar: json['avatar'] as String?, - banner: json['banner'] as String?, - displayName: json['display_name'] as String?, - email: json['email'] as String?, - bio: json['bio'] as String?, - matrixUserId: json['matrix_user_id'] as String?, - showAvatars: json['show_avatars'] as bool?, - sendNotificationsToEmail: json['send_notifications_to_email'] as bool?, - botAccount: json['bot_account'] as bool?, - showBotAccounts: json['show_bot_accounts'] as bool?, - showReadPosts: json['show_read_posts'] as bool?, - showNewPostNotifs: json['show_new_post_notifs'] as bool?, - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - generateTotp2fa: json['generate_totp2fa'] as bool?, - auth: json['auth'] as String?, - openLinksInNewTab: json['open_links_in_new_tab'] as bool?, - infiniteScrollEnabled: json['infinite_scroll_enabled'] as bool?, - postListingMode: json['post_listing_mode'] as String?, - enableKeyboardNavigation: json['enable_keyboard_navigation'] as bool?, - enableAnimatedImages: json['enable_animated_images'] as bool?, - collapseBotComments: json['collapse_bot_comments'] as bool?, - showScores: json['show_scores'] as bool?, - showUpvotes: json['show_upvotes'] as bool?, - showDownvotes: json['show_downvotes'] as bool?, - showUpvotePercentage: json['show_upvote_percentage'] as bool?, - ); - -Map _$$SaveUserSettingsImplToJson( - _$SaveUserSettingsImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('show_nsfw', instance.showNsfw); - writeNotNull('blur_nsfw', instance.blurNsfw); - writeNotNull('auto_expand', instance.autoExpand); - writeNotNull('theme', instance.theme); - writeNotNull('default_sort_type', instance.defaultSortType?.toJson()); - writeNotNull('default_listing_type', instance.defaultListingType?.toJson()); - writeNotNull('interface_language', instance.interfaceLanguage); - writeNotNull('avatar', instance.avatar); - writeNotNull('banner', instance.banner); - writeNotNull('display_name', instance.displayName); - writeNotNull('email', instance.email); - writeNotNull('bio', instance.bio); - writeNotNull('matrix_user_id', instance.matrixUserId); - writeNotNull('show_avatars', instance.showAvatars); - writeNotNull( - 'send_notifications_to_email', instance.sendNotificationsToEmail); - writeNotNull('bot_account', instance.botAccount); - writeNotNull('show_bot_accounts', instance.showBotAccounts); - writeNotNull('show_read_posts', instance.showReadPosts); - writeNotNull('show_new_post_notifs', instance.showNewPostNotifs); - writeNotNull('discussion_languages', instance.discussionLanguages); - writeNotNull('generate_totp2fa', instance.generateTotp2fa); - writeNotNull('auth', instance.auth); - writeNotNull('open_links_in_new_tab', instance.openLinksInNewTab); - writeNotNull('infinite_scroll_enabled', instance.infiniteScrollEnabled); - writeNotNull('post_listing_mode', instance.postListingMode); - writeNotNull('enable_keyboard_navigation', instance.enableKeyboardNavigation); - writeNotNull('enable_animated_images', instance.enableAnimatedImages); - writeNotNull('collapse_bot_comments', instance.collapseBotComments); - writeNotNull('show_scores', instance.showScores); - writeNotNull('show_upvotes', instance.showUpvotes); - writeNotNull('show_downvotes', instance.showDownvotes); - writeNotNull('show_upvote_percentage', instance.showUpvotePercentage); - return val; -} - -_$ChangePasswordImpl _$$ChangePasswordImplFromJson(Map json) => - _$ChangePasswordImpl( - newPassword: json['new_password'] as String, - newPasswordVerify: json['new_password_verify'] as String, - oldPassword: json['old_password'] as String, - auth: json['auth'] as String?, - ); - -Map _$$ChangePasswordImplToJson( - _$ChangePasswordImpl instance) { - final val = { - 'new_password': instance.newPassword, - 'new_password_verify': instance.newPasswordVerify, - 'old_password': instance.oldPassword, - }; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$GetReportCountImpl _$$GetReportCountImplFromJson(Map json) => - _$GetReportCountImpl( - communityId: (json['community_id'] as num?)?.toInt(), - auth: json['auth'] as String?, - ); - -Map _$$GetReportCountImplToJson( - _$GetReportCountImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('community_id', instance.communityId); - writeNotNull('auth', instance.auth); - return val; -} - -_$GetUnreadCountImpl _$$GetUnreadCountImplFromJson(Map json) => - _$GetUnreadCountImpl( - auth: json['auth'] as String?, - ); - -Map _$$GetUnreadCountImplToJson( - _$GetUnreadCountImpl instance) { - final val = {}; - - void writeNotNull(String key, dynamic value) { - if (value != null) { - val[key] = value; - } - } - - writeNotNull('auth', instance.auth); - return val; -} - -_$VerifyEmailImpl _$$VerifyEmailImplFromJson(Map json) => - _$VerifyEmailImpl( - token: json['token'] as String, - ); - -Map _$$VerifyEmailImplToJson(_$VerifyEmailImpl instance) => - { - 'token': instance.token, - }; + _$DeleteAccountImpl(password: json['password'] as String, deleteContent: json['delete_content'] as bool?, auth: json['auth'] as String?); + +Map _$$DeleteAccountImplToJson(_$DeleteAccountImpl instance) => { + 'password': instance.password, + if (instance.deleteContent case final value?) 'delete_content': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$PasswordResetImpl _$$PasswordResetImplFromJson(Map json) => _$PasswordResetImpl(email: json['email'] as String); + +Map _$$PasswordResetImplToJson(_$PasswordResetImpl instance) => {'email': instance.email}; + +_$PasswordChangeAfterResetImpl _$$PasswordChangeAfterResetImplFromJson(Map json) => + _$PasswordChangeAfterResetImpl(token: json['token'] as String, password: json['password'] as String, passwordVerify: json['password_verify'] as String); + +Map _$$PasswordChangeAfterResetImplToJson(_$PasswordChangeAfterResetImpl instance) => { + 'token': instance.token, + 'password': instance.password, + 'password_verify': instance.passwordVerify, +}; + +_$MarkAllAsReadImpl _$$MarkAllAsReadImplFromJson(Map json) => _$MarkAllAsReadImpl(auth: json['auth'] as String?); + +Map _$$MarkAllAsReadImplToJson(_$MarkAllAsReadImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$SaveUserSettingsImpl _$$SaveUserSettingsImplFromJson(Map json) => _$SaveUserSettingsImpl( + showNsfw: json['show_nsfw'] as bool?, + blurNsfw: json['blur_nsfw'] as bool?, + autoExpand: json['auto_expand'] as bool?, + theme: json['theme'] as String?, + defaultSortType: json['default_sort_type'] == null ? null : SortType.fromJson(json['default_sort_type']), + defaultListingType: json['default_listing_type'] == null ? null : ListingType.fromJson(json['default_listing_type']), + interfaceLanguage: json['interface_language'] as String?, + avatar: json['avatar'] as String?, + banner: json['banner'] as String?, + displayName: json['display_name'] as String?, + email: json['email'] as String?, + bio: json['bio'] as String?, + matrixUserId: json['matrix_user_id'] as String?, + showAvatars: json['show_avatars'] as bool?, + sendNotificationsToEmail: json['send_notifications_to_email'] as bool?, + botAccount: json['bot_account'] as bool?, + showBotAccounts: json['show_bot_accounts'] as bool?, + showReadPosts: json['show_read_posts'] as bool?, + showNewPostNotifs: json['show_new_post_notifs'] as bool?, + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + generateTotp2fa: json['generate_totp2fa'] as bool?, + auth: json['auth'] as String?, + openLinksInNewTab: json['open_links_in_new_tab'] as bool?, + infiniteScrollEnabled: json['infinite_scroll_enabled'] as bool?, + postListingMode: json['post_listing_mode'] as String?, + enableKeyboardNavigation: json['enable_keyboard_navigation'] as bool?, + enableAnimatedImages: json['enable_animated_images'] as bool?, + collapseBotComments: json['collapse_bot_comments'] as bool?, + showScores: json['show_scores'] as bool?, + showUpvotes: json['show_upvotes'] as bool?, + showDownvotes: json['show_downvotes'] as bool?, + showUpvotePercentage: json['show_upvote_percentage'] as bool?, +); + +Map _$$SaveUserSettingsImplToJson(_$SaveUserSettingsImpl instance) => { + if (instance.showNsfw case final value?) 'show_nsfw': value, + if (instance.blurNsfw case final value?) 'blur_nsfw': value, + if (instance.autoExpand case final value?) 'auto_expand': value, + if (instance.theme case final value?) 'theme': value, + if (instance.defaultSortType?.toJson() case final value?) 'default_sort_type': value, + if (instance.defaultListingType?.toJson() case final value?) 'default_listing_type': value, + if (instance.interfaceLanguage case final value?) 'interface_language': value, + if (instance.avatar case final value?) 'avatar': value, + if (instance.banner case final value?) 'banner': value, + if (instance.displayName case final value?) 'display_name': value, + if (instance.email case final value?) 'email': value, + if (instance.bio case final value?) 'bio': value, + if (instance.matrixUserId case final value?) 'matrix_user_id': value, + if (instance.showAvatars case final value?) 'show_avatars': value, + if (instance.sendNotificationsToEmail case final value?) 'send_notifications_to_email': value, + if (instance.botAccount case final value?) 'bot_account': value, + if (instance.showBotAccounts case final value?) 'show_bot_accounts': value, + if (instance.showReadPosts case final value?) 'show_read_posts': value, + if (instance.showNewPostNotifs case final value?) 'show_new_post_notifs': value, + if (instance.discussionLanguages case final value?) 'discussion_languages': value, + if (instance.generateTotp2fa case final value?) 'generate_totp2fa': value, + if (instance.auth case final value?) 'auth': value, + if (instance.openLinksInNewTab case final value?) 'open_links_in_new_tab': value, + if (instance.infiniteScrollEnabled case final value?) 'infinite_scroll_enabled': value, + if (instance.postListingMode case final value?) 'post_listing_mode': value, + if (instance.enableKeyboardNavigation case final value?) 'enable_keyboard_navigation': value, + if (instance.enableAnimatedImages case final value?) 'enable_animated_images': value, + if (instance.collapseBotComments case final value?) 'collapse_bot_comments': value, + if (instance.showScores case final value?) 'show_scores': value, + if (instance.showUpvotes case final value?) 'show_upvotes': value, + if (instance.showDownvotes case final value?) 'show_downvotes': value, + if (instance.showUpvotePercentage case final value?) 'show_upvote_percentage': value, +}; + +_$ChangePasswordImpl _$$ChangePasswordImplFromJson(Map json) => _$ChangePasswordImpl( + newPassword: json['new_password'] as String, + newPasswordVerify: json['new_password_verify'] as String, + oldPassword: json['old_password'] as String, + auth: json['auth'] as String?, +); + +Map _$$ChangePasswordImplToJson(_$ChangePasswordImpl instance) => { + 'new_password': instance.newPassword, + 'new_password_verify': instance.newPasswordVerify, + 'old_password': instance.oldPassword, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetReportCountImpl _$$GetReportCountImplFromJson(Map json) => _$GetReportCountImpl(communityId: (json['community_id'] as num?)?.toInt(), auth: json['auth'] as String?); + +Map _$$GetReportCountImplToJson(_$GetReportCountImpl instance) => { + if (instance.communityId case final value?) 'community_id': value, + if (instance.auth case final value?) 'auth': value, +}; + +_$GetUnreadCountImpl _$$GetUnreadCountImplFromJson(Map json) => _$GetUnreadCountImpl(auth: json['auth'] as String?); + +Map _$$GetUnreadCountImplToJson(_$GetUnreadCountImpl instance) => {if (instance.auth case final value?) 'auth': value}; + +_$VerifyEmailImpl _$$VerifyEmailImplFromJson(Map json) => _$VerifyEmailImpl(token: json['token'] as String); + +Map _$$VerifyEmailImplToJson(_$VerifyEmailImpl instance) => {'token': instance.token}; diff --git a/lib/src/v3/enums/comment_sort_type.dart b/lib/src/v3/enums/comment_sort_type.dart index 52fc0b00..80b404c0 100644 --- a/lib/src/v3/enums/comment_sort_type.dart +++ b/lib/src/v3/enums/comment_sort_type.dart @@ -9,9 +9,7 @@ enum CommentSortType { const CommentSortType(this.value); factory CommentSortType.fromJson(dynamic value) { - return value is int - ? values[value] - : values.firstWhere((e) => e.value == value); + return value is int ? values[value] : values.firstWhere((e) => e.value == value); } String toJson() => value; diff --git a/lib/src/v3/enums/community_visibility_type.dart b/lib/src/v3/enums/community_visibility_type.dart index bc30771b..7b75f582 100644 --- a/lib/src/v3/enums/community_visibility_type.dart +++ b/lib/src/v3/enums/community_visibility_type.dart @@ -6,9 +6,7 @@ enum CommunityVisibility { const CommunityVisibility(this.value); factory CommunityVisibility.fromJson(dynamic value) { - return value is int - ? values[value] - : values.firstWhere((e) => e.value == value); + return value is int ? values[value] : values.firstWhere((e) => e.value == value); } String toJson() => value; diff --git a/lib/src/v3/enums/listing_type.dart b/lib/src/v3/enums/listing_type.dart index 50662c7b..b9cb4013 100644 --- a/lib/src/v3/enums/listing_type.dart +++ b/lib/src/v3/enums/listing_type.dart @@ -8,9 +8,7 @@ enum ListingType { const ListingType(this.value); factory ListingType.fromJson(dynamic value) { - return value is int - ? values[value] - : values.firstWhere((e) => e.value == value); + return value is int ? values[value] : values.firstWhere((e) => e.value == value); } String toJson() => value; diff --git a/lib/src/v3/enums/modlog_action_type.dart b/lib/src/v3/enums/modlog_action_type.dart index 0dccac98..6b983dc6 100644 --- a/lib/src/v3/enums/modlog_action_type.dart +++ b/lib/src/v3/enums/modlog_action_type.dart @@ -19,8 +19,7 @@ enum ModlogActionType { final String value; const ModlogActionType(this.value); - factory ModlogActionType.fromJson(String value) => - values.firstWhere((e) => e.value == value); + factory ModlogActionType.fromJson(String value) => values.firstWhere((e) => e.value == value); String toJson() => value; diff --git a/lib/src/v3/enums/post_feature_type.dart b/lib/src/v3/enums/post_feature_type.dart index ef062a17..4fd282e0 100644 --- a/lib/src/v3/enums/post_feature_type.dart +++ b/lib/src/v3/enums/post_feature_type.dart @@ -1,13 +1,12 @@ enum PostFeatureType { local('Local'), // v0.18.0 - community('Community'), // v0.18.0 + community('Community') // v0.18.0 ; final String value; const PostFeatureType(this.value); - factory PostFeatureType.fromJson(String value) => - values.firstWhere((e) => e.value == value); + factory PostFeatureType.fromJson(String value) => values.firstWhere((e) => e.value == value); String toJson() => value; diff --git a/lib/src/v3/enums/registration_mode.dart b/lib/src/v3/enums/registration_mode.dart index afc907e1..b9fed9f6 100644 --- a/lib/src/v3/enums/registration_mode.dart +++ b/lib/src/v3/enums/registration_mode.dart @@ -6,8 +6,7 @@ enum RegistrationMode { final String value; const RegistrationMode(this.value); - factory RegistrationMode.fromJson(String value) => - values.firstWhere((e) => e.value == value); + factory RegistrationMode.fromJson(String value) => values.firstWhere((e) => e.value == value); String toJson() => value; diff --git a/lib/src/v3/enums/search_type.dart b/lib/src/v3/enums/search_type.dart index 644f026e..e3d4667a 100644 --- a/lib/src/v3/enums/search_type.dart +++ b/lib/src/v3/enums/search_type.dart @@ -9,8 +9,7 @@ enum SearchType { final String value; const SearchType(this.value); - factory SearchType.fromJson(String value) => - values.firstWhere((e) => e.value == value); + factory SearchType.fromJson(String value) => values.firstWhere((e) => e.value == value); String toJson() => value; diff --git a/lib/src/v3/enums/sort_type.dart b/lib/src/v3/enums/sort_type.dart index fdcbe79a..47518353 100644 --- a/lib/src/v3/enums/sort_type.dart +++ b/lib/src/v3/enums/sort_type.dart @@ -17,16 +17,14 @@ enum SortType { topSixMonths('TopSixMonths'), // v0.18.0 topNineMonths('TopNineMonths'), // v0.18.0 controversial('Controversial'), // v0.19.0 - scaled('Scaled'), // v0.19.0 + scaled('Scaled') // v0.19.0 ; final String value; const SortType(this.value); factory SortType.fromJson(dynamic value) { - return value is int - ? values[value] - : values.firstWhere((e) => e.value == value); + return value is int ? values[value] : values.firstWhere((e) => e.value == value); } String toJson() => value; diff --git a/lib/src/v3/enums/subscribed_type.dart b/lib/src/v3/enums/subscribed_type.dart index 7eb96f1c..349997c4 100644 --- a/lib/src/v3/enums/subscribed_type.dart +++ b/lib/src/v3/enums/subscribed_type.dart @@ -6,8 +6,7 @@ enum SubscribedType { final String value; const SubscribedType(this.value); - factory SubscribedType.fromJson(String value) => - values.firstWhere((e) => e.value == value); + factory SubscribedType.fromJson(String value) => values.firstWhere((e) => e.value == value); String toJson() => value; diff --git a/lib/src/v3/main.dart b/lib/src/v3/main.dart index 4d431b40..a5dccfc8 100644 --- a/lib/src/v3/main.dart +++ b/lib/src/v3/main.dart @@ -33,9 +33,7 @@ class LemmyApiV3 { } if (debug) { - print( - '${DateTime.now().toIso8601String()}: ${query.httpMethod} ${query.path}', - ); + print('${DateTime.now().toIso8601String()}: ${query.httpMethod} ${query.path}'); } // TLS can only be disable in debug mode. @@ -45,42 +43,20 @@ class LemmyApiV3 { switch (query.httpMethod) { case HttpMethod.get: return http.get( - Uri( - scheme: scheme, - host: host, - path: '$extraPath${query.path}', - queryParameters: { - for (final entry in query.toJson().entries) - entry.key: entry.value.toString(), - }, - ), + Uri(scheme: scheme, host: host, path: '$extraPath${query.path}', queryParameters: {for (final entry in query.toJson().entries) entry.key: entry.value.toString()}), headers: (auth != null) ? {'Authorization': 'Bearer $auth'} : null, ); case HttpMethod.post: return http.post( - Uri( - scheme: scheme, - host: host, - path: '$extraPath${query.path}', - ), + Uri(scheme: scheme, host: host, path: '$extraPath${query.path}'), body: passthroughParameter != null ? query.toJson()[passthroughParameter] as String : jsonEncode(query.toJson()), - headers: { - 'Content-Type': 'application/json', - if (auth != null) 'Authorization': 'Bearer $auth', - }, + headers: {'Content-Type': 'application/json', if (auth != null) 'Authorization': 'Bearer $auth'}, ); case HttpMethod.put: return http.put( - Uri( - scheme: scheme, - host: host, - path: '$extraPath${query.path}', - ), + Uri(scheme: scheme, host: host, path: '$extraPath${query.path}'), body: jsonEncode(query.toJson()), - headers: { - 'Content-Type': 'application/json', - if (auth != null) 'Authorization': 'Bearer $auth', - }, + headers: {'Content-Type': 'application/json', if (auth != null) 'Authorization': 'Bearer $auth'}, ); } }(); diff --git a/lib/src/v3/models/admin/add_admin_response.dart b/lib/src/v3/models/admin/add_admin_response.dart index 416a74a6..34af967f 100644 --- a/lib/src/v3/models/admin/add_admin_response.dart +++ b/lib/src/v3/models/admin/add_admin_response.dart @@ -14,6 +14,5 @@ class AddAdminResponse with _$AddAdminResponse { }) = _AddAdminResponse; const AddAdminResponse._(); - factory AddAdminResponse.fromJson(Map json) => - _$AddAdminResponseFromJson(json); + factory AddAdminResponse.fromJson(Map json) => _$AddAdminResponseFromJson(json); } diff --git a/lib/src/v3/models/admin/add_admin_response.freezed.dart b/lib/src/v3/models/admin/add_admin_response.freezed.dart index 925f4e0c..fd6c80ae 100644 --- a/lib/src/v3/models/admin/add_admin_response.freezed.dart +++ b/lib/src/v3/models/admin/add_admin_response.freezed.dart @@ -12,7 +12,8 @@ part of 'add_admin_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AddAdminResponse _$AddAdminResponseFromJson(Map json) { return _AddAdminResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$AddAdminResponse { /// Create a copy of AddAdminResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AddAdminResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $AddAdminResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AddAdminResponseCopyWith<$Res> { - factory $AddAdminResponseCopyWith( - AddAdminResponse value, $Res Function(AddAdminResponse) then) = - _$AddAdminResponseCopyWithImpl<$Res, AddAdminResponse>; + factory $AddAdminResponseCopyWith(AddAdminResponse value, $Res Function(AddAdminResponse) then) = _$AddAdminResponseCopyWithImpl<$Res, AddAdminResponse>; @useResult $Res call({List admins}); } /// @nodoc -class _$AddAdminResponseCopyWithImpl<$Res, $Val extends AddAdminResponse> - implements $AddAdminResponseCopyWith<$Res> { +class _$AddAdminResponseCopyWithImpl<$Res, $Val extends AddAdminResponse> implements $AddAdminResponseCopyWith<$Res> { _$AddAdminResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$AddAdminResponseCopyWithImpl<$Res, $Val extends AddAdminResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? admins = null, - }) { - return _then(_value.copyWith( - admins: null == admins - ? _value.admins - : admins // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? admins = null}) { + return _then( + _value.copyWith( + admins: + null == admins + ? _value.admins + : admins // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AddAdminResponseImplCopyWith<$Res> - implements $AddAdminResponseCopyWith<$Res> { - factory _$$AddAdminResponseImplCopyWith(_$AddAdminResponseImpl value, - $Res Function(_$AddAdminResponseImpl) then) = - __$$AddAdminResponseImplCopyWithImpl<$Res>; +abstract class _$$AddAdminResponseImplCopyWith<$Res> implements $AddAdminResponseCopyWith<$Res> { + factory _$$AddAdminResponseImplCopyWith(_$AddAdminResponseImpl value, $Res Function(_$AddAdminResponseImpl) then) = __$$AddAdminResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List admins}); } /// @nodoc -class __$$AddAdminResponseImplCopyWithImpl<$Res> - extends _$AddAdminResponseCopyWithImpl<$Res, _$AddAdminResponseImpl> - implements _$$AddAdminResponseImplCopyWith<$Res> { - __$$AddAdminResponseImplCopyWithImpl(_$AddAdminResponseImpl _value, - $Res Function(_$AddAdminResponseImpl) _then) - : super(_value, _then); +class __$$AddAdminResponseImplCopyWithImpl<$Res> extends _$AddAdminResponseCopyWithImpl<$Res, _$AddAdminResponseImpl> implements _$$AddAdminResponseImplCopyWith<$Res> { + __$$AddAdminResponseImplCopyWithImpl(_$AddAdminResponseImpl _value, $Res Function(_$AddAdminResponseImpl) _then) : super(_value, _then); /// Create a copy of AddAdminResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? admins = null, - }) { - return _then(_$AddAdminResponseImpl( - admins: null == admins - ? _value._admins - : admins // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? admins = null}) { + return _then( + _$AddAdminResponseImpl( + admins: + null == admins + ? _value._admins + : admins // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -106,12 +99,9 @@ class __$$AddAdminResponseImplCopyWithImpl<$Res> @modelSerde class _$AddAdminResponseImpl extends _AddAdminResponse { - const _$AddAdminResponseImpl({required final List admins}) - : _admins = admins, - super._(); + const _$AddAdminResponseImpl({required final List admins}) : _admins = admins, super._(); - factory _$AddAdminResponseImpl.fromJson(Map json) => - _$$AddAdminResponseImplFromJson(json); + factory _$AddAdminResponseImpl.fromJson(Map json) => _$$AddAdminResponseImplFromJson(json); final List _admins; @override @@ -128,41 +118,31 @@ class _$AddAdminResponseImpl extends _AddAdminResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddAdminResponseImpl && - const DeepCollectionEquality().equals(other._admins, _admins)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddAdminResponseImpl && const DeepCollectionEquality().equals(other._admins, _admins)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_admins)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_admins)); /// Create a copy of AddAdminResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AddAdminResponseImplCopyWith<_$AddAdminResponseImpl> get copyWith => - __$$AddAdminResponseImplCopyWithImpl<_$AddAdminResponseImpl>( - this, _$identity); + _$$AddAdminResponseImplCopyWith<_$AddAdminResponseImpl> get copyWith => __$$AddAdminResponseImplCopyWithImpl<_$AddAdminResponseImpl>(this, _$identity); @override Map toJson() { - return _$$AddAdminResponseImplToJson( - this, - ); + return _$$AddAdminResponseImplToJson(this); } } abstract class _AddAdminResponse extends AddAdminResponse { - const factory _AddAdminResponse({required final List admins}) = - _$AddAdminResponseImpl; + const factory _AddAdminResponse({required final List admins}) = _$AddAdminResponseImpl; const _AddAdminResponse._() : super._(); - factory _AddAdminResponse.fromJson(Map json) = - _$AddAdminResponseImpl.fromJson; + factory _AddAdminResponse.fromJson(Map json) = _$AddAdminResponseImpl.fromJson; @override List get admins; @@ -171,6 +151,5 @@ abstract class _AddAdminResponse extends AddAdminResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AddAdminResponseImplCopyWith<_$AddAdminResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AddAdminResponseImplCopyWith<_$AddAdminResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/add_admin_response.g.dart b/lib/src/v3/models/admin/add_admin_response.g.dart index b8b40399..81618096 100644 --- a/lib/src/v3/models/admin/add_admin_response.g.dart +++ b/lib/src/v3/models/admin/add_admin_response.g.dart @@ -6,16 +6,7 @@ part of 'add_admin_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AddAdminResponseImpl _$$AddAdminResponseImplFromJson( - Map json) => - _$AddAdminResponseImpl( - admins: (json['admins'] as List) - .map((e) => PersonView.fromJson(e as Map)) - .toList(), - ); +_$AddAdminResponseImpl _$$AddAdminResponseImplFromJson(Map json) => + _$AddAdminResponseImpl(admins: (json['admins'] as List).map((e) => PersonView.fromJson(e as Map)).toList()); -Map _$$AddAdminResponseImplToJson( - _$AddAdminResponseImpl instance) => - { - 'admins': instance.admins.map((e) => e.toJson()).toList(), - }; +Map _$$AddAdminResponseImplToJson(_$AddAdminResponseImpl instance) => {'admins': instance.admins.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/admin/admin_purge_comment.dart b/lib/src/v3/models/admin/admin_purge_comment.dart index 8c2c0a61..d004982a 100644 --- a/lib/src/v3/models/admin/admin_purge_comment.dart +++ b/lib/src/v3/models/admin/admin_purge_comment.dart @@ -17,6 +17,5 @@ class AdminPurgeComment with _$AdminPurgeComment { }) = _AdminPurgeComment; const AdminPurgeComment._(); - factory AdminPurgeComment.fromJson(Map json) => - _$AdminPurgeCommentFromJson(json); + factory AdminPurgeComment.fromJson(Map json) => _$AdminPurgeCommentFromJson(json); } diff --git a/lib/src/v3/models/admin/admin_purge_comment.freezed.dart b/lib/src/v3/models/admin/admin_purge_comment.freezed.dart index 7511c233..c8a0eaa1 100644 --- a/lib/src/v3/models/admin/admin_purge_comment.freezed.dart +++ b/lib/src/v3/models/admin/admin_purge_comment.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_comment.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgeComment _$AdminPurgeCommentFromJson(Map json) { return _AdminPurgeComment.fromJson(json); @@ -33,27 +34,18 @@ mixin _$AdminPurgeComment { /// Create a copy of AdminPurgeComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgeCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgeCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgeCommentCopyWith<$Res> { - factory $AdminPurgeCommentCopyWith( - AdminPurgeComment value, $Res Function(AdminPurgeComment) then) = - _$AdminPurgeCommentCopyWithImpl<$Res, AdminPurgeComment>; + factory $AdminPurgeCommentCopyWith(AdminPurgeComment value, $Res Function(AdminPurgeComment) then) = _$AdminPurgeCommentCopyWithImpl<$Res, AdminPurgeComment>; @useResult - $Res call( - {int id, - int adminPersonId, - int postId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, int postId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$AdminPurgeCommentCopyWithImpl<$Res, $Val extends AdminPurgeComment> - implements $AdminPurgeCommentCopyWith<$Res> { +class _$AdminPurgeCommentCopyWithImpl<$Res, $Val extends AdminPurgeComment> implements $AdminPurgeCommentCopyWith<$Res> { _$AdminPurgeCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -65,95 +57,86 @@ class _$AdminPurgeCommentCopyWithImpl<$Res, $Val extends AdminPurgeComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? postId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? adminPersonId = null, Object? postId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AdminPurgeCommentImplCopyWith<$Res> - implements $AdminPurgeCommentCopyWith<$Res> { - factory _$$AdminPurgeCommentImplCopyWith(_$AdminPurgeCommentImpl value, - $Res Function(_$AdminPurgeCommentImpl) then) = - __$$AdminPurgeCommentImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgeCommentImplCopyWith<$Res> implements $AdminPurgeCommentCopyWith<$Res> { + factory _$$AdminPurgeCommentImplCopyWith(_$AdminPurgeCommentImpl value, $Res Function(_$AdminPurgeCommentImpl) then) = __$$AdminPurgeCommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int adminPersonId, - int postId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, int postId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$AdminPurgeCommentImplCopyWithImpl<$Res> - extends _$AdminPurgeCommentCopyWithImpl<$Res, _$AdminPurgeCommentImpl> - implements _$$AdminPurgeCommentImplCopyWith<$Res> { - __$$AdminPurgeCommentImplCopyWithImpl(_$AdminPurgeCommentImpl _value, - $Res Function(_$AdminPurgeCommentImpl) _then) - : super(_value, _then); +class __$$AdminPurgeCommentImplCopyWithImpl<$Res> extends _$AdminPurgeCommentCopyWithImpl<$Res, _$AdminPurgeCommentImpl> implements _$$AdminPurgeCommentImplCopyWith<$Res> { + __$$AdminPurgeCommentImplCopyWithImpl(_$AdminPurgeCommentImpl _value, $Res Function(_$AdminPurgeCommentImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgeComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? postId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_$AdminPurgeCommentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? adminPersonId = null, Object? postId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _$AdminPurgeCommentImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -161,29 +144,22 @@ class __$$AdminPurgeCommentImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgeCommentImpl extends _AdminPurgeComment { - const _$AdminPurgeCommentImpl( - {required this.id, - required this.adminPersonId, - required this.postId, - this.reason, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$AdminPurgeCommentImpl({required this.id, required this.adminPersonId, required this.postId, this.reason, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$AdminPurgeCommentImpl.fromJson(Map json) => - _$$AdminPurgeCommentImplFromJson(json); + factory _$AdminPurgeCommentImpl.fromJson(Map json) => _$$AdminPurgeCommentImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int adminPersonId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -199,8 +175,7 @@ class _$AdminPurgeCommentImpl extends _AdminPurgeComment { (other.runtimeType == runtimeType && other is _$AdminPurgeCommentImpl && (identical(other.id, id) || other.id == id) && - (identical(other.adminPersonId, adminPersonId) || - other.adminPersonId == adminPersonId) && + (identical(other.adminPersonId, adminPersonId) || other.adminPersonId == adminPersonId) && (identical(other.postId, postId) || other.postId == postId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.when, when) || other.when == when)); @@ -208,38 +183,27 @@ class _$AdminPurgeCommentImpl extends _AdminPurgeComment { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, adminPersonId, postId, reason, when); + int get hashCode => Object.hash(runtimeType, id, adminPersonId, postId, reason, when); /// Create a copy of AdminPurgeComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgeCommentImplCopyWith<_$AdminPurgeCommentImpl> get copyWith => - __$$AdminPurgeCommentImplCopyWithImpl<_$AdminPurgeCommentImpl>( - this, _$identity); + _$$AdminPurgeCommentImplCopyWith<_$AdminPurgeCommentImpl> get copyWith => __$$AdminPurgeCommentImplCopyWithImpl<_$AdminPurgeCommentImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgeCommentImplToJson( - this, - ); + return _$$AdminPurgeCommentImplToJson(this); } } abstract class _AdminPurgeComment extends AdminPurgeComment { - const factory _AdminPurgeComment( - {required final int id, - required final int adminPersonId, - required final int postId, - final String? reason, - @JsonKey(name: 'when_') required final String when}) = + const factory _AdminPurgeComment({required final int id, required final int adminPersonId, required final int postId, final String? reason, @JsonKey(name: 'when_') required final String when}) = _$AdminPurgeCommentImpl; const _AdminPurgeComment._() : super._(); - factory _AdminPurgeComment.fromJson(Map json) = - _$AdminPurgeCommentImpl.fromJson; + factory _AdminPurgeComment.fromJson(Map json) = _$AdminPurgeCommentImpl.fromJson; @override int get id; // v0.18.0 @@ -257,6 +221,5 @@ abstract class _AdminPurgeComment extends AdminPurgeComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgeCommentImplCopyWith<_$AdminPurgeCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AdminPurgeCommentImplCopyWith<_$AdminPurgeCommentImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/admin_purge_comment.g.dart b/lib/src/v3/models/admin/admin_purge_comment.g.dart index 4a002dce..52ddd442 100644 --- a/lib/src/v3/models/admin/admin_purge_comment.g.dart +++ b/lib/src/v3/models/admin/admin_purge_comment.g.dart @@ -6,22 +6,18 @@ part of 'admin_purge_comment.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgeCommentImpl _$$AdminPurgeCommentImplFromJson( - Map json) => - _$AdminPurgeCommentImpl( - id: (json['id'] as num).toInt(), - adminPersonId: (json['admin_person_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - reason: json['reason'] as String?, - when: json['when_'] as String, - ); +_$AdminPurgeCommentImpl _$$AdminPurgeCommentImplFromJson(Map json) => _$AdminPurgeCommentImpl( + id: (json['id'] as num).toInt(), + adminPersonId: (json['admin_person_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + reason: json['reason'] as String?, + when: json['when_'] as String, +); -Map _$$AdminPurgeCommentImplToJson( - _$AdminPurgeCommentImpl instance) => - { - 'id': instance.id, - 'admin_person_id': instance.adminPersonId, - 'post_id': instance.postId, - 'reason': instance.reason, - 'when_': instance.when, - }; +Map _$$AdminPurgeCommentImplToJson(_$AdminPurgeCommentImpl instance) => { + 'id': instance.id, + 'admin_person_id': instance.adminPersonId, + 'post_id': instance.postId, + 'reason': instance.reason, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/admin/admin_purge_community.dart b/lib/src/v3/models/admin/admin_purge_community.dart index be5937e8..4d910c60 100644 --- a/lib/src/v3/models/admin/admin_purge_community.dart +++ b/lib/src/v3/models/admin/admin_purge_community.dart @@ -16,6 +16,5 @@ class AdminPurgeCommunity with _$AdminPurgeCommunity { }) = _AdminPurgeCommunity; const AdminPurgeCommunity._(); - factory AdminPurgeCommunity.fromJson(Map json) => - _$AdminPurgeCommunityFromJson(json); + factory AdminPurgeCommunity.fromJson(Map json) => _$AdminPurgeCommunityFromJson(json); } diff --git a/lib/src/v3/models/admin/admin_purge_community.freezed.dart b/lib/src/v3/models/admin/admin_purge_community.freezed.dart index 26c81182..d4923383 100644 --- a/lib/src/v3/models/admin/admin_purge_community.freezed.dart +++ b/lib/src/v3/models/admin/admin_purge_community.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgeCommunity _$AdminPurgeCommunityFromJson(Map json) { return _AdminPurgeCommunity.fromJson(json); @@ -32,26 +33,18 @@ mixin _$AdminPurgeCommunity { /// Create a copy of AdminPurgeCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgeCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgeCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgeCommunityCopyWith<$Res> { - factory $AdminPurgeCommunityCopyWith( - AdminPurgeCommunity value, $Res Function(AdminPurgeCommunity) then) = - _$AdminPurgeCommunityCopyWithImpl<$Res, AdminPurgeCommunity>; + factory $AdminPurgeCommunityCopyWith(AdminPurgeCommunity value, $Res Function(AdminPurgeCommunity) then) = _$AdminPurgeCommunityCopyWithImpl<$Res, AdminPurgeCommunity>; @useResult - $Res call( - {int id, - int adminPersonId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$AdminPurgeCommunityCopyWithImpl<$Res, $Val extends AdminPurgeCommunity> - implements $AdminPurgeCommunityCopyWith<$Res> { +class _$AdminPurgeCommunityCopyWithImpl<$Res, $Val extends AdminPurgeCommunity> implements $AdminPurgeCommunityCopyWith<$Res> { _$AdminPurgeCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,84 +56,76 @@ class _$AdminPurgeCommunityCopyWithImpl<$Res, $Val extends AdminPurgeCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? adminPersonId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AdminPurgeCommunityImplCopyWith<$Res> - implements $AdminPurgeCommunityCopyWith<$Res> { - factory _$$AdminPurgeCommunityImplCopyWith(_$AdminPurgeCommunityImpl value, - $Res Function(_$AdminPurgeCommunityImpl) then) = - __$$AdminPurgeCommunityImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgeCommunityImplCopyWith<$Res> implements $AdminPurgeCommunityCopyWith<$Res> { + factory _$$AdminPurgeCommunityImplCopyWith(_$AdminPurgeCommunityImpl value, $Res Function(_$AdminPurgeCommunityImpl) then) = __$$AdminPurgeCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int adminPersonId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$AdminPurgeCommunityImplCopyWithImpl<$Res> - extends _$AdminPurgeCommunityCopyWithImpl<$Res, _$AdminPurgeCommunityImpl> - implements _$$AdminPurgeCommunityImplCopyWith<$Res> { - __$$AdminPurgeCommunityImplCopyWithImpl(_$AdminPurgeCommunityImpl _value, - $Res Function(_$AdminPurgeCommunityImpl) _then) - : super(_value, _then); +class __$$AdminPurgeCommunityImplCopyWithImpl<$Res> extends _$AdminPurgeCommunityCopyWithImpl<$Res, _$AdminPurgeCommunityImpl> implements _$$AdminPurgeCommunityImplCopyWith<$Res> { + __$$AdminPurgeCommunityImplCopyWithImpl(_$AdminPurgeCommunityImpl _value, $Res Function(_$AdminPurgeCommunityImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgeCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_$AdminPurgeCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? adminPersonId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _$AdminPurgeCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -148,25 +133,19 @@ class __$$AdminPurgeCommunityImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgeCommunityImpl extends _AdminPurgeCommunity { - const _$AdminPurgeCommunityImpl( - {required this.id, - required this.adminPersonId, - this.reason, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$AdminPurgeCommunityImpl({required this.id, required this.adminPersonId, this.reason, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$AdminPurgeCommunityImpl.fromJson(Map json) => - _$$AdminPurgeCommunityImplFromJson(json); + factory _$AdminPurgeCommunityImpl.fromJson(Map json) => _$$AdminPurgeCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int adminPersonId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -182,8 +161,7 @@ class _$AdminPurgeCommunityImpl extends _AdminPurgeCommunity { (other.runtimeType == runtimeType && other is _$AdminPurgeCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.adminPersonId, adminPersonId) || - other.adminPersonId == adminPersonId) && + (identical(other.adminPersonId, adminPersonId) || other.adminPersonId == adminPersonId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.when, when) || other.when == when)); } @@ -197,29 +175,19 @@ class _$AdminPurgeCommunityImpl extends _AdminPurgeCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgeCommunityImplCopyWith<_$AdminPurgeCommunityImpl> get copyWith => - __$$AdminPurgeCommunityImplCopyWithImpl<_$AdminPurgeCommunityImpl>( - this, _$identity); + _$$AdminPurgeCommunityImplCopyWith<_$AdminPurgeCommunityImpl> get copyWith => __$$AdminPurgeCommunityImplCopyWithImpl<_$AdminPurgeCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgeCommunityImplToJson( - this, - ); + return _$$AdminPurgeCommunityImplToJson(this); } } abstract class _AdminPurgeCommunity extends AdminPurgeCommunity { - const factory _AdminPurgeCommunity( - {required final int id, - required final int adminPersonId, - final String? reason, - @JsonKey(name: 'when_') required final String when}) = - _$AdminPurgeCommunityImpl; + const factory _AdminPurgeCommunity({required final int id, required final int adminPersonId, final String? reason, @JsonKey(name: 'when_') required final String when}) = _$AdminPurgeCommunityImpl; const _AdminPurgeCommunity._() : super._(); - factory _AdminPurgeCommunity.fromJson(Map json) = - _$AdminPurgeCommunityImpl.fromJson; + factory _AdminPurgeCommunity.fromJson(Map json) = _$AdminPurgeCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -235,6 +203,5 @@ abstract class _AdminPurgeCommunity extends AdminPurgeCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgeCommunityImplCopyWith<_$AdminPurgeCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AdminPurgeCommunityImplCopyWith<_$AdminPurgeCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/admin_purge_community.g.dart b/lib/src/v3/models/admin/admin_purge_community.g.dart index 48724a84..fb0f60b3 100644 --- a/lib/src/v3/models/admin/admin_purge_community.g.dart +++ b/lib/src/v3/models/admin/admin_purge_community.g.dart @@ -6,20 +6,12 @@ part of 'admin_purge_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgeCommunityImpl _$$AdminPurgeCommunityImplFromJson( - Map json) => - _$AdminPurgeCommunityImpl( - id: (json['id'] as num).toInt(), - adminPersonId: (json['admin_person_id'] as num).toInt(), - reason: json['reason'] as String?, - when: json['when_'] as String, - ); +_$AdminPurgeCommunityImpl _$$AdminPurgeCommunityImplFromJson(Map json) => + _$AdminPurgeCommunityImpl(id: (json['id'] as num).toInt(), adminPersonId: (json['admin_person_id'] as num).toInt(), reason: json['reason'] as String?, when: json['when_'] as String); -Map _$$AdminPurgeCommunityImplToJson( - _$AdminPurgeCommunityImpl instance) => - { - 'id': instance.id, - 'admin_person_id': instance.adminPersonId, - 'reason': instance.reason, - 'when_': instance.when, - }; +Map _$$AdminPurgeCommunityImplToJson(_$AdminPurgeCommunityImpl instance) => { + 'id': instance.id, + 'admin_person_id': instance.adminPersonId, + 'reason': instance.reason, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/admin/admin_purge_person.dart b/lib/src/v3/models/admin/admin_purge_person.dart index bea1f544..f59bd8aa 100644 --- a/lib/src/v3/models/admin/admin_purge_person.dart +++ b/lib/src/v3/models/admin/admin_purge_person.dart @@ -16,6 +16,5 @@ class AdminPurgePerson with _$AdminPurgePerson { }) = _AdminPurgePerson; const AdminPurgePerson._(); - factory AdminPurgePerson.fromJson(Map json) => - _$AdminPurgePersonFromJson(json); + factory AdminPurgePerson.fromJson(Map json) => _$AdminPurgePersonFromJson(json); } diff --git a/lib/src/v3/models/admin/admin_purge_person.freezed.dart b/lib/src/v3/models/admin/admin_purge_person.freezed.dart index 6a989f23..8952a665 100644 --- a/lib/src/v3/models/admin/admin_purge_person.freezed.dart +++ b/lib/src/v3/models/admin/admin_purge_person.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_person.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgePerson _$AdminPurgePersonFromJson(Map json) { return _AdminPurgePerson.fromJson(json); @@ -32,26 +33,18 @@ mixin _$AdminPurgePerson { /// Create a copy of AdminPurgePerson /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgePersonCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgePersonCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgePersonCopyWith<$Res> { - factory $AdminPurgePersonCopyWith( - AdminPurgePerson value, $Res Function(AdminPurgePerson) then) = - _$AdminPurgePersonCopyWithImpl<$Res, AdminPurgePerson>; + factory $AdminPurgePersonCopyWith(AdminPurgePerson value, $Res Function(AdminPurgePerson) then) = _$AdminPurgePersonCopyWithImpl<$Res, AdminPurgePerson>; @useResult - $Res call( - {int id, - int adminPersonId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$AdminPurgePersonCopyWithImpl<$Res, $Val extends AdminPurgePerson> - implements $AdminPurgePersonCopyWith<$Res> { +class _$AdminPurgePersonCopyWithImpl<$Res, $Val extends AdminPurgePerson> implements $AdminPurgePersonCopyWith<$Res> { _$AdminPurgePersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,84 +56,76 @@ class _$AdminPurgePersonCopyWithImpl<$Res, $Val extends AdminPurgePerson> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? adminPersonId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AdminPurgePersonImplCopyWith<$Res> - implements $AdminPurgePersonCopyWith<$Res> { - factory _$$AdminPurgePersonImplCopyWith(_$AdminPurgePersonImpl value, - $Res Function(_$AdminPurgePersonImpl) then) = - __$$AdminPurgePersonImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgePersonImplCopyWith<$Res> implements $AdminPurgePersonCopyWith<$Res> { + factory _$$AdminPurgePersonImplCopyWith(_$AdminPurgePersonImpl value, $Res Function(_$AdminPurgePersonImpl) then) = __$$AdminPurgePersonImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int adminPersonId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$AdminPurgePersonImplCopyWithImpl<$Res> - extends _$AdminPurgePersonCopyWithImpl<$Res, _$AdminPurgePersonImpl> - implements _$$AdminPurgePersonImplCopyWith<$Res> { - __$$AdminPurgePersonImplCopyWithImpl(_$AdminPurgePersonImpl _value, - $Res Function(_$AdminPurgePersonImpl) _then) - : super(_value, _then); +class __$$AdminPurgePersonImplCopyWithImpl<$Res> extends _$AdminPurgePersonCopyWithImpl<$Res, _$AdminPurgePersonImpl> implements _$$AdminPurgePersonImplCopyWith<$Res> { + __$$AdminPurgePersonImplCopyWithImpl(_$AdminPurgePersonImpl _value, $Res Function(_$AdminPurgePersonImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgePerson /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_$AdminPurgePersonImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? adminPersonId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _$AdminPurgePersonImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -148,25 +133,19 @@ class __$$AdminPurgePersonImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgePersonImpl extends _AdminPurgePerson { - const _$AdminPurgePersonImpl( - {required this.id, - required this.adminPersonId, - this.reason, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$AdminPurgePersonImpl({required this.id, required this.adminPersonId, this.reason, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$AdminPurgePersonImpl.fromJson(Map json) => - _$$AdminPurgePersonImplFromJson(json); + factory _$AdminPurgePersonImpl.fromJson(Map json) => _$$AdminPurgePersonImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int adminPersonId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -182,8 +161,7 @@ class _$AdminPurgePersonImpl extends _AdminPurgePerson { (other.runtimeType == runtimeType && other is _$AdminPurgePersonImpl && (identical(other.id, id) || other.id == id) && - (identical(other.adminPersonId, adminPersonId) || - other.adminPersonId == adminPersonId) && + (identical(other.adminPersonId, adminPersonId) || other.adminPersonId == adminPersonId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.when, when) || other.when == when)); } @@ -197,29 +175,19 @@ class _$AdminPurgePersonImpl extends _AdminPurgePerson { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgePersonImplCopyWith<_$AdminPurgePersonImpl> get copyWith => - __$$AdminPurgePersonImplCopyWithImpl<_$AdminPurgePersonImpl>( - this, _$identity); + _$$AdminPurgePersonImplCopyWith<_$AdminPurgePersonImpl> get copyWith => __$$AdminPurgePersonImplCopyWithImpl<_$AdminPurgePersonImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgePersonImplToJson( - this, - ); + return _$$AdminPurgePersonImplToJson(this); } } abstract class _AdminPurgePerson extends AdminPurgePerson { - const factory _AdminPurgePerson( - {required final int id, - required final int adminPersonId, - final String? reason, - @JsonKey(name: 'when_') required final String when}) = - _$AdminPurgePersonImpl; + const factory _AdminPurgePerson({required final int id, required final int adminPersonId, final String? reason, @JsonKey(name: 'when_') required final String when}) = _$AdminPurgePersonImpl; const _AdminPurgePerson._() : super._(); - factory _AdminPurgePerson.fromJson(Map json) = - _$AdminPurgePersonImpl.fromJson; + factory _AdminPurgePerson.fromJson(Map json) = _$AdminPurgePersonImpl.fromJson; @override int get id; // v0.18.0 @@ -235,6 +203,5 @@ abstract class _AdminPurgePerson extends AdminPurgePerson { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgePersonImplCopyWith<_$AdminPurgePersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AdminPurgePersonImplCopyWith<_$AdminPurgePersonImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/admin_purge_person.g.dart b/lib/src/v3/models/admin/admin_purge_person.g.dart index 3035967e..45a42598 100644 --- a/lib/src/v3/models/admin/admin_purge_person.g.dart +++ b/lib/src/v3/models/admin/admin_purge_person.g.dart @@ -6,20 +6,12 @@ part of 'admin_purge_person.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgePersonImpl _$$AdminPurgePersonImplFromJson( - Map json) => - _$AdminPurgePersonImpl( - id: (json['id'] as num).toInt(), - adminPersonId: (json['admin_person_id'] as num).toInt(), - reason: json['reason'] as String?, - when: json['when_'] as String, - ); +_$AdminPurgePersonImpl _$$AdminPurgePersonImplFromJson(Map json) => + _$AdminPurgePersonImpl(id: (json['id'] as num).toInt(), adminPersonId: (json['admin_person_id'] as num).toInt(), reason: json['reason'] as String?, when: json['when_'] as String); -Map _$$AdminPurgePersonImplToJson( - _$AdminPurgePersonImpl instance) => - { - 'id': instance.id, - 'admin_person_id': instance.adminPersonId, - 'reason': instance.reason, - 'when_': instance.when, - }; +Map _$$AdminPurgePersonImplToJson(_$AdminPurgePersonImpl instance) => { + 'id': instance.id, + 'admin_person_id': instance.adminPersonId, + 'reason': instance.reason, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/admin/admin_purge_post.dart b/lib/src/v3/models/admin/admin_purge_post.dart index 942125ac..36b8bbea 100644 --- a/lib/src/v3/models/admin/admin_purge_post.dart +++ b/lib/src/v3/models/admin/admin_purge_post.dart @@ -17,6 +17,5 @@ class AdminPurgePost with _$AdminPurgePost { }) = _AdminPurgePost; const AdminPurgePost._(); - factory AdminPurgePost.fromJson(Map json) => - _$AdminPurgePostFromJson(json); + factory AdminPurgePost.fromJson(Map json) => _$AdminPurgePostFromJson(json); } diff --git a/lib/src/v3/models/admin/admin_purge_post.freezed.dart b/lib/src/v3/models/admin/admin_purge_post.freezed.dart index 40fa5347..a7dd94cc 100644 --- a/lib/src/v3/models/admin/admin_purge_post.freezed.dart +++ b/lib/src/v3/models/admin/admin_purge_post.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgePost _$AdminPurgePostFromJson(Map json) { return _AdminPurgePost.fromJson(json); @@ -33,27 +34,18 @@ mixin _$AdminPurgePost { /// Create a copy of AdminPurgePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgePostCopyWith<$Res> { - factory $AdminPurgePostCopyWith( - AdminPurgePost value, $Res Function(AdminPurgePost) then) = - _$AdminPurgePostCopyWithImpl<$Res, AdminPurgePost>; + factory $AdminPurgePostCopyWith(AdminPurgePost value, $Res Function(AdminPurgePost) then) = _$AdminPurgePostCopyWithImpl<$Res, AdminPurgePost>; @useResult - $Res call( - {int id, - int adminPersonId, - int communityId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, int communityId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$AdminPurgePostCopyWithImpl<$Res, $Val extends AdminPurgePost> - implements $AdminPurgePostCopyWith<$Res> { +class _$AdminPurgePostCopyWithImpl<$Res, $Val extends AdminPurgePost> implements $AdminPurgePostCopyWith<$Res> { _$AdminPurgePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -65,95 +57,86 @@ class _$AdminPurgePostCopyWithImpl<$Res, $Val extends AdminPurgePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? communityId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? adminPersonId = null, Object? communityId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AdminPurgePostImplCopyWith<$Res> - implements $AdminPurgePostCopyWith<$Res> { - factory _$$AdminPurgePostImplCopyWith(_$AdminPurgePostImpl value, - $Res Function(_$AdminPurgePostImpl) then) = - __$$AdminPurgePostImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgePostImplCopyWith<$Res> implements $AdminPurgePostCopyWith<$Res> { + factory _$$AdminPurgePostImplCopyWith(_$AdminPurgePostImpl value, $Res Function(_$AdminPurgePostImpl) then) = __$$AdminPurgePostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int adminPersonId, - int communityId, - String? reason, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int adminPersonId, int communityId, String? reason, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$AdminPurgePostImplCopyWithImpl<$Res> - extends _$AdminPurgePostCopyWithImpl<$Res, _$AdminPurgePostImpl> - implements _$$AdminPurgePostImplCopyWith<$Res> { - __$$AdminPurgePostImplCopyWithImpl( - _$AdminPurgePostImpl _value, $Res Function(_$AdminPurgePostImpl) _then) - : super(_value, _then); +class __$$AdminPurgePostImplCopyWithImpl<$Res> extends _$AdminPurgePostCopyWithImpl<$Res, _$AdminPurgePostImpl> implements _$$AdminPurgePostImplCopyWith<$Res> { + __$$AdminPurgePostImplCopyWithImpl(_$AdminPurgePostImpl _value, $Res Function(_$AdminPurgePostImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? adminPersonId = null, - Object? communityId = null, - Object? reason = freezed, - Object? when = null, - }) { - return _then(_$AdminPurgePostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - adminPersonId: null == adminPersonId - ? _value.adminPersonId - : adminPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? adminPersonId = null, Object? communityId = null, Object? reason = freezed, Object? when = null}) { + return _then( + _$AdminPurgePostImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + adminPersonId: + null == adminPersonId + ? _value.adminPersonId + : adminPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -161,29 +144,22 @@ class __$$AdminPurgePostImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgePostImpl extends _AdminPurgePost { - const _$AdminPurgePostImpl( - {required this.id, - required this.adminPersonId, - required this.communityId, - this.reason, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$AdminPurgePostImpl({required this.id, required this.adminPersonId, required this.communityId, this.reason, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$AdminPurgePostImpl.fromJson(Map json) => - _$$AdminPurgePostImplFromJson(json); + factory _$AdminPurgePostImpl.fromJson(Map json) => _$$AdminPurgePostImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int adminPersonId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -199,48 +175,35 @@ class _$AdminPurgePostImpl extends _AdminPurgePost { (other.runtimeType == runtimeType && other is _$AdminPurgePostImpl && (identical(other.id, id) || other.id == id) && - (identical(other.adminPersonId, adminPersonId) || - other.adminPersonId == adminPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.adminPersonId, adminPersonId) || other.adminPersonId == adminPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.when, when) || other.when == when)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, adminPersonId, communityId, reason, when); + int get hashCode => Object.hash(runtimeType, id, adminPersonId, communityId, reason, when); /// Create a copy of AdminPurgePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgePostImplCopyWith<_$AdminPurgePostImpl> get copyWith => - __$$AdminPurgePostImplCopyWithImpl<_$AdminPurgePostImpl>( - this, _$identity); + _$$AdminPurgePostImplCopyWith<_$AdminPurgePostImpl> get copyWith => __$$AdminPurgePostImplCopyWithImpl<_$AdminPurgePostImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgePostImplToJson( - this, - ); + return _$$AdminPurgePostImplToJson(this); } } abstract class _AdminPurgePost extends AdminPurgePost { - const factory _AdminPurgePost( - {required final int id, - required final int adminPersonId, - required final int communityId, - final String? reason, - @JsonKey(name: 'when_') required final String when}) = + const factory _AdminPurgePost({required final int id, required final int adminPersonId, required final int communityId, final String? reason, @JsonKey(name: 'when_') required final String when}) = _$AdminPurgePostImpl; const _AdminPurgePost._() : super._(); - factory _AdminPurgePost.fromJson(Map json) = - _$AdminPurgePostImpl.fromJson; + factory _AdminPurgePost.fromJson(Map json) = _$AdminPurgePostImpl.fromJson; @override int get id; // v0.18.0 @@ -258,6 +221,5 @@ abstract class _AdminPurgePost extends AdminPurgePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgePostImplCopyWith<_$AdminPurgePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AdminPurgePostImplCopyWith<_$AdminPurgePostImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/admin_purge_post.g.dart b/lib/src/v3/models/admin/admin_purge_post.g.dart index d92b6cad..bc96b85f 100644 --- a/lib/src/v3/models/admin/admin_purge_post.g.dart +++ b/lib/src/v3/models/admin/admin_purge_post.g.dart @@ -6,21 +6,18 @@ part of 'admin_purge_post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgePostImpl _$$AdminPurgePostImplFromJson(Map json) => - _$AdminPurgePostImpl( - id: (json['id'] as num).toInt(), - adminPersonId: (json['admin_person_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - reason: json['reason'] as String?, - when: json['when_'] as String, - ); +_$AdminPurgePostImpl _$$AdminPurgePostImplFromJson(Map json) => _$AdminPurgePostImpl( + id: (json['id'] as num).toInt(), + adminPersonId: (json['admin_person_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + reason: json['reason'] as String?, + when: json['when_'] as String, +); -Map _$$AdminPurgePostImplToJson( - _$AdminPurgePostImpl instance) => - { - 'id': instance.id, - 'admin_person_id': instance.adminPersonId, - 'community_id': instance.communityId, - 'reason': instance.reason, - 'when_': instance.when, - }; +Map _$$AdminPurgePostImplToJson(_$AdminPurgePostImpl instance) => { + 'id': instance.id, + 'admin_person_id': instance.adminPersonId, + 'community_id': instance.communityId, + 'reason': instance.reason, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/admin/get_unread_registration_application_count_response.dart b/lib/src/v3/models/admin/get_unread_registration_application_count_response.dart index 3b7cfdf5..076337a6 100644 --- a/lib/src/v3/models/admin/get_unread_registration_application_count_response.dart +++ b/lib/src/v3/models/admin/get_unread_registration_application_count_response.dart @@ -6,16 +6,12 @@ part 'get_unread_registration_application_count_response.freezed.dart'; part 'get_unread_registration_application_count_response.g.dart'; @freezed -class GetUnreadRegistrationApplicationCountResponse - with _$GetUnreadRegistrationApplicationCountResponse { +class GetUnreadRegistrationApplicationCountResponse with _$GetUnreadRegistrationApplicationCountResponse { @modelSerde const factory GetUnreadRegistrationApplicationCountResponse({ required int registrationApplications, // v0.18.0 }) = _GetUnreadRegistrationApplicationCountResponse; const GetUnreadRegistrationApplicationCountResponse._(); - factory GetUnreadRegistrationApplicationCountResponse.fromJson( - Map json, - ) => - _$GetUnreadRegistrationApplicationCountResponseFromJson(json); + factory GetUnreadRegistrationApplicationCountResponse.fromJson(Map json) => _$GetUnreadRegistrationApplicationCountResponseFromJson(json); } diff --git a/lib/src/v3/models/admin/get_unread_registration_application_count_response.freezed.dart b/lib/src/v3/models/admin/get_unread_registration_application_count_response.freezed.dart index 11a06b88..07713fba 100644 --- a/lib/src/v3/models/admin/get_unread_registration_application_count_response.freezed.dart +++ b/lib/src/v3/models/admin/get_unread_registration_application_count_response.freezed.dart @@ -12,11 +12,10 @@ part of 'get_unread_registration_application_count_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetUnreadRegistrationApplicationCountResponse - _$GetUnreadRegistrationApplicationCountResponseFromJson( - Map json) { +GetUnreadRegistrationApplicationCountResponse _$GetUnreadRegistrationApplicationCountResponseFromJson(Map json) { return _GetUnreadRegistrationApplicationCountResponse.fromJson(json); } @@ -30,28 +29,21 @@ mixin _$GetUnreadRegistrationApplicationCountResponse { /// Create a copy of GetUnreadRegistrationApplicationCountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetUnreadRegistrationApplicationCountResponseCopyWith< - GetUnreadRegistrationApplicationCountResponse> - get copyWith => throw _privateConstructorUsedError; + $GetUnreadRegistrationApplicationCountResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetUnreadRegistrationApplicationCountResponseCopyWith<$Res> { - factory $GetUnreadRegistrationApplicationCountResponseCopyWith( - GetUnreadRegistrationApplicationCountResponse value, - $Res Function(GetUnreadRegistrationApplicationCountResponse) then) = - _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, - GetUnreadRegistrationApplicationCountResponse>; + factory $GetUnreadRegistrationApplicationCountResponseCopyWith(GetUnreadRegistrationApplicationCountResponse value, $Res Function(GetUnreadRegistrationApplicationCountResponse) then) = + _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, GetUnreadRegistrationApplicationCountResponse>; @useResult $Res call({int registrationApplications}); } /// @nodoc -class _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, - $Val extends GetUnreadRegistrationApplicationCountResponse> +class _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, $Val extends GetUnreadRegistrationApplicationCountResponse> implements $GetUnreadRegistrationApplicationCountResponseCopyWith<$Res> { - _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl( - this._value, this._then); + _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl(this._value, this._then); // ignore: unused_field final $Val _value; @@ -62,27 +54,26 @@ class _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplications = null, - }) { - return _then(_value.copyWith( - registrationApplications: null == registrationApplications - ? _value.registrationApplications - : registrationApplications // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? registrationApplications = null}) { + return _then( + _value.copyWith( + registrationApplications: + null == registrationApplications + ? _value.registrationApplications + : registrationApplications // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith< - $Res> - implements $GetUnreadRegistrationApplicationCountResponseCopyWith<$Res> { +abstract class _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith<$Res> implements $GetUnreadRegistrationApplicationCountResponseCopyWith<$Res> { factory _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith( - _$GetUnreadRegistrationApplicationCountResponseImpl value, - $Res Function(_$GetUnreadRegistrationApplicationCountResponseImpl) - then) = - __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl<$Res>; + _$GetUnreadRegistrationApplicationCountResponseImpl value, + $Res Function(_$GetUnreadRegistrationApplicationCountResponseImpl) then, + ) = __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({int registrationApplications}); @@ -90,43 +81,37 @@ abstract class _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith< /// @nodoc class __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl<$Res> - extends _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, - _$GetUnreadRegistrationApplicationCountResponseImpl> - implements - _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith<$Res> { + extends _$GetUnreadRegistrationApplicationCountResponseCopyWithImpl<$Res, _$GetUnreadRegistrationApplicationCountResponseImpl> + implements _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith<$Res> { __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl( - _$GetUnreadRegistrationApplicationCountResponseImpl _value, - $Res Function(_$GetUnreadRegistrationApplicationCountResponseImpl) _then) - : super(_value, _then); + _$GetUnreadRegistrationApplicationCountResponseImpl _value, + $Res Function(_$GetUnreadRegistrationApplicationCountResponseImpl) _then, + ) : super(_value, _then); /// Create a copy of GetUnreadRegistrationApplicationCountResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplications = null, - }) { - return _then(_$GetUnreadRegistrationApplicationCountResponseImpl( - registrationApplications: null == registrationApplications - ? _value.registrationApplications - : registrationApplications // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? registrationApplications = null}) { + return _then( + _$GetUnreadRegistrationApplicationCountResponseImpl( + registrationApplications: + null == registrationApplications + ? _value.registrationApplications + : registrationApplications // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @modelSerde -class _$GetUnreadRegistrationApplicationCountResponseImpl - extends _GetUnreadRegistrationApplicationCountResponse { - const _$GetUnreadRegistrationApplicationCountResponseImpl( - {required this.registrationApplications}) - : super._(); +class _$GetUnreadRegistrationApplicationCountResponseImpl extends _GetUnreadRegistrationApplicationCountResponse { + const _$GetUnreadRegistrationApplicationCountResponseImpl({required this.registrationApplications}) : super._(); - factory _$GetUnreadRegistrationApplicationCountResponseImpl.fromJson( - Map json) => - _$$GetUnreadRegistrationApplicationCountResponseImplFromJson(json); + factory _$GetUnreadRegistrationApplicationCountResponseImpl.fromJson(Map json) => _$$GetUnreadRegistrationApplicationCountResponseImplFromJson(json); @override final int registrationApplications; @@ -141,9 +126,7 @@ class _$GetUnreadRegistrationApplicationCountResponseImpl return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetUnreadRegistrationApplicationCountResponseImpl && - (identical( - other.registrationApplications, registrationApplications) || - other.registrationApplications == registrationApplications)); + (identical(other.registrationApplications, registrationApplications) || other.registrationApplications == registrationApplications)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -155,31 +138,20 @@ class _$GetUnreadRegistrationApplicationCountResponseImpl @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith< - _$GetUnreadRegistrationApplicationCountResponseImpl> - get copyWith => - __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl< - _$GetUnreadRegistrationApplicationCountResponseImpl>( - this, _$identity); + _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith<_$GetUnreadRegistrationApplicationCountResponseImpl> get copyWith => + __$$GetUnreadRegistrationApplicationCountResponseImplCopyWithImpl<_$GetUnreadRegistrationApplicationCountResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetUnreadRegistrationApplicationCountResponseImplToJson( - this, - ); + return _$$GetUnreadRegistrationApplicationCountResponseImplToJson(this); } } -abstract class _GetUnreadRegistrationApplicationCountResponse - extends GetUnreadRegistrationApplicationCountResponse { - const factory _GetUnreadRegistrationApplicationCountResponse( - {required final int registrationApplications}) = - _$GetUnreadRegistrationApplicationCountResponseImpl; +abstract class _GetUnreadRegistrationApplicationCountResponse extends GetUnreadRegistrationApplicationCountResponse { + const factory _GetUnreadRegistrationApplicationCountResponse({required final int registrationApplications}) = _$GetUnreadRegistrationApplicationCountResponseImpl; const _GetUnreadRegistrationApplicationCountResponse._() : super._(); - factory _GetUnreadRegistrationApplicationCountResponse.fromJson( - Map json) = - _$GetUnreadRegistrationApplicationCountResponseImpl.fromJson; + factory _GetUnreadRegistrationApplicationCountResponse.fromJson(Map json) = _$GetUnreadRegistrationApplicationCountResponseImpl.fromJson; @override int get registrationApplications; @@ -188,7 +160,5 @@ abstract class _GetUnreadRegistrationApplicationCountResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith< - _$GetUnreadRegistrationApplicationCountResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetUnreadRegistrationApplicationCountResponseImplCopyWith<_$GetUnreadRegistrationApplicationCountResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/get_unread_registration_application_count_response.g.dart b/lib/src/v3/models/admin/get_unread_registration_application_count_response.g.dart index 1d3f8910..32e06451 100644 --- a/lib/src/v3/models/admin/get_unread_registration_application_count_response.g.dart +++ b/lib/src/v3/models/admin/get_unread_registration_application_count_response.g.dart @@ -6,16 +6,9 @@ part of 'get_unread_registration_application_count_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetUnreadRegistrationApplicationCountResponseImpl - _$$GetUnreadRegistrationApplicationCountResponseImplFromJson( - Map json) => - _$GetUnreadRegistrationApplicationCountResponseImpl( - registrationApplications: - (json['registration_applications'] as num).toInt(), - ); +_$GetUnreadRegistrationApplicationCountResponseImpl _$$GetUnreadRegistrationApplicationCountResponseImplFromJson(Map json) => + _$GetUnreadRegistrationApplicationCountResponseImpl(registrationApplications: (json['registration_applications'] as num).toInt()); -Map _$$GetUnreadRegistrationApplicationCountResponseImplToJson( - _$GetUnreadRegistrationApplicationCountResponseImpl instance) => - { - 'registration_applications': instance.registrationApplications, - }; +Map _$$GetUnreadRegistrationApplicationCountResponseImplToJson(_$GetUnreadRegistrationApplicationCountResponseImpl instance) => { + 'registration_applications': instance.registrationApplications, +}; diff --git a/lib/src/v3/models/admin/list_registration_applications_response.dart b/lib/src/v3/models/admin/list_registration_applications_response.dart index edf7f960..ba3249b7 100644 --- a/lib/src/v3/models/admin/list_registration_applications_response.dart +++ b/lib/src/v3/models/admin/list_registration_applications_response.dart @@ -7,17 +7,12 @@ part 'list_registration_applications_response.freezed.dart'; part 'list_registration_applications_response.g.dart'; @freezed -class ListRegistrationApplicationsResponse - with _$ListRegistrationApplicationsResponse { +class ListRegistrationApplicationsResponse with _$ListRegistrationApplicationsResponse { @modelSerde const factory ListRegistrationApplicationsResponse({ - required List - registrationApplications, // v0.18.0 + required List registrationApplications, // v0.18.0 }) = _ListRegistrationApplicationsResponse; const ListRegistrationApplicationsResponse._(); - factory ListRegistrationApplicationsResponse.fromJson( - Map json, - ) => - _$ListRegistrationApplicationsResponseFromJson(json); + factory ListRegistrationApplicationsResponse.fromJson(Map json) => _$ListRegistrationApplicationsResponseFromJson(json); } diff --git a/lib/src/v3/models/admin/list_registration_applications_response.freezed.dart b/lib/src/v3/models/admin/list_registration_applications_response.freezed.dart index db36c618..66cc857a 100644 --- a/lib/src/v3/models/admin/list_registration_applications_response.freezed.dart +++ b/lib/src/v3/models/admin/list_registration_applications_response.freezed.dart @@ -12,17 +12,16 @@ part of 'list_registration_applications_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListRegistrationApplicationsResponse - _$ListRegistrationApplicationsResponseFromJson(Map json) { +ListRegistrationApplicationsResponse _$ListRegistrationApplicationsResponseFromJson(Map json) { return _ListRegistrationApplicationsResponse.fromJson(json); } /// @nodoc mixin _$ListRegistrationApplicationsResponse { - List get registrationApplications => - throw _privateConstructorUsedError; + List get registrationApplications => throw _privateConstructorUsedError; /// Serializes this ListRegistrationApplicationsResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,26 +29,19 @@ mixin _$ListRegistrationApplicationsResponse { /// Create a copy of ListRegistrationApplicationsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListRegistrationApplicationsResponseCopyWith< - ListRegistrationApplicationsResponse> - get copyWith => throw _privateConstructorUsedError; + $ListRegistrationApplicationsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListRegistrationApplicationsResponseCopyWith<$Res> { - factory $ListRegistrationApplicationsResponseCopyWith( - ListRegistrationApplicationsResponse value, - $Res Function(ListRegistrationApplicationsResponse) then) = - _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, - ListRegistrationApplicationsResponse>; + factory $ListRegistrationApplicationsResponseCopyWith(ListRegistrationApplicationsResponse value, $Res Function(ListRegistrationApplicationsResponse) then) = + _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, ListRegistrationApplicationsResponse>; @useResult $Res call({List registrationApplications}); } /// @nodoc -class _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, - $Val extends ListRegistrationApplicationsResponse> - implements $ListRegistrationApplicationsResponseCopyWith<$Res> { +class _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, $Val extends ListRegistrationApplicationsResponse> implements $ListRegistrationApplicationsResponseCopyWith<$Res> { _$ListRegistrationApplicationsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,24 +53,23 @@ class _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplications = null, - }) { - return _then(_value.copyWith( - registrationApplications: null == registrationApplications - ? _value.registrationApplications - : registrationApplications // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? registrationApplications = null}) { + return _then( + _value.copyWith( + registrationApplications: + null == registrationApplications + ? _value.registrationApplications + : registrationApplications // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListRegistrationApplicationsResponseImplCopyWith<$Res> - implements $ListRegistrationApplicationsResponseCopyWith<$Res> { - factory _$$ListRegistrationApplicationsResponseImplCopyWith( - _$ListRegistrationApplicationsResponseImpl value, - $Res Function(_$ListRegistrationApplicationsResponseImpl) then) = +abstract class _$$ListRegistrationApplicationsResponseImplCopyWith<$Res> implements $ListRegistrationApplicationsResponseCopyWith<$Res> { + factory _$$ListRegistrationApplicationsResponseImplCopyWith(_$ListRegistrationApplicationsResponseImpl value, $Res Function(_$ListRegistrationApplicationsResponseImpl) then) = __$$ListRegistrationApplicationsResponseImplCopyWithImpl<$Res>; @override @useResult @@ -86,51 +77,39 @@ abstract class _$$ListRegistrationApplicationsResponseImplCopyWith<$Res> } /// @nodoc -class __$$ListRegistrationApplicationsResponseImplCopyWithImpl<$Res> - extends _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, - _$ListRegistrationApplicationsResponseImpl> +class __$$ListRegistrationApplicationsResponseImplCopyWithImpl<$Res> extends _$ListRegistrationApplicationsResponseCopyWithImpl<$Res, _$ListRegistrationApplicationsResponseImpl> implements _$$ListRegistrationApplicationsResponseImplCopyWith<$Res> { - __$$ListRegistrationApplicationsResponseImplCopyWithImpl( - _$ListRegistrationApplicationsResponseImpl _value, - $Res Function(_$ListRegistrationApplicationsResponseImpl) _then) - : super(_value, _then); + __$$ListRegistrationApplicationsResponseImplCopyWithImpl(_$ListRegistrationApplicationsResponseImpl _value, $Res Function(_$ListRegistrationApplicationsResponseImpl) _then) : super(_value, _then); /// Create a copy of ListRegistrationApplicationsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplications = null, - }) { - return _then(_$ListRegistrationApplicationsResponseImpl( - registrationApplications: null == registrationApplications - ? _value._registrationApplications - : registrationApplications // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? registrationApplications = null}) { + return _then( + _$ListRegistrationApplicationsResponseImpl( + registrationApplications: + null == registrationApplications + ? _value._registrationApplications + : registrationApplications // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @modelSerde -class _$ListRegistrationApplicationsResponseImpl - extends _ListRegistrationApplicationsResponse { - const _$ListRegistrationApplicationsResponseImpl( - {required final List - registrationApplications}) - : _registrationApplications = registrationApplications, - super._(); - - factory _$ListRegistrationApplicationsResponseImpl.fromJson( - Map json) => - _$$ListRegistrationApplicationsResponseImplFromJson(json); +class _$ListRegistrationApplicationsResponseImpl extends _ListRegistrationApplicationsResponse { + const _$ListRegistrationApplicationsResponseImpl({required final List registrationApplications}) : _registrationApplications = registrationApplications, super._(); + + factory _$ListRegistrationApplicationsResponseImpl.fromJson(Map json) => _$$ListRegistrationApplicationsResponseImplFromJson(json); final List _registrationApplications; @override List get registrationApplications { - if (_registrationApplications is EqualUnmodifiableListView) - return _registrationApplications; + if (_registrationApplications is EqualUnmodifiableListView) return _registrationApplications; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_registrationApplications); } @@ -143,46 +122,32 @@ class _$ListRegistrationApplicationsResponseImpl @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListRegistrationApplicationsResponseImpl && - const DeepCollectionEquality().equals( - other._registrationApplications, _registrationApplications)); + (other.runtimeType == runtimeType && other is _$ListRegistrationApplicationsResponseImpl && const DeepCollectionEquality().equals(other._registrationApplications, _registrationApplications)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_registrationApplications)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_registrationApplications)); /// Create a copy of ListRegistrationApplicationsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListRegistrationApplicationsResponseImplCopyWith< - _$ListRegistrationApplicationsResponseImpl> - get copyWith => __$$ListRegistrationApplicationsResponseImplCopyWithImpl< - _$ListRegistrationApplicationsResponseImpl>(this, _$identity); + _$$ListRegistrationApplicationsResponseImplCopyWith<_$ListRegistrationApplicationsResponseImpl> get copyWith => + __$$ListRegistrationApplicationsResponseImplCopyWithImpl<_$ListRegistrationApplicationsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListRegistrationApplicationsResponseImplToJson( - this, - ); + return _$$ListRegistrationApplicationsResponseImplToJson(this); } } -abstract class _ListRegistrationApplicationsResponse - extends ListRegistrationApplicationsResponse { - const factory _ListRegistrationApplicationsResponse( - {required final List - registrationApplications}) = - _$ListRegistrationApplicationsResponseImpl; +abstract class _ListRegistrationApplicationsResponse extends ListRegistrationApplicationsResponse { + const factory _ListRegistrationApplicationsResponse({required final List registrationApplications}) = _$ListRegistrationApplicationsResponseImpl; const _ListRegistrationApplicationsResponse._() : super._(); - factory _ListRegistrationApplicationsResponse.fromJson( - Map json) = - _$ListRegistrationApplicationsResponseImpl.fromJson; + factory _ListRegistrationApplicationsResponse.fromJson(Map json) = _$ListRegistrationApplicationsResponseImpl.fromJson; @override List get registrationApplications; @@ -191,7 +156,5 @@ abstract class _ListRegistrationApplicationsResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListRegistrationApplicationsResponseImplCopyWith< - _$ListRegistrationApplicationsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListRegistrationApplicationsResponseImplCopyWith<_$ListRegistrationApplicationsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/list_registration_applications_response.g.dart b/lib/src/v3/models/admin/list_registration_applications_response.g.dart index 3b55652a..cdc69e2c 100644 --- a/lib/src/v3/models/admin/list_registration_applications_response.g.dart +++ b/lib/src/v3/models/admin/list_registration_applications_response.g.dart @@ -6,20 +6,10 @@ part of 'list_registration_applications_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListRegistrationApplicationsResponseImpl - _$$ListRegistrationApplicationsResponseImplFromJson( - Map json) => - _$ListRegistrationApplicationsResponseImpl( - registrationApplications: - (json['registration_applications'] as List) - .map((e) => RegistrationApplicationView.fromJson( - e as Map)) - .toList(), - ); +_$ListRegistrationApplicationsResponseImpl _$$ListRegistrationApplicationsResponseImplFromJson(Map json) => _$ListRegistrationApplicationsResponseImpl( + registrationApplications: (json['registration_applications'] as List).map((e) => RegistrationApplicationView.fromJson(e as Map)).toList(), +); -Map _$$ListRegistrationApplicationsResponseImplToJson( - _$ListRegistrationApplicationsResponseImpl instance) => - { - 'registration_applications': - instance.registrationApplications.map((e) => e.toJson()).toList(), - }; +Map _$$ListRegistrationApplicationsResponseImplToJson(_$ListRegistrationApplicationsResponseImpl instance) => { + 'registration_applications': instance.registrationApplications.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/admin/purge_item_response.dart b/lib/src/v3/models/admin/purge_item_response.dart index 53ca89ac..69126661 100644 --- a/lib/src/v3/models/admin/purge_item_response.dart +++ b/lib/src/v3/models/admin/purge_item_response.dart @@ -13,6 +13,5 @@ class PurgeItemResponse with _$PurgeItemResponse { }) = _PurgeItemResponse; const PurgeItemResponse._(); - factory PurgeItemResponse.fromJson(Map json) => - _$PurgeItemResponseFromJson(json); + factory PurgeItemResponse.fromJson(Map json) => _$PurgeItemResponseFromJson(json); } diff --git a/lib/src/v3/models/admin/purge_item_response.freezed.dart b/lib/src/v3/models/admin/purge_item_response.freezed.dart index 85f41a42..3fbcd1c4 100644 --- a/lib/src/v3/models/admin/purge_item_response.freezed.dart +++ b/lib/src/v3/models/admin/purge_item_response.freezed.dart @@ -12,7 +12,8 @@ part of 'purge_item_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PurgeItemResponse _$PurgeItemResponseFromJson(Map json) { return _PurgeItemResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$PurgeItemResponse { /// Create a copy of PurgeItemResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PurgeItemResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PurgeItemResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PurgeItemResponseCopyWith<$Res> { - factory $PurgeItemResponseCopyWith( - PurgeItemResponse value, $Res Function(PurgeItemResponse) then) = - _$PurgeItemResponseCopyWithImpl<$Res, PurgeItemResponse>; + factory $PurgeItemResponseCopyWith(PurgeItemResponse value, $Res Function(PurgeItemResponse) then) = _$PurgeItemResponseCopyWithImpl<$Res, PurgeItemResponse>; @useResult $Res call({bool success}); } /// @nodoc -class _$PurgeItemResponseCopyWithImpl<$Res, $Val extends PurgeItemResponse> - implements $PurgeItemResponseCopyWith<$Res> { +class _$PurgeItemResponseCopyWithImpl<$Res, $Val extends PurgeItemResponse> implements $PurgeItemResponseCopyWith<$Res> { _$PurgeItemResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$PurgeItemResponseCopyWithImpl<$Res, $Val extends PurgeItemResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = null, - }) { - return _then(_value.copyWith( - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? success = null}) { + return _then( + _value.copyWith( + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PurgeItemResponseImplCopyWith<$Res> - implements $PurgeItemResponseCopyWith<$Res> { - factory _$$PurgeItemResponseImplCopyWith(_$PurgeItemResponseImpl value, - $Res Function(_$PurgeItemResponseImpl) then) = - __$$PurgeItemResponseImplCopyWithImpl<$Res>; +abstract class _$$PurgeItemResponseImplCopyWith<$Res> implements $PurgeItemResponseCopyWith<$Res> { + factory _$$PurgeItemResponseImplCopyWith(_$PurgeItemResponseImpl value, $Res Function(_$PurgeItemResponseImpl) then) = __$$PurgeItemResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool success}); } /// @nodoc -class __$$PurgeItemResponseImplCopyWithImpl<$Res> - extends _$PurgeItemResponseCopyWithImpl<$Res, _$PurgeItemResponseImpl> - implements _$$PurgeItemResponseImplCopyWith<$Res> { - __$$PurgeItemResponseImplCopyWithImpl(_$PurgeItemResponseImpl _value, - $Res Function(_$PurgeItemResponseImpl) _then) - : super(_value, _then); +class __$$PurgeItemResponseImplCopyWithImpl<$Res> extends _$PurgeItemResponseCopyWithImpl<$Res, _$PurgeItemResponseImpl> implements _$$PurgeItemResponseImplCopyWith<$Res> { + __$$PurgeItemResponseImplCopyWithImpl(_$PurgeItemResponseImpl _value, $Res Function(_$PurgeItemResponseImpl) _then) : super(_value, _then); /// Create a copy of PurgeItemResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = null, - }) { - return _then(_$PurgeItemResponseImpl( - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? success = null}) { + return _then( + _$PurgeItemResponseImpl( + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -108,8 +101,7 @@ class __$$PurgeItemResponseImplCopyWithImpl<$Res> class _$PurgeItemResponseImpl extends _PurgeItemResponse { const _$PurgeItemResponseImpl({required this.success}) : super._(); - factory _$PurgeItemResponseImpl.fromJson(Map json) => - _$$PurgeItemResponseImplFromJson(json); + factory _$PurgeItemResponseImpl.fromJson(Map json) => _$$PurgeItemResponseImplFromJson(json); @override final bool success; @@ -121,10 +113,7 @@ class _$PurgeItemResponseImpl extends _PurgeItemResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PurgeItemResponseImpl && - (identical(other.success, success) || other.success == success)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$PurgeItemResponseImpl && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -136,25 +125,19 @@ class _$PurgeItemResponseImpl extends _PurgeItemResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PurgeItemResponseImplCopyWith<_$PurgeItemResponseImpl> get copyWith => - __$$PurgeItemResponseImplCopyWithImpl<_$PurgeItemResponseImpl>( - this, _$identity); + _$$PurgeItemResponseImplCopyWith<_$PurgeItemResponseImpl> get copyWith => __$$PurgeItemResponseImplCopyWithImpl<_$PurgeItemResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PurgeItemResponseImplToJson( - this, - ); + return _$$PurgeItemResponseImplToJson(this); } } abstract class _PurgeItemResponse extends PurgeItemResponse { - const factory _PurgeItemResponse({required final bool success}) = - _$PurgeItemResponseImpl; + const factory _PurgeItemResponse({required final bool success}) = _$PurgeItemResponseImpl; const _PurgeItemResponse._() : super._(); - factory _PurgeItemResponse.fromJson(Map json) = - _$PurgeItemResponseImpl.fromJson; + factory _PurgeItemResponse.fromJson(Map json) = _$PurgeItemResponseImpl.fromJson; @override bool get success; @@ -163,6 +146,5 @@ abstract class _PurgeItemResponse extends PurgeItemResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PurgeItemResponseImplCopyWith<_$PurgeItemResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PurgeItemResponseImplCopyWith<_$PurgeItemResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/purge_item_response.g.dart b/lib/src/v3/models/admin/purge_item_response.g.dart index f1be523f..c9f98432 100644 --- a/lib/src/v3/models/admin/purge_item_response.g.dart +++ b/lib/src/v3/models/admin/purge_item_response.g.dart @@ -6,14 +6,6 @@ part of 'purge_item_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PurgeItemResponseImpl _$$PurgeItemResponseImplFromJson( - Map json) => - _$PurgeItemResponseImpl( - success: json['success'] as bool, - ); +_$PurgeItemResponseImpl _$$PurgeItemResponseImplFromJson(Map json) => _$PurgeItemResponseImpl(success: json['success'] as bool); -Map _$$PurgeItemResponseImplToJson( - _$PurgeItemResponseImpl instance) => - { - 'success': instance.success, - }; +Map _$$PurgeItemResponseImplToJson(_$PurgeItemResponseImpl instance) => {'success': instance.success}; diff --git a/lib/src/v3/models/admin/registration_application.dart b/lib/src/v3/models/admin/registration_application.dart index ec6b4263..222318f5 100644 --- a/lib/src/v3/models/admin/registration_application.dart +++ b/lib/src/v3/models/admin/registration_application.dart @@ -19,6 +19,5 @@ class RegistrationApplication with _$RegistrationApplication { }) = _RegistrationApplication; const RegistrationApplication._(); - factory RegistrationApplication.fromJson(Map json) => - _$RegistrationApplicationFromJson(json); + factory RegistrationApplication.fromJson(Map json) => _$RegistrationApplicationFromJson(json); } diff --git a/lib/src/v3/models/admin/registration_application.freezed.dart b/lib/src/v3/models/admin/registration_application.freezed.dart index 86970623..060e4b71 100644 --- a/lib/src/v3/models/admin/registration_application.freezed.dart +++ b/lib/src/v3/models/admin/registration_application.freezed.dart @@ -12,10 +12,10 @@ part of 'registration_application.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -RegistrationApplication _$RegistrationApplicationFromJson( - Map json) { +RegistrationApplication _$RegistrationApplicationFromJson(Map json) { return _RegistrationApplication.fromJson(json); } @@ -34,29 +34,18 @@ mixin _$RegistrationApplication { /// Create a copy of RegistrationApplication /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RegistrationApplicationCopyWith get copyWith => - throw _privateConstructorUsedError; + $RegistrationApplicationCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RegistrationApplicationCopyWith<$Res> { - factory $RegistrationApplicationCopyWith(RegistrationApplication value, - $Res Function(RegistrationApplication) then) = - _$RegistrationApplicationCopyWithImpl<$Res, RegistrationApplication>; + factory $RegistrationApplicationCopyWith(RegistrationApplication value, $Res Function(RegistrationApplication) then) = _$RegistrationApplicationCopyWithImpl<$Res, RegistrationApplication>; @useResult - $Res call( - {int id, - int localUserId, - String answer, - int? adminId, - String? denyReason, - DateTime published}); + $Res call({int id, int localUserId, String answer, int? adminId, String? denyReason, DateTime published}); } /// @nodoc -class _$RegistrationApplicationCopyWithImpl<$Res, - $Val extends RegistrationApplication> - implements $RegistrationApplicationCopyWith<$Res> { +class _$RegistrationApplicationCopyWithImpl<$Res, $Val extends RegistrationApplication> implements $RegistrationApplicationCopyWith<$Res> { _$RegistrationApplicationCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,109 +57,96 @@ class _$RegistrationApplicationCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? localUserId = null, - Object? answer = null, - Object? adminId = freezed, - Object? denyReason = freezed, - Object? published = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localUserId: null == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int, - answer: null == answer - ? _value.answer - : answer // ignore: cast_nullable_to_non_nullable - as String, - adminId: freezed == adminId - ? _value.adminId - : adminId // ignore: cast_nullable_to_non_nullable - as int?, - denyReason: freezed == denyReason - ? _value.denyReason - : denyReason // ignore: cast_nullable_to_non_nullable - as String?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + $Res call({Object? id = null, Object? localUserId = null, Object? answer = null, Object? adminId = freezed, Object? denyReason = freezed, Object? published = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localUserId: + null == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int, + answer: + null == answer + ? _value.answer + : answer // ignore: cast_nullable_to_non_nullable + as String, + adminId: + freezed == adminId + ? _value.adminId + : adminId // ignore: cast_nullable_to_non_nullable + as int?, + denyReason: + freezed == denyReason + ? _value.denyReason + : denyReason // ignore: cast_nullable_to_non_nullable + as String?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$RegistrationApplicationImplCopyWith<$Res> - implements $RegistrationApplicationCopyWith<$Res> { - factory _$$RegistrationApplicationImplCopyWith( - _$RegistrationApplicationImpl value, - $Res Function(_$RegistrationApplicationImpl) then) = - __$$RegistrationApplicationImplCopyWithImpl<$Res>; +abstract class _$$RegistrationApplicationImplCopyWith<$Res> implements $RegistrationApplicationCopyWith<$Res> { + factory _$$RegistrationApplicationImplCopyWith(_$RegistrationApplicationImpl value, $Res Function(_$RegistrationApplicationImpl) then) = __$$RegistrationApplicationImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int localUserId, - String answer, - int? adminId, - String? denyReason, - DateTime published}); + $Res call({int id, int localUserId, String answer, int? adminId, String? denyReason, DateTime published}); } /// @nodoc -class __$$RegistrationApplicationImplCopyWithImpl<$Res> - extends _$RegistrationApplicationCopyWithImpl<$Res, - _$RegistrationApplicationImpl> - implements _$$RegistrationApplicationImplCopyWith<$Res> { - __$$RegistrationApplicationImplCopyWithImpl( - _$RegistrationApplicationImpl _value, - $Res Function(_$RegistrationApplicationImpl) _then) - : super(_value, _then); +class __$$RegistrationApplicationImplCopyWithImpl<$Res> extends _$RegistrationApplicationCopyWithImpl<$Res, _$RegistrationApplicationImpl> implements _$$RegistrationApplicationImplCopyWith<$Res> { + __$$RegistrationApplicationImplCopyWithImpl(_$RegistrationApplicationImpl _value, $Res Function(_$RegistrationApplicationImpl) _then) : super(_value, _then); /// Create a copy of RegistrationApplication /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? localUserId = null, - Object? answer = null, - Object? adminId = freezed, - Object? denyReason = freezed, - Object? published = null, - }) { - return _then(_$RegistrationApplicationImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localUserId: null == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int, - answer: null == answer - ? _value.answer - : answer // ignore: cast_nullable_to_non_nullable - as String, - adminId: freezed == adminId - ? _value.adminId - : adminId // ignore: cast_nullable_to_non_nullable - as int?, - denyReason: freezed == denyReason - ? _value.denyReason - : denyReason // ignore: cast_nullable_to_non_nullable - as String?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + $Res call({Object? id = null, Object? localUserId = null, Object? answer = null, Object? adminId = freezed, Object? denyReason = freezed, Object? published = null}) { + return _then( + _$RegistrationApplicationImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localUserId: + null == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int, + answer: + null == answer + ? _value.answer + : answer // ignore: cast_nullable_to_non_nullable + as String, + adminId: + freezed == adminId + ? _value.adminId + : adminId // ignore: cast_nullable_to_non_nullable + as int?, + denyReason: + freezed == denyReason + ? _value.denyReason + : denyReason // ignore: cast_nullable_to_non_nullable + as String?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } @@ -178,33 +154,25 @@ class __$$RegistrationApplicationImplCopyWithImpl<$Res> @modelSerde class _$RegistrationApplicationImpl extends _RegistrationApplication { - const _$RegistrationApplicationImpl( - {required this.id, - required this.localUserId, - required this.answer, - this.adminId, - this.denyReason, - required this.published}) - : super._(); + const _$RegistrationApplicationImpl({required this.id, required this.localUserId, required this.answer, this.adminId, this.denyReason, required this.published}) : super._(); - factory _$RegistrationApplicationImpl.fromJson(Map json) => - _$$RegistrationApplicationImplFromJson(json); + factory _$RegistrationApplicationImpl.fromJson(Map json) => _$$RegistrationApplicationImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int localUserId; -// v0.18.0 + // v0.18.0 @override final String answer; -// v0.18.0 + // v0.18.0 @override final int? adminId; -// v0.18.0 + // v0.18.0 @override final String? denyReason; -// v0.18.0 + // v0.18.0 @override final DateTime published; @@ -219,50 +187,42 @@ class _$RegistrationApplicationImpl extends _RegistrationApplication { (other.runtimeType == runtimeType && other is _$RegistrationApplicationImpl && (identical(other.id, id) || other.id == id) && - (identical(other.localUserId, localUserId) || - other.localUserId == localUserId) && + (identical(other.localUserId, localUserId) || other.localUserId == localUserId) && (identical(other.answer, answer) || other.answer == answer) && (identical(other.adminId, adminId) || other.adminId == adminId) && - (identical(other.denyReason, denyReason) || - other.denyReason == denyReason) && - (identical(other.published, published) || - other.published == published)); + (identical(other.denyReason, denyReason) || other.denyReason == denyReason) && + (identical(other.published, published) || other.published == published)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, localUserId, answer, adminId, denyReason, published); + int get hashCode => Object.hash(runtimeType, id, localUserId, answer, adminId, denyReason, published); /// Create a copy of RegistrationApplication /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RegistrationApplicationImplCopyWith<_$RegistrationApplicationImpl> - get copyWith => __$$RegistrationApplicationImplCopyWithImpl< - _$RegistrationApplicationImpl>(this, _$identity); + _$$RegistrationApplicationImplCopyWith<_$RegistrationApplicationImpl> get copyWith => __$$RegistrationApplicationImplCopyWithImpl<_$RegistrationApplicationImpl>(this, _$identity); @override Map toJson() { - return _$$RegistrationApplicationImplToJson( - this, - ); + return _$$RegistrationApplicationImplToJson(this); } } abstract class _RegistrationApplication extends RegistrationApplication { - const factory _RegistrationApplication( - {required final int id, - required final int localUserId, - required final String answer, - final int? adminId, - final String? denyReason, - required final DateTime published}) = _$RegistrationApplicationImpl; + const factory _RegistrationApplication({ + required final int id, + required final int localUserId, + required final String answer, + final int? adminId, + final String? denyReason, + required final DateTime published, + }) = _$RegistrationApplicationImpl; const _RegistrationApplication._() : super._(); - factory _RegistrationApplication.fromJson(Map json) = - _$RegistrationApplicationImpl.fromJson; + factory _RegistrationApplication.fromJson(Map json) = _$RegistrationApplicationImpl.fromJson; @override int get id; // v0.18.0 @@ -281,6 +241,5 @@ abstract class _RegistrationApplication extends RegistrationApplication { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RegistrationApplicationImplCopyWith<_$RegistrationApplicationImpl> - get copyWith => throw _privateConstructorUsedError; + _$$RegistrationApplicationImplCopyWith<_$RegistrationApplicationImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/registration_application.g.dart b/lib/src/v3/models/admin/registration_application.g.dart index 257c503e..707782b1 100644 --- a/lib/src/v3/models/admin/registration_application.g.dart +++ b/lib/src/v3/models/admin/registration_application.g.dart @@ -6,24 +6,20 @@ part of 'registration_application.dart'; // JsonSerializableGenerator // ************************************************************************** -_$RegistrationApplicationImpl _$$RegistrationApplicationImplFromJson( - Map json) => - _$RegistrationApplicationImpl( - id: (json['id'] as num).toInt(), - localUserId: (json['local_user_id'] as num).toInt(), - answer: json['answer'] as String, - adminId: (json['admin_id'] as num?)?.toInt(), - denyReason: json['deny_reason'] as String?, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - ); +_$RegistrationApplicationImpl _$$RegistrationApplicationImplFromJson(Map json) => _$RegistrationApplicationImpl( + id: (json['id'] as num).toInt(), + localUserId: (json['local_user_id'] as num).toInt(), + answer: json['answer'] as String, + adminId: (json['admin_id'] as num?)?.toInt(), + denyReason: json['deny_reason'] as String?, + published: const ForceUtcDateTime().fromJson(json['published'] as String), +); -Map _$$RegistrationApplicationImplToJson( - _$RegistrationApplicationImpl instance) => - { - 'id': instance.id, - 'local_user_id': instance.localUserId, - 'answer': instance.answer, - 'admin_id': instance.adminId, - 'deny_reason': instance.denyReason, - 'published': const ForceUtcDateTime().toJson(instance.published), - }; +Map _$$RegistrationApplicationImplToJson(_$RegistrationApplicationImpl instance) => { + 'id': instance.id, + 'local_user_id': instance.localUserId, + 'answer': instance.answer, + 'admin_id': instance.adminId, + 'deny_reason': instance.denyReason, + 'published': const ForceUtcDateTime().toJson(instance.published), +}; diff --git a/lib/src/v3/models/admin/registration_application_response.dart b/lib/src/v3/models/admin/registration_application_response.dart index b4e66a6b..312f19f0 100644 --- a/lib/src/v3/models/admin/registration_application_response.dart +++ b/lib/src/v3/models/admin/registration_application_response.dart @@ -14,6 +14,5 @@ class RegistrationApplicationResponse with _$RegistrationApplicationResponse { }) = _RegistrationApplicationResponse; const RegistrationApplicationResponse._(); - factory RegistrationApplicationResponse.fromJson(Map json) => - _$RegistrationApplicationResponseFromJson(json); + factory RegistrationApplicationResponse.fromJson(Map json) => _$RegistrationApplicationResponseFromJson(json); } diff --git a/lib/src/v3/models/admin/registration_application_response.freezed.dart b/lib/src/v3/models/admin/registration_application_response.freezed.dart index 2ddc45c2..348c5a7b 100644 --- a/lib/src/v3/models/admin/registration_application_response.freezed.dart +++ b/lib/src/v3/models/admin/registration_application_response.freezed.dart @@ -12,17 +12,16 @@ part of 'registration_application_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -RegistrationApplicationResponse _$RegistrationApplicationResponseFromJson( - Map json) { +RegistrationApplicationResponse _$RegistrationApplicationResponseFromJson(Map json) { return _RegistrationApplicationResponse.fromJson(json); } /// @nodoc mixin _$RegistrationApplicationResponse { - RegistrationApplicationView get registrationApplication => - throw _privateConstructorUsedError; + RegistrationApplicationView get registrationApplication => throw _privateConstructorUsedError; /// Serializes this RegistrationApplicationResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,17 +29,13 @@ mixin _$RegistrationApplicationResponse { /// Create a copy of RegistrationApplicationResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RegistrationApplicationResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $RegistrationApplicationResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RegistrationApplicationResponseCopyWith<$Res> { - factory $RegistrationApplicationResponseCopyWith( - RegistrationApplicationResponse value, - $Res Function(RegistrationApplicationResponse) then) = - _$RegistrationApplicationResponseCopyWithImpl<$Res, - RegistrationApplicationResponse>; + factory $RegistrationApplicationResponseCopyWith(RegistrationApplicationResponse value, $Res Function(RegistrationApplicationResponse) then) = + _$RegistrationApplicationResponseCopyWithImpl<$Res, RegistrationApplicationResponse>; @useResult $Res call({RegistrationApplicationView registrationApplication}); @@ -48,9 +43,7 @@ abstract class $RegistrationApplicationResponseCopyWith<$Res> { } /// @nodoc -class _$RegistrationApplicationResponseCopyWithImpl<$Res, - $Val extends RegistrationApplicationResponse> - implements $RegistrationApplicationResponseCopyWith<$Res> { +class _$RegistrationApplicationResponseCopyWithImpl<$Res, $Val extends RegistrationApplicationResponse> implements $RegistrationApplicationResponseCopyWith<$Res> { _$RegistrationApplicationResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,15 +55,17 @@ class _$RegistrationApplicationResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplication = null, - }) { - return _then(_value.copyWith( - registrationApplication: null == registrationApplication - ? _value.registrationApplication - : registrationApplication // ignore: cast_nullable_to_non_nullable - as RegistrationApplicationView, - ) as $Val); + $Res call({Object? registrationApplication = null}) { + return _then( + _value.copyWith( + registrationApplication: + null == registrationApplication + ? _value.registrationApplication + : registrationApplication // ignore: cast_nullable_to_non_nullable + as RegistrationApplicationView, + ) + as $Val, + ); } /// Create a copy of RegistrationApplicationResponse @@ -78,19 +73,15 @@ class _$RegistrationApplicationResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $RegistrationApplicationViewCopyWith<$Res> get registrationApplication { - return $RegistrationApplicationViewCopyWith<$Res>( - _value.registrationApplication, (value) { + return $RegistrationApplicationViewCopyWith<$Res>(_value.registrationApplication, (value) { return _then(_value.copyWith(registrationApplication: value) as $Val); }); } } /// @nodoc -abstract class _$$RegistrationApplicationResponseImplCopyWith<$Res> - implements $RegistrationApplicationResponseCopyWith<$Res> { - factory _$$RegistrationApplicationResponseImplCopyWith( - _$RegistrationApplicationResponseImpl value, - $Res Function(_$RegistrationApplicationResponseImpl) then) = +abstract class _$$RegistrationApplicationResponseImplCopyWith<$Res> implements $RegistrationApplicationResponseCopyWith<$Res> { + factory _$$RegistrationApplicationResponseImplCopyWith(_$RegistrationApplicationResponseImpl value, $Res Function(_$RegistrationApplicationResponseImpl) then) = __$$RegistrationApplicationResponseImplCopyWithImpl<$Res>; @override @useResult @@ -101,43 +92,34 @@ abstract class _$$RegistrationApplicationResponseImplCopyWith<$Res> } /// @nodoc -class __$$RegistrationApplicationResponseImplCopyWithImpl<$Res> - extends _$RegistrationApplicationResponseCopyWithImpl<$Res, - _$RegistrationApplicationResponseImpl> +class __$$RegistrationApplicationResponseImplCopyWithImpl<$Res> extends _$RegistrationApplicationResponseCopyWithImpl<$Res, _$RegistrationApplicationResponseImpl> implements _$$RegistrationApplicationResponseImplCopyWith<$Res> { - __$$RegistrationApplicationResponseImplCopyWithImpl( - _$RegistrationApplicationResponseImpl _value, - $Res Function(_$RegistrationApplicationResponseImpl) _then) - : super(_value, _then); + __$$RegistrationApplicationResponseImplCopyWithImpl(_$RegistrationApplicationResponseImpl _value, $Res Function(_$RegistrationApplicationResponseImpl) _then) : super(_value, _then); /// Create a copy of RegistrationApplicationResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplication = null, - }) { - return _then(_$RegistrationApplicationResponseImpl( - registrationApplication: null == registrationApplication - ? _value.registrationApplication - : registrationApplication // ignore: cast_nullable_to_non_nullable - as RegistrationApplicationView, - )); + $Res call({Object? registrationApplication = null}) { + return _then( + _$RegistrationApplicationResponseImpl( + registrationApplication: + null == registrationApplication + ? _value.registrationApplication + : registrationApplication // ignore: cast_nullable_to_non_nullable + as RegistrationApplicationView, + ), + ); } } /// @nodoc @modelSerde -class _$RegistrationApplicationResponseImpl - extends _RegistrationApplicationResponse { - const _$RegistrationApplicationResponseImpl( - {required this.registrationApplication}) - : super._(); +class _$RegistrationApplicationResponseImpl extends _RegistrationApplicationResponse { + const _$RegistrationApplicationResponseImpl({required this.registrationApplication}) : super._(); - factory _$RegistrationApplicationResponseImpl.fromJson( - Map json) => - _$$RegistrationApplicationResponseImplFromJson(json); + factory _$RegistrationApplicationResponseImpl.fromJson(Map json) => _$$RegistrationApplicationResponseImplFromJson(json); @override final RegistrationApplicationView registrationApplication; @@ -152,9 +134,7 @@ class _$RegistrationApplicationResponseImpl return identical(this, other) || (other.runtimeType == runtimeType && other is _$RegistrationApplicationResponseImpl && - (identical( - other.registrationApplication, registrationApplication) || - other.registrationApplication == registrationApplication)); + (identical(other.registrationApplication, registrationApplication) || other.registrationApplication == registrationApplication)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -166,28 +146,20 @@ class _$RegistrationApplicationResponseImpl @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RegistrationApplicationResponseImplCopyWith< - _$RegistrationApplicationResponseImpl> - get copyWith => __$$RegistrationApplicationResponseImplCopyWithImpl< - _$RegistrationApplicationResponseImpl>(this, _$identity); + _$$RegistrationApplicationResponseImplCopyWith<_$RegistrationApplicationResponseImpl> get copyWith => + __$$RegistrationApplicationResponseImplCopyWithImpl<_$RegistrationApplicationResponseImpl>(this, _$identity); @override Map toJson() { - return _$$RegistrationApplicationResponseImplToJson( - this, - ); + return _$$RegistrationApplicationResponseImplToJson(this); } } -abstract class _RegistrationApplicationResponse - extends RegistrationApplicationResponse { - const factory _RegistrationApplicationResponse( - {required final RegistrationApplicationView - registrationApplication}) = _$RegistrationApplicationResponseImpl; +abstract class _RegistrationApplicationResponse extends RegistrationApplicationResponse { + const factory _RegistrationApplicationResponse({required final RegistrationApplicationView registrationApplication}) = _$RegistrationApplicationResponseImpl; const _RegistrationApplicationResponse._() : super._(); - factory _RegistrationApplicationResponse.fromJson(Map json) = - _$RegistrationApplicationResponseImpl.fromJson; + factory _RegistrationApplicationResponse.fromJson(Map json) = _$RegistrationApplicationResponseImpl.fromJson; @override RegistrationApplicationView get registrationApplication; @@ -196,7 +168,5 @@ abstract class _RegistrationApplicationResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RegistrationApplicationResponseImplCopyWith< - _$RegistrationApplicationResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$RegistrationApplicationResponseImplCopyWith<_$RegistrationApplicationResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/admin/registration_application_response.g.dart b/lib/src/v3/models/admin/registration_application_response.g.dart index 797063b4..2736e051 100644 --- a/lib/src/v3/models/admin/registration_application_response.g.dart +++ b/lib/src/v3/models/admin/registration_application_response.g.dart @@ -6,15 +6,9 @@ part of 'registration_application_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$RegistrationApplicationResponseImpl - _$$RegistrationApplicationResponseImplFromJson(Map json) => - _$RegistrationApplicationResponseImpl( - registrationApplication: RegistrationApplicationView.fromJson( - json['registration_application'] as Map), - ); +_$RegistrationApplicationResponseImpl _$$RegistrationApplicationResponseImplFromJson(Map json) => + _$RegistrationApplicationResponseImpl(registrationApplication: RegistrationApplicationView.fromJson(json['registration_application'] as Map)); -Map _$$RegistrationApplicationResponseImplToJson( - _$RegistrationApplicationResponseImpl instance) => - { - 'registration_application': instance.registrationApplication.toJson(), - }; +Map _$$RegistrationApplicationResponseImplToJson(_$RegistrationApplicationResponseImpl instance) => { + 'registration_application': instance.registrationApplication.toJson(), +}; diff --git a/lib/src/v3/models/comment/comment.dart b/lib/src/v3/models/comment/comment.dart index 950d8df1..dac247c0 100644 --- a/lib/src/v3/models/comment/comment.dart +++ b/lib/src/v3/models/comment/comment.dart @@ -26,6 +26,5 @@ class Comment with _$Comment { }) = _Comment; const Comment._(); - factory Comment.fromJson(Map json) => - _$CommentFromJson(json); + factory Comment.fromJson(Map json) => _$CommentFromJson(json); } diff --git a/lib/src/v3/models/comment/comment.freezed.dart b/lib/src/v3/models/comment/comment.freezed.dart index 7cd093d2..d3ed9f18 100644 --- a/lib/src/v3/models/comment/comment.freezed.dart +++ b/lib/src/v3/models/comment/comment.freezed.dart @@ -12,7 +12,8 @@ part of 'comment.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Comment _$CommentFromJson(Map json) { return _Comment.fromJson(json); @@ -45,28 +46,27 @@ mixin _$Comment { /// @nodoc abstract class $CommentCopyWith<$Res> { - factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = - _$CommentCopyWithImpl<$Res, Comment>; + factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>; @useResult - $Res call( - {int id, - int creatorId, - int postId, - String content, - bool removed, - DateTime published, - DateTime? updated, - bool deleted, - String apId, - bool local, - String path, - bool distinguished, - int languageId}); + $Res call({ + int id, + int creatorId, + int postId, + String content, + bool removed, + DateTime published, + DateTime? updated, + bool deleted, + String apId, + bool local, + String path, + bool distinguished, + int languageId, + }); } /// @nodoc -class _$CommentCopyWithImpl<$Res, $Val extends Comment> - implements $CommentCopyWith<$Res> { +class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyWith<$Res> { _$CommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -93,93 +93,104 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment> Object? distinguished = null, Object? languageId = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - distinguished: null == distinguished - ? _value.distinguished - : distinguished // ignore: cast_nullable_to_non_nullable - as bool, - languageId: null == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + distinguished: + null == distinguished + ? _value.distinguished + : distinguished // ignore: cast_nullable_to_non_nullable + as bool, + languageId: + null == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> { - factory _$$CommentImplCopyWith( - _$CommentImpl value, $Res Function(_$CommentImpl) then) = - __$$CommentImplCopyWithImpl<$Res>; + factory _$$CommentImplCopyWith(_$CommentImpl value, $Res Function(_$CommentImpl) then) = __$$CommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int creatorId, - int postId, - String content, - bool removed, - DateTime published, - DateTime? updated, - bool deleted, - String apId, - bool local, - String path, - bool distinguished, - int languageId}); + $Res call({ + int id, + int creatorId, + int postId, + String content, + bool removed, + DateTime published, + DateTime? updated, + bool deleted, + String apId, + bool local, + String path, + bool distinguished, + int languageId, + }); } /// @nodoc -class __$$CommentImplCopyWithImpl<$Res> - extends _$CommentCopyWithImpl<$Res, _$CommentImpl> - implements _$$CommentImplCopyWith<$Res> { - __$$CommentImplCopyWithImpl( - _$CommentImpl _value, $Res Function(_$CommentImpl) _then) - : super(_value, _then); +class __$$CommentImplCopyWithImpl<$Res> extends _$CommentCopyWithImpl<$Res, _$CommentImpl> implements _$$CommentImplCopyWith<$Res> { + __$$CommentImplCopyWithImpl(_$CommentImpl _value, $Res Function(_$CommentImpl) _then) : super(_value, _then); /// Create a copy of Comment /// with the given fields replaced by the non-null parameter values. @@ -200,60 +211,75 @@ class __$$CommentImplCopyWithImpl<$Res> Object? distinguished = null, Object? languageId = null, }) { - return _then(_$CommentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - distinguished: null == distinguished - ? _value.distinguished - : distinguished // ignore: cast_nullable_to_non_nullable - as bool, - languageId: null == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$CommentImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + distinguished: + null == distinguished + ? _value.distinguished + : distinguished // ignore: cast_nullable_to_non_nullable + as bool, + languageId: + null == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -261,61 +287,60 @@ class __$$CommentImplCopyWithImpl<$Res> @modelSerde class _$CommentImpl extends _Comment { - const _$CommentImpl( - {required this.id, - required this.creatorId, - required this.postId, - required this.content, - required this.removed, - required this.published, - this.updated, - required this.deleted, - required this.apId, - required this.local, - required this.path, - required this.distinguished, - required this.languageId}) - : super._(); + const _$CommentImpl({ + required this.id, + required this.creatorId, + required this.postId, + required this.content, + required this.removed, + required this.published, + this.updated, + required this.deleted, + required this.apId, + required this.local, + required this.path, + required this.distinguished, + required this.languageId, + }) : super._(); - factory _$CommentImpl.fromJson(Map json) => - _$$CommentImplFromJson(json); + factory _$CommentImpl.fromJson(Map json) => _$$CommentImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final String content; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final String apId; -// v0.18.0 + // v0.18.0 @override final bool local; -// v0.18.0 + // v0.18.0 @override final String path; -// v0.18.0 + // v0.18.0 @override final bool distinguished; -// v0.18.0 + // v0.18.0 @override final int languageId; @@ -330,73 +355,53 @@ class _$CommentImpl extends _Comment { (other.runtimeType == runtimeType && other is _$CommentImpl && (identical(other.id, id) || other.id == id) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && (identical(other.postId, postId) || other.postId == postId) && (identical(other.content, content) || other.content == content) && (identical(other.removed, removed) || other.removed == removed) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.apId, apId) || other.apId == apId) && (identical(other.local, local) || other.local == local) && (identical(other.path, path) || other.path == path) && - (identical(other.distinguished, distinguished) || - other.distinguished == distinguished) && - (identical(other.languageId, languageId) || - other.languageId == languageId)); + (identical(other.distinguished, distinguished) || other.distinguished == distinguished) && + (identical(other.languageId, languageId) || other.languageId == languageId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - creatorId, - postId, - content, - removed, - published, - updated, - deleted, - apId, - local, - path, - distinguished, - languageId); + int get hashCode => Object.hash(runtimeType, id, creatorId, postId, content, removed, published, updated, deleted, apId, local, path, distinguished, languageId); /// Create a copy of Comment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentImplCopyWith<_$CommentImpl> get copyWith => - __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity); + _$$CommentImplCopyWith<_$CommentImpl> get copyWith => __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity); @override Map toJson() { - return _$$CommentImplToJson( - this, - ); + return _$$CommentImplToJson(this); } } abstract class _Comment extends Comment { - const factory _Comment( - {required final int id, - required final int creatorId, - required final int postId, - required final String content, - required final bool removed, - required final DateTime published, - final DateTime? updated, - required final bool deleted, - required final String apId, - required final bool local, - required final String path, - required final bool distinguished, - required final int languageId}) = _$CommentImpl; + const factory _Comment({ + required final int id, + required final int creatorId, + required final int postId, + required final String content, + required final bool removed, + required final DateTime published, + final DateTime? updated, + required final bool deleted, + required final String apId, + required final bool local, + required final String path, + required final bool distinguished, + required final int languageId, + }) = _$CommentImpl; const _Comment._() : super._(); factory _Comment.fromJson(Map json) = _$CommentImpl.fromJson; @@ -432,6 +437,5 @@ abstract class _Comment extends Comment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentImplCopyWith<_$CommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentImplCopyWith<_$CommentImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment.g.dart b/lib/src/v3/models/comment/comment.g.dart index 6299a69b..d4fec20e 100644 --- a/lib/src/v3/models/comment/comment.g.dart +++ b/lib/src/v3/models/comment/comment.g.dart @@ -6,50 +6,38 @@ part of 'comment.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentImpl _$$CommentImplFromJson(Map json) => - _$CommentImpl( - id: (json['id'] as num).toInt(), - creatorId: (json['creator_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - content: json['content'] as String, - removed: json['removed'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - deleted: json['deleted'] as bool, - apId: json['ap_id'] as String, - local: json['local'] as bool, - path: json['path'] as String, - distinguished: json['distinguished'] as bool, - languageId: (json['language_id'] as num).toInt(), - ); +_$CommentImpl _$$CommentImplFromJson(Map json) => _$CommentImpl( + id: (json['id'] as num).toInt(), + creatorId: (json['creator_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + content: json['content'] as String, + removed: json['removed'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + deleted: json['deleted'] as bool, + apId: json['ap_id'] as String, + local: json['local'] as bool, + path: json['path'] as String, + distinguished: json['distinguished'] as bool, + languageId: (json['language_id'] as num).toInt(), +); -Map _$$CommentImplToJson(_$CommentImpl instance) => - { - 'id': instance.id, - 'creator_id': instance.creatorId, - 'post_id': instance.postId, - 'content': instance.content, - 'removed': instance.removed, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'deleted': instance.deleted, - 'ap_id': instance.apId, - 'local': instance.local, - 'path': instance.path, - 'distinguished': instance.distinguished, - 'language_id': instance.languageId, - }; +Map _$$CommentImplToJson(_$CommentImpl instance) => { + 'id': instance.id, + 'creator_id': instance.creatorId, + 'post_id': instance.postId, + 'content': instance.content, + 'removed': instance.removed, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'deleted': instance.deleted, + 'ap_id': instance.apId, + 'local': instance.local, + 'path': instance.path, + 'distinguished': instance.distinguished, + 'language_id': instance.languageId, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/comment/comment_aggregates.dart b/lib/src/v3/models/comment/comment_aggregates.dart index f715afd8..5e14d408 100644 --- a/lib/src/v3/models/comment/comment_aggregates.dart +++ b/lib/src/v3/models/comment/comment_aggregates.dart @@ -21,6 +21,5 @@ class CommentAggregates with _$CommentAggregates { }) = _CommentAggregates; const CommentAggregates._(); - factory CommentAggregates.fromJson(Map json) => - _$CommentAggregatesFromJson(json); + factory CommentAggregates.fromJson(Map json) => _$CommentAggregatesFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_aggregates.freezed.dart b/lib/src/v3/models/comment/comment_aggregates.freezed.dart index 8431b090..0f8183c4 100644 --- a/lib/src/v3/models/comment/comment_aggregates.freezed.dart +++ b/lib/src/v3/models/comment/comment_aggregates.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_aggregates.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentAggregates _$CommentAggregatesFromJson(Map json) { return _CommentAggregates.fromJson(json); @@ -21,8 +22,7 @@ CommentAggregates _$CommentAggregatesFromJson(Map json) { /// @nodoc mixin _$CommentAggregates { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get commentId => throw _privateConstructorUsedError; // v0.18.0 int get score => throw _privateConstructorUsedError; // v0.18.0 int get upvotes => throw _privateConstructorUsedError; // v0.18.0 @@ -38,30 +38,18 @@ mixin _$CommentAggregates { /// Create a copy of CommentAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentAggregatesCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentAggregatesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentAggregatesCopyWith<$Res> { - factory $CommentAggregatesCopyWith( - CommentAggregates value, $Res Function(CommentAggregates) then) = - _$CommentAggregatesCopyWithImpl<$Res, CommentAggregates>; + factory $CommentAggregatesCopyWith(CommentAggregates value, $Res Function(CommentAggregates) then) = _$CommentAggregatesCopyWithImpl<$Res, CommentAggregates>; @useResult - $Res call( - {@deprecated int? id, - int commentId, - int score, - int upvotes, - int downvotes, - DateTime published, - int childCount, - @deprecated int? hotRank}); + $Res call({@deprecated int? id, int commentId, int score, int upvotes, int downvotes, DateTime published, int childCount, @deprecated int? hotRank}); } /// @nodoc -class _$CommentAggregatesCopyWithImpl<$Res, $Val extends CommentAggregates> - implements $CommentAggregatesCopyWith<$Res> { +class _$CommentAggregatesCopyWithImpl<$Res, $Val extends CommentAggregates> implements $CommentAggregatesCopyWith<$Res> { _$CommentAggregatesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -83,69 +71,65 @@ class _$CommentAggregatesCopyWithImpl<$Res, $Val extends CommentAggregates> Object? childCount = null, Object? hotRank = freezed, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - upvotes: null == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as int, - downvotes: null == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - childCount: null == childCount - ? _value.childCount - : childCount // ignore: cast_nullable_to_non_nullable - as int, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + upvotes: + null == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as int, + downvotes: + null == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + childCount: + null == childCount + ? _value.childCount + : childCount // ignore: cast_nullable_to_non_nullable + as int, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CommentAggregatesImplCopyWith<$Res> - implements $CommentAggregatesCopyWith<$Res> { - factory _$$CommentAggregatesImplCopyWith(_$CommentAggregatesImpl value, - $Res Function(_$CommentAggregatesImpl) then) = - __$$CommentAggregatesImplCopyWithImpl<$Res>; +abstract class _$$CommentAggregatesImplCopyWith<$Res> implements $CommentAggregatesCopyWith<$Res> { + factory _$$CommentAggregatesImplCopyWith(_$CommentAggregatesImpl value, $Res Function(_$CommentAggregatesImpl) then) = __$$CommentAggregatesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int commentId, - int score, - int upvotes, - int downvotes, - DateTime published, - int childCount, - @deprecated int? hotRank}); + $Res call({@deprecated int? id, int commentId, int score, int upvotes, int downvotes, DateTime published, int childCount, @deprecated int? hotRank}); } /// @nodoc -class __$$CommentAggregatesImplCopyWithImpl<$Res> - extends _$CommentAggregatesCopyWithImpl<$Res, _$CommentAggregatesImpl> - implements _$$CommentAggregatesImplCopyWith<$Res> { - __$$CommentAggregatesImplCopyWithImpl(_$CommentAggregatesImpl _value, - $Res Function(_$CommentAggregatesImpl) _then) - : super(_value, _then); +class __$$CommentAggregatesImplCopyWithImpl<$Res> extends _$CommentAggregatesCopyWithImpl<$Res, _$CommentAggregatesImpl> implements _$$CommentAggregatesImplCopyWith<$Res> { + __$$CommentAggregatesImplCopyWithImpl(_$CommentAggregatesImpl _value, $Res Function(_$CommentAggregatesImpl) _then) : super(_value, _then); /// Create a copy of CommentAggregates /// with the given fields replaced by the non-null parameter values. @@ -161,40 +145,50 @@ class __$$CommentAggregatesImplCopyWithImpl<$Res> Object? childCount = null, Object? hotRank = freezed, }) { - return _then(_$CommentAggregatesImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - upvotes: null == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as int, - downvotes: null == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - childCount: null == childCount - ? _value.childCount - : childCount // ignore: cast_nullable_to_non_nullable - as int, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$CommentAggregatesImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + upvotes: + null == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as int, + downvotes: + null == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + childCount: + null == childCount + ? _value.childCount + : childCount // ignore: cast_nullable_to_non_nullable + as int, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -202,42 +196,41 @@ class __$$CommentAggregatesImplCopyWithImpl<$Res> @modelSerde class _$CommentAggregatesImpl extends _CommentAggregates { - const _$CommentAggregatesImpl( - {@deprecated this.id, - required this.commentId, - required this.score, - required this.upvotes, - required this.downvotes, - required this.published, - required this.childCount, - @deprecated this.hotRank}) - : super._(); + const _$CommentAggregatesImpl({ + @deprecated this.id, + required this.commentId, + required this.score, + required this.upvotes, + required this.downvotes, + required this.published, + required this.childCount, + @deprecated this.hotRank, + }) : super._(); - factory _$CommentAggregatesImpl.fromJson(Map json) => - _$$CommentAggregatesImplFromJson(json); + factory _$CommentAggregatesImpl.fromJson(Map json) => _$$CommentAggregatesImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int commentId; -// v0.18.0 + // v0.18.0 @override final int score; -// v0.18.0 + // v0.18.0 @override final int upvotes; -// v0.18.0 + // v0.18.0 @override final int downvotes; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final int childCount; -// v0.18.0 + // v0.18.0 @override @deprecated final int? hotRank; @@ -253,55 +246,46 @@ class _$CommentAggregatesImpl extends _CommentAggregates { (other.runtimeType == runtimeType && other is _$CommentAggregatesImpl && (identical(other.id, id) || other.id == id) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.score, score) || other.score == score) && (identical(other.upvotes, upvotes) || other.upvotes == upvotes) && - (identical(other.downvotes, downvotes) || - other.downvotes == downvotes) && - (identical(other.published, published) || - other.published == published) && - (identical(other.childCount, childCount) || - other.childCount == childCount) && + (identical(other.downvotes, downvotes) || other.downvotes == downvotes) && + (identical(other.published, published) || other.published == published) && + (identical(other.childCount, childCount) || other.childCount == childCount) && (identical(other.hotRank, hotRank) || other.hotRank == hotRank)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, commentId, score, upvotes, - downvotes, published, childCount, hotRank); + int get hashCode => Object.hash(runtimeType, id, commentId, score, upvotes, downvotes, published, childCount, hotRank); /// Create a copy of CommentAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentAggregatesImplCopyWith<_$CommentAggregatesImpl> get copyWith => - __$$CommentAggregatesImplCopyWithImpl<_$CommentAggregatesImpl>( - this, _$identity); + _$$CommentAggregatesImplCopyWith<_$CommentAggregatesImpl> get copyWith => __$$CommentAggregatesImplCopyWithImpl<_$CommentAggregatesImpl>(this, _$identity); @override Map toJson() { - return _$$CommentAggregatesImplToJson( - this, - ); + return _$$CommentAggregatesImplToJson(this); } } abstract class _CommentAggregates extends CommentAggregates { - const factory _CommentAggregates( - {@deprecated final int? id, - required final int commentId, - required final int score, - required final int upvotes, - required final int downvotes, - required final DateTime published, - required final int childCount, - @deprecated final int? hotRank}) = _$CommentAggregatesImpl; + const factory _CommentAggregates({ + @deprecated final int? id, + required final int commentId, + required final int score, + required final int upvotes, + required final int downvotes, + required final DateTime published, + required final int childCount, + @deprecated final int? hotRank, + }) = _$CommentAggregatesImpl; const _CommentAggregates._() : super._(); - factory _CommentAggregates.fromJson(Map json) = - _$CommentAggregatesImpl.fromJson; + factory _CommentAggregates.fromJson(Map json) = _$CommentAggregatesImpl.fromJson; @override @deprecated @@ -326,6 +310,5 @@ abstract class _CommentAggregates extends CommentAggregates { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentAggregatesImplCopyWith<_$CommentAggregatesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentAggregatesImplCopyWith<_$CommentAggregatesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_aggregates.g.dart b/lib/src/v3/models/comment/comment_aggregates.g.dart index 871ec7cd..4aaf3a2c 100644 --- a/lib/src/v3/models/comment/comment_aggregates.g.dart +++ b/lib/src/v3/models/comment/comment_aggregates.g.dart @@ -6,28 +6,24 @@ part of 'comment_aggregates.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentAggregatesImpl _$$CommentAggregatesImplFromJson( - Map json) => - _$CommentAggregatesImpl( - id: (json['id'] as num?)?.toInt(), - commentId: (json['comment_id'] as num).toInt(), - score: (json['score'] as num).toInt(), - upvotes: (json['upvotes'] as num).toInt(), - downvotes: (json['downvotes'] as num).toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - childCount: (json['child_count'] as num).toInt(), - hotRank: (json['hot_rank'] as num?)?.toInt(), - ); +_$CommentAggregatesImpl _$$CommentAggregatesImplFromJson(Map json) => _$CommentAggregatesImpl( + id: (json['id'] as num?)?.toInt(), + commentId: (json['comment_id'] as num).toInt(), + score: (json['score'] as num).toInt(), + upvotes: (json['upvotes'] as num).toInt(), + downvotes: (json['downvotes'] as num).toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + childCount: (json['child_count'] as num).toInt(), + hotRank: (json['hot_rank'] as num?)?.toInt(), +); -Map _$$CommentAggregatesImplToJson( - _$CommentAggregatesImpl instance) => - { - 'id': instance.id, - 'comment_id': instance.commentId, - 'score': instance.score, - 'upvotes': instance.upvotes, - 'downvotes': instance.downvotes, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'child_count': instance.childCount, - 'hot_rank': instance.hotRank, - }; +Map _$$CommentAggregatesImplToJson(_$CommentAggregatesImpl instance) => { + 'id': instance.id, + 'comment_id': instance.commentId, + 'score': instance.score, + 'upvotes': instance.upvotes, + 'downvotes': instance.downvotes, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'child_count': instance.childCount, + 'hot_rank': instance.hotRank, +}; diff --git a/lib/src/v3/models/comment/comment_reply.dart b/lib/src/v3/models/comment/comment_reply.dart index 9702d743..b2448eb8 100644 --- a/lib/src/v3/models/comment/comment_reply.dart +++ b/lib/src/v3/models/comment/comment_reply.dart @@ -18,6 +18,5 @@ class CommentReply with _$CommentReply { }) = _CommentReply; const CommentReply._(); - factory CommentReply.fromJson(Map json) => - _$CommentReplyFromJson(json); + factory CommentReply.fromJson(Map json) => _$CommentReplyFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_reply.freezed.dart b/lib/src/v3/models/comment/comment_reply.freezed.dart index a11bb48d..6929a998 100644 --- a/lib/src/v3/models/comment/comment_reply.freezed.dart +++ b/lib/src/v3/models/comment/comment_reply.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_reply.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentReply _$CommentReplyFromJson(Map json) { return _CommentReply.fromJson(json); @@ -32,23 +33,18 @@ mixin _$CommentReply { /// Create a copy of CommentReply /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReplyCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReplyCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReplyCopyWith<$Res> { - factory $CommentReplyCopyWith( - CommentReply value, $Res Function(CommentReply) then) = - _$CommentReplyCopyWithImpl<$Res, CommentReply>; + factory $CommentReplyCopyWith(CommentReply value, $Res Function(CommentReply) then) = _$CommentReplyCopyWithImpl<$Res, CommentReply>; @useResult - $Res call( - {int id, int recipientId, int commentId, bool read, DateTime published}); + $Res call({int id, int recipientId, int commentId, bool read, DateTime published}); } /// @nodoc -class _$CommentReplyCopyWithImpl<$Res, $Val extends CommentReply> - implements $CommentReplyCopyWith<$Res> { +class _$CommentReplyCopyWithImpl<$Res, $Val extends CommentReply> implements $CommentReplyCopyWith<$Res> { _$CommentReplyCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,91 +56,86 @@ class _$CommentReplyCopyWithImpl<$Res, $Val extends CommentReply> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? recipientId = null, - Object? commentId = null, - Object? read = null, - Object? published = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + $Res call({Object? id = null, Object? recipientId = null, Object? commentId = null, Object? read = null, Object? published = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CommentReplyImplCopyWith<$Res> - implements $CommentReplyCopyWith<$Res> { - factory _$$CommentReplyImplCopyWith( - _$CommentReplyImpl value, $Res Function(_$CommentReplyImpl) then) = - __$$CommentReplyImplCopyWithImpl<$Res>; +abstract class _$$CommentReplyImplCopyWith<$Res> implements $CommentReplyCopyWith<$Res> { + factory _$$CommentReplyImplCopyWith(_$CommentReplyImpl value, $Res Function(_$CommentReplyImpl) then) = __$$CommentReplyImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, int recipientId, int commentId, bool read, DateTime published}); + $Res call({int id, int recipientId, int commentId, bool read, DateTime published}); } /// @nodoc -class __$$CommentReplyImplCopyWithImpl<$Res> - extends _$CommentReplyCopyWithImpl<$Res, _$CommentReplyImpl> - implements _$$CommentReplyImplCopyWith<$Res> { - __$$CommentReplyImplCopyWithImpl( - _$CommentReplyImpl _value, $Res Function(_$CommentReplyImpl) _then) - : super(_value, _then); +class __$$CommentReplyImplCopyWithImpl<$Res> extends _$CommentReplyCopyWithImpl<$Res, _$CommentReplyImpl> implements _$$CommentReplyImplCopyWith<$Res> { + __$$CommentReplyImplCopyWithImpl(_$CommentReplyImpl _value, $Res Function(_$CommentReplyImpl) _then) : super(_value, _then); /// Create a copy of CommentReply /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? recipientId = null, - Object? commentId = null, - Object? read = null, - Object? published = null, - }) { - return _then(_$CommentReplyImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + $Res call({Object? id = null, Object? recipientId = null, Object? commentId = null, Object? read = null, Object? published = null}) { + return _then( + _$CommentReplyImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } @@ -152,29 +143,22 @@ class __$$CommentReplyImplCopyWithImpl<$Res> @modelSerde class _$CommentReplyImpl extends _CommentReply { - const _$CommentReplyImpl( - {required this.id, - required this.recipientId, - required this.commentId, - required this.read, - required this.published}) - : super._(); + const _$CommentReplyImpl({required this.id, required this.recipientId, required this.commentId, required this.read, required this.published}) : super._(); - factory _$CommentReplyImpl.fromJson(Map json) => - _$$CommentReplyImplFromJson(json); + factory _$CommentReplyImpl.fromJson(Map json) => _$$CommentReplyImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int recipientId; -// v0.18.0 + // v0.18.0 @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final DateTime published; @@ -189,47 +173,34 @@ class _$CommentReplyImpl extends _CommentReply { (other.runtimeType == runtimeType && other is _$CommentReplyImpl && (identical(other.id, id) || other.id == id) && - (identical(other.recipientId, recipientId) || - other.recipientId == recipientId) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.recipientId, recipientId) || other.recipientId == recipientId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.read, read) || other.read == read) && - (identical(other.published, published) || - other.published == published)); + (identical(other.published, published) || other.published == published)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, recipientId, commentId, read, published); + int get hashCode => Object.hash(runtimeType, id, recipientId, commentId, read, published); /// Create a copy of CommentReply /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReplyImplCopyWith<_$CommentReplyImpl> get copyWith => - __$$CommentReplyImplCopyWithImpl<_$CommentReplyImpl>(this, _$identity); + _$$CommentReplyImplCopyWith<_$CommentReplyImpl> get copyWith => __$$CommentReplyImplCopyWithImpl<_$CommentReplyImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReplyImplToJson( - this, - ); + return _$$CommentReplyImplToJson(this); } } abstract class _CommentReply extends CommentReply { - const factory _CommentReply( - {required final int id, - required final int recipientId, - required final int commentId, - required final bool read, - required final DateTime published}) = _$CommentReplyImpl; + const factory _CommentReply({required final int id, required final int recipientId, required final int commentId, required final bool read, required final DateTime published}) = _$CommentReplyImpl; const _CommentReply._() : super._(); - factory _CommentReply.fromJson(Map json) = - _$CommentReplyImpl.fromJson; + factory _CommentReply.fromJson(Map json) = _$CommentReplyImpl.fromJson; @override int get id; // v0.18.0 @@ -246,6 +217,5 @@ abstract class _CommentReply extends CommentReply { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReplyImplCopyWith<_$CommentReplyImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentReplyImplCopyWith<_$CommentReplyImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_reply.g.dart b/lib/src/v3/models/comment/comment_reply.g.dart index 66d00023..1bfa4f15 100644 --- a/lib/src/v3/models/comment/comment_reply.g.dart +++ b/lib/src/v3/models/comment/comment_reply.g.dart @@ -6,20 +6,18 @@ part of 'comment_reply.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReplyImpl _$$CommentReplyImplFromJson(Map json) => - _$CommentReplyImpl( - id: (json['id'] as num).toInt(), - recipientId: (json['recipient_id'] as num).toInt(), - commentId: (json['comment_id'] as num).toInt(), - read: json['read'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - ); +_$CommentReplyImpl _$$CommentReplyImplFromJson(Map json) => _$CommentReplyImpl( + id: (json['id'] as num).toInt(), + recipientId: (json['recipient_id'] as num).toInt(), + commentId: (json['comment_id'] as num).toInt(), + read: json['read'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), +); -Map _$$CommentReplyImplToJson(_$CommentReplyImpl instance) => - { - 'id': instance.id, - 'recipient_id': instance.recipientId, - 'comment_id': instance.commentId, - 'read': instance.read, - 'published': const ForceUtcDateTime().toJson(instance.published), - }; +Map _$$CommentReplyImplToJson(_$CommentReplyImpl instance) => { + 'id': instance.id, + 'recipient_id': instance.recipientId, + 'comment_id': instance.commentId, + 'read': instance.read, + 'published': const ForceUtcDateTime().toJson(instance.published), +}; diff --git a/lib/src/v3/models/comment/comment_reply_response.dart b/lib/src/v3/models/comment/comment_reply_response.dart index 0146a53c..030f2d39 100644 --- a/lib/src/v3/models/comment/comment_reply_response.dart +++ b/lib/src/v3/models/comment/comment_reply_response.dart @@ -14,6 +14,5 @@ class CommentReplyResponse with _$CommentReplyResponse { }) = _CommentReplyResponse; const CommentReplyResponse._(); - factory CommentReplyResponse.fromJson(Map json) => - _$CommentReplyResponseFromJson(json); + factory CommentReplyResponse.fromJson(Map json) => _$CommentReplyResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_reply_response.freezed.dart b/lib/src/v3/models/comment/comment_reply_response.freezed.dart index 3c74eee4..632f305a 100644 --- a/lib/src/v3/models/comment/comment_reply_response.freezed.dart +++ b/lib/src/v3/models/comment/comment_reply_response.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_reply_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentReplyResponse _$CommentReplyResponseFromJson(Map json) { return _CommentReplyResponse.fromJson(json); @@ -28,15 +29,12 @@ mixin _$CommentReplyResponse { /// Create a copy of CommentReplyResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReplyResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReplyResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReplyResponseCopyWith<$Res> { - factory $CommentReplyResponseCopyWith(CommentReplyResponse value, - $Res Function(CommentReplyResponse) then) = - _$CommentReplyResponseCopyWithImpl<$Res, CommentReplyResponse>; + factory $CommentReplyResponseCopyWith(CommentReplyResponse value, $Res Function(CommentReplyResponse) then) = _$CommentReplyResponseCopyWithImpl<$Res, CommentReplyResponse>; @useResult $Res call({CommentReplyView commentReplyView}); @@ -44,9 +42,7 @@ abstract class $CommentReplyResponseCopyWith<$Res> { } /// @nodoc -class _$CommentReplyResponseCopyWithImpl<$Res, - $Val extends CommentReplyResponse> - implements $CommentReplyResponseCopyWith<$Res> { +class _$CommentReplyResponseCopyWithImpl<$Res, $Val extends CommentReplyResponse> implements $CommentReplyResponseCopyWith<$Res> { _$CommentReplyResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,15 +54,17 @@ class _$CommentReplyResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReplyView = null, - }) { - return _then(_value.copyWith( - commentReplyView: null == commentReplyView - ? _value.commentReplyView - : commentReplyView // ignore: cast_nullable_to_non_nullable - as CommentReplyView, - ) as $Val); + $Res call({Object? commentReplyView = null}) { + return _then( + _value.copyWith( + commentReplyView: + null == commentReplyView + ? _value.commentReplyView + : commentReplyView // ignore: cast_nullable_to_non_nullable + as CommentReplyView, + ) + as $Val, + ); } /// Create a copy of CommentReplyResponse @@ -81,11 +79,8 @@ class _$CommentReplyResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$CommentReplyResponseImplCopyWith<$Res> - implements $CommentReplyResponseCopyWith<$Res> { - factory _$$CommentReplyResponseImplCopyWith(_$CommentReplyResponseImpl value, - $Res Function(_$CommentReplyResponseImpl) then) = - __$$CommentReplyResponseImplCopyWithImpl<$Res>; +abstract class _$$CommentReplyResponseImplCopyWith<$Res> implements $CommentReplyResponseCopyWith<$Res> { + factory _$$CommentReplyResponseImplCopyWith(_$CommentReplyResponseImpl value, $Res Function(_$CommentReplyResponseImpl) then) = __$$CommentReplyResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CommentReplyView commentReplyView}); @@ -95,26 +90,23 @@ abstract class _$$CommentReplyResponseImplCopyWith<$Res> } /// @nodoc -class __$$CommentReplyResponseImplCopyWithImpl<$Res> - extends _$CommentReplyResponseCopyWithImpl<$Res, _$CommentReplyResponseImpl> - implements _$$CommentReplyResponseImplCopyWith<$Res> { - __$$CommentReplyResponseImplCopyWithImpl(_$CommentReplyResponseImpl _value, - $Res Function(_$CommentReplyResponseImpl) _then) - : super(_value, _then); +class __$$CommentReplyResponseImplCopyWithImpl<$Res> extends _$CommentReplyResponseCopyWithImpl<$Res, _$CommentReplyResponseImpl> implements _$$CommentReplyResponseImplCopyWith<$Res> { + __$$CommentReplyResponseImplCopyWithImpl(_$CommentReplyResponseImpl _value, $Res Function(_$CommentReplyResponseImpl) _then) : super(_value, _then); /// Create a copy of CommentReplyResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReplyView = null, - }) { - return _then(_$CommentReplyResponseImpl( - commentReplyView: null == commentReplyView - ? _value.commentReplyView - : commentReplyView // ignore: cast_nullable_to_non_nullable - as CommentReplyView, - )); + $Res call({Object? commentReplyView = null}) { + return _then( + _$CommentReplyResponseImpl( + commentReplyView: + null == commentReplyView + ? _value.commentReplyView + : commentReplyView // ignore: cast_nullable_to_non_nullable + as CommentReplyView, + ), + ); } } @@ -122,11 +114,9 @@ class __$$CommentReplyResponseImplCopyWithImpl<$Res> @modelSerde class _$CommentReplyResponseImpl extends _CommentReplyResponse { - const _$CommentReplyResponseImpl({required this.commentReplyView}) - : super._(); + const _$CommentReplyResponseImpl({required this.commentReplyView}) : super._(); - factory _$CommentReplyResponseImpl.fromJson(Map json) => - _$$CommentReplyResponseImplFromJson(json); + factory _$CommentReplyResponseImpl.fromJson(Map json) => _$$CommentReplyResponseImplFromJson(json); @override final CommentReplyView commentReplyView; @@ -139,10 +129,7 @@ class _$CommentReplyResponseImpl extends _CommentReplyResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$CommentReplyResponseImpl && - (identical(other.commentReplyView, commentReplyView) || - other.commentReplyView == commentReplyView)); + (other.runtimeType == runtimeType && other is _$CommentReplyResponseImpl && (identical(other.commentReplyView, commentReplyView) || other.commentReplyView == commentReplyView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -154,27 +141,19 @@ class _$CommentReplyResponseImpl extends _CommentReplyResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReplyResponseImplCopyWith<_$CommentReplyResponseImpl> - get copyWith => - __$$CommentReplyResponseImplCopyWithImpl<_$CommentReplyResponseImpl>( - this, _$identity); + _$$CommentReplyResponseImplCopyWith<_$CommentReplyResponseImpl> get copyWith => __$$CommentReplyResponseImplCopyWithImpl<_$CommentReplyResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReplyResponseImplToJson( - this, - ); + return _$$CommentReplyResponseImplToJson(this); } } abstract class _CommentReplyResponse extends CommentReplyResponse { - const factory _CommentReplyResponse( - {required final CommentReplyView commentReplyView}) = - _$CommentReplyResponseImpl; + const factory _CommentReplyResponse({required final CommentReplyView commentReplyView}) = _$CommentReplyResponseImpl; const _CommentReplyResponse._() : super._(); - factory _CommentReplyResponse.fromJson(Map json) = - _$CommentReplyResponseImpl.fromJson; + factory _CommentReplyResponse.fromJson(Map json) = _$CommentReplyResponseImpl.fromJson; @override CommentReplyView get commentReplyView; @@ -183,6 +162,5 @@ abstract class _CommentReplyResponse extends CommentReplyResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReplyResponseImplCopyWith<_$CommentReplyResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CommentReplyResponseImplCopyWith<_$CommentReplyResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_reply_response.g.dart b/lib/src/v3/models/comment/comment_reply_response.g.dart index f07ab2ba..7a606aaf 100644 --- a/lib/src/v3/models/comment/comment_reply_response.g.dart +++ b/lib/src/v3/models/comment/comment_reply_response.g.dart @@ -6,15 +6,7 @@ part of 'comment_reply_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReplyResponseImpl _$$CommentReplyResponseImplFromJson( - Map json) => - _$CommentReplyResponseImpl( - commentReplyView: CommentReplyView.fromJson( - json['comment_reply_view'] as Map), - ); +_$CommentReplyResponseImpl _$$CommentReplyResponseImplFromJson(Map json) => + _$CommentReplyResponseImpl(commentReplyView: CommentReplyView.fromJson(json['comment_reply_view'] as Map)); -Map _$$CommentReplyResponseImplToJson( - _$CommentReplyResponseImpl instance) => - { - 'comment_reply_view': instance.commentReplyView.toJson(), - }; +Map _$$CommentReplyResponseImplToJson(_$CommentReplyResponseImpl instance) => {'comment_reply_view': instance.commentReplyView.toJson()}; diff --git a/lib/src/v3/models/comment/comment_report.dart b/lib/src/v3/models/comment/comment_report.dart index e5ef0c4f..ed71232a 100644 --- a/lib/src/v3/models/comment/comment_report.dart +++ b/lib/src/v3/models/comment/comment_report.dart @@ -22,6 +22,5 @@ class CommentReport with _$CommentReport { }) = _CommentReport; const CommentReport._(); - factory CommentReport.fromJson(Map json) => - _$CommentReportFromJson(json); + factory CommentReport.fromJson(Map json) => _$CommentReportFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_report.freezed.dart b/lib/src/v3/models/comment/comment_report.freezed.dart index 25b85442..adfcb9de 100644 --- a/lib/src/v3/models/comment/comment_report.freezed.dart +++ b/lib/src/v3/models/comment/comment_report.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_report.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentReport _$CommentReportFromJson(Map json) { return _CommentReport.fromJson(json); @@ -23,8 +24,7 @@ mixin _$CommentReport { int get id => throw _privateConstructorUsedError; // v0.18.0 int get creatorId => throw _privateConstructorUsedError; // v0.18.0 int get commentId => throw _privateConstructorUsedError; // v0.18.0 - String get originalCommentText => - throw _privateConstructorUsedError; // v0.18.0 + String get originalCommentText => throw _privateConstructorUsedError; // v0.18.0 String get reason => throw _privateConstructorUsedError; // v0.18.0 bool get resolved => throw _privateConstructorUsedError; // v0.18.0 int? get resolverId => throw _privateConstructorUsedError; // v0.18.0 @@ -37,31 +37,18 @@ mixin _$CommentReport { /// Create a copy of CommentReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReportCopyWith<$Res> { - factory $CommentReportCopyWith( - CommentReport value, $Res Function(CommentReport) then) = - _$CommentReportCopyWithImpl<$Res, CommentReport>; + factory $CommentReportCopyWith(CommentReport value, $Res Function(CommentReport) then) = _$CommentReportCopyWithImpl<$Res, CommentReport>; @useResult - $Res call( - {int id, - int creatorId, - int commentId, - String originalCommentText, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({int id, int creatorId, int commentId, String originalCommentText, String reason, bool resolved, int? resolverId, DateTime published, DateTime? updated}); } /// @nodoc -class _$CommentReportCopyWithImpl<$Res, $Val extends CommentReport> - implements $CommentReportCopyWith<$Res> { +class _$CommentReportCopyWithImpl<$Res, $Val extends CommentReport> implements $CommentReportCopyWith<$Res> { _$CommentReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -84,74 +71,70 @@ class _$CommentReportCopyWithImpl<$Res, $Val extends CommentReport> Object? published = null, Object? updated = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - originalCommentText: null == originalCommentText - ? _value.originalCommentText - : originalCommentText // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + originalCommentText: + null == originalCommentText + ? _value.originalCommentText + : originalCommentText // ignore: cast_nullable_to_non_nullable + as String, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CommentReportImplCopyWith<$Res> - implements $CommentReportCopyWith<$Res> { - factory _$$CommentReportImplCopyWith( - _$CommentReportImpl value, $Res Function(_$CommentReportImpl) then) = - __$$CommentReportImplCopyWithImpl<$Res>; +abstract class _$$CommentReportImplCopyWith<$Res> implements $CommentReportCopyWith<$Res> { + factory _$$CommentReportImplCopyWith(_$CommentReportImpl value, $Res Function(_$CommentReportImpl) then) = __$$CommentReportImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int creatorId, - int commentId, - String originalCommentText, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({int id, int creatorId, int commentId, String originalCommentText, String reason, bool resolved, int? resolverId, DateTime published, DateTime? updated}); } /// @nodoc -class __$$CommentReportImplCopyWithImpl<$Res> - extends _$CommentReportCopyWithImpl<$Res, _$CommentReportImpl> - implements _$$CommentReportImplCopyWith<$Res> { - __$$CommentReportImplCopyWithImpl( - _$CommentReportImpl _value, $Res Function(_$CommentReportImpl) _then) - : super(_value, _then); +class __$$CommentReportImplCopyWithImpl<$Res> extends _$CommentReportCopyWithImpl<$Res, _$CommentReportImpl> implements _$$CommentReportImplCopyWith<$Res> { + __$$CommentReportImplCopyWithImpl(_$CommentReportImpl _value, $Res Function(_$CommentReportImpl) _then) : super(_value, _then); /// Create a copy of CommentReport /// with the given fields replaced by the non-null parameter values. @@ -168,44 +151,55 @@ class __$$CommentReportImplCopyWithImpl<$Res> Object? published = null, Object? updated = freezed, }) { - return _then(_$CommentReportImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - originalCommentText: null == originalCommentText - ? _value.originalCommentText - : originalCommentText // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + return _then( + _$CommentReportImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + originalCommentText: + null == originalCommentText + ? _value.originalCommentText + : originalCommentText // ignore: cast_nullable_to_non_nullable + as String, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -213,45 +207,44 @@ class __$$CommentReportImplCopyWithImpl<$Res> @modelSerde class _$CommentReportImpl extends _CommentReport { - const _$CommentReportImpl( - {required this.id, - required this.creatorId, - required this.commentId, - required this.originalCommentText, - required this.reason, - required this.resolved, - this.resolverId, - required this.published, - this.updated}) - : super._(); + const _$CommentReportImpl({ + required this.id, + required this.creatorId, + required this.commentId, + required this.originalCommentText, + required this.reason, + required this.resolved, + this.resolverId, + required this.published, + this.updated, + }) : super._(); - factory _$CommentReportImpl.fromJson(Map json) => - _$$CommentReportImplFromJson(json); + factory _$CommentReportImpl.fromJson(Map json) => _$$CommentReportImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int commentId; -// v0.18.0 + // v0.18.0 @override final String originalCommentText; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final int? resolverId; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; @@ -266,58 +259,48 @@ class _$CommentReportImpl extends _CommentReport { (other.runtimeType == runtimeType && other is _$CommentReportImpl && (identical(other.id, id) || other.id == id) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && - (identical(other.originalCommentText, originalCommentText) || - other.originalCommentText == originalCommentText) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && + (identical(other.originalCommentText, originalCommentText) || other.originalCommentText == originalCommentText) && (identical(other.reason, reason) || other.reason == reason) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && - (identical(other.resolverId, resolverId) || - other.resolverId == resolverId) && - (identical(other.published, published) || - other.published == published) && + (identical(other.resolved, resolved) || other.resolved == resolved) && + (identical(other.resolverId, resolverId) || other.resolverId == resolverId) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, creatorId, commentId, - originalCommentText, reason, resolved, resolverId, published, updated); + int get hashCode => Object.hash(runtimeType, id, creatorId, commentId, originalCommentText, reason, resolved, resolverId, published, updated); /// Create a copy of CommentReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReportImplCopyWith<_$CommentReportImpl> get copyWith => - __$$CommentReportImplCopyWithImpl<_$CommentReportImpl>(this, _$identity); + _$$CommentReportImplCopyWith<_$CommentReportImpl> get copyWith => __$$CommentReportImplCopyWithImpl<_$CommentReportImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReportImplToJson( - this, - ); + return _$$CommentReportImplToJson(this); } } abstract class _CommentReport extends CommentReport { - const factory _CommentReport( - {required final int id, - required final int creatorId, - required final int commentId, - required final String originalCommentText, - required final String reason, - required final bool resolved, - final int? resolverId, - required final DateTime published, - final DateTime? updated}) = _$CommentReportImpl; + const factory _CommentReport({ + required final int id, + required final int creatorId, + required final int commentId, + required final String originalCommentText, + required final String reason, + required final bool resolved, + final int? resolverId, + required final DateTime published, + final DateTime? updated, + }) = _$CommentReportImpl; const _CommentReport._() : super._(); - factory _CommentReport.fromJson(Map json) = - _$CommentReportImpl.fromJson; + factory _CommentReport.fromJson(Map json) = _$CommentReportImpl.fromJson; @override int get id; // v0.18.0 @@ -342,6 +325,5 @@ abstract class _CommentReport extends CommentReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReportImplCopyWith<_$CommentReportImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentReportImplCopyWith<_$CommentReportImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_report.g.dart b/lib/src/v3/models/comment/comment_report.g.dart index 1e5d2aa8..5cdd5fa9 100644 --- a/lib/src/v3/models/comment/comment_report.g.dart +++ b/lib/src/v3/models/comment/comment_report.g.dart @@ -6,42 +6,30 @@ part of 'comment_report.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReportImpl _$$CommentReportImplFromJson(Map json) => - _$CommentReportImpl( - id: (json['id'] as num).toInt(), - creatorId: (json['creator_id'] as num).toInt(), - commentId: (json['comment_id'] as num).toInt(), - originalCommentText: json['original_comment_text'] as String, - reason: json['reason'] as String, - resolved: json['resolved'] as bool, - resolverId: (json['resolver_id'] as num?)?.toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$CommentReportImpl _$$CommentReportImplFromJson(Map json) => _$CommentReportImpl( + id: (json['id'] as num).toInt(), + creatorId: (json['creator_id'] as num).toInt(), + commentId: (json['comment_id'] as num).toInt(), + originalCommentText: json['original_comment_text'] as String, + reason: json['reason'] as String, + resolved: json['resolved'] as bool, + resolverId: (json['resolver_id'] as num?)?.toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$CommentReportImplToJson(_$CommentReportImpl instance) => - { - 'id': instance.id, - 'creator_id': instance.creatorId, - 'comment_id': instance.commentId, - 'original_comment_text': instance.originalCommentText, - 'reason': instance.reason, - 'resolved': instance.resolved, - 'resolver_id': instance.resolverId, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$CommentReportImplToJson(_$CommentReportImpl instance) => { + 'id': instance.id, + 'creator_id': instance.creatorId, + 'comment_id': instance.commentId, + 'original_comment_text': instance.originalCommentText, + 'reason': instance.reason, + 'resolved': instance.resolved, + 'resolver_id': instance.resolverId, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/comment/comment_report_response.dart b/lib/src/v3/models/comment/comment_report_response.dart index e9b64763..0f3e5dce 100644 --- a/lib/src/v3/models/comment/comment_report_response.dart +++ b/lib/src/v3/models/comment/comment_report_response.dart @@ -14,6 +14,5 @@ class CommentReportResponse with _$CommentReportResponse { }) = _CommentReportResponse; const CommentReportResponse._(); - factory CommentReportResponse.fromJson(Map json) => - _$CommentReportResponseFromJson(json); + factory CommentReportResponse.fromJson(Map json) => _$CommentReportResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_report_response.freezed.dart b/lib/src/v3/models/comment/comment_report_response.freezed.dart index 9743f18e..c751636f 100644 --- a/lib/src/v3/models/comment/comment_report_response.freezed.dart +++ b/lib/src/v3/models/comment/comment_report_response.freezed.dart @@ -12,10 +12,10 @@ part of 'comment_report_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -CommentReportResponse _$CommentReportResponseFromJson( - Map json) { +CommentReportResponse _$CommentReportResponseFromJson(Map json) { return _CommentReportResponse.fromJson(json); } @@ -29,15 +29,12 @@ mixin _$CommentReportResponse { /// Create a copy of CommentReportResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReportResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReportResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReportResponseCopyWith<$Res> { - factory $CommentReportResponseCopyWith(CommentReportResponse value, - $Res Function(CommentReportResponse) then) = - _$CommentReportResponseCopyWithImpl<$Res, CommentReportResponse>; + factory $CommentReportResponseCopyWith(CommentReportResponse value, $Res Function(CommentReportResponse) then) = _$CommentReportResponseCopyWithImpl<$Res, CommentReportResponse>; @useResult $Res call({CommentReportView commentReportView}); @@ -45,9 +42,7 @@ abstract class $CommentReportResponseCopyWith<$Res> { } /// @nodoc -class _$CommentReportResponseCopyWithImpl<$Res, - $Val extends CommentReportResponse> - implements $CommentReportResponseCopyWith<$Res> { +class _$CommentReportResponseCopyWithImpl<$Res, $Val extends CommentReportResponse> implements $CommentReportResponseCopyWith<$Res> { _$CommentReportResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,15 +54,17 @@ class _$CommentReportResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReportView = null, - }) { - return _then(_value.copyWith( - commentReportView: null == commentReportView - ? _value.commentReportView - : commentReportView // ignore: cast_nullable_to_non_nullable - as CommentReportView, - ) as $Val); + $Res call({Object? commentReportView = null}) { + return _then( + _value.copyWith( + commentReportView: + null == commentReportView + ? _value.commentReportView + : commentReportView // ignore: cast_nullable_to_non_nullable + as CommentReportView, + ) + as $Val, + ); } /// Create a copy of CommentReportResponse @@ -82,12 +79,8 @@ class _$CommentReportResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$CommentReportResponseImplCopyWith<$Res> - implements $CommentReportResponseCopyWith<$Res> { - factory _$$CommentReportResponseImplCopyWith( - _$CommentReportResponseImpl value, - $Res Function(_$CommentReportResponseImpl) then) = - __$$CommentReportResponseImplCopyWithImpl<$Res>; +abstract class _$$CommentReportResponseImplCopyWith<$Res> implements $CommentReportResponseCopyWith<$Res> { + factory _$$CommentReportResponseImplCopyWith(_$CommentReportResponseImpl value, $Res Function(_$CommentReportResponseImpl) then) = __$$CommentReportResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CommentReportView commentReportView}); @@ -97,27 +90,23 @@ abstract class _$$CommentReportResponseImplCopyWith<$Res> } /// @nodoc -class __$$CommentReportResponseImplCopyWithImpl<$Res> - extends _$CommentReportResponseCopyWithImpl<$Res, - _$CommentReportResponseImpl> - implements _$$CommentReportResponseImplCopyWith<$Res> { - __$$CommentReportResponseImplCopyWithImpl(_$CommentReportResponseImpl _value, - $Res Function(_$CommentReportResponseImpl) _then) - : super(_value, _then); +class __$$CommentReportResponseImplCopyWithImpl<$Res> extends _$CommentReportResponseCopyWithImpl<$Res, _$CommentReportResponseImpl> implements _$$CommentReportResponseImplCopyWith<$Res> { + __$$CommentReportResponseImplCopyWithImpl(_$CommentReportResponseImpl _value, $Res Function(_$CommentReportResponseImpl) _then) : super(_value, _then); /// Create a copy of CommentReportResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReportView = null, - }) { - return _then(_$CommentReportResponseImpl( - commentReportView: null == commentReportView - ? _value.commentReportView - : commentReportView // ignore: cast_nullable_to_non_nullable - as CommentReportView, - )); + $Res call({Object? commentReportView = null}) { + return _then( + _$CommentReportResponseImpl( + commentReportView: + null == commentReportView + ? _value.commentReportView + : commentReportView // ignore: cast_nullable_to_non_nullable + as CommentReportView, + ), + ); } } @@ -125,11 +114,9 @@ class __$$CommentReportResponseImplCopyWithImpl<$Res> @modelSerde class _$CommentReportResponseImpl extends _CommentReportResponse { - const _$CommentReportResponseImpl({required this.commentReportView}) - : super._(); + const _$CommentReportResponseImpl({required this.commentReportView}) : super._(); - factory _$CommentReportResponseImpl.fromJson(Map json) => - _$$CommentReportResponseImplFromJson(json); + factory _$CommentReportResponseImpl.fromJson(Map json) => _$$CommentReportResponseImplFromJson(json); @override final CommentReportView commentReportView; @@ -142,10 +129,7 @@ class _$CommentReportResponseImpl extends _CommentReportResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$CommentReportResponseImpl && - (identical(other.commentReportView, commentReportView) || - other.commentReportView == commentReportView)); + (other.runtimeType == runtimeType && other is _$CommentReportResponseImpl && (identical(other.commentReportView, commentReportView) || other.commentReportView == commentReportView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -157,26 +141,19 @@ class _$CommentReportResponseImpl extends _CommentReportResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReportResponseImplCopyWith<_$CommentReportResponseImpl> - get copyWith => __$$CommentReportResponseImplCopyWithImpl< - _$CommentReportResponseImpl>(this, _$identity); + _$$CommentReportResponseImplCopyWith<_$CommentReportResponseImpl> get copyWith => __$$CommentReportResponseImplCopyWithImpl<_$CommentReportResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReportResponseImplToJson( - this, - ); + return _$$CommentReportResponseImplToJson(this); } } abstract class _CommentReportResponse extends CommentReportResponse { - const factory _CommentReportResponse( - {required final CommentReportView commentReportView}) = - _$CommentReportResponseImpl; + const factory _CommentReportResponse({required final CommentReportView commentReportView}) = _$CommentReportResponseImpl; const _CommentReportResponse._() : super._(); - factory _CommentReportResponse.fromJson(Map json) = - _$CommentReportResponseImpl.fromJson; + factory _CommentReportResponse.fromJson(Map json) = _$CommentReportResponseImpl.fromJson; @override CommentReportView get commentReportView; @@ -185,6 +162,5 @@ abstract class _CommentReportResponse extends CommentReportResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReportResponseImplCopyWith<_$CommentReportResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CommentReportResponseImplCopyWith<_$CommentReportResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_report_response.g.dart b/lib/src/v3/models/comment/comment_report_response.g.dart index e22479c6..bfa03660 100644 --- a/lib/src/v3/models/comment/comment_report_response.g.dart +++ b/lib/src/v3/models/comment/comment_report_response.g.dart @@ -6,15 +6,7 @@ part of 'comment_report_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReportResponseImpl _$$CommentReportResponseImplFromJson( - Map json) => - _$CommentReportResponseImpl( - commentReportView: CommentReportView.fromJson( - json['comment_report_view'] as Map), - ); +_$CommentReportResponseImpl _$$CommentReportResponseImplFromJson(Map json) => + _$CommentReportResponseImpl(commentReportView: CommentReportView.fromJson(json['comment_report_view'] as Map)); -Map _$$CommentReportResponseImplToJson( - _$CommentReportResponseImpl instance) => - { - 'comment_report_view': instance.commentReportView.toJson(), - }; +Map _$$CommentReportResponseImplToJson(_$CommentReportResponseImpl instance) => {'comment_report_view': instance.commentReportView.toJson()}; diff --git a/lib/src/v3/models/comment/comment_response.dart b/lib/src/v3/models/comment/comment_response.dart index 8d500373..1a6aecca 100644 --- a/lib/src/v3/models/comment/comment_response.dart +++ b/lib/src/v3/models/comment/comment_response.dart @@ -16,6 +16,5 @@ class CommentResponse with _$CommentResponse { }) = _CommentResponse; const CommentResponse._(); - factory CommentResponse.fromJson(Map json) => - _$CommentResponseFromJson(json); + factory CommentResponse.fromJson(Map json) => _$CommentResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/comment_response.freezed.dart b/lib/src/v3/models/comment/comment_response.freezed.dart index 42f53620..f1efed73 100644 --- a/lib/src/v3/models/comment/comment_response.freezed.dart +++ b/lib/src/v3/models/comment/comment_response.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentResponse _$CommentResponseFromJson(Map json) { return _CommentResponse.fromJson(json); @@ -31,27 +32,20 @@ mixin _$CommentResponse { /// Create a copy of CommentResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentResponseCopyWith<$Res> { - factory $CommentResponseCopyWith( - CommentResponse value, $Res Function(CommentResponse) then) = - _$CommentResponseCopyWithImpl<$Res, CommentResponse>; + factory $CommentResponseCopyWith(CommentResponse value, $Res Function(CommentResponse) then) = _$CommentResponseCopyWithImpl<$Res, CommentResponse>; @useResult - $Res call( - {CommentView commentView, - List recipientIds, - @deprecated String? formId}); + $Res call({CommentView commentView, List recipientIds, @deprecated String? formId}); $CommentViewCopyWith<$Res> get commentView; } /// @nodoc -class _$CommentResponseCopyWithImpl<$Res, $Val extends CommentResponse> - implements $CommentResponseCopyWith<$Res> { +class _$CommentResponseCopyWithImpl<$Res, $Val extends CommentResponse> implements $CommentResponseCopyWith<$Res> { _$CommentResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,25 +57,27 @@ class _$CommentResponseCopyWithImpl<$Res, $Val extends CommentResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentView = null, - Object? recipientIds = null, - Object? formId = freezed, - }) { - return _then(_value.copyWith( - commentView: null == commentView - ? _value.commentView - : commentView // ignore: cast_nullable_to_non_nullable - as CommentView, - recipientIds: null == recipientIds - ? _value.recipientIds - : recipientIds // ignore: cast_nullable_to_non_nullable - as List, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? commentView = null, Object? recipientIds = null, Object? formId = freezed}) { + return _then( + _value.copyWith( + commentView: + null == commentView + ? _value.commentView + : commentView // ignore: cast_nullable_to_non_nullable + as CommentView, + recipientIds: + null == recipientIds + ? _value.recipientIds + : recipientIds // ignore: cast_nullable_to_non_nullable + as List, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } /// Create a copy of CommentResponse @@ -96,53 +92,44 @@ class _$CommentResponseCopyWithImpl<$Res, $Val extends CommentResponse> } /// @nodoc -abstract class _$$CommentResponseImplCopyWith<$Res> - implements $CommentResponseCopyWith<$Res> { - factory _$$CommentResponseImplCopyWith(_$CommentResponseImpl value, - $Res Function(_$CommentResponseImpl) then) = - __$$CommentResponseImplCopyWithImpl<$Res>; +abstract class _$$CommentResponseImplCopyWith<$Res> implements $CommentResponseCopyWith<$Res> { + factory _$$CommentResponseImplCopyWith(_$CommentResponseImpl value, $Res Function(_$CommentResponseImpl) then) = __$$CommentResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentView commentView, - List recipientIds, - @deprecated String? formId}); + $Res call({CommentView commentView, List recipientIds, @deprecated String? formId}); @override $CommentViewCopyWith<$Res> get commentView; } /// @nodoc -class __$$CommentResponseImplCopyWithImpl<$Res> - extends _$CommentResponseCopyWithImpl<$Res, _$CommentResponseImpl> - implements _$$CommentResponseImplCopyWith<$Res> { - __$$CommentResponseImplCopyWithImpl( - _$CommentResponseImpl _value, $Res Function(_$CommentResponseImpl) _then) - : super(_value, _then); +class __$$CommentResponseImplCopyWithImpl<$Res> extends _$CommentResponseCopyWithImpl<$Res, _$CommentResponseImpl> implements _$$CommentResponseImplCopyWith<$Res> { + __$$CommentResponseImplCopyWithImpl(_$CommentResponseImpl _value, $Res Function(_$CommentResponseImpl) _then) : super(_value, _then); /// Create a copy of CommentResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentView = null, - Object? recipientIds = null, - Object? formId = freezed, - }) { - return _then(_$CommentResponseImpl( - commentView: null == commentView - ? _value.commentView - : commentView // ignore: cast_nullable_to_non_nullable - as CommentView, - recipientIds: null == recipientIds - ? _value._recipientIds - : recipientIds // ignore: cast_nullable_to_non_nullable - as List, - formId: freezed == formId - ? _value.formId - : formId // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? commentView = null, Object? recipientIds = null, Object? formId = freezed}) { + return _then( + _$CommentResponseImpl( + commentView: + null == commentView + ? _value.commentView + : commentView // ignore: cast_nullable_to_non_nullable + as CommentView, + recipientIds: + null == recipientIds + ? _value._recipientIds + : recipientIds // ignore: cast_nullable_to_non_nullable + as List, + formId: + freezed == formId + ? _value.formId + : formId // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -150,21 +137,15 @@ class __$$CommentResponseImplCopyWithImpl<$Res> @modelSerde class _$CommentResponseImpl extends _CommentResponse { - const _$CommentResponseImpl( - {required this.commentView, - required final List recipientIds, - @deprecated this.formId}) - : _recipientIds = recipientIds, - super._(); + const _$CommentResponseImpl({required this.commentView, required final List recipientIds, @deprecated this.formId}) : _recipientIds = recipientIds, super._(); - factory _$CommentResponseImpl.fromJson(Map json) => - _$$CommentResponseImplFromJson(json); + factory _$CommentResponseImpl.fromJson(Map json) => _$$CommentResponseImplFromJson(json); @override final CommentView commentView; -// v0.18.0 + // v0.18.0 final List _recipientIds; -// v0.18.0 + // v0.18.0 @override List get recipientIds { if (_recipientIds is EqualUnmodifiableListView) return _recipientIds; @@ -172,7 +153,7 @@ class _$CommentResponseImpl extends _CommentResponse { return EqualUnmodifiableListView(_recipientIds); } -// v0.18.0 + // v0.18.0 @override @deprecated final String? formId; @@ -187,44 +168,33 @@ class _$CommentResponseImpl extends _CommentResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentResponseImpl && - (identical(other.commentView, commentView) || - other.commentView == commentView) && - const DeepCollectionEquality() - .equals(other._recipientIds, _recipientIds) && + (identical(other.commentView, commentView) || other.commentView == commentView) && + const DeepCollectionEquality().equals(other._recipientIds, _recipientIds) && (identical(other.formId, formId) || other.formId == formId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, commentView, - const DeepCollectionEquality().hash(_recipientIds), formId); + int get hashCode => Object.hash(runtimeType, commentView, const DeepCollectionEquality().hash(_recipientIds), formId); /// Create a copy of CommentResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentResponseImplCopyWith<_$CommentResponseImpl> get copyWith => - __$$CommentResponseImplCopyWithImpl<_$CommentResponseImpl>( - this, _$identity); + _$$CommentResponseImplCopyWith<_$CommentResponseImpl> get copyWith => __$$CommentResponseImplCopyWithImpl<_$CommentResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CommentResponseImplToJson( - this, - ); + return _$$CommentResponseImplToJson(this); } } abstract class _CommentResponse extends CommentResponse { - const factory _CommentResponse( - {required final CommentView commentView, - required final List recipientIds, - @deprecated final String? formId}) = _$CommentResponseImpl; + const factory _CommentResponse({required final CommentView commentView, required final List recipientIds, @deprecated final String? formId}) = _$CommentResponseImpl; const _CommentResponse._() : super._(); - factory _CommentResponse.fromJson(Map json) = - _$CommentResponseImpl.fromJson; + factory _CommentResponse.fromJson(Map json) = _$CommentResponseImpl.fromJson; @override CommentView get commentView; // v0.18.0 @@ -238,6 +208,5 @@ abstract class _CommentResponse extends CommentResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentResponseImplCopyWith<_$CommentResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentResponseImplCopyWith<_$CommentResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/comment_response.g.dart b/lib/src/v3/models/comment/comment_response.g.dart index 2b0db42c..ac4457de 100644 --- a/lib/src/v3/models/comment/comment_response.g.dart +++ b/lib/src/v3/models/comment/comment_response.g.dart @@ -6,21 +6,14 @@ part of 'comment_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentResponseImpl _$$CommentResponseImplFromJson( - Map json) => - _$CommentResponseImpl( - commentView: - CommentView.fromJson(json['comment_view'] as Map), - recipientIds: (json['recipient_ids'] as List) - .map((e) => (e as num).toInt()) - .toList(), - formId: json['form_id'] as String?, - ); +_$CommentResponseImpl _$$CommentResponseImplFromJson(Map json) => _$CommentResponseImpl( + commentView: CommentView.fromJson(json['comment_view'] as Map), + recipientIds: (json['recipient_ids'] as List).map((e) => (e as num).toInt()).toList(), + formId: json['form_id'] as String?, +); -Map _$$CommentResponseImplToJson( - _$CommentResponseImpl instance) => - { - 'comment_view': instance.commentView.toJson(), - 'recipient_ids': instance.recipientIds, - 'form_id': instance.formId, - }; +Map _$$CommentResponseImplToJson(_$CommentResponseImpl instance) => { + 'comment_view': instance.commentView.toJson(), + 'recipient_ids': instance.recipientIds, + 'form_id': instance.formId, +}; diff --git a/lib/src/v3/models/comment/get_comments_response.dart b/lib/src/v3/models/comment/get_comments_response.dart index 2449a621..88308417 100644 --- a/lib/src/v3/models/comment/get_comments_response.dart +++ b/lib/src/v3/models/comment/get_comments_response.dart @@ -14,6 +14,5 @@ class GetCommentsResponse with _$GetCommentsResponse { }) = _GetCommentsResponse; const GetCommentsResponse._(); - factory GetCommentsResponse.fromJson(Map json) => - _$GetCommentsResponseFromJson(json); + factory GetCommentsResponse.fromJson(Map json) => _$GetCommentsResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/get_comments_response.freezed.dart b/lib/src/v3/models/comment/get_comments_response.freezed.dart index 676689ca..b3c93c25 100644 --- a/lib/src/v3/models/comment/get_comments_response.freezed.dart +++ b/lib/src/v3/models/comment/get_comments_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_comments_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetCommentsResponse _$GetCommentsResponseFromJson(Map json) { return _GetCommentsResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$GetCommentsResponse { /// Create a copy of GetCommentsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCommentsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCommentsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCommentsResponseCopyWith<$Res> { - factory $GetCommentsResponseCopyWith( - GetCommentsResponse value, $Res Function(GetCommentsResponse) then) = - _$GetCommentsResponseCopyWithImpl<$Res, GetCommentsResponse>; + factory $GetCommentsResponseCopyWith(GetCommentsResponse value, $Res Function(GetCommentsResponse) then) = _$GetCommentsResponseCopyWithImpl<$Res, GetCommentsResponse>; @useResult $Res call({List comments}); } /// @nodoc -class _$GetCommentsResponseCopyWithImpl<$Res, $Val extends GetCommentsResponse> - implements $GetCommentsResponseCopyWith<$Res> { +class _$GetCommentsResponseCopyWithImpl<$Res, $Val extends GetCommentsResponse> implements $GetCommentsResponseCopyWith<$Res> { _$GetCommentsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$GetCommentsResponseCopyWithImpl<$Res, $Val extends GetCommentsResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? comments = null, - }) { - return _then(_value.copyWith( - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? comments = null}) { + return _then( + _value.copyWith( + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetCommentsResponseImplCopyWith<$Res> - implements $GetCommentsResponseCopyWith<$Res> { - factory _$$GetCommentsResponseImplCopyWith(_$GetCommentsResponseImpl value, - $Res Function(_$GetCommentsResponseImpl) then) = - __$$GetCommentsResponseImplCopyWithImpl<$Res>; +abstract class _$$GetCommentsResponseImplCopyWith<$Res> implements $GetCommentsResponseCopyWith<$Res> { + factory _$$GetCommentsResponseImplCopyWith(_$GetCommentsResponseImpl value, $Res Function(_$GetCommentsResponseImpl) then) = __$$GetCommentsResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List comments}); } /// @nodoc -class __$$GetCommentsResponseImplCopyWithImpl<$Res> - extends _$GetCommentsResponseCopyWithImpl<$Res, _$GetCommentsResponseImpl> - implements _$$GetCommentsResponseImplCopyWith<$Res> { - __$$GetCommentsResponseImplCopyWithImpl(_$GetCommentsResponseImpl _value, - $Res Function(_$GetCommentsResponseImpl) _then) - : super(_value, _then); +class __$$GetCommentsResponseImplCopyWithImpl<$Res> extends _$GetCommentsResponseCopyWithImpl<$Res, _$GetCommentsResponseImpl> implements _$$GetCommentsResponseImplCopyWith<$Res> { + __$$GetCommentsResponseImplCopyWithImpl(_$GetCommentsResponseImpl _value, $Res Function(_$GetCommentsResponseImpl) _then) : super(_value, _then); /// Create a copy of GetCommentsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? comments = null, - }) { - return _then(_$GetCommentsResponseImpl( - comments: null == comments - ? _value._comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? comments = null}) { + return _then( + _$GetCommentsResponseImpl( + comments: + null == comments + ? _value._comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -106,12 +99,9 @@ class __$$GetCommentsResponseImplCopyWithImpl<$Res> @modelSerde class _$GetCommentsResponseImpl extends _GetCommentsResponse { - const _$GetCommentsResponseImpl({required final List comments}) - : _comments = comments, - super._(); + const _$GetCommentsResponseImpl({required final List comments}) : _comments = comments, super._(); - factory _$GetCommentsResponseImpl.fromJson(Map json) => - _$$GetCommentsResponseImplFromJson(json); + factory _$GetCommentsResponseImpl.fromJson(Map json) => _$$GetCommentsResponseImplFromJson(json); final List _comments; @override @@ -128,41 +118,31 @@ class _$GetCommentsResponseImpl extends _GetCommentsResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetCommentsResponseImpl && - const DeepCollectionEquality().equals(other._comments, _comments)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetCommentsResponseImpl && const DeepCollectionEquality().equals(other._comments, _comments)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_comments)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_comments)); /// Create a copy of GetCommentsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCommentsResponseImplCopyWith<_$GetCommentsResponseImpl> get copyWith => - __$$GetCommentsResponseImplCopyWithImpl<_$GetCommentsResponseImpl>( - this, _$identity); + _$$GetCommentsResponseImplCopyWith<_$GetCommentsResponseImpl> get copyWith => __$$GetCommentsResponseImplCopyWithImpl<_$GetCommentsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetCommentsResponseImplToJson( - this, - ); + return _$$GetCommentsResponseImplToJson(this); } } abstract class _GetCommentsResponse extends GetCommentsResponse { - const factory _GetCommentsResponse( - {required final List comments}) = _$GetCommentsResponseImpl; + const factory _GetCommentsResponse({required final List comments}) = _$GetCommentsResponseImpl; const _GetCommentsResponse._() : super._(); - factory _GetCommentsResponse.fromJson(Map json) = - _$GetCommentsResponseImpl.fromJson; + factory _GetCommentsResponse.fromJson(Map json) = _$GetCommentsResponseImpl.fromJson; @override List get comments; @@ -171,6 +151,5 @@ abstract class _GetCommentsResponse extends GetCommentsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCommentsResponseImplCopyWith<_$GetCommentsResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCommentsResponseImplCopyWith<_$GetCommentsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/get_comments_response.g.dart b/lib/src/v3/models/comment/get_comments_response.g.dart index a4613d11..8d5201c2 100644 --- a/lib/src/v3/models/comment/get_comments_response.g.dart +++ b/lib/src/v3/models/comment/get_comments_response.g.dart @@ -6,16 +6,7 @@ part of 'get_comments_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetCommentsResponseImpl _$$GetCommentsResponseImplFromJson( - Map json) => - _$GetCommentsResponseImpl( - comments: (json['comments'] as List) - .map((e) => CommentView.fromJson(e as Map)) - .toList(), - ); +_$GetCommentsResponseImpl _$$GetCommentsResponseImplFromJson(Map json) => + _$GetCommentsResponseImpl(comments: (json['comments'] as List).map((e) => CommentView.fromJson(e as Map)).toList()); -Map _$$GetCommentsResponseImplToJson( - _$GetCommentsResponseImpl instance) => - { - 'comments': instance.comments.map((e) => e.toJson()).toList(), - }; +Map _$$GetCommentsResponseImplToJson(_$GetCommentsResponseImpl instance) => {'comments': instance.comments.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/comment/list_comment_likes_response.dart b/lib/src/v3/models/comment/list_comment_likes_response.dart index 4c69dd89..ed613d8c 100644 --- a/lib/src/v3/models/comment/list_comment_likes_response.dart +++ b/lib/src/v3/models/comment/list_comment_likes_response.dart @@ -14,6 +14,5 @@ class ListCommentLikesResponse with _$ListCommentLikesResponse { }) = _ListCommentLikesResponse; const ListCommentLikesResponse._(); - factory ListCommentLikesResponse.fromJson(Map json) => - _$ListCommentLikesResponseFromJson(json); + factory ListCommentLikesResponse.fromJson(Map json) => _$ListCommentLikesResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/list_comment_likes_response.freezed.dart b/lib/src/v3/models/comment/list_comment_likes_response.freezed.dart index 582a921a..bca25d7c 100644 --- a/lib/src/v3/models/comment/list_comment_likes_response.freezed.dart +++ b/lib/src/v3/models/comment/list_comment_likes_response.freezed.dart @@ -12,10 +12,10 @@ part of 'list_comment_likes_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListCommentLikesResponse _$ListCommentLikesResponseFromJson( - Map json) { +ListCommentLikesResponse _$ListCommentLikesResponseFromJson(Map json) { return _ListCommentLikesResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$ListCommentLikesResponse { /// Create a copy of ListCommentLikesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommentLikesResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListCommentLikesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommentLikesResponseCopyWith<$Res> { - factory $ListCommentLikesResponseCopyWith(ListCommentLikesResponse value, - $Res Function(ListCommentLikesResponse) then) = - _$ListCommentLikesResponseCopyWithImpl<$Res, ListCommentLikesResponse>; + factory $ListCommentLikesResponseCopyWith(ListCommentLikesResponse value, $Res Function(ListCommentLikesResponse) then) = _$ListCommentLikesResponseCopyWithImpl<$Res, ListCommentLikesResponse>; @useResult $Res call({List commentLikes}); } /// @nodoc -class _$ListCommentLikesResponseCopyWithImpl<$Res, - $Val extends ListCommentLikesResponse> - implements $ListCommentLikesResponseCopyWith<$Res> { +class _$ListCommentLikesResponseCopyWithImpl<$Res, $Val extends ListCommentLikesResponse> implements $ListCommentLikesResponseCopyWith<$Res> { _$ListCommentLikesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,53 +52,46 @@ class _$ListCommentLikesResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentLikes = null, - }) { - return _then(_value.copyWith( - commentLikes: null == commentLikes - ? _value.commentLikes - : commentLikes // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? commentLikes = null}) { + return _then( + _value.copyWith( + commentLikes: + null == commentLikes + ? _value.commentLikes + : commentLikes // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListCommentLikesResponseImplCopyWith<$Res> - implements $ListCommentLikesResponseCopyWith<$Res> { - factory _$$ListCommentLikesResponseImplCopyWith( - _$ListCommentLikesResponseImpl value, - $Res Function(_$ListCommentLikesResponseImpl) then) = - __$$ListCommentLikesResponseImplCopyWithImpl<$Res>; +abstract class _$$ListCommentLikesResponseImplCopyWith<$Res> implements $ListCommentLikesResponseCopyWith<$Res> { + factory _$$ListCommentLikesResponseImplCopyWith(_$ListCommentLikesResponseImpl value, $Res Function(_$ListCommentLikesResponseImpl) then) = __$$ListCommentLikesResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List commentLikes}); } /// @nodoc -class __$$ListCommentLikesResponseImplCopyWithImpl<$Res> - extends _$ListCommentLikesResponseCopyWithImpl<$Res, - _$ListCommentLikesResponseImpl> - implements _$$ListCommentLikesResponseImplCopyWith<$Res> { - __$$ListCommentLikesResponseImplCopyWithImpl( - _$ListCommentLikesResponseImpl _value, - $Res Function(_$ListCommentLikesResponseImpl) _then) - : super(_value, _then); +class __$$ListCommentLikesResponseImplCopyWithImpl<$Res> extends _$ListCommentLikesResponseCopyWithImpl<$Res, _$ListCommentLikesResponseImpl> implements _$$ListCommentLikesResponseImplCopyWith<$Res> { + __$$ListCommentLikesResponseImplCopyWithImpl(_$ListCommentLikesResponseImpl _value, $Res Function(_$ListCommentLikesResponseImpl) _then) : super(_value, _then); /// Create a copy of ListCommentLikesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentLikes = null, - }) { - return _then(_$ListCommentLikesResponseImpl( - commentLikes: null == commentLikes - ? _value._commentLikes - : commentLikes // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? commentLikes = null}) { + return _then( + _$ListCommentLikesResponseImpl( + commentLikes: + null == commentLikes + ? _value._commentLikes + : commentLikes // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -111,13 +99,9 @@ class __$$ListCommentLikesResponseImplCopyWithImpl<$Res> @modelSerde class _$ListCommentLikesResponseImpl extends _ListCommentLikesResponse { - const _$ListCommentLikesResponseImpl( - {required final List commentLikes}) - : _commentLikes = commentLikes, - super._(); + const _$ListCommentLikesResponseImpl({required final List commentLikes}) : _commentLikes = commentLikes, super._(); - factory _$ListCommentLikesResponseImpl.fromJson(Map json) => - _$$ListCommentLikesResponseImplFromJson(json); + factory _$ListCommentLikesResponseImpl.fromJson(Map json) => _$$ListCommentLikesResponseImplFromJson(json); final List _commentLikes; @override @@ -134,43 +118,31 @@ class _$ListCommentLikesResponseImpl extends _ListCommentLikesResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListCommentLikesResponseImpl && - const DeepCollectionEquality() - .equals(other._commentLikes, _commentLikes)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListCommentLikesResponseImpl && const DeepCollectionEquality().equals(other._commentLikes, _commentLikes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_commentLikes)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_commentLikes)); /// Create a copy of ListCommentLikesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommentLikesResponseImplCopyWith<_$ListCommentLikesResponseImpl> - get copyWith => __$$ListCommentLikesResponseImplCopyWithImpl< - _$ListCommentLikesResponseImpl>(this, _$identity); + _$$ListCommentLikesResponseImplCopyWith<_$ListCommentLikesResponseImpl> get copyWith => __$$ListCommentLikesResponseImplCopyWithImpl<_$ListCommentLikesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommentLikesResponseImplToJson( - this, - ); + return _$$ListCommentLikesResponseImplToJson(this); } } abstract class _ListCommentLikesResponse extends ListCommentLikesResponse { - const factory _ListCommentLikesResponse( - {required final List commentLikes}) = - _$ListCommentLikesResponseImpl; + const factory _ListCommentLikesResponse({required final List commentLikes}) = _$ListCommentLikesResponseImpl; const _ListCommentLikesResponse._() : super._(); - factory _ListCommentLikesResponse.fromJson(Map json) = - _$ListCommentLikesResponseImpl.fromJson; + factory _ListCommentLikesResponse.fromJson(Map json) = _$ListCommentLikesResponseImpl.fromJson; @override List get commentLikes; @@ -179,6 +151,5 @@ abstract class _ListCommentLikesResponse extends ListCommentLikesResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommentLikesResponseImplCopyWith<_$ListCommentLikesResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListCommentLikesResponseImplCopyWith<_$ListCommentLikesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/list_comment_likes_response.g.dart b/lib/src/v3/models/comment/list_comment_likes_response.g.dart index 003a74d2..9609d8bd 100644 --- a/lib/src/v3/models/comment/list_comment_likes_response.g.dart +++ b/lib/src/v3/models/comment/list_comment_likes_response.g.dart @@ -6,16 +6,7 @@ part of 'list_comment_likes_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListCommentLikesResponseImpl _$$ListCommentLikesResponseImplFromJson( - Map json) => - _$ListCommentLikesResponseImpl( - commentLikes: (json['comment_likes'] as List) - .map((e) => VoteView.fromJson(e as Map)) - .toList(), - ); +_$ListCommentLikesResponseImpl _$$ListCommentLikesResponseImplFromJson(Map json) => + _$ListCommentLikesResponseImpl(commentLikes: (json['comment_likes'] as List).map((e) => VoteView.fromJson(e as Map)).toList()); -Map _$$ListCommentLikesResponseImplToJson( - _$ListCommentLikesResponseImpl instance) => - { - 'comment_likes': instance.commentLikes.map((e) => e.toJson()).toList(), - }; +Map _$$ListCommentLikesResponseImplToJson(_$ListCommentLikesResponseImpl instance) => {'comment_likes': instance.commentLikes.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/comment/list_comment_reports_response.dart b/lib/src/v3/models/comment/list_comment_reports_response.dart index 1ce1c3b3..f80af9b6 100644 --- a/lib/src/v3/models/comment/list_comment_reports_response.dart +++ b/lib/src/v3/models/comment/list_comment_reports_response.dart @@ -14,6 +14,5 @@ class ListCommentReportsResponse with _$ListCommentReportsResponse { }) = _ListCommentReportsResponse; const ListCommentReportsResponse._(); - factory ListCommentReportsResponse.fromJson(Map json) => - _$ListCommentReportsResponseFromJson(json); + factory ListCommentReportsResponse.fromJson(Map json) => _$ListCommentReportsResponseFromJson(json); } diff --git a/lib/src/v3/models/comment/list_comment_reports_response.freezed.dart b/lib/src/v3/models/comment/list_comment_reports_response.freezed.dart index 13e6b4cb..2eccdafa 100644 --- a/lib/src/v3/models/comment/list_comment_reports_response.freezed.dart +++ b/lib/src/v3/models/comment/list_comment_reports_response.freezed.dart @@ -12,17 +12,16 @@ part of 'list_comment_reports_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListCommentReportsResponse _$ListCommentReportsResponseFromJson( - Map json) { +ListCommentReportsResponse _$ListCommentReportsResponseFromJson(Map json) { return _ListCommentReportsResponse.fromJson(json); } /// @nodoc mixin _$ListCommentReportsResponse { - List get commentReports => - throw _privateConstructorUsedError; + List get commentReports => throw _privateConstructorUsedError; /// Serializes this ListCommentReportsResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,24 +29,19 @@ mixin _$ListCommentReportsResponse { /// Create a copy of ListCommentReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommentReportsResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $ListCommentReportsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommentReportsResponseCopyWith<$Res> { - factory $ListCommentReportsResponseCopyWith(ListCommentReportsResponse value, - $Res Function(ListCommentReportsResponse) then) = - _$ListCommentReportsResponseCopyWithImpl<$Res, - ListCommentReportsResponse>; + factory $ListCommentReportsResponseCopyWith(ListCommentReportsResponse value, $Res Function(ListCommentReportsResponse) then) = + _$ListCommentReportsResponseCopyWithImpl<$Res, ListCommentReportsResponse>; @useResult $Res call({List commentReports}); } /// @nodoc -class _$ListCommentReportsResponseCopyWithImpl<$Res, - $Val extends ListCommentReportsResponse> - implements $ListCommentReportsResponseCopyWith<$Res> { +class _$ListCommentReportsResponseCopyWithImpl<$Res, $Val extends ListCommentReportsResponse> implements $ListCommentReportsResponseCopyWith<$Res> { _$ListCommentReportsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,24 +53,23 @@ class _$ListCommentReportsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReports = null, - }) { - return _then(_value.copyWith( - commentReports: null == commentReports - ? _value.commentReports - : commentReports // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? commentReports = null}) { + return _then( + _value.copyWith( + commentReports: + null == commentReports + ? _value.commentReports + : commentReports // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListCommentReportsResponseImplCopyWith<$Res> - implements $ListCommentReportsResponseCopyWith<$Res> { - factory _$$ListCommentReportsResponseImplCopyWith( - _$ListCommentReportsResponseImpl value, - $Res Function(_$ListCommentReportsResponseImpl) then) = +abstract class _$$ListCommentReportsResponseImplCopyWith<$Res> implements $ListCommentReportsResponseCopyWith<$Res> { + factory _$$ListCommentReportsResponseImplCopyWith(_$ListCommentReportsResponseImpl value, $Res Function(_$ListCommentReportsResponseImpl) then) = __$$ListCommentReportsResponseImplCopyWithImpl<$Res>; @override @useResult @@ -84,28 +77,24 @@ abstract class _$$ListCommentReportsResponseImplCopyWith<$Res> } /// @nodoc -class __$$ListCommentReportsResponseImplCopyWithImpl<$Res> - extends _$ListCommentReportsResponseCopyWithImpl<$Res, - _$ListCommentReportsResponseImpl> +class __$$ListCommentReportsResponseImplCopyWithImpl<$Res> extends _$ListCommentReportsResponseCopyWithImpl<$Res, _$ListCommentReportsResponseImpl> implements _$$ListCommentReportsResponseImplCopyWith<$Res> { - __$$ListCommentReportsResponseImplCopyWithImpl( - _$ListCommentReportsResponseImpl _value, - $Res Function(_$ListCommentReportsResponseImpl) _then) - : super(_value, _then); + __$$ListCommentReportsResponseImplCopyWithImpl(_$ListCommentReportsResponseImpl _value, $Res Function(_$ListCommentReportsResponseImpl) _then) : super(_value, _then); /// Create a copy of ListCommentReportsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? commentReports = null, - }) { - return _then(_$ListCommentReportsResponseImpl( - commentReports: null == commentReports - ? _value._commentReports - : commentReports // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? commentReports = null}) { + return _then( + _$ListCommentReportsResponseImpl( + commentReports: + null == commentReports + ? _value._commentReports + : commentReports // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -113,14 +102,9 @@ class __$$ListCommentReportsResponseImplCopyWithImpl<$Res> @modelSerde class _$ListCommentReportsResponseImpl extends _ListCommentReportsResponse { - const _$ListCommentReportsResponseImpl( - {required final List commentReports}) - : _commentReports = commentReports, - super._(); + const _$ListCommentReportsResponseImpl({required final List commentReports}) : _commentReports = commentReports, super._(); - factory _$ListCommentReportsResponseImpl.fromJson( - Map json) => - _$$ListCommentReportsResponseImplFromJson(json); + factory _$ListCommentReportsResponseImpl.fromJson(Map json) => _$$ListCommentReportsResponseImplFromJson(json); final List _commentReports; @override @@ -137,43 +121,31 @@ class _$ListCommentReportsResponseImpl extends _ListCommentReportsResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListCommentReportsResponseImpl && - const DeepCollectionEquality() - .equals(other._commentReports, _commentReports)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListCommentReportsResponseImpl && const DeepCollectionEquality().equals(other._commentReports, _commentReports)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_commentReports)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_commentReports)); /// Create a copy of ListCommentReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommentReportsResponseImplCopyWith<_$ListCommentReportsResponseImpl> - get copyWith => __$$ListCommentReportsResponseImplCopyWithImpl< - _$ListCommentReportsResponseImpl>(this, _$identity); + _$$ListCommentReportsResponseImplCopyWith<_$ListCommentReportsResponseImpl> get copyWith => __$$ListCommentReportsResponseImplCopyWithImpl<_$ListCommentReportsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommentReportsResponseImplToJson( - this, - ); + return _$$ListCommentReportsResponseImplToJson(this); } } abstract class _ListCommentReportsResponse extends ListCommentReportsResponse { - const factory _ListCommentReportsResponse( - {required final List commentReports}) = - _$ListCommentReportsResponseImpl; + const factory _ListCommentReportsResponse({required final List commentReports}) = _$ListCommentReportsResponseImpl; const _ListCommentReportsResponse._() : super._(); - factory _ListCommentReportsResponse.fromJson(Map json) = - _$ListCommentReportsResponseImpl.fromJson; + factory _ListCommentReportsResponse.fromJson(Map json) = _$ListCommentReportsResponseImpl.fromJson; @override List get commentReports; @@ -182,6 +154,5 @@ abstract class _ListCommentReportsResponse extends ListCommentReportsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommentReportsResponseImplCopyWith<_$ListCommentReportsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListCommentReportsResponseImplCopyWith<_$ListCommentReportsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/comment/list_comment_reports_response.g.dart b/lib/src/v3/models/comment/list_comment_reports_response.g.dart index 20ddfddb..c7988de7 100644 --- a/lib/src/v3/models/comment/list_comment_reports_response.g.dart +++ b/lib/src/v3/models/comment/list_comment_reports_response.g.dart @@ -6,17 +6,9 @@ part of 'list_comment_reports_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListCommentReportsResponseImpl _$$ListCommentReportsResponseImplFromJson( - Map json) => - _$ListCommentReportsResponseImpl( - commentReports: (json['comment_reports'] as List) - .map((e) => CommentReportView.fromJson(e as Map)) - .toList(), - ); +_$ListCommentReportsResponseImpl _$$ListCommentReportsResponseImplFromJson(Map json) => + _$ListCommentReportsResponseImpl(commentReports: (json['comment_reports'] as List).map((e) => CommentReportView.fromJson(e as Map)).toList()); -Map _$$ListCommentReportsResponseImplToJson( - _$ListCommentReportsResponseImpl instance) => - { - 'comment_reports': - instance.commentReports.map((e) => e.toJson()).toList(), - }; +Map _$$ListCommentReportsResponseImplToJson(_$ListCommentReportsResponseImpl instance) => { + 'comment_reports': instance.commentReports.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/community/add_mod_to_community_response.dart b/lib/src/v3/models/community/add_mod_to_community_response.dart index 8f5056e3..81459711 100644 --- a/lib/src/v3/models/community/add_mod_to_community_response.dart +++ b/lib/src/v3/models/community/add_mod_to_community_response.dart @@ -14,6 +14,5 @@ class AddModToCommunityResponse with _$AddModToCommunityResponse { }) = _AddModToCommunityResponse; const AddModToCommunityResponse._(); - factory AddModToCommunityResponse.fromJson(Map json) => - _$AddModToCommunityResponseFromJson(json); + factory AddModToCommunityResponse.fromJson(Map json) => _$AddModToCommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/add_mod_to_community_response.freezed.dart b/lib/src/v3/models/community/add_mod_to_community_response.freezed.dart index f6b56b16..421ca348 100644 --- a/lib/src/v3/models/community/add_mod_to_community_response.freezed.dart +++ b/lib/src/v3/models/community/add_mod_to_community_response.freezed.dart @@ -12,17 +12,16 @@ part of 'add_mod_to_community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -AddModToCommunityResponse _$AddModToCommunityResponseFromJson( - Map json) { +AddModToCommunityResponse _$AddModToCommunityResponseFromJson(Map json) { return _AddModToCommunityResponse.fromJson(json); } /// @nodoc mixin _$AddModToCommunityResponse { - List get moderators => - throw _privateConstructorUsedError; + List get moderators => throw _privateConstructorUsedError; /// Serializes this AddModToCommunityResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,23 +29,18 @@ mixin _$AddModToCommunityResponse { /// Create a copy of AddModToCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AddModToCommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $AddModToCommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AddModToCommunityResponseCopyWith<$Res> { - factory $AddModToCommunityResponseCopyWith(AddModToCommunityResponse value, - $Res Function(AddModToCommunityResponse) then) = - _$AddModToCommunityResponseCopyWithImpl<$Res, AddModToCommunityResponse>; + factory $AddModToCommunityResponseCopyWith(AddModToCommunityResponse value, $Res Function(AddModToCommunityResponse) then) = _$AddModToCommunityResponseCopyWithImpl<$Res, AddModToCommunityResponse>; @useResult $Res call({List moderators}); } /// @nodoc -class _$AddModToCommunityResponseCopyWithImpl<$Res, - $Val extends AddModToCommunityResponse> - implements $AddModToCommunityResponseCopyWith<$Res> { +class _$AddModToCommunityResponseCopyWithImpl<$Res, $Val extends AddModToCommunityResponse> implements $AddModToCommunityResponseCopyWith<$Res> { _$AddModToCommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,53 +52,47 @@ class _$AddModToCommunityResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? moderators = null, - }) { - return _then(_value.copyWith( - moderators: null == moderators - ? _value.moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? moderators = null}) { + return _then( + _value.copyWith( + moderators: + null == moderators + ? _value.moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$AddModToCommunityResponseImplCopyWith<$Res> - implements $AddModToCommunityResponseCopyWith<$Res> { - factory _$$AddModToCommunityResponseImplCopyWith( - _$AddModToCommunityResponseImpl value, - $Res Function(_$AddModToCommunityResponseImpl) then) = - __$$AddModToCommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$AddModToCommunityResponseImplCopyWith<$Res> implements $AddModToCommunityResponseCopyWith<$Res> { + factory _$$AddModToCommunityResponseImplCopyWith(_$AddModToCommunityResponseImpl value, $Res Function(_$AddModToCommunityResponseImpl) then) = __$$AddModToCommunityResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List moderators}); } /// @nodoc -class __$$AddModToCommunityResponseImplCopyWithImpl<$Res> - extends _$AddModToCommunityResponseCopyWithImpl<$Res, - _$AddModToCommunityResponseImpl> +class __$$AddModToCommunityResponseImplCopyWithImpl<$Res> extends _$AddModToCommunityResponseCopyWithImpl<$Res, _$AddModToCommunityResponseImpl> implements _$$AddModToCommunityResponseImplCopyWith<$Res> { - __$$AddModToCommunityResponseImplCopyWithImpl( - _$AddModToCommunityResponseImpl _value, - $Res Function(_$AddModToCommunityResponseImpl) _then) - : super(_value, _then); + __$$AddModToCommunityResponseImplCopyWithImpl(_$AddModToCommunityResponseImpl _value, $Res Function(_$AddModToCommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of AddModToCommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? moderators = null, - }) { - return _then(_$AddModToCommunityResponseImpl( - moderators: null == moderators - ? _value._moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? moderators = null}) { + return _then( + _$AddModToCommunityResponseImpl( + moderators: + null == moderators + ? _value._moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -112,13 +100,9 @@ class __$$AddModToCommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$AddModToCommunityResponseImpl extends _AddModToCommunityResponse { - const _$AddModToCommunityResponseImpl( - {required final List moderators}) - : _moderators = moderators, - super._(); + const _$AddModToCommunityResponseImpl({required final List moderators}) : _moderators = moderators, super._(); - factory _$AddModToCommunityResponseImpl.fromJson(Map json) => - _$$AddModToCommunityResponseImplFromJson(json); + factory _$AddModToCommunityResponseImpl.fromJson(Map json) => _$$AddModToCommunityResponseImplFromJson(json); final List _moderators; @override @@ -135,43 +119,31 @@ class _$AddModToCommunityResponseImpl extends _AddModToCommunityResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$AddModToCommunityResponseImpl && - const DeepCollectionEquality() - .equals(other._moderators, _moderators)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$AddModToCommunityResponseImpl && const DeepCollectionEquality().equals(other._moderators, _moderators)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_moderators)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_moderators)); /// Create a copy of AddModToCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AddModToCommunityResponseImplCopyWith<_$AddModToCommunityResponseImpl> - get copyWith => __$$AddModToCommunityResponseImplCopyWithImpl< - _$AddModToCommunityResponseImpl>(this, _$identity); + _$$AddModToCommunityResponseImplCopyWith<_$AddModToCommunityResponseImpl> get copyWith => __$$AddModToCommunityResponseImplCopyWithImpl<_$AddModToCommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$AddModToCommunityResponseImplToJson( - this, - ); + return _$$AddModToCommunityResponseImplToJson(this); } } abstract class _AddModToCommunityResponse extends AddModToCommunityResponse { - const factory _AddModToCommunityResponse( - {required final List moderators}) = - _$AddModToCommunityResponseImpl; + const factory _AddModToCommunityResponse({required final List moderators}) = _$AddModToCommunityResponseImpl; const _AddModToCommunityResponse._() : super._(); - factory _AddModToCommunityResponse.fromJson(Map json) = - _$AddModToCommunityResponseImpl.fromJson; + factory _AddModToCommunityResponse.fromJson(Map json) = _$AddModToCommunityResponseImpl.fromJson; @override List get moderators; @@ -180,6 +152,5 @@ abstract class _AddModToCommunityResponse extends AddModToCommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AddModToCommunityResponseImplCopyWith<_$AddModToCommunityResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$AddModToCommunityResponseImplCopyWith<_$AddModToCommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/add_mod_to_community_response.g.dart b/lib/src/v3/models/community/add_mod_to_community_response.g.dart index 28675beb..49992707 100644 --- a/lib/src/v3/models/community/add_mod_to_community_response.g.dart +++ b/lib/src/v3/models/community/add_mod_to_community_response.g.dart @@ -6,17 +6,7 @@ part of 'add_mod_to_community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AddModToCommunityResponseImpl _$$AddModToCommunityResponseImplFromJson( - Map json) => - _$AddModToCommunityResponseImpl( - moderators: (json['moderators'] as List) - .map( - (e) => CommunityModeratorView.fromJson(e as Map)) - .toList(), - ); +_$AddModToCommunityResponseImpl _$$AddModToCommunityResponseImplFromJson(Map json) => + _$AddModToCommunityResponseImpl(moderators: (json['moderators'] as List).map((e) => CommunityModeratorView.fromJson(e as Map)).toList()); -Map _$$AddModToCommunityResponseImplToJson( - _$AddModToCommunityResponseImpl instance) => - { - 'moderators': instance.moderators.map((e) => e.toJson()).toList(), - }; +Map _$$AddModToCommunityResponseImplToJson(_$AddModToCommunityResponseImpl instance) => {'moderators': instance.moderators.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/community/ban_from_community_response.dart b/lib/src/v3/models/community/ban_from_community_response.dart index bd598058..a92dc018 100644 --- a/lib/src/v3/models/community/ban_from_community_response.dart +++ b/lib/src/v3/models/community/ban_from_community_response.dart @@ -15,6 +15,5 @@ class BanFromCommunityResponse with _$BanFromCommunityResponse { }) = _BanFromCommunityResponse; const BanFromCommunityResponse._(); - factory BanFromCommunityResponse.fromJson(Map json) => - _$BanFromCommunityResponseFromJson(json); + factory BanFromCommunityResponse.fromJson(Map json) => _$BanFromCommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/ban_from_community_response.freezed.dart b/lib/src/v3/models/community/ban_from_community_response.freezed.dart index 449cf8b1..0db94b5e 100644 --- a/lib/src/v3/models/community/ban_from_community_response.freezed.dart +++ b/lib/src/v3/models/community/ban_from_community_response.freezed.dart @@ -12,10 +12,10 @@ part of 'ban_from_community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -BanFromCommunityResponse _$BanFromCommunityResponseFromJson( - Map json) { +BanFromCommunityResponse _$BanFromCommunityResponseFromJson(Map json) { return _BanFromCommunityResponse.fromJson(json); } @@ -30,15 +30,12 @@ mixin _$BanFromCommunityResponse { /// Create a copy of BanFromCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BanFromCommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BanFromCommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BanFromCommunityResponseCopyWith<$Res> { - factory $BanFromCommunityResponseCopyWith(BanFromCommunityResponse value, - $Res Function(BanFromCommunityResponse) then) = - _$BanFromCommunityResponseCopyWithImpl<$Res, BanFromCommunityResponse>; + factory $BanFromCommunityResponseCopyWith(BanFromCommunityResponse value, $Res Function(BanFromCommunityResponse) then) = _$BanFromCommunityResponseCopyWithImpl<$Res, BanFromCommunityResponse>; @useResult $Res call({PersonView personView, bool banned}); @@ -46,9 +43,7 @@ abstract class $BanFromCommunityResponseCopyWith<$Res> { } /// @nodoc -class _$BanFromCommunityResponseCopyWithImpl<$Res, - $Val extends BanFromCommunityResponse> - implements $BanFromCommunityResponseCopyWith<$Res> { +class _$BanFromCommunityResponseCopyWithImpl<$Res, $Val extends BanFromCommunityResponse> implements $BanFromCommunityResponseCopyWith<$Res> { _$BanFromCommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,20 +55,22 @@ class _$BanFromCommunityResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? banned = null, - }) { - return _then(_value.copyWith( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? personView = null, Object? banned = null}) { + return _then( + _value.copyWith( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of BanFromCommunityResponse @@ -88,12 +85,8 @@ class _$BanFromCommunityResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$BanFromCommunityResponseImplCopyWith<$Res> - implements $BanFromCommunityResponseCopyWith<$Res> { - factory _$$BanFromCommunityResponseImplCopyWith( - _$BanFromCommunityResponseImpl value, - $Res Function(_$BanFromCommunityResponseImpl) then) = - __$$BanFromCommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$BanFromCommunityResponseImplCopyWith<$Res> implements $BanFromCommunityResponseCopyWith<$Res> { + factory _$$BanFromCommunityResponseImplCopyWith(_$BanFromCommunityResponseImpl value, $Res Function(_$BanFromCommunityResponseImpl) then) = __$$BanFromCommunityResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PersonView personView, bool banned}); @@ -103,33 +96,28 @@ abstract class _$$BanFromCommunityResponseImplCopyWith<$Res> } /// @nodoc -class __$$BanFromCommunityResponseImplCopyWithImpl<$Res> - extends _$BanFromCommunityResponseCopyWithImpl<$Res, - _$BanFromCommunityResponseImpl> - implements _$$BanFromCommunityResponseImplCopyWith<$Res> { - __$$BanFromCommunityResponseImplCopyWithImpl( - _$BanFromCommunityResponseImpl _value, - $Res Function(_$BanFromCommunityResponseImpl) _then) - : super(_value, _then); +class __$$BanFromCommunityResponseImplCopyWithImpl<$Res> extends _$BanFromCommunityResponseCopyWithImpl<$Res, _$BanFromCommunityResponseImpl> implements _$$BanFromCommunityResponseImplCopyWith<$Res> { + __$$BanFromCommunityResponseImplCopyWithImpl(_$BanFromCommunityResponseImpl _value, $Res Function(_$BanFromCommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of BanFromCommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? banned = null, - }) { - return _then(_$BanFromCommunityResponseImpl( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? personView = null, Object? banned = null}) { + return _then( + _$BanFromCommunityResponseImpl( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -137,16 +125,13 @@ class __$$BanFromCommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$BanFromCommunityResponseImpl extends _BanFromCommunityResponse { - const _$BanFromCommunityResponseImpl( - {required this.personView, required this.banned}) - : super._(); + const _$BanFromCommunityResponseImpl({required this.personView, required this.banned}) : super._(); - factory _$BanFromCommunityResponseImpl.fromJson(Map json) => - _$$BanFromCommunityResponseImplFromJson(json); + factory _$BanFromCommunityResponseImpl.fromJson(Map json) => _$$BanFromCommunityResponseImplFromJson(json); @override final PersonView personView; -// v0.18.0 + // v0.18.0 @override final bool banned; @@ -160,8 +145,7 @@ class _$BanFromCommunityResponseImpl extends _BanFromCommunityResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BanFromCommunityResponseImpl && - (identical(other.personView, personView) || - other.personView == personView) && + (identical(other.personView, personView) || other.personView == personView) && (identical(other.banned, banned) || other.banned == banned)); } @@ -174,26 +158,19 @@ class _$BanFromCommunityResponseImpl extends _BanFromCommunityResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BanFromCommunityResponseImplCopyWith<_$BanFromCommunityResponseImpl> - get copyWith => __$$BanFromCommunityResponseImplCopyWithImpl< - _$BanFromCommunityResponseImpl>(this, _$identity); + _$$BanFromCommunityResponseImplCopyWith<_$BanFromCommunityResponseImpl> get copyWith => __$$BanFromCommunityResponseImplCopyWithImpl<_$BanFromCommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BanFromCommunityResponseImplToJson( - this, - ); + return _$$BanFromCommunityResponseImplToJson(this); } } abstract class _BanFromCommunityResponse extends BanFromCommunityResponse { - const factory _BanFromCommunityResponse( - {required final PersonView personView, - required final bool banned}) = _$BanFromCommunityResponseImpl; + const factory _BanFromCommunityResponse({required final PersonView personView, required final bool banned}) = _$BanFromCommunityResponseImpl; const _BanFromCommunityResponse._() : super._(); - factory _BanFromCommunityResponse.fromJson(Map json) = - _$BanFromCommunityResponseImpl.fromJson; + factory _BanFromCommunityResponse.fromJson(Map json) = _$BanFromCommunityResponseImpl.fromJson; @override PersonView get personView; // v0.18.0 @@ -204,6 +181,5 @@ abstract class _BanFromCommunityResponse extends BanFromCommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BanFromCommunityResponseImplCopyWith<_$BanFromCommunityResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BanFromCommunityResponseImplCopyWith<_$BanFromCommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/ban_from_community_response.g.dart b/lib/src/v3/models/community/ban_from_community_response.g.dart index 45cebb1e..326c2776 100644 --- a/lib/src/v3/models/community/ban_from_community_response.g.dart +++ b/lib/src/v3/models/community/ban_from_community_response.g.dart @@ -6,17 +6,7 @@ part of 'ban_from_community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BanFromCommunityResponseImpl _$$BanFromCommunityResponseImplFromJson( - Map json) => - _$BanFromCommunityResponseImpl( - personView: - PersonView.fromJson(json['person_view'] as Map), - banned: json['banned'] as bool, - ); +_$BanFromCommunityResponseImpl _$$BanFromCommunityResponseImplFromJson(Map json) => + _$BanFromCommunityResponseImpl(personView: PersonView.fromJson(json['person_view'] as Map), banned: json['banned'] as bool); -Map _$$BanFromCommunityResponseImplToJson( - _$BanFromCommunityResponseImpl instance) => - { - 'person_view': instance.personView.toJson(), - 'banned': instance.banned, - }; +Map _$$BanFromCommunityResponseImplToJson(_$BanFromCommunityResponseImpl instance) => {'person_view': instance.personView.toJson(), 'banned': instance.banned}; diff --git a/lib/src/v3/models/community/block_community_response.dart b/lib/src/v3/models/community/block_community_response.dart index d1811065..e907d501 100644 --- a/lib/src/v3/models/community/block_community_response.dart +++ b/lib/src/v3/models/community/block_community_response.dart @@ -15,6 +15,5 @@ class BlockCommunityResponse with _$BlockCommunityResponse { }) = _BlockCommunityResponse; const BlockCommunityResponse._(); - factory BlockCommunityResponse.fromJson(Map json) => - _$BlockCommunityResponseFromJson(json); + factory BlockCommunityResponse.fromJson(Map json) => _$BlockCommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/block_community_response.freezed.dart b/lib/src/v3/models/community/block_community_response.freezed.dart index 2949ff47..e33340f3 100644 --- a/lib/src/v3/models/community/block_community_response.freezed.dart +++ b/lib/src/v3/models/community/block_community_response.freezed.dart @@ -12,17 +12,16 @@ part of 'block_community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -BlockCommunityResponse _$BlockCommunityResponseFromJson( - Map json) { +BlockCommunityResponse _$BlockCommunityResponseFromJson(Map json) { return _BlockCommunityResponse.fromJson(json); } /// @nodoc mixin _$BlockCommunityResponse { - CommunityView get communityView => - throw _privateConstructorUsedError; // v0.18.0 + CommunityView get communityView => throw _privateConstructorUsedError; // v0.18.0 bool get blocked => throw _privateConstructorUsedError; /// Serializes this BlockCommunityResponse to a JSON map. @@ -31,15 +30,12 @@ mixin _$BlockCommunityResponse { /// Create a copy of BlockCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockCommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockCommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockCommunityResponseCopyWith<$Res> { - factory $BlockCommunityResponseCopyWith(BlockCommunityResponse value, - $Res Function(BlockCommunityResponse) then) = - _$BlockCommunityResponseCopyWithImpl<$Res, BlockCommunityResponse>; + factory $BlockCommunityResponseCopyWith(BlockCommunityResponse value, $Res Function(BlockCommunityResponse) then) = _$BlockCommunityResponseCopyWithImpl<$Res, BlockCommunityResponse>; @useResult $Res call({CommunityView communityView, bool blocked}); @@ -47,9 +43,7 @@ abstract class $BlockCommunityResponseCopyWith<$Res> { } /// @nodoc -class _$BlockCommunityResponseCopyWithImpl<$Res, - $Val extends BlockCommunityResponse> - implements $BlockCommunityResponseCopyWith<$Res> { +class _$BlockCommunityResponseCopyWithImpl<$Res, $Val extends BlockCommunityResponse> implements $BlockCommunityResponseCopyWith<$Res> { _$BlockCommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,20 +55,22 @@ class _$BlockCommunityResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? blocked = null, - }) { - return _then(_value.copyWith( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? communityView = null, Object? blocked = null}) { + return _then( + _value.copyWith( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of BlockCommunityResponse @@ -89,12 +85,8 @@ class _$BlockCommunityResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$BlockCommunityResponseImplCopyWith<$Res> - implements $BlockCommunityResponseCopyWith<$Res> { - factory _$$BlockCommunityResponseImplCopyWith( - _$BlockCommunityResponseImpl value, - $Res Function(_$BlockCommunityResponseImpl) then) = - __$$BlockCommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$BlockCommunityResponseImplCopyWith<$Res> implements $BlockCommunityResponseCopyWith<$Res> { + factory _$$BlockCommunityResponseImplCopyWith(_$BlockCommunityResponseImpl value, $Res Function(_$BlockCommunityResponseImpl) then) = __$$BlockCommunityResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CommunityView communityView, bool blocked}); @@ -104,33 +96,28 @@ abstract class _$$BlockCommunityResponseImplCopyWith<$Res> } /// @nodoc -class __$$BlockCommunityResponseImplCopyWithImpl<$Res> - extends _$BlockCommunityResponseCopyWithImpl<$Res, - _$BlockCommunityResponseImpl> - implements _$$BlockCommunityResponseImplCopyWith<$Res> { - __$$BlockCommunityResponseImplCopyWithImpl( - _$BlockCommunityResponseImpl _value, - $Res Function(_$BlockCommunityResponseImpl) _then) - : super(_value, _then); +class __$$BlockCommunityResponseImplCopyWithImpl<$Res> extends _$BlockCommunityResponseCopyWithImpl<$Res, _$BlockCommunityResponseImpl> implements _$$BlockCommunityResponseImplCopyWith<$Res> { + __$$BlockCommunityResponseImplCopyWithImpl(_$BlockCommunityResponseImpl _value, $Res Function(_$BlockCommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of BlockCommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? blocked = null, - }) { - return _then(_$BlockCommunityResponseImpl( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? communityView = null, Object? blocked = null}) { + return _then( + _$BlockCommunityResponseImpl( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -138,16 +125,13 @@ class __$$BlockCommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$BlockCommunityResponseImpl extends _BlockCommunityResponse { - const _$BlockCommunityResponseImpl( - {required this.communityView, required this.blocked}) - : super._(); + const _$BlockCommunityResponseImpl({required this.communityView, required this.blocked}) : super._(); - factory _$BlockCommunityResponseImpl.fromJson(Map json) => - _$$BlockCommunityResponseImplFromJson(json); + factory _$BlockCommunityResponseImpl.fromJson(Map json) => _$$BlockCommunityResponseImplFromJson(json); @override final CommunityView communityView; -// v0.18.0 + // v0.18.0 @override final bool blocked; @@ -161,8 +145,7 @@ class _$BlockCommunityResponseImpl extends _BlockCommunityResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlockCommunityResponseImpl && - (identical(other.communityView, communityView) || - other.communityView == communityView) && + (identical(other.communityView, communityView) || other.communityView == communityView) && (identical(other.blocked, blocked) || other.blocked == blocked)); } @@ -175,26 +158,19 @@ class _$BlockCommunityResponseImpl extends _BlockCommunityResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockCommunityResponseImplCopyWith<_$BlockCommunityResponseImpl> - get copyWith => __$$BlockCommunityResponseImplCopyWithImpl< - _$BlockCommunityResponseImpl>(this, _$identity); + _$$BlockCommunityResponseImplCopyWith<_$BlockCommunityResponseImpl> get copyWith => __$$BlockCommunityResponseImplCopyWithImpl<_$BlockCommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BlockCommunityResponseImplToJson( - this, - ); + return _$$BlockCommunityResponseImplToJson(this); } } abstract class _BlockCommunityResponse extends BlockCommunityResponse { - const factory _BlockCommunityResponse( - {required final CommunityView communityView, - required final bool blocked}) = _$BlockCommunityResponseImpl; + const factory _BlockCommunityResponse({required final CommunityView communityView, required final bool blocked}) = _$BlockCommunityResponseImpl; const _BlockCommunityResponse._() : super._(); - factory _BlockCommunityResponse.fromJson(Map json) = - _$BlockCommunityResponseImpl.fromJson; + factory _BlockCommunityResponse.fromJson(Map json) = _$BlockCommunityResponseImpl.fromJson; @override CommunityView get communityView; // v0.18.0 @@ -205,6 +181,5 @@ abstract class _BlockCommunityResponse extends BlockCommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockCommunityResponseImplCopyWith<_$BlockCommunityResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BlockCommunityResponseImplCopyWith<_$BlockCommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/block_community_response.g.dart b/lib/src/v3/models/community/block_community_response.g.dart index f8877173..7f7e2adc 100644 --- a/lib/src/v3/models/community/block_community_response.g.dart +++ b/lib/src/v3/models/community/block_community_response.g.dart @@ -6,17 +6,7 @@ part of 'block_community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BlockCommunityResponseImpl _$$BlockCommunityResponseImplFromJson( - Map json) => - _$BlockCommunityResponseImpl( - communityView: CommunityView.fromJson( - json['community_view'] as Map), - blocked: json['blocked'] as bool, - ); +_$BlockCommunityResponseImpl _$$BlockCommunityResponseImplFromJson(Map json) => + _$BlockCommunityResponseImpl(communityView: CommunityView.fromJson(json['community_view'] as Map), blocked: json['blocked'] as bool); -Map _$$BlockCommunityResponseImplToJson( - _$BlockCommunityResponseImpl instance) => - { - 'community_view': instance.communityView.toJson(), - 'blocked': instance.blocked, - }; +Map _$$BlockCommunityResponseImplToJson(_$BlockCommunityResponseImpl instance) => {'community_view': instance.communityView.toJson(), 'blocked': instance.blocked}; diff --git a/lib/src/v3/models/community/community.dart b/lib/src/v3/models/community/community.dart index d2e69f2c..d1ac45da 100644 --- a/lib/src/v3/models/community/community.dart +++ b/lib/src/v3/models/community/community.dart @@ -33,6 +33,5 @@ class Community with _$Community { }) = _Community; const Community._(); - factory Community.fromJson(Map json) => - _$CommunityFromJson(json); + factory Community.fromJson(Map json) => _$CommunityFromJson(json); } diff --git a/lib/src/v3/models/community/community.freezed.dart b/lib/src/v3/models/community/community.freezed.dart index 7782486d..ee1ac220 100644 --- a/lib/src/v3/models/community/community.freezed.dart +++ b/lib/src/v3/models/community/community.freezed.dart @@ -12,7 +12,8 @@ part of 'community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Community _$CommunityFromJson(Map json) { return _Community.fromJson(json); @@ -34,14 +35,11 @@ mixin _$Community { String? get icon => throw _privateConstructorUsedError; // v0.18.0 String? get banner => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get followersUrl => - throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] + String? get followersUrl => throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] @deprecated - String? get inboxUrl => - throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] + String? get inboxUrl => throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] bool get hidden => throw _privateConstructorUsedError; // v0.18.0 - bool get postingRestrictedToMods => - throw _privateConstructorUsedError; // v0.18.0 + bool get postingRestrictedToMods => throw _privateConstructorUsedError; // v0.18.0 int get instanceId => throw _privateConstructorUsedError; // v0.18.0 CommunityVisibility? get visibility => throw _privateConstructorUsedError; @@ -51,40 +49,38 @@ mixin _$Community { /// Create a copy of Community /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityCopyWith<$Res> { - factory $CommunityCopyWith(Community value, $Res Function(Community) then) = - _$CommunityCopyWithImpl<$Res, Community>; + factory $CommunityCopyWith(Community value, $Res Function(Community) then) = _$CommunityCopyWithImpl<$Res, Community>; @useResult - $Res call( - {int id, - String name, - String title, - String? description, - bool removed, - DateTime published, - DateTime? updated, - bool deleted, - bool nsfw, - String actorId, - bool local, - String? icon, - String? banner, - @deprecated String? followersUrl, - @deprecated String? inboxUrl, - bool hidden, - bool postingRestrictedToMods, - int instanceId, - CommunityVisibility? visibility}); + $Res call({ + int id, + String name, + String title, + String? description, + bool removed, + DateTime published, + DateTime? updated, + bool deleted, + bool nsfw, + String actorId, + bool local, + String? icon, + String? banner, + @deprecated String? followersUrl, + @deprecated String? inboxUrl, + bool hidden, + bool postingRestrictedToMods, + int instanceId, + CommunityVisibility? visibility, + }); } /// @nodoc -class _$CommunityCopyWithImpl<$Res, $Val extends Community> - implements $CommunityCopyWith<$Res> { +class _$CommunityCopyWithImpl<$Res, $Val extends Community> implements $CommunityCopyWith<$Res> { _$CommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -117,124 +113,140 @@ class _$CommunityCopyWithImpl<$Res, $Val extends Community> Object? instanceId = null, Object? visibility = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - nsfw: null == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - followersUrl: freezed == followersUrl - ? _value.followersUrl - : followersUrl // ignore: cast_nullable_to_non_nullable - as String?, - inboxUrl: freezed == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String?, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - postingRestrictedToMods: null == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + nsfw: + null == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + followersUrl: + freezed == followersUrl + ? _value.followersUrl + : followersUrl // ignore: cast_nullable_to_non_nullable + as String?, + inboxUrl: + freezed == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String?, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + postingRestrictedToMods: + null == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CommunityImplCopyWith<$Res> - implements $CommunityCopyWith<$Res> { - factory _$$CommunityImplCopyWith( - _$CommunityImpl value, $Res Function(_$CommunityImpl) then) = - __$$CommunityImplCopyWithImpl<$Res>; +abstract class _$$CommunityImplCopyWith<$Res> implements $CommunityCopyWith<$Res> { + factory _$$CommunityImplCopyWith(_$CommunityImpl value, $Res Function(_$CommunityImpl) then) = __$$CommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - String title, - String? description, - bool removed, - DateTime published, - DateTime? updated, - bool deleted, - bool nsfw, - String actorId, - bool local, - String? icon, - String? banner, - @deprecated String? followersUrl, - @deprecated String? inboxUrl, - bool hidden, - bool postingRestrictedToMods, - int instanceId, - CommunityVisibility? visibility}); + $Res call({ + int id, + String name, + String title, + String? description, + bool removed, + DateTime published, + DateTime? updated, + bool deleted, + bool nsfw, + String actorId, + bool local, + String? icon, + String? banner, + @deprecated String? followersUrl, + @deprecated String? inboxUrl, + bool hidden, + bool postingRestrictedToMods, + int instanceId, + CommunityVisibility? visibility, + }); } /// @nodoc -class __$$CommunityImplCopyWithImpl<$Res> - extends _$CommunityCopyWithImpl<$Res, _$CommunityImpl> - implements _$$CommunityImplCopyWith<$Res> { - __$$CommunityImplCopyWithImpl( - _$CommunityImpl _value, $Res Function(_$CommunityImpl) _then) - : super(_value, _then); +class __$$CommunityImplCopyWithImpl<$Res> extends _$CommunityCopyWithImpl<$Res, _$CommunityImpl> implements _$$CommunityImplCopyWith<$Res> { + __$$CommunityImplCopyWithImpl(_$CommunityImpl _value, $Res Function(_$CommunityImpl) _then) : super(_value, _then); /// Create a copy of Community /// with the given fields replaced by the non-null parameter values. @@ -261,84 +273,105 @@ class __$$CommunityImplCopyWithImpl<$Res> Object? instanceId = null, Object? visibility = freezed, }) { - return _then(_$CommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - nsfw: null == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - followersUrl: freezed == followersUrl - ? _value.followersUrl - : followersUrl // ignore: cast_nullable_to_non_nullable - as String?, - inboxUrl: freezed == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String?, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - postingRestrictedToMods: null == postingRestrictedToMods - ? _value.postingRestrictedToMods - : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable - as bool, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - visibility: freezed == visibility - ? _value.visibility - : visibility // ignore: cast_nullable_to_non_nullable - as CommunityVisibility?, - )); + return _then( + _$CommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + nsfw: + null == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + followersUrl: + freezed == followersUrl + ? _value.followersUrl + : followersUrl // ignore: cast_nullable_to_non_nullable + as String?, + inboxUrl: + freezed == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String?, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + postingRestrictedToMods: + null == postingRestrictedToMods + ? _value.postingRestrictedToMods + : postingRestrictedToMods // ignore: cast_nullable_to_non_nullable + as bool, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + visibility: + freezed == visibility + ? _value.visibility + : visibility // ignore: cast_nullable_to_non_nullable + as CommunityVisibility?, + ), + ); } } @@ -346,87 +379,86 @@ class __$$CommunityImplCopyWithImpl<$Res> @modelSerde class _$CommunityImpl extends _Community { - const _$CommunityImpl( - {required this.id, - required this.name, - required this.title, - this.description, - required this.removed, - required this.published, - this.updated, - required this.deleted, - required this.nsfw, - required this.actorId, - required this.local, - this.icon, - this.banner, - @deprecated this.followersUrl, - @deprecated this.inboxUrl, - required this.hidden, - required this.postingRestrictedToMods, - required this.instanceId, - this.visibility}) - : super._(); + const _$CommunityImpl({ + required this.id, + required this.name, + required this.title, + this.description, + required this.removed, + required this.published, + this.updated, + required this.deleted, + required this.nsfw, + required this.actorId, + required this.local, + this.icon, + this.banner, + @deprecated this.followersUrl, + @deprecated this.inboxUrl, + required this.hidden, + required this.postingRestrictedToMods, + required this.instanceId, + this.visibility, + }) : super._(); - factory _$CommunityImpl.fromJson(Map json) => - _$$CommunityImplFromJson(json); + factory _$CommunityImpl.fromJson(Map json) => _$$CommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String name; -// v0.18.0 + // v0.18.0 @override final String title; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final bool nsfw; -// v0.18.0 + // v0.18.0 @override final String actorId; -// v0.18.0 + // v0.18.0 @override final bool local; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override @deprecated final String? followersUrl; -// v0.18.1 [deprecated in v0.19.0] + // v0.18.1 [deprecated in v0.19.0] @override @deprecated final String? inboxUrl; -// v0.18.1 [deprecated in v0.19.0] + // v0.18.1 [deprecated in v0.19.0] @override final bool hidden; -// v0.18.0 + // v0.18.0 @override final bool postingRestrictedToMods; -// v0.18.0 + // v0.18.0 @override final int instanceId; -// v0.18.0 + // v0.18.0 @override final CommunityVisibility? visibility; @@ -443,11 +475,9 @@ class _$CommunityImpl extends _Community { (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.title, title) || other.title == title) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.removed, removed) || other.removed == removed) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && @@ -455,86 +485,77 @@ class _$CommunityImpl extends _Community { (identical(other.local, local) || other.local == local) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && - (identical(other.followersUrl, followersUrl) || - other.followersUrl == followersUrl) && - (identical(other.inboxUrl, inboxUrl) || - other.inboxUrl == inboxUrl) && + (identical(other.followersUrl, followersUrl) || other.followersUrl == followersUrl) && + (identical(other.inboxUrl, inboxUrl) || other.inboxUrl == inboxUrl) && (identical(other.hidden, hidden) || other.hidden == hidden) && - (identical( - other.postingRestrictedToMods, postingRestrictedToMods) || - other.postingRestrictedToMods == postingRestrictedToMods) && - (identical(other.instanceId, instanceId) || - other.instanceId == instanceId) && - (identical(other.visibility, visibility) || - other.visibility == visibility)); + (identical(other.postingRestrictedToMods, postingRestrictedToMods) || other.postingRestrictedToMods == postingRestrictedToMods) && + (identical(other.instanceId, instanceId) || other.instanceId == instanceId) && + (identical(other.visibility, visibility) || other.visibility == visibility)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - name, - title, - description, - removed, - published, - updated, - deleted, - nsfw, - actorId, - local, - icon, - banner, - followersUrl, - inboxUrl, - hidden, - postingRestrictedToMods, - instanceId, - visibility - ]); + runtimeType, + id, + name, + title, + description, + removed, + published, + updated, + deleted, + nsfw, + actorId, + local, + icon, + banner, + followersUrl, + inboxUrl, + hidden, + postingRestrictedToMods, + instanceId, + visibility, + ]); /// Create a copy of Community /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityImplCopyWith<_$CommunityImpl> get copyWith => - __$$CommunityImplCopyWithImpl<_$CommunityImpl>(this, _$identity); + _$$CommunityImplCopyWith<_$CommunityImpl> get copyWith => __$$CommunityImplCopyWithImpl<_$CommunityImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityImplToJson( - this, - ); + return _$$CommunityImplToJson(this); } } abstract class _Community extends Community { - const factory _Community( - {required final int id, - required final String name, - required final String title, - final String? description, - required final bool removed, - required final DateTime published, - final DateTime? updated, - required final bool deleted, - required final bool nsfw, - required final String actorId, - required final bool local, - final String? icon, - final String? banner, - @deprecated final String? followersUrl, - @deprecated final String? inboxUrl, - required final bool hidden, - required final bool postingRestrictedToMods, - required final int instanceId, - final CommunityVisibility? visibility}) = _$CommunityImpl; + const factory _Community({ + required final int id, + required final String name, + required final String title, + final String? description, + required final bool removed, + required final DateTime published, + final DateTime? updated, + required final bool deleted, + required final bool nsfw, + required final String actorId, + required final bool local, + final String? icon, + final String? banner, + @deprecated final String? followersUrl, + @deprecated final String? inboxUrl, + required final bool hidden, + required final bool postingRestrictedToMods, + required final int instanceId, + final CommunityVisibility? visibility, + }) = _$CommunityImpl; const _Community._() : super._(); - factory _Community.fromJson(Map json) = - _$CommunityImpl.fromJson; + factory _Community.fromJson(Map json) = _$CommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -581,6 +602,5 @@ abstract class _Community extends Community { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityImplCopyWith<_$CommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommunityImplCopyWith<_$CommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/community.g.dart b/lib/src/v3/models/community/community.g.dart index 07e9ff82..2b5eaaab 100644 --- a/lib/src/v3/models/community/community.g.dart +++ b/lib/src/v3/models/community/community.g.dart @@ -6,64 +6,50 @@ part of 'community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityImpl _$$CommunityImplFromJson(Map json) => - _$CommunityImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - title: json['title'] as String, - description: json['description'] as String?, - removed: json['removed'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - deleted: json['deleted'] as bool, - nsfw: json['nsfw'] as bool, - actorId: json['actor_id'] as String, - local: json['local'] as bool, - icon: json['icon'] as String?, - banner: json['banner'] as String?, - followersUrl: json['followers_url'] as String?, - inboxUrl: json['inbox_url'] as String?, - hidden: json['hidden'] as bool, - postingRestrictedToMods: json['posting_restricted_to_mods'] as bool, - instanceId: (json['instance_id'] as num).toInt(), - visibility: json['visibility'] == null - ? null - : CommunityVisibility.fromJson(json['visibility']), - ); +_$CommunityImpl _$$CommunityImplFromJson(Map json) => _$CommunityImpl( + id: (json['id'] as num).toInt(), + name: json['name'] as String, + title: json['title'] as String, + description: json['description'] as String?, + removed: json['removed'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + deleted: json['deleted'] as bool, + nsfw: json['nsfw'] as bool, + actorId: json['actor_id'] as String, + local: json['local'] as bool, + icon: json['icon'] as String?, + banner: json['banner'] as String?, + followersUrl: json['followers_url'] as String?, + inboxUrl: json['inbox_url'] as String?, + hidden: json['hidden'] as bool, + postingRestrictedToMods: json['posting_restricted_to_mods'] as bool, + instanceId: (json['instance_id'] as num).toInt(), + visibility: json['visibility'] == null ? null : CommunityVisibility.fromJson(json['visibility']), +); -Map _$$CommunityImplToJson(_$CommunityImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'title': instance.title, - 'description': instance.description, - 'removed': instance.removed, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'deleted': instance.deleted, - 'nsfw': instance.nsfw, - 'actor_id': instance.actorId, - 'local': instance.local, - 'icon': instance.icon, - 'banner': instance.banner, - 'followers_url': instance.followersUrl, - 'inbox_url': instance.inboxUrl, - 'hidden': instance.hidden, - 'posting_restricted_to_mods': instance.postingRestrictedToMods, - 'instance_id': instance.instanceId, - 'visibility': instance.visibility?.toJson(), - }; +Map _$$CommunityImplToJson(_$CommunityImpl instance) => { + 'id': instance.id, + 'name': instance.name, + 'title': instance.title, + 'description': instance.description, + 'removed': instance.removed, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'deleted': instance.deleted, + 'nsfw': instance.nsfw, + 'actor_id': instance.actorId, + 'local': instance.local, + 'icon': instance.icon, + 'banner': instance.banner, + 'followers_url': instance.followersUrl, + 'inbox_url': instance.inboxUrl, + 'hidden': instance.hidden, + 'posting_restricted_to_mods': instance.postingRestrictedToMods, + 'instance_id': instance.instanceId, + 'visibility': instance.visibility?.toJson(), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/community/community_aggregates.dart b/lib/src/v3/models/community/community_aggregates.dart index 8335c05a..ced1a9b5 100644 --- a/lib/src/v3/models/community/community_aggregates.dart +++ b/lib/src/v3/models/community/community_aggregates.dart @@ -25,6 +25,5 @@ class CommunityAggregates with _$CommunityAggregates { }) = _CommunityAggregates; const CommunityAggregates._(); - factory CommunityAggregates.fromJson(Map json) => - _$CommunityAggregatesFromJson(json); + factory CommunityAggregates.fromJson(Map json) => _$CommunityAggregatesFromJson(json); } diff --git a/lib/src/v3/models/community/community_aggregates.freezed.dart b/lib/src/v3/models/community/community_aggregates.freezed.dart index 5bbb93d8..7f0d193f 100644 --- a/lib/src/v3/models/community/community_aggregates.freezed.dart +++ b/lib/src/v3/models/community/community_aggregates.freezed.dart @@ -12,7 +12,8 @@ part of 'community_aggregates.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommunityAggregates _$CommunityAggregatesFromJson(Map json) { return _CommunityAggregates.fromJson(json); @@ -21,8 +22,7 @@ CommunityAggregates _$CommunityAggregatesFromJson(Map json) { /// @nodoc mixin _$CommunityAggregates { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get communityId => throw _privateConstructorUsedError; // v0.18.0 int get subscribers => throw _privateConstructorUsedError; // v0.18.0 int get posts => throw _privateConstructorUsedError; // v0.18.0 @@ -33,8 +33,7 @@ mixin _$CommunityAggregates { int get usersActiveMonth => throw _privateConstructorUsedError; // v0.18.0 int get usersActiveHalfYear => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get hotRank => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get hotRank => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int? get subscribersLocal => throw _privateConstructorUsedError; /// Serializes this CommunityAggregates to a JSON map. @@ -43,34 +42,31 @@ mixin _$CommunityAggregates { /// Create a copy of CommunityAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityAggregatesCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityAggregatesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityAggregatesCopyWith<$Res> { - factory $CommunityAggregatesCopyWith( - CommunityAggregates value, $Res Function(CommunityAggregates) then) = - _$CommunityAggregatesCopyWithImpl<$Res, CommunityAggregates>; + factory $CommunityAggregatesCopyWith(CommunityAggregates value, $Res Function(CommunityAggregates) then) = _$CommunityAggregatesCopyWithImpl<$Res, CommunityAggregates>; @useResult - $Res call( - {@deprecated int? id, - int communityId, - int subscribers, - int posts, - int comments, - DateTime published, - int usersActiveDay, - int usersActiveWeek, - int usersActiveMonth, - int usersActiveHalfYear, - @deprecated int? hotRank, - int? subscribersLocal}); + $Res call({ + @deprecated int? id, + int communityId, + int subscribers, + int posts, + int comments, + DateTime published, + int usersActiveDay, + int usersActiveWeek, + int usersActiveMonth, + int usersActiveHalfYear, + @deprecated int? hotRank, + int? subscribersLocal, + }); } /// @nodoc -class _$CommunityAggregatesCopyWithImpl<$Res, $Val extends CommunityAggregates> - implements $CommunityAggregatesCopyWith<$Res> { +class _$CommunityAggregatesCopyWithImpl<$Res, $Val extends CommunityAggregates> implements $CommunityAggregatesCopyWith<$Res> { _$CommunityAggregatesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -96,89 +92,98 @@ class _$CommunityAggregatesCopyWithImpl<$Res, $Val extends CommunityAggregates> Object? hotRank = freezed, Object? subscribersLocal = freezed, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - subscribers: null == subscribers - ? _value.subscribers - : subscribers // ignore: cast_nullable_to_non_nullable - as int, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - usersActiveDay: null == usersActiveDay - ? _value.usersActiveDay - : usersActiveDay // ignore: cast_nullable_to_non_nullable - as int, - usersActiveWeek: null == usersActiveWeek - ? _value.usersActiveWeek - : usersActiveWeek // ignore: cast_nullable_to_non_nullable - as int, - usersActiveMonth: null == usersActiveMonth - ? _value.usersActiveMonth - : usersActiveMonth // ignore: cast_nullable_to_non_nullable - as int, - usersActiveHalfYear: null == usersActiveHalfYear - ? _value.usersActiveHalfYear - : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable - as int, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - subscribersLocal: freezed == subscribersLocal - ? _value.subscribersLocal - : subscribersLocal // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + subscribers: + null == subscribers + ? _value.subscribers + : subscribers // ignore: cast_nullable_to_non_nullable + as int, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + usersActiveDay: + null == usersActiveDay + ? _value.usersActiveDay + : usersActiveDay // ignore: cast_nullable_to_non_nullable + as int, + usersActiveWeek: + null == usersActiveWeek + ? _value.usersActiveWeek + : usersActiveWeek // ignore: cast_nullable_to_non_nullable + as int, + usersActiveMonth: + null == usersActiveMonth + ? _value.usersActiveMonth + : usersActiveMonth // ignore: cast_nullable_to_non_nullable + as int, + usersActiveHalfYear: + null == usersActiveHalfYear + ? _value.usersActiveHalfYear + : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable + as int, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + subscribersLocal: + freezed == subscribersLocal + ? _value.subscribersLocal + : subscribersLocal // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CommunityAggregatesImplCopyWith<$Res> - implements $CommunityAggregatesCopyWith<$Res> { - factory _$$CommunityAggregatesImplCopyWith(_$CommunityAggregatesImpl value, - $Res Function(_$CommunityAggregatesImpl) then) = - __$$CommunityAggregatesImplCopyWithImpl<$Res>; +abstract class _$$CommunityAggregatesImplCopyWith<$Res> implements $CommunityAggregatesCopyWith<$Res> { + factory _$$CommunityAggregatesImplCopyWith(_$CommunityAggregatesImpl value, $Res Function(_$CommunityAggregatesImpl) then) = __$$CommunityAggregatesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int communityId, - int subscribers, - int posts, - int comments, - DateTime published, - int usersActiveDay, - int usersActiveWeek, - int usersActiveMonth, - int usersActiveHalfYear, - @deprecated int? hotRank, - int? subscribersLocal}); + $Res call({ + @deprecated int? id, + int communityId, + int subscribers, + int posts, + int comments, + DateTime published, + int usersActiveDay, + int usersActiveWeek, + int usersActiveMonth, + int usersActiveHalfYear, + @deprecated int? hotRank, + int? subscribersLocal, + }); } /// @nodoc -class __$$CommunityAggregatesImplCopyWithImpl<$Res> - extends _$CommunityAggregatesCopyWithImpl<$Res, _$CommunityAggregatesImpl> - implements _$$CommunityAggregatesImplCopyWith<$Res> { - __$$CommunityAggregatesImplCopyWithImpl(_$CommunityAggregatesImpl _value, - $Res Function(_$CommunityAggregatesImpl) _then) - : super(_value, _then); +class __$$CommunityAggregatesImplCopyWithImpl<$Res> extends _$CommunityAggregatesCopyWithImpl<$Res, _$CommunityAggregatesImpl> implements _$$CommunityAggregatesImplCopyWith<$Res> { + __$$CommunityAggregatesImplCopyWithImpl(_$CommunityAggregatesImpl _value, $Res Function(_$CommunityAggregatesImpl) _then) : super(_value, _then); /// Create a copy of CommunityAggregates /// with the given fields replaced by the non-null parameter values. @@ -198,56 +203,70 @@ class __$$CommunityAggregatesImplCopyWithImpl<$Res> Object? hotRank = freezed, Object? subscribersLocal = freezed, }) { - return _then(_$CommunityAggregatesImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - subscribers: null == subscribers - ? _value.subscribers - : subscribers // ignore: cast_nullable_to_non_nullable - as int, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - usersActiveDay: null == usersActiveDay - ? _value.usersActiveDay - : usersActiveDay // ignore: cast_nullable_to_non_nullable - as int, - usersActiveWeek: null == usersActiveWeek - ? _value.usersActiveWeek - : usersActiveWeek // ignore: cast_nullable_to_non_nullable - as int, - usersActiveMonth: null == usersActiveMonth - ? _value.usersActiveMonth - : usersActiveMonth // ignore: cast_nullable_to_non_nullable - as int, - usersActiveHalfYear: null == usersActiveHalfYear - ? _value.usersActiveHalfYear - : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable - as int, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - subscribersLocal: freezed == subscribersLocal - ? _value.subscribersLocal - : subscribersLocal // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$CommunityAggregatesImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + subscribers: + null == subscribers + ? _value.subscribers + : subscribers // ignore: cast_nullable_to_non_nullable + as int, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + usersActiveDay: + null == usersActiveDay + ? _value.usersActiveDay + : usersActiveDay // ignore: cast_nullable_to_non_nullable + as int, + usersActiveWeek: + null == usersActiveWeek + ? _value.usersActiveWeek + : usersActiveWeek // ignore: cast_nullable_to_non_nullable + as int, + usersActiveMonth: + null == usersActiveMonth + ? _value.usersActiveMonth + : usersActiveMonth // ignore: cast_nullable_to_non_nullable + as int, + usersActiveHalfYear: + null == usersActiveHalfYear + ? _value.usersActiveHalfYear + : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable + as int, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + subscribersLocal: + freezed == subscribersLocal + ? _value.subscribersLocal + : subscribersLocal // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -255,59 +274,58 @@ class __$$CommunityAggregatesImplCopyWithImpl<$Res> @modelSerde class _$CommunityAggregatesImpl extends _CommunityAggregates { - const _$CommunityAggregatesImpl( - {@deprecated this.id, - required this.communityId, - required this.subscribers, - required this.posts, - required this.comments, - required this.published, - required this.usersActiveDay, - required this.usersActiveWeek, - required this.usersActiveMonth, - required this.usersActiveHalfYear, - @deprecated this.hotRank, - this.subscribersLocal}) - : super._(); + const _$CommunityAggregatesImpl({ + @deprecated this.id, + required this.communityId, + required this.subscribers, + required this.posts, + required this.comments, + required this.published, + required this.usersActiveDay, + required this.usersActiveWeek, + required this.usersActiveMonth, + required this.usersActiveHalfYear, + @deprecated this.hotRank, + this.subscribersLocal, + }) : super._(); - factory _$CommunityAggregatesImpl.fromJson(Map json) => - _$$CommunityAggregatesImplFromJson(json); + factory _$CommunityAggregatesImpl.fromJson(Map json) => _$$CommunityAggregatesImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int communityId; -// v0.18.0 + // v0.18.0 @override final int subscribers; -// v0.18.0 + // v0.18.0 @override final int posts; -// v0.18.0 + // v0.18.0 @override final int comments; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final int usersActiveDay; -// v0.18.0 + // v0.18.0 @override final int usersActiveWeek; -// v0.18.0 + // v0.18.0 @override final int usersActiveMonth; -// v0.18.0 + // v0.18.0 @override final int usersActiveHalfYear; -// v0.18.0 + // v0.18.0 @override @deprecated final int? hotRank; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int? subscribersLocal; @@ -322,80 +340,55 @@ class _$CommunityAggregatesImpl extends _CommunityAggregates { (other.runtimeType == runtimeType && other is _$CommunityAggregatesImpl && (identical(other.id, id) || other.id == id) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.subscribers, subscribers) || - other.subscribers == subscribers) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.subscribers, subscribers) || other.subscribers == subscribers) && (identical(other.posts, posts) || other.posts == posts) && - (identical(other.comments, comments) || - other.comments == comments) && - (identical(other.published, published) || - other.published == published) && - (identical(other.usersActiveDay, usersActiveDay) || - other.usersActiveDay == usersActiveDay) && - (identical(other.usersActiveWeek, usersActiveWeek) || - other.usersActiveWeek == usersActiveWeek) && - (identical(other.usersActiveMonth, usersActiveMonth) || - other.usersActiveMonth == usersActiveMonth) && - (identical(other.usersActiveHalfYear, usersActiveHalfYear) || - other.usersActiveHalfYear == usersActiveHalfYear) && + (identical(other.comments, comments) || other.comments == comments) && + (identical(other.published, published) || other.published == published) && + (identical(other.usersActiveDay, usersActiveDay) || other.usersActiveDay == usersActiveDay) && + (identical(other.usersActiveWeek, usersActiveWeek) || other.usersActiveWeek == usersActiveWeek) && + (identical(other.usersActiveMonth, usersActiveMonth) || other.usersActiveMonth == usersActiveMonth) && + (identical(other.usersActiveHalfYear, usersActiveHalfYear) || other.usersActiveHalfYear == usersActiveHalfYear) && (identical(other.hotRank, hotRank) || other.hotRank == hotRank) && - (identical(other.subscribersLocal, subscribersLocal) || - other.subscribersLocal == subscribersLocal)); + (identical(other.subscribersLocal, subscribersLocal) || other.subscribersLocal == subscribersLocal)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - communityId, - subscribers, - posts, - comments, - published, - usersActiveDay, - usersActiveWeek, - usersActiveMonth, - usersActiveHalfYear, - hotRank, - subscribersLocal); + int get hashCode => + Object.hash(runtimeType, id, communityId, subscribers, posts, comments, published, usersActiveDay, usersActiveWeek, usersActiveMonth, usersActiveHalfYear, hotRank, subscribersLocal); /// Create a copy of CommunityAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityAggregatesImplCopyWith<_$CommunityAggregatesImpl> get copyWith => - __$$CommunityAggregatesImplCopyWithImpl<_$CommunityAggregatesImpl>( - this, _$identity); + _$$CommunityAggregatesImplCopyWith<_$CommunityAggregatesImpl> get copyWith => __$$CommunityAggregatesImplCopyWithImpl<_$CommunityAggregatesImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityAggregatesImplToJson( - this, - ); + return _$$CommunityAggregatesImplToJson(this); } } abstract class _CommunityAggregates extends CommunityAggregates { - const factory _CommunityAggregates( - {@deprecated final int? id, - required final int communityId, - required final int subscribers, - required final int posts, - required final int comments, - required final DateTime published, - required final int usersActiveDay, - required final int usersActiveWeek, - required final int usersActiveMonth, - required final int usersActiveHalfYear, - @deprecated final int? hotRank, - final int? subscribersLocal}) = _$CommunityAggregatesImpl; + const factory _CommunityAggregates({ + @deprecated final int? id, + required final int communityId, + required final int subscribers, + required final int posts, + required final int comments, + required final DateTime published, + required final int usersActiveDay, + required final int usersActiveWeek, + required final int usersActiveMonth, + required final int usersActiveHalfYear, + @deprecated final int? hotRank, + final int? subscribersLocal, + }) = _$CommunityAggregatesImpl; const _CommunityAggregates._() : super._(); - factory _CommunityAggregates.fromJson(Map json) = - _$CommunityAggregatesImpl.fromJson; + factory _CommunityAggregates.fromJson(Map json) = _$CommunityAggregatesImpl.fromJson; @override @deprecated @@ -428,6 +421,5 @@ abstract class _CommunityAggregates extends CommunityAggregates { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityAggregatesImplCopyWith<_$CommunityAggregatesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommunityAggregatesImplCopyWith<_$CommunityAggregatesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/community_aggregates.g.dart b/lib/src/v3/models/community/community_aggregates.g.dart index a103b06c..0ce8dea9 100644 --- a/lib/src/v3/models/community/community_aggregates.g.dart +++ b/lib/src/v3/models/community/community_aggregates.g.dart @@ -6,36 +6,32 @@ part of 'community_aggregates.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityAggregatesImpl _$$CommunityAggregatesImplFromJson( - Map json) => - _$CommunityAggregatesImpl( - id: (json['id'] as num?)?.toInt(), - communityId: (json['community_id'] as num).toInt(), - subscribers: (json['subscribers'] as num).toInt(), - posts: (json['posts'] as num).toInt(), - comments: (json['comments'] as num).toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - usersActiveDay: (json['users_active_day'] as num).toInt(), - usersActiveWeek: (json['users_active_week'] as num).toInt(), - usersActiveMonth: (json['users_active_month'] as num).toInt(), - usersActiveHalfYear: (json['users_active_half_year'] as num).toInt(), - hotRank: (json['hot_rank'] as num?)?.toInt(), - subscribersLocal: (json['subscribers_local'] as num?)?.toInt(), - ); +_$CommunityAggregatesImpl _$$CommunityAggregatesImplFromJson(Map json) => _$CommunityAggregatesImpl( + id: (json['id'] as num?)?.toInt(), + communityId: (json['community_id'] as num).toInt(), + subscribers: (json['subscribers'] as num).toInt(), + posts: (json['posts'] as num).toInt(), + comments: (json['comments'] as num).toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + usersActiveDay: (json['users_active_day'] as num).toInt(), + usersActiveWeek: (json['users_active_week'] as num).toInt(), + usersActiveMonth: (json['users_active_month'] as num).toInt(), + usersActiveHalfYear: (json['users_active_half_year'] as num).toInt(), + hotRank: (json['hot_rank'] as num?)?.toInt(), + subscribersLocal: (json['subscribers_local'] as num?)?.toInt(), +); -Map _$$CommunityAggregatesImplToJson( - _$CommunityAggregatesImpl instance) => - { - 'id': instance.id, - 'community_id': instance.communityId, - 'subscribers': instance.subscribers, - 'posts': instance.posts, - 'comments': instance.comments, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'users_active_day': instance.usersActiveDay, - 'users_active_week': instance.usersActiveWeek, - 'users_active_month': instance.usersActiveMonth, - 'users_active_half_year': instance.usersActiveHalfYear, - 'hot_rank': instance.hotRank, - 'subscribers_local': instance.subscribersLocal, - }; +Map _$$CommunityAggregatesImplToJson(_$CommunityAggregatesImpl instance) => { + 'id': instance.id, + 'community_id': instance.communityId, + 'subscribers': instance.subscribers, + 'posts': instance.posts, + 'comments': instance.comments, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'users_active_day': instance.usersActiveDay, + 'users_active_week': instance.usersActiveWeek, + 'users_active_month': instance.usersActiveMonth, + 'users_active_half_year': instance.usersActiveHalfYear, + 'hot_rank': instance.hotRank, + 'subscribers_local': instance.subscribersLocal, +}; diff --git a/lib/src/v3/models/community/community_response.dart b/lib/src/v3/models/community/community_response.dart index 4569946f..3f1b53d5 100644 --- a/lib/src/v3/models/community/community_response.dart +++ b/lib/src/v3/models/community/community_response.dart @@ -15,6 +15,5 @@ class CommunityResponse with _$CommunityResponse { }) = _CommunityResponse; const CommunityResponse._(); - factory CommunityResponse.fromJson(Map json) => - _$CommunityResponseFromJson(json); + factory CommunityResponse.fromJson(Map json) => _$CommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/community_response.freezed.dart b/lib/src/v3/models/community/community_response.freezed.dart index b9bacc1f..475443fc 100644 --- a/lib/src/v3/models/community/community_response.freezed.dart +++ b/lib/src/v3/models/community/community_response.freezed.dart @@ -12,7 +12,8 @@ part of 'community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommunityResponse _$CommunityResponseFromJson(Map json) { return _CommunityResponse.fromJson(json); @@ -20,8 +21,7 @@ CommunityResponse _$CommunityResponseFromJson(Map json) { /// @nodoc mixin _$CommunityResponse { - CommunityView get communityView => - throw _privateConstructorUsedError; // v0.18.0 + CommunityView get communityView => throw _privateConstructorUsedError; // v0.18.0 List get discussionLanguages => throw _privateConstructorUsedError; /// Serializes this CommunityResponse to a JSON map. @@ -30,15 +30,12 @@ mixin _$CommunityResponse { /// Create a copy of CommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityResponseCopyWith<$Res> { - factory $CommunityResponseCopyWith( - CommunityResponse value, $Res Function(CommunityResponse) then) = - _$CommunityResponseCopyWithImpl<$Res, CommunityResponse>; + factory $CommunityResponseCopyWith(CommunityResponse value, $Res Function(CommunityResponse) then) = _$CommunityResponseCopyWithImpl<$Res, CommunityResponse>; @useResult $Res call({CommunityView communityView, List discussionLanguages}); @@ -46,8 +43,7 @@ abstract class $CommunityResponseCopyWith<$Res> { } /// @nodoc -class _$CommunityResponseCopyWithImpl<$Res, $Val extends CommunityResponse> - implements $CommunityResponseCopyWith<$Res> { +class _$CommunityResponseCopyWithImpl<$Res, $Val extends CommunityResponse> implements $CommunityResponseCopyWith<$Res> { _$CommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,20 +55,22 @@ class _$CommunityResponseCopyWithImpl<$Res, $Val extends CommunityResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? discussionLanguages = null, - }) { - return _then(_value.copyWith( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - discussionLanguages: null == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? communityView = null, Object? discussionLanguages = null}) { + return _then( + _value.copyWith( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + discussionLanguages: + null == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of CommunityResponse @@ -87,11 +85,8 @@ class _$CommunityResponseCopyWithImpl<$Res, $Val extends CommunityResponse> } /// @nodoc -abstract class _$$CommunityResponseImplCopyWith<$Res> - implements $CommunityResponseCopyWith<$Res> { - factory _$$CommunityResponseImplCopyWith(_$CommunityResponseImpl value, - $Res Function(_$CommunityResponseImpl) then) = - __$$CommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$CommunityResponseImplCopyWith<$Res> implements $CommunityResponseCopyWith<$Res> { + factory _$$CommunityResponseImplCopyWith(_$CommunityResponseImpl value, $Res Function(_$CommunityResponseImpl) then) = __$$CommunityResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CommunityView communityView, List discussionLanguages}); @@ -101,31 +96,28 @@ abstract class _$$CommunityResponseImplCopyWith<$Res> } /// @nodoc -class __$$CommunityResponseImplCopyWithImpl<$Res> - extends _$CommunityResponseCopyWithImpl<$Res, _$CommunityResponseImpl> - implements _$$CommunityResponseImplCopyWith<$Res> { - __$$CommunityResponseImplCopyWithImpl(_$CommunityResponseImpl _value, - $Res Function(_$CommunityResponseImpl) _then) - : super(_value, _then); +class __$$CommunityResponseImplCopyWithImpl<$Res> extends _$CommunityResponseCopyWithImpl<$Res, _$CommunityResponseImpl> implements _$$CommunityResponseImplCopyWith<$Res> { + __$$CommunityResponseImplCopyWithImpl(_$CommunityResponseImpl _value, $Res Function(_$CommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of CommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? discussionLanguages = null, - }) { - return _then(_$CommunityResponseImpl( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - discussionLanguages: null == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? communityView = null, Object? discussionLanguages = null}) { + return _then( + _$CommunityResponseImpl( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + discussionLanguages: + null == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -133,24 +125,18 @@ class __$$CommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$CommunityResponseImpl extends _CommunityResponse { - const _$CommunityResponseImpl( - {required this.communityView, - required final List discussionLanguages}) - : _discussionLanguages = discussionLanguages, - super._(); + const _$CommunityResponseImpl({required this.communityView, required final List discussionLanguages}) : _discussionLanguages = discussionLanguages, super._(); - factory _$CommunityResponseImpl.fromJson(Map json) => - _$$CommunityResponseImplFromJson(json); + factory _$CommunityResponseImpl.fromJson(Map json) => _$$CommunityResponseImplFromJson(json); @override final CommunityView communityView; -// v0.18.0 + // v0.18.0 final List _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List get discussionLanguages { - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_discussionLanguages); } @@ -165,42 +151,32 @@ class _$CommunityResponseImpl extends _CommunityResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommunityResponseImpl && - (identical(other.communityView, communityView) || - other.communityView == communityView) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages)); + (identical(other.communityView, communityView) || other.communityView == communityView) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, communityView, - const DeepCollectionEquality().hash(_discussionLanguages)); + int get hashCode => Object.hash(runtimeType, communityView, const DeepCollectionEquality().hash(_discussionLanguages)); /// Create a copy of CommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityResponseImplCopyWith<_$CommunityResponseImpl> get copyWith => - __$$CommunityResponseImplCopyWithImpl<_$CommunityResponseImpl>( - this, _$identity); + _$$CommunityResponseImplCopyWith<_$CommunityResponseImpl> get copyWith => __$$CommunityResponseImplCopyWithImpl<_$CommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityResponseImplToJson( - this, - ); + return _$$CommunityResponseImplToJson(this); } } abstract class _CommunityResponse extends CommunityResponse { - const factory _CommunityResponse( - {required final CommunityView communityView, - required final List discussionLanguages}) = _$CommunityResponseImpl; + const factory _CommunityResponse({required final CommunityView communityView, required final List discussionLanguages}) = _$CommunityResponseImpl; const _CommunityResponse._() : super._(); - factory _CommunityResponse.fromJson(Map json) = - _$CommunityResponseImpl.fromJson; + factory _CommunityResponse.fromJson(Map json) = _$CommunityResponseImpl.fromJson; @override CommunityView get communityView; // v0.18.0 @@ -211,6 +187,5 @@ abstract class _CommunityResponse extends CommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityResponseImplCopyWith<_$CommunityResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommunityResponseImplCopyWith<_$CommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/community_response.g.dart b/lib/src/v3/models/community/community_response.g.dart index a179c250..8ea4f5b0 100644 --- a/lib/src/v3/models/community/community_response.g.dart +++ b/lib/src/v3/models/community/community_response.g.dart @@ -6,19 +6,12 @@ part of 'community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityResponseImpl _$$CommunityResponseImplFromJson( - Map json) => - _$CommunityResponseImpl( - communityView: CommunityView.fromJson( - json['community_view'] as Map), - discussionLanguages: (json['discussion_languages'] as List) - .map((e) => (e as num).toInt()) - .toList(), - ); +_$CommunityResponseImpl _$$CommunityResponseImplFromJson(Map json) => _$CommunityResponseImpl( + communityView: CommunityView.fromJson(json['community_view'] as Map), + discussionLanguages: (json['discussion_languages'] as List).map((e) => (e as num).toInt()).toList(), +); -Map _$$CommunityResponseImplToJson( - _$CommunityResponseImpl instance) => - { - 'community_view': instance.communityView.toJson(), - 'discussion_languages': instance.discussionLanguages, - }; +Map _$$CommunityResponseImplToJson(_$CommunityResponseImpl instance) => { + 'community_view': instance.communityView.toJson(), + 'discussion_languages': instance.discussionLanguages, +}; diff --git a/lib/src/v3/models/community/get_community_response.dart b/lib/src/v3/models/community/get_community_response.dart index 52c031c6..9bee18e1 100644 --- a/lib/src/v3/models/community/get_community_response.dart +++ b/lib/src/v3/models/community/get_community_response.dart @@ -18,6 +18,5 @@ class GetCommunityResponse with _$GetCommunityResponse { }) = _GetCommunityResponse; const GetCommunityResponse._(); - factory GetCommunityResponse.fromJson(Map json) => - _$GetCommunityResponseFromJson(json); + factory GetCommunityResponse.fromJson(Map json) => _$GetCommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/get_community_response.freezed.dart b/lib/src/v3/models/community/get_community_response.freezed.dart index 61831773..0bbd0917 100644 --- a/lib/src/v3/models/community/get_community_response.freezed.dart +++ b/lib/src/v3/models/community/get_community_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetCommunityResponse _$GetCommunityResponseFromJson(Map json) { return _GetCommunityResponse.fromJson(json); @@ -20,11 +21,9 @@ GetCommunityResponse _$GetCommunityResponseFromJson(Map json) { /// @nodoc mixin _$GetCommunityResponse { - CommunityView get communityView => - throw _privateConstructorUsedError; // v0.18.0 + CommunityView get communityView => throw _privateConstructorUsedError; // v0.18.0 Site? get site => throw _privateConstructorUsedError; // v0.18.0 - List get moderators => - throw _privateConstructorUsedError; // v0.18.0 + List get moderators => throw _privateConstructorUsedError; // v0.18.0 List get discussionLanguages => throw _privateConstructorUsedError; /// Serializes this GetCommunityResponse to a JSON map. @@ -33,30 +32,21 @@ mixin _$GetCommunityResponse { /// Create a copy of GetCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCommunityResponseCopyWith<$Res> { - factory $GetCommunityResponseCopyWith(GetCommunityResponse value, - $Res Function(GetCommunityResponse) then) = - _$GetCommunityResponseCopyWithImpl<$Res, GetCommunityResponse>; + factory $GetCommunityResponseCopyWith(GetCommunityResponse value, $Res Function(GetCommunityResponse) then) = _$GetCommunityResponseCopyWithImpl<$Res, GetCommunityResponse>; @useResult - $Res call( - {CommunityView communityView, - Site? site, - List moderators, - List discussionLanguages}); + $Res call({CommunityView communityView, Site? site, List moderators, List discussionLanguages}); $CommunityViewCopyWith<$Res> get communityView; $SiteCopyWith<$Res>? get site; } /// @nodoc -class _$GetCommunityResponseCopyWithImpl<$Res, - $Val extends GetCommunityResponse> - implements $GetCommunityResponseCopyWith<$Res> { +class _$GetCommunityResponseCopyWithImpl<$Res, $Val extends GetCommunityResponse> implements $GetCommunityResponseCopyWith<$Res> { _$GetCommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,30 +58,32 @@ class _$GetCommunityResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? site = freezed, - Object? moderators = null, - Object? discussionLanguages = null, - }) { - return _then(_value.copyWith( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - moderators: null == moderators - ? _value.moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? communityView = null, Object? site = freezed, Object? moderators = null, Object? discussionLanguages = null}) { + return _then( + _value.copyWith( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + moderators: + null == moderators + ? _value.moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of GetCommunityResponse @@ -120,18 +112,11 @@ class _$GetCommunityResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$GetCommunityResponseImplCopyWith<$Res> - implements $GetCommunityResponseCopyWith<$Res> { - factory _$$GetCommunityResponseImplCopyWith(_$GetCommunityResponseImpl value, - $Res Function(_$GetCommunityResponseImpl) then) = - __$$GetCommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$GetCommunityResponseImplCopyWith<$Res> implements $GetCommunityResponseCopyWith<$Res> { + factory _$$GetCommunityResponseImplCopyWith(_$GetCommunityResponseImpl value, $Res Function(_$GetCommunityResponseImpl) then) = __$$GetCommunityResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommunityView communityView, - Site? site, - List moderators, - List discussionLanguages}); + $Res call({CommunityView communityView, Site? site, List moderators, List discussionLanguages}); @override $CommunityViewCopyWith<$Res> get communityView; @@ -140,41 +125,38 @@ abstract class _$$GetCommunityResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetCommunityResponseImplCopyWithImpl<$Res> - extends _$GetCommunityResponseCopyWithImpl<$Res, _$GetCommunityResponseImpl> - implements _$$GetCommunityResponseImplCopyWith<$Res> { - __$$GetCommunityResponseImplCopyWithImpl(_$GetCommunityResponseImpl _value, - $Res Function(_$GetCommunityResponseImpl) _then) - : super(_value, _then); +class __$$GetCommunityResponseImplCopyWithImpl<$Res> extends _$GetCommunityResponseCopyWithImpl<$Res, _$GetCommunityResponseImpl> implements _$$GetCommunityResponseImplCopyWith<$Res> { + __$$GetCommunityResponseImplCopyWithImpl(_$GetCommunityResponseImpl _value, $Res Function(_$GetCommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of GetCommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = null, - Object? site = freezed, - Object? moderators = null, - Object? discussionLanguages = null, - }) { - return _then(_$GetCommunityResponseImpl( - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - moderators: null == moderators - ? _value._moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? communityView = null, Object? site = freezed, Object? moderators = null, Object? discussionLanguages = null}) { + return _then( + _$GetCommunityResponseImpl( + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + moderators: + null == moderators + ? _value._moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -182,26 +164,21 @@ class __$$GetCommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$GetCommunityResponseImpl extends _GetCommunityResponse { - const _$GetCommunityResponseImpl( - {required this.communityView, - this.site, - required final List moderators, - required final List discussionLanguages}) - : _moderators = moderators, - _discussionLanguages = discussionLanguages, - super._(); - - factory _$GetCommunityResponseImpl.fromJson(Map json) => - _$$GetCommunityResponseImplFromJson(json); + const _$GetCommunityResponseImpl({required this.communityView, this.site, required final List moderators, required final List discussionLanguages}) + : _moderators = moderators, + _discussionLanguages = discussionLanguages, + super._(); + + factory _$GetCommunityResponseImpl.fromJson(Map json) => _$$GetCommunityResponseImplFromJson(json); @override final CommunityView communityView; -// v0.18.0 + // v0.18.0 @override final Site? site; -// v0.18.0 + // v0.18.0 final List _moderators; -// v0.18.0 + // v0.18.0 @override List get moderators { if (_moderators is EqualUnmodifiableListView) return _moderators; @@ -209,13 +186,12 @@ class _$GetCommunityResponseImpl extends _GetCommunityResponse { return EqualUnmodifiableListView(_moderators); } -// v0.18.0 + // v0.18.0 final List _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List get discussionLanguages { - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_discussionLanguages); } @@ -230,53 +206,39 @@ class _$GetCommunityResponseImpl extends _GetCommunityResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetCommunityResponseImpl && - (identical(other.communityView, communityView) || - other.communityView == communityView) && + (identical(other.communityView, communityView) || other.communityView == communityView) && (identical(other.site, site) || other.site == site) && - const DeepCollectionEquality() - .equals(other._moderators, _moderators) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages)); + const DeepCollectionEquality().equals(other._moderators, _moderators) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - communityView, - site, - const DeepCollectionEquality().hash(_moderators), - const DeepCollectionEquality().hash(_discussionLanguages)); + int get hashCode => Object.hash(runtimeType, communityView, site, const DeepCollectionEquality().hash(_moderators), const DeepCollectionEquality().hash(_discussionLanguages)); /// Create a copy of GetCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCommunityResponseImplCopyWith<_$GetCommunityResponseImpl> - get copyWith => - __$$GetCommunityResponseImplCopyWithImpl<_$GetCommunityResponseImpl>( - this, _$identity); + _$$GetCommunityResponseImplCopyWith<_$GetCommunityResponseImpl> get copyWith => __$$GetCommunityResponseImplCopyWithImpl<_$GetCommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetCommunityResponseImplToJson( - this, - ); + return _$$GetCommunityResponseImplToJson(this); } } abstract class _GetCommunityResponse extends GetCommunityResponse { - const factory _GetCommunityResponse( - {required final CommunityView communityView, - final Site? site, - required final List moderators, - required final List discussionLanguages}) = - _$GetCommunityResponseImpl; + const factory _GetCommunityResponse({ + required final CommunityView communityView, + final Site? site, + required final List moderators, + required final List discussionLanguages, + }) = _$GetCommunityResponseImpl; const _GetCommunityResponse._() : super._(); - factory _GetCommunityResponse.fromJson(Map json) = - _$GetCommunityResponseImpl.fromJson; + factory _GetCommunityResponse.fromJson(Map json) = _$GetCommunityResponseImpl.fromJson; @override CommunityView get communityView; // v0.18.0 @@ -291,6 +253,5 @@ abstract class _GetCommunityResponse extends GetCommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCommunityResponseImplCopyWith<_$GetCommunityResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetCommunityResponseImplCopyWith<_$GetCommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/get_community_response.g.dart b/lib/src/v3/models/community/get_community_response.g.dart index 620b863d..a9e8ccca 100644 --- a/lib/src/v3/models/community/get_community_response.g.dart +++ b/lib/src/v3/models/community/get_community_response.g.dart @@ -6,28 +6,16 @@ part of 'get_community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetCommunityResponseImpl _$$GetCommunityResponseImplFromJson( - Map json) => - _$GetCommunityResponseImpl( - communityView: CommunityView.fromJson( - json['community_view'] as Map), - site: json['site'] == null - ? null - : Site.fromJson(json['site'] as Map), - moderators: (json['moderators'] as List) - .map( - (e) => CommunityModeratorView.fromJson(e as Map)) - .toList(), - discussionLanguages: (json['discussion_languages'] as List) - .map((e) => (e as num).toInt()) - .toList(), - ); +_$GetCommunityResponseImpl _$$GetCommunityResponseImplFromJson(Map json) => _$GetCommunityResponseImpl( + communityView: CommunityView.fromJson(json['community_view'] as Map), + site: json['site'] == null ? null : Site.fromJson(json['site'] as Map), + moderators: (json['moderators'] as List).map((e) => CommunityModeratorView.fromJson(e as Map)).toList(), + discussionLanguages: (json['discussion_languages'] as List).map((e) => (e as num).toInt()).toList(), +); -Map _$$GetCommunityResponseImplToJson( - _$GetCommunityResponseImpl instance) => - { - 'community_view': instance.communityView.toJson(), - 'site': instance.site?.toJson(), - 'moderators': instance.moderators.map((e) => e.toJson()).toList(), - 'discussion_languages': instance.discussionLanguages, - }; +Map _$$GetCommunityResponseImplToJson(_$GetCommunityResponseImpl instance) => { + 'community_view': instance.communityView.toJson(), + 'site': instance.site?.toJson(), + 'moderators': instance.moderators.map((e) => e.toJson()).toList(), + 'discussion_languages': instance.discussionLanguages, +}; diff --git a/lib/src/v3/models/community/hide_community_response.dart b/lib/src/v3/models/community/hide_community_response.dart index cabbc127..28bf68d6 100644 --- a/lib/src/v3/models/community/hide_community_response.dart +++ b/lib/src/v3/models/community/hide_community_response.dart @@ -16,6 +16,5 @@ class HideCommunityResponse with _$HideCommunityResponse { }) = _HideCommunityResponse; const HideCommunityResponse._(); - factory HideCommunityResponse.fromJson(Map json) => - _$HideCommunityResponseFromJson(json); + factory HideCommunityResponse.fromJson(Map json) => _$HideCommunityResponseFromJson(json); } diff --git a/lib/src/v3/models/community/hide_community_response.freezed.dart b/lib/src/v3/models/community/hide_community_response.freezed.dart index e6cdc347..382086ec 100644 --- a/lib/src/v3/models/community/hide_community_response.freezed.dart +++ b/lib/src/v3/models/community/hide_community_response.freezed.dart @@ -12,10 +12,10 @@ part of 'hide_community_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -HideCommunityResponse _$HideCommunityResponseFromJson( - Map json) { +HideCommunityResponse _$HideCommunityResponseFromJson(Map json) { return _HideCommunityResponse.fromJson(json); } @@ -33,28 +33,20 @@ mixin _$HideCommunityResponse { /// Create a copy of HideCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $HideCommunityResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $HideCommunityResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $HideCommunityResponseCopyWith<$Res> { - factory $HideCommunityResponseCopyWith(HideCommunityResponse value, - $Res Function(HideCommunityResponse) then) = - _$HideCommunityResponseCopyWithImpl<$Res, HideCommunityResponse>; + factory $HideCommunityResponseCopyWith(HideCommunityResponse value, $Res Function(HideCommunityResponse) then) = _$HideCommunityResponseCopyWithImpl<$Res, HideCommunityResponse>; @useResult - $Res call( - {@deprecated CommunityView? communityView, - @deprecated List? discussionLanguages, - bool? success}); + $Res call({@deprecated CommunityView? communityView, @deprecated List? discussionLanguages, bool? success}); $CommunityViewCopyWith<$Res>? get communityView; } /// @nodoc -class _$HideCommunityResponseCopyWithImpl<$Res, - $Val extends HideCommunityResponse> - implements $HideCommunityResponseCopyWith<$Res> { +class _$HideCommunityResponseCopyWithImpl<$Res, $Val extends HideCommunityResponse> implements $HideCommunityResponseCopyWith<$Res> { _$HideCommunityResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -66,25 +58,27 @@ class _$HideCommunityResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = freezed, - Object? discussionLanguages = freezed, - Object? success = freezed, - }) { - return _then(_value.copyWith( - communityView: freezed == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView?, - discussionLanguages: freezed == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? communityView = freezed, Object? discussionLanguages = freezed, Object? success = freezed}) { + return _then( + _value.copyWith( + communityView: + freezed == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView?, + discussionLanguages: + freezed == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } /// Create a copy of HideCommunityResponse @@ -103,55 +97,44 @@ class _$HideCommunityResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$HideCommunityResponseImplCopyWith<$Res> - implements $HideCommunityResponseCopyWith<$Res> { - factory _$$HideCommunityResponseImplCopyWith( - _$HideCommunityResponseImpl value, - $Res Function(_$HideCommunityResponseImpl) then) = - __$$HideCommunityResponseImplCopyWithImpl<$Res>; +abstract class _$$HideCommunityResponseImplCopyWith<$Res> implements $HideCommunityResponseCopyWith<$Res> { + factory _$$HideCommunityResponseImplCopyWith(_$HideCommunityResponseImpl value, $Res Function(_$HideCommunityResponseImpl) then) = __$$HideCommunityResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated CommunityView? communityView, - @deprecated List? discussionLanguages, - bool? success}); + $Res call({@deprecated CommunityView? communityView, @deprecated List? discussionLanguages, bool? success}); @override $CommunityViewCopyWith<$Res>? get communityView; } /// @nodoc -class __$$HideCommunityResponseImplCopyWithImpl<$Res> - extends _$HideCommunityResponseCopyWithImpl<$Res, - _$HideCommunityResponseImpl> - implements _$$HideCommunityResponseImplCopyWith<$Res> { - __$$HideCommunityResponseImplCopyWithImpl(_$HideCommunityResponseImpl _value, - $Res Function(_$HideCommunityResponseImpl) _then) - : super(_value, _then); +class __$$HideCommunityResponseImplCopyWithImpl<$Res> extends _$HideCommunityResponseCopyWithImpl<$Res, _$HideCommunityResponseImpl> implements _$$HideCommunityResponseImplCopyWith<$Res> { + __$$HideCommunityResponseImplCopyWithImpl(_$HideCommunityResponseImpl _value, $Res Function(_$HideCommunityResponseImpl) _then) : super(_value, _then); /// Create a copy of HideCommunityResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityView = freezed, - Object? discussionLanguages = freezed, - Object? success = freezed, - }) { - return _then(_$HideCommunityResponseImpl( - communityView: freezed == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView?, - discussionLanguages: freezed == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? communityView = freezed, Object? discussionLanguages = freezed, Object? success = freezed}) { + return _then( + _$HideCommunityResponseImpl( + communityView: + freezed == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView?, + discussionLanguages: + freezed == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -159,15 +142,9 @@ class __$$HideCommunityResponseImplCopyWithImpl<$Res> @modelSerde class _$HideCommunityResponseImpl extends _HideCommunityResponse { - const _$HideCommunityResponseImpl( - {@deprecated this.communityView, - @deprecated final List? discussionLanguages, - this.success}) - : _discussionLanguages = discussionLanguages, - super._(); + const _$HideCommunityResponseImpl({@deprecated this.communityView, @deprecated final List? discussionLanguages, this.success}) : _discussionLanguages = discussionLanguages, super._(); - factory _$HideCommunityResponseImpl.fromJson(Map json) => - _$$HideCommunityResponseImplFromJson(json); + factory _$HideCommunityResponseImpl.fromJson(Map json) => _$$HideCommunityResponseImplFromJson(json); @override @deprecated @@ -178,8 +155,7 @@ class _$HideCommunityResponseImpl extends _HideCommunityResponse { List? get discussionLanguages { final value = _discussionLanguages; if (value == null) return null; - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(value); } @@ -197,44 +173,33 @@ class _$HideCommunityResponseImpl extends _HideCommunityResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$HideCommunityResponseImpl && - (identical(other.communityView, communityView) || - other.communityView == communityView) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && + (identical(other.communityView, communityView) || other.communityView == communityView) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, communityView, - const DeepCollectionEquality().hash(_discussionLanguages), success); + int get hashCode => Object.hash(runtimeType, communityView, const DeepCollectionEquality().hash(_discussionLanguages), success); /// Create a copy of HideCommunityResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$HideCommunityResponseImplCopyWith<_$HideCommunityResponseImpl> - get copyWith => __$$HideCommunityResponseImplCopyWithImpl< - _$HideCommunityResponseImpl>(this, _$identity); + _$$HideCommunityResponseImplCopyWith<_$HideCommunityResponseImpl> get copyWith => __$$HideCommunityResponseImplCopyWithImpl<_$HideCommunityResponseImpl>(this, _$identity); @override Map toJson() { - return _$$HideCommunityResponseImplToJson( - this, - ); + return _$$HideCommunityResponseImplToJson(this); } } abstract class _HideCommunityResponse extends HideCommunityResponse { - const factory _HideCommunityResponse( - {@deprecated final CommunityView? communityView, - @deprecated final List? discussionLanguages, - final bool? success}) = _$HideCommunityResponseImpl; + const factory _HideCommunityResponse({@deprecated final CommunityView? communityView, @deprecated final List? discussionLanguages, final bool? success}) = _$HideCommunityResponseImpl; const _HideCommunityResponse._() : super._(); - factory _HideCommunityResponse.fromJson(Map json) = - _$HideCommunityResponseImpl.fromJson; + factory _HideCommunityResponse.fromJson(Map json) = _$HideCommunityResponseImpl.fromJson; @override @deprecated @@ -249,6 +214,5 @@ abstract class _HideCommunityResponse extends HideCommunityResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$HideCommunityResponseImplCopyWith<_$HideCommunityResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$HideCommunityResponseImplCopyWith<_$HideCommunityResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/hide_community_response.g.dart b/lib/src/v3/models/community/hide_community_response.g.dart index 70751b1f..f491d2c0 100644 --- a/lib/src/v3/models/community/hide_community_response.g.dart +++ b/lib/src/v3/models/community/hide_community_response.g.dart @@ -6,23 +6,14 @@ part of 'hide_community_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$HideCommunityResponseImpl _$$HideCommunityResponseImplFromJson( - Map json) => - _$HideCommunityResponseImpl( - communityView: json['community_view'] == null - ? null - : CommunityView.fromJson( - json['community_view'] as Map), - discussionLanguages: (json['discussion_languages'] as List?) - ?.map((e) => (e as num).toInt()) - .toList(), - success: json['success'] as bool?, - ); +_$HideCommunityResponseImpl _$$HideCommunityResponseImplFromJson(Map json) => _$HideCommunityResponseImpl( + communityView: json['community_view'] == null ? null : CommunityView.fromJson(json['community_view'] as Map), + discussionLanguages: (json['discussion_languages'] as List?)?.map((e) => (e as num).toInt()).toList(), + success: json['success'] as bool?, +); -Map _$$HideCommunityResponseImplToJson( - _$HideCommunityResponseImpl instance) => - { - 'community_view': instance.communityView?.toJson(), - 'discussion_languages': instance.discussionLanguages, - 'success': instance.success, - }; +Map _$$HideCommunityResponseImplToJson(_$HideCommunityResponseImpl instance) => { + 'community_view': instance.communityView?.toJson(), + 'discussion_languages': instance.discussionLanguages, + 'success': instance.success, +}; diff --git a/lib/src/v3/models/community/list_communities_response.dart b/lib/src/v3/models/community/list_communities_response.dart index f80b5761..10b874d4 100644 --- a/lib/src/v3/models/community/list_communities_response.dart +++ b/lib/src/v3/models/community/list_communities_response.dart @@ -14,6 +14,5 @@ class ListCommunitiesResponse with _$ListCommunitiesResponse { }) = _ListCommunitiesResponse; const ListCommunitiesResponse._(); - factory ListCommunitiesResponse.fromJson(Map json) => - _$ListCommunitiesResponseFromJson(json); + factory ListCommunitiesResponse.fromJson(Map json) => _$ListCommunitiesResponseFromJson(json); } diff --git a/lib/src/v3/models/community/list_communities_response.freezed.dart b/lib/src/v3/models/community/list_communities_response.freezed.dart index e534af43..51c9d7f0 100644 --- a/lib/src/v3/models/community/list_communities_response.freezed.dart +++ b/lib/src/v3/models/community/list_communities_response.freezed.dart @@ -12,10 +12,10 @@ part of 'list_communities_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListCommunitiesResponse _$ListCommunitiesResponseFromJson( - Map json) { +ListCommunitiesResponse _$ListCommunitiesResponseFromJson(Map json) { return _ListCommunitiesResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$ListCommunitiesResponse { /// Create a copy of ListCommunitiesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListCommunitiesResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListCommunitiesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListCommunitiesResponseCopyWith<$Res> { - factory $ListCommunitiesResponseCopyWith(ListCommunitiesResponse value, - $Res Function(ListCommunitiesResponse) then) = - _$ListCommunitiesResponseCopyWithImpl<$Res, ListCommunitiesResponse>; + factory $ListCommunitiesResponseCopyWith(ListCommunitiesResponse value, $Res Function(ListCommunitiesResponse) then) = _$ListCommunitiesResponseCopyWithImpl<$Res, ListCommunitiesResponse>; @useResult $Res call({List communities}); } /// @nodoc -class _$ListCommunitiesResponseCopyWithImpl<$Res, - $Val extends ListCommunitiesResponse> - implements $ListCommunitiesResponseCopyWith<$Res> { +class _$ListCommunitiesResponseCopyWithImpl<$Res, $Val extends ListCommunitiesResponse> implements $ListCommunitiesResponseCopyWith<$Res> { _$ListCommunitiesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,53 +52,46 @@ class _$ListCommunitiesResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communities = null, - }) { - return _then(_value.copyWith( - communities: null == communities - ? _value.communities - : communities // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? communities = null}) { + return _then( + _value.copyWith( + communities: + null == communities + ? _value.communities + : communities // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListCommunitiesResponseImplCopyWith<$Res> - implements $ListCommunitiesResponseCopyWith<$Res> { - factory _$$ListCommunitiesResponseImplCopyWith( - _$ListCommunitiesResponseImpl value, - $Res Function(_$ListCommunitiesResponseImpl) then) = - __$$ListCommunitiesResponseImplCopyWithImpl<$Res>; +abstract class _$$ListCommunitiesResponseImplCopyWith<$Res> implements $ListCommunitiesResponseCopyWith<$Res> { + factory _$$ListCommunitiesResponseImplCopyWith(_$ListCommunitiesResponseImpl value, $Res Function(_$ListCommunitiesResponseImpl) then) = __$$ListCommunitiesResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List communities}); } /// @nodoc -class __$$ListCommunitiesResponseImplCopyWithImpl<$Res> - extends _$ListCommunitiesResponseCopyWithImpl<$Res, - _$ListCommunitiesResponseImpl> - implements _$$ListCommunitiesResponseImplCopyWith<$Res> { - __$$ListCommunitiesResponseImplCopyWithImpl( - _$ListCommunitiesResponseImpl _value, - $Res Function(_$ListCommunitiesResponseImpl) _then) - : super(_value, _then); +class __$$ListCommunitiesResponseImplCopyWithImpl<$Res> extends _$ListCommunitiesResponseCopyWithImpl<$Res, _$ListCommunitiesResponseImpl> implements _$$ListCommunitiesResponseImplCopyWith<$Res> { + __$$ListCommunitiesResponseImplCopyWithImpl(_$ListCommunitiesResponseImpl _value, $Res Function(_$ListCommunitiesResponseImpl) _then) : super(_value, _then); /// Create a copy of ListCommunitiesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communities = null, - }) { - return _then(_$ListCommunitiesResponseImpl( - communities: null == communities - ? _value._communities - : communities // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? communities = null}) { + return _then( + _$ListCommunitiesResponseImpl( + communities: + null == communities + ? _value._communities + : communities // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -111,13 +99,9 @@ class __$$ListCommunitiesResponseImplCopyWithImpl<$Res> @modelSerde class _$ListCommunitiesResponseImpl extends _ListCommunitiesResponse { - const _$ListCommunitiesResponseImpl( - {required final List communities}) - : _communities = communities, - super._(); + const _$ListCommunitiesResponseImpl({required final List communities}) : _communities = communities, super._(); - factory _$ListCommunitiesResponseImpl.fromJson(Map json) => - _$$ListCommunitiesResponseImplFromJson(json); + factory _$ListCommunitiesResponseImpl.fromJson(Map json) => _$$ListCommunitiesResponseImplFromJson(json); final List _communities; @override @@ -134,43 +118,31 @@ class _$ListCommunitiesResponseImpl extends _ListCommunitiesResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListCommunitiesResponseImpl && - const DeepCollectionEquality() - .equals(other._communities, _communities)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListCommunitiesResponseImpl && const DeepCollectionEquality().equals(other._communities, _communities)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_communities)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_communities)); /// Create a copy of ListCommunitiesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListCommunitiesResponseImplCopyWith<_$ListCommunitiesResponseImpl> - get copyWith => __$$ListCommunitiesResponseImplCopyWithImpl< - _$ListCommunitiesResponseImpl>(this, _$identity); + _$$ListCommunitiesResponseImplCopyWith<_$ListCommunitiesResponseImpl> get copyWith => __$$ListCommunitiesResponseImplCopyWithImpl<_$ListCommunitiesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListCommunitiesResponseImplToJson( - this, - ); + return _$$ListCommunitiesResponseImplToJson(this); } } abstract class _ListCommunitiesResponse extends ListCommunitiesResponse { - const factory _ListCommunitiesResponse( - {required final List communities}) = - _$ListCommunitiesResponseImpl; + const factory _ListCommunitiesResponse({required final List communities}) = _$ListCommunitiesResponseImpl; const _ListCommunitiesResponse._() : super._(); - factory _ListCommunitiesResponse.fromJson(Map json) = - _$ListCommunitiesResponseImpl.fromJson; + factory _ListCommunitiesResponse.fromJson(Map json) = _$ListCommunitiesResponseImpl.fromJson; @override List get communities; @@ -179,6 +151,5 @@ abstract class _ListCommunitiesResponse extends ListCommunitiesResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListCommunitiesResponseImplCopyWith<_$ListCommunitiesResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListCommunitiesResponseImplCopyWith<_$ListCommunitiesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/community/list_communities_response.g.dart b/lib/src/v3/models/community/list_communities_response.g.dart index 89f4e2fd..fc284e2d 100644 --- a/lib/src/v3/models/community/list_communities_response.g.dart +++ b/lib/src/v3/models/community/list_communities_response.g.dart @@ -6,16 +6,7 @@ part of 'list_communities_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListCommunitiesResponseImpl _$$ListCommunitiesResponseImplFromJson( - Map json) => - _$ListCommunitiesResponseImpl( - communities: (json['communities'] as List) - .map((e) => CommunityView.fromJson(e as Map)) - .toList(), - ); +_$ListCommunitiesResponseImpl _$$ListCommunitiesResponseImplFromJson(Map json) => + _$ListCommunitiesResponseImpl(communities: (json['communities'] as List).map((e) => CommunityView.fromJson(e as Map)).toList()); -Map _$$ListCommunitiesResponseImplToJson( - _$ListCommunitiesResponseImpl instance) => - { - 'communities': instance.communities.map((e) => e.toJson()).toList(), - }; +Map _$$ListCommunitiesResponseImplToJson(_$ListCommunitiesResponseImpl instance) => {'communities': instance.communities.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/custom_emoji/custom_emoji.dart b/lib/src/v3/models/custom_emoji/custom_emoji.dart index 60c8e825..309b2b22 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji.dart @@ -21,6 +21,5 @@ class CustomEmoji with _$CustomEmoji { }) = _CustomEmoji; const CustomEmoji._(); - factory CustomEmoji.fromJson(Map json) => - _$CustomEmojiFromJson(json); + factory CustomEmoji.fromJson(Map json) => _$CustomEmojiFromJson(json); } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji.freezed.dart b/lib/src/v3/models/custom_emoji/custom_emoji.freezed.dart index 9a97754b..384ba6f4 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji.freezed.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji.freezed.dart @@ -12,7 +12,8 @@ part of 'custom_emoji.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CustomEmoji _$CustomEmojiFromJson(Map json) { return _CustomEmoji.fromJson(json); @@ -35,30 +36,18 @@ mixin _$CustomEmoji { /// Create a copy of CustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CustomEmojiCopyWith get copyWith => - throw _privateConstructorUsedError; + $CustomEmojiCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CustomEmojiCopyWith<$Res> { - factory $CustomEmojiCopyWith( - CustomEmoji value, $Res Function(CustomEmoji) then) = - _$CustomEmojiCopyWithImpl<$Res, CustomEmoji>; + factory $CustomEmojiCopyWith(CustomEmoji value, $Res Function(CustomEmoji) then) = _$CustomEmojiCopyWithImpl<$Res, CustomEmoji>; @useResult - $Res call( - {int id, - int localSiteId, - String shortcode, - String imageUrl, - String altText, - String category, - DateTime published, - DateTime? updated}); + $Res call({int id, int localSiteId, String shortcode, String imageUrl, String altText, String category, DateTime published, DateTime? updated}); } /// @nodoc -class _$CustomEmojiCopyWithImpl<$Res, $Val extends CustomEmoji> - implements $CustomEmojiCopyWith<$Res> { +class _$CustomEmojiCopyWithImpl<$Res, $Val extends CustomEmoji> implements $CustomEmojiCopyWith<$Res> { _$CustomEmojiCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -80,69 +69,65 @@ class _$CustomEmojiCopyWithImpl<$Res, $Val extends CustomEmoji> Object? published = null, Object? updated = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - shortcode: null == shortcode - ? _value.shortcode - : shortcode // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + shortcode: + null == shortcode + ? _value.shortcode + : shortcode // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CustomEmojiImplCopyWith<$Res> - implements $CustomEmojiCopyWith<$Res> { - factory _$$CustomEmojiImplCopyWith( - _$CustomEmojiImpl value, $Res Function(_$CustomEmojiImpl) then) = - __$$CustomEmojiImplCopyWithImpl<$Res>; +abstract class _$$CustomEmojiImplCopyWith<$Res> implements $CustomEmojiCopyWith<$Res> { + factory _$$CustomEmojiImplCopyWith(_$CustomEmojiImpl value, $Res Function(_$CustomEmojiImpl) then) = __$$CustomEmojiImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int localSiteId, - String shortcode, - String imageUrl, - String altText, - String category, - DateTime published, - DateTime? updated}); + $Res call({int id, int localSiteId, String shortcode, String imageUrl, String altText, String category, DateTime published, DateTime? updated}); } /// @nodoc -class __$$CustomEmojiImplCopyWithImpl<$Res> - extends _$CustomEmojiCopyWithImpl<$Res, _$CustomEmojiImpl> - implements _$$CustomEmojiImplCopyWith<$Res> { - __$$CustomEmojiImplCopyWithImpl( - _$CustomEmojiImpl _value, $Res Function(_$CustomEmojiImpl) _then) - : super(_value, _then); +class __$$CustomEmojiImplCopyWithImpl<$Res> extends _$CustomEmojiCopyWithImpl<$Res, _$CustomEmojiImpl> implements _$$CustomEmojiImplCopyWith<$Res> { + __$$CustomEmojiImplCopyWithImpl(_$CustomEmojiImpl _value, $Res Function(_$CustomEmojiImpl) _then) : super(_value, _then); /// Create a copy of CustomEmoji /// with the given fields replaced by the non-null parameter values. @@ -158,40 +143,50 @@ class __$$CustomEmojiImplCopyWithImpl<$Res> Object? published = null, Object? updated = freezed, }) { - return _then(_$CustomEmojiImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - shortcode: null == shortcode - ? _value.shortcode - : shortcode // ignore: cast_nullable_to_non_nullable - as String, - imageUrl: null == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String, - altText: null == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String, - category: null == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + return _then( + _$CustomEmojiImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + shortcode: + null == shortcode + ? _value.shortcode + : shortcode // ignore: cast_nullable_to_non_nullable + as String, + imageUrl: + null == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String, + altText: + null == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String, + category: + null == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -199,41 +194,40 @@ class __$$CustomEmojiImplCopyWithImpl<$Res> @modelSerde class _$CustomEmojiImpl extends _CustomEmoji { - const _$CustomEmojiImpl( - {required this.id, - required this.localSiteId, - required this.shortcode, - required this.imageUrl, - required this.altText, - required this.category, - required this.published, - this.updated}) - : super._(); + const _$CustomEmojiImpl({ + required this.id, + required this.localSiteId, + required this.shortcode, + required this.imageUrl, + required this.altText, + required this.category, + required this.published, + this.updated, + }) : super._(); - factory _$CustomEmojiImpl.fromJson(Map json) => - _$$CustomEmojiImplFromJson(json); + factory _$CustomEmojiImpl.fromJson(Map json) => _$$CustomEmojiImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int localSiteId; -// v0.18.0 + // v0.18.0 @override final String shortcode; -// v0.18.0 + // v0.18.0 @override final String imageUrl; -// v0.18.0 + // v0.18.0 @override final String altText; -// v0.18.0 + // v0.18.0 @override final String category; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; @@ -248,55 +242,46 @@ class _$CustomEmojiImpl extends _CustomEmoji { (other.runtimeType == runtimeType && other is _$CustomEmojiImpl && (identical(other.id, id) || other.id == id) && - (identical(other.localSiteId, localSiteId) || - other.localSiteId == localSiteId) && - (identical(other.shortcode, shortcode) || - other.shortcode == shortcode) && - (identical(other.imageUrl, imageUrl) || - other.imageUrl == imageUrl) && + (identical(other.localSiteId, localSiteId) || other.localSiteId == localSiteId) && + (identical(other.shortcode, shortcode) || other.shortcode == shortcode) && + (identical(other.imageUrl, imageUrl) || other.imageUrl == imageUrl) && (identical(other.altText, altText) || other.altText == altText) && - (identical(other.category, category) || - other.category == category) && - (identical(other.published, published) || - other.published == published) && + (identical(other.category, category) || other.category == category) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, localSiteId, shortcode, - imageUrl, altText, category, published, updated); + int get hashCode => Object.hash(runtimeType, id, localSiteId, shortcode, imageUrl, altText, category, published, updated); /// Create a copy of CustomEmoji /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CustomEmojiImplCopyWith<_$CustomEmojiImpl> get copyWith => - __$$CustomEmojiImplCopyWithImpl<_$CustomEmojiImpl>(this, _$identity); + _$$CustomEmojiImplCopyWith<_$CustomEmojiImpl> get copyWith => __$$CustomEmojiImplCopyWithImpl<_$CustomEmojiImpl>(this, _$identity); @override Map toJson() { - return _$$CustomEmojiImplToJson( - this, - ); + return _$$CustomEmojiImplToJson(this); } } abstract class _CustomEmoji extends CustomEmoji { - const factory _CustomEmoji( - {required final int id, - required final int localSiteId, - required final String shortcode, - required final String imageUrl, - required final String altText, - required final String category, - required final DateTime published, - final DateTime? updated}) = _$CustomEmojiImpl; + const factory _CustomEmoji({ + required final int id, + required final int localSiteId, + required final String shortcode, + required final String imageUrl, + required final String altText, + required final String category, + required final DateTime published, + final DateTime? updated, + }) = _$CustomEmojiImpl; const _CustomEmoji._() : super._(); - factory _CustomEmoji.fromJson(Map json) = - _$CustomEmojiImpl.fromJson; + factory _CustomEmoji.fromJson(Map json) = _$CustomEmojiImpl.fromJson; @override int get id; // v0.18.0 @@ -319,6 +304,5 @@ abstract class _CustomEmoji extends CustomEmoji { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CustomEmojiImplCopyWith<_$CustomEmojiImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CustomEmojiImplCopyWith<_$CustomEmojiImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji.g.dart b/lib/src/v3/models/custom_emoji/custom_emoji.g.dart index 79f0884a..17e14ea2 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji.g.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji.g.dart @@ -6,40 +6,28 @@ part of 'custom_emoji.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CustomEmojiImpl _$$CustomEmojiImplFromJson(Map json) => - _$CustomEmojiImpl( - id: (json['id'] as num).toInt(), - localSiteId: (json['local_site_id'] as num).toInt(), - shortcode: json['shortcode'] as String, - imageUrl: json['image_url'] as String, - altText: json['alt_text'] as String, - category: json['category'] as String, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$CustomEmojiImpl _$$CustomEmojiImplFromJson(Map json) => _$CustomEmojiImpl( + id: (json['id'] as num).toInt(), + localSiteId: (json['local_site_id'] as num).toInt(), + shortcode: json['shortcode'] as String, + imageUrl: json['image_url'] as String, + altText: json['alt_text'] as String, + category: json['category'] as String, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$CustomEmojiImplToJson(_$CustomEmojiImpl instance) => - { - 'id': instance.id, - 'local_site_id': instance.localSiteId, - 'shortcode': instance.shortcode, - 'image_url': instance.imageUrl, - 'alt_text': instance.altText, - 'category': instance.category, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$CustomEmojiImplToJson(_$CustomEmojiImpl instance) => { + 'id': instance.id, + 'local_site_id': instance.localSiteId, + 'shortcode': instance.shortcode, + 'image_url': instance.imageUrl, + 'alt_text': instance.altText, + 'category': instance.category, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.dart b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.dart index 287dd754..87ec44a4 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.dart @@ -15,6 +15,5 @@ class CustomEmojiKeyword with _$CustomEmojiKeyword { }) = _CustomEmojiKeyword; const CustomEmojiKeyword._(); - factory CustomEmojiKeyword.fromJson(Map json) => - _$CustomEmojiKeywordFromJson(json); + factory CustomEmojiKeyword.fromJson(Map json) => _$CustomEmojiKeywordFromJson(json); } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.freezed.dart b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.freezed.dart index 7a3206eb..9e8db4e0 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.freezed.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.freezed.dart @@ -12,7 +12,8 @@ part of 'custom_emoji_keyword.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CustomEmojiKeyword _$CustomEmojiKeywordFromJson(Map json) { return _CustomEmojiKeyword.fromJson(json); @@ -21,8 +22,7 @@ CustomEmojiKeyword _$CustomEmojiKeywordFromJson(Map json) { /// @nodoc mixin _$CustomEmojiKeyword { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get customEmojiId => throw _privateConstructorUsedError; // v0.18.0 String get keyword => throw _privateConstructorUsedError; @@ -32,22 +32,18 @@ mixin _$CustomEmojiKeyword { /// Create a copy of CustomEmojiKeyword /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CustomEmojiKeywordCopyWith get copyWith => - throw _privateConstructorUsedError; + $CustomEmojiKeywordCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CustomEmojiKeywordCopyWith<$Res> { - factory $CustomEmojiKeywordCopyWith( - CustomEmojiKeyword value, $Res Function(CustomEmojiKeyword) then) = - _$CustomEmojiKeywordCopyWithImpl<$Res, CustomEmojiKeyword>; + factory $CustomEmojiKeywordCopyWith(CustomEmojiKeyword value, $Res Function(CustomEmojiKeyword) then) = _$CustomEmojiKeywordCopyWithImpl<$Res, CustomEmojiKeyword>; @useResult $Res call({@deprecated int? id, int customEmojiId, String keyword}); } /// @nodoc -class _$CustomEmojiKeywordCopyWithImpl<$Res, $Val extends CustomEmojiKeyword> - implements $CustomEmojiKeywordCopyWith<$Res> { +class _$CustomEmojiKeywordCopyWithImpl<$Res, $Val extends CustomEmojiKeyword> implements $CustomEmojiKeywordCopyWith<$Res> { _$CustomEmojiKeywordCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,70 +55,66 @@ class _$CustomEmojiKeywordCopyWithImpl<$Res, $Val extends CustomEmojiKeyword> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? customEmojiId = null, - Object? keyword = null, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - customEmojiId: null == customEmojiId - ? _value.customEmojiId - : customEmojiId // ignore: cast_nullable_to_non_nullable - as int, - keyword: null == keyword - ? _value.keyword - : keyword // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = freezed, Object? customEmojiId = null, Object? keyword = null}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + customEmojiId: + null == customEmojiId + ? _value.customEmojiId + : customEmojiId // ignore: cast_nullable_to_non_nullable + as int, + keyword: + null == keyword + ? _value.keyword + : keyword // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CustomEmojiKeywordImplCopyWith<$Res> - implements $CustomEmojiKeywordCopyWith<$Res> { - factory _$$CustomEmojiKeywordImplCopyWith(_$CustomEmojiKeywordImpl value, - $Res Function(_$CustomEmojiKeywordImpl) then) = - __$$CustomEmojiKeywordImplCopyWithImpl<$Res>; +abstract class _$$CustomEmojiKeywordImplCopyWith<$Res> implements $CustomEmojiKeywordCopyWith<$Res> { + factory _$$CustomEmojiKeywordImplCopyWith(_$CustomEmojiKeywordImpl value, $Res Function(_$CustomEmojiKeywordImpl) then) = __$$CustomEmojiKeywordImplCopyWithImpl<$Res>; @override @useResult $Res call({@deprecated int? id, int customEmojiId, String keyword}); } /// @nodoc -class __$$CustomEmojiKeywordImplCopyWithImpl<$Res> - extends _$CustomEmojiKeywordCopyWithImpl<$Res, _$CustomEmojiKeywordImpl> - implements _$$CustomEmojiKeywordImplCopyWith<$Res> { - __$$CustomEmojiKeywordImplCopyWithImpl(_$CustomEmojiKeywordImpl _value, - $Res Function(_$CustomEmojiKeywordImpl) _then) - : super(_value, _then); +class __$$CustomEmojiKeywordImplCopyWithImpl<$Res> extends _$CustomEmojiKeywordCopyWithImpl<$Res, _$CustomEmojiKeywordImpl> implements _$$CustomEmojiKeywordImplCopyWith<$Res> { + __$$CustomEmojiKeywordImplCopyWithImpl(_$CustomEmojiKeywordImpl _value, $Res Function(_$CustomEmojiKeywordImpl) _then) : super(_value, _then); /// Create a copy of CustomEmojiKeyword /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? customEmojiId = null, - Object? keyword = null, - }) { - return _then(_$CustomEmojiKeywordImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - customEmojiId: null == customEmojiId - ? _value.customEmojiId - : customEmojiId // ignore: cast_nullable_to_non_nullable - as int, - keyword: null == keyword - ? _value.keyword - : keyword // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = freezed, Object? customEmojiId = null, Object? keyword = null}) { + return _then( + _$CustomEmojiKeywordImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + customEmojiId: + null == customEmojiId + ? _value.customEmojiId + : customEmojiId // ignore: cast_nullable_to_non_nullable + as int, + keyword: + null == keyword + ? _value.keyword + : keyword // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -130,20 +122,17 @@ class __$$CustomEmojiKeywordImplCopyWithImpl<$Res> @modelSerde class _$CustomEmojiKeywordImpl extends _CustomEmojiKeyword { - const _$CustomEmojiKeywordImpl( - {@deprecated this.id, required this.customEmojiId, required this.keyword}) - : super._(); + const _$CustomEmojiKeywordImpl({@deprecated this.id, required this.customEmojiId, required this.keyword}) : super._(); - factory _$CustomEmojiKeywordImpl.fromJson(Map json) => - _$$CustomEmojiKeywordImplFromJson(json); + factory _$CustomEmojiKeywordImpl.fromJson(Map json) => _$$CustomEmojiKeywordImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int customEmojiId; -// v0.18.0 + // v0.18.0 @override final String keyword; @@ -158,8 +147,7 @@ class _$CustomEmojiKeywordImpl extends _CustomEmojiKeyword { (other.runtimeType == runtimeType && other is _$CustomEmojiKeywordImpl && (identical(other.id, id) || other.id == id) && - (identical(other.customEmojiId, customEmojiId) || - other.customEmojiId == customEmojiId) && + (identical(other.customEmojiId, customEmojiId) || other.customEmojiId == customEmojiId) && (identical(other.keyword, keyword) || other.keyword == keyword)); } @@ -172,27 +160,19 @@ class _$CustomEmojiKeywordImpl extends _CustomEmojiKeyword { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CustomEmojiKeywordImplCopyWith<_$CustomEmojiKeywordImpl> get copyWith => - __$$CustomEmojiKeywordImplCopyWithImpl<_$CustomEmojiKeywordImpl>( - this, _$identity); + _$$CustomEmojiKeywordImplCopyWith<_$CustomEmojiKeywordImpl> get copyWith => __$$CustomEmojiKeywordImplCopyWithImpl<_$CustomEmojiKeywordImpl>(this, _$identity); @override Map toJson() { - return _$$CustomEmojiKeywordImplToJson( - this, - ); + return _$$CustomEmojiKeywordImplToJson(this); } } abstract class _CustomEmojiKeyword extends CustomEmojiKeyword { - const factory _CustomEmojiKeyword( - {@deprecated final int? id, - required final int customEmojiId, - required final String keyword}) = _$CustomEmojiKeywordImpl; + const factory _CustomEmojiKeyword({@deprecated final int? id, required final int customEmojiId, required final String keyword}) = _$CustomEmojiKeywordImpl; const _CustomEmojiKeyword._() : super._(); - factory _CustomEmojiKeyword.fromJson(Map json) = - _$CustomEmojiKeywordImpl.fromJson; + factory _CustomEmojiKeyword.fromJson(Map json) = _$CustomEmojiKeywordImpl.fromJson; @override @deprecated @@ -206,6 +186,5 @@ abstract class _CustomEmojiKeyword extends CustomEmojiKeyword { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CustomEmojiKeywordImplCopyWith<_$CustomEmojiKeywordImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CustomEmojiKeywordImplCopyWith<_$CustomEmojiKeywordImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.g.dart b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.g.dart index 7d38758b..fe17cbec 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_keyword.g.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_keyword.g.dart @@ -6,18 +6,7 @@ part of 'custom_emoji_keyword.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CustomEmojiKeywordImpl _$$CustomEmojiKeywordImplFromJson( - Map json) => - _$CustomEmojiKeywordImpl( - id: (json['id'] as num?)?.toInt(), - customEmojiId: (json['custom_emoji_id'] as num).toInt(), - keyword: json['keyword'] as String, - ); +_$CustomEmojiKeywordImpl _$$CustomEmojiKeywordImplFromJson(Map json) => + _$CustomEmojiKeywordImpl(id: (json['id'] as num?)?.toInt(), customEmojiId: (json['custom_emoji_id'] as num).toInt(), keyword: json['keyword'] as String); -Map _$$CustomEmojiKeywordImplToJson( - _$CustomEmojiKeywordImpl instance) => - { - 'id': instance.id, - 'custom_emoji_id': instance.customEmojiId, - 'keyword': instance.keyword, - }; +Map _$$CustomEmojiKeywordImplToJson(_$CustomEmojiKeywordImpl instance) => {'id': instance.id, 'custom_emoji_id': instance.customEmojiId, 'keyword': instance.keyword}; diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_response.dart b/lib/src/v3/models/custom_emoji/custom_emoji_response.dart index 4b28f897..ffb8320a 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_response.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_response.dart @@ -14,6 +14,5 @@ class CustomEmojiResponse with _$CustomEmojiResponse { }) = _CustomEmojiResponse; const CustomEmojiResponse._(); - factory CustomEmojiResponse.fromJson(Map json) => - _$CustomEmojiResponseFromJson(json); + factory CustomEmojiResponse.fromJson(Map json) => _$CustomEmojiResponseFromJson(json); } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_response.freezed.dart b/lib/src/v3/models/custom_emoji/custom_emoji_response.freezed.dart index 84af3213..7e12620e 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_response.freezed.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_response.freezed.dart @@ -12,7 +12,8 @@ part of 'custom_emoji_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CustomEmojiResponse _$CustomEmojiResponseFromJson(Map json) { return _CustomEmojiResponse.fromJson(json); @@ -28,15 +29,12 @@ mixin _$CustomEmojiResponse { /// Create a copy of CustomEmojiResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CustomEmojiResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CustomEmojiResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CustomEmojiResponseCopyWith<$Res> { - factory $CustomEmojiResponseCopyWith( - CustomEmojiResponse value, $Res Function(CustomEmojiResponse) then) = - _$CustomEmojiResponseCopyWithImpl<$Res, CustomEmojiResponse>; + factory $CustomEmojiResponseCopyWith(CustomEmojiResponse value, $Res Function(CustomEmojiResponse) then) = _$CustomEmojiResponseCopyWithImpl<$Res, CustomEmojiResponse>; @useResult $Res call({CustomEmojiView customEmoji}); @@ -44,8 +42,7 @@ abstract class $CustomEmojiResponseCopyWith<$Res> { } /// @nodoc -class _$CustomEmojiResponseCopyWithImpl<$Res, $Val extends CustomEmojiResponse> - implements $CustomEmojiResponseCopyWith<$Res> { +class _$CustomEmojiResponseCopyWithImpl<$Res, $Val extends CustomEmojiResponse> implements $CustomEmojiResponseCopyWith<$Res> { _$CustomEmojiResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,15 +54,17 @@ class _$CustomEmojiResponseCopyWithImpl<$Res, $Val extends CustomEmojiResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? customEmoji = null, - }) { - return _then(_value.copyWith( - customEmoji: null == customEmoji - ? _value.customEmoji - : customEmoji // ignore: cast_nullable_to_non_nullable - as CustomEmojiView, - ) as $Val); + $Res call({Object? customEmoji = null}) { + return _then( + _value.copyWith( + customEmoji: + null == customEmoji + ? _value.customEmoji + : customEmoji // ignore: cast_nullable_to_non_nullable + as CustomEmojiView, + ) + as $Val, + ); } /// Create a copy of CustomEmojiResponse @@ -80,11 +79,8 @@ class _$CustomEmojiResponseCopyWithImpl<$Res, $Val extends CustomEmojiResponse> } /// @nodoc -abstract class _$$CustomEmojiResponseImplCopyWith<$Res> - implements $CustomEmojiResponseCopyWith<$Res> { - factory _$$CustomEmojiResponseImplCopyWith(_$CustomEmojiResponseImpl value, - $Res Function(_$CustomEmojiResponseImpl) then) = - __$$CustomEmojiResponseImplCopyWithImpl<$Res>; +abstract class _$$CustomEmojiResponseImplCopyWith<$Res> implements $CustomEmojiResponseCopyWith<$Res> { + factory _$$CustomEmojiResponseImplCopyWith(_$CustomEmojiResponseImpl value, $Res Function(_$CustomEmojiResponseImpl) then) = __$$CustomEmojiResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CustomEmojiView customEmoji}); @@ -94,26 +90,23 @@ abstract class _$$CustomEmojiResponseImplCopyWith<$Res> } /// @nodoc -class __$$CustomEmojiResponseImplCopyWithImpl<$Res> - extends _$CustomEmojiResponseCopyWithImpl<$Res, _$CustomEmojiResponseImpl> - implements _$$CustomEmojiResponseImplCopyWith<$Res> { - __$$CustomEmojiResponseImplCopyWithImpl(_$CustomEmojiResponseImpl _value, - $Res Function(_$CustomEmojiResponseImpl) _then) - : super(_value, _then); +class __$$CustomEmojiResponseImplCopyWithImpl<$Res> extends _$CustomEmojiResponseCopyWithImpl<$Res, _$CustomEmojiResponseImpl> implements _$$CustomEmojiResponseImplCopyWith<$Res> { + __$$CustomEmojiResponseImplCopyWithImpl(_$CustomEmojiResponseImpl _value, $Res Function(_$CustomEmojiResponseImpl) _then) : super(_value, _then); /// Create a copy of CustomEmojiResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? customEmoji = null, - }) { - return _then(_$CustomEmojiResponseImpl( - customEmoji: null == customEmoji - ? _value.customEmoji - : customEmoji // ignore: cast_nullable_to_non_nullable - as CustomEmojiView, - )); + $Res call({Object? customEmoji = null}) { + return _then( + _$CustomEmojiResponseImpl( + customEmoji: + null == customEmoji + ? _value.customEmoji + : customEmoji // ignore: cast_nullable_to_non_nullable + as CustomEmojiView, + ), + ); } } @@ -123,8 +116,7 @@ class __$$CustomEmojiResponseImplCopyWithImpl<$Res> class _$CustomEmojiResponseImpl extends _CustomEmojiResponse { const _$CustomEmojiResponseImpl({required this.customEmoji}) : super._(); - factory _$CustomEmojiResponseImpl.fromJson(Map json) => - _$$CustomEmojiResponseImplFromJson(json); + factory _$CustomEmojiResponseImpl.fromJson(Map json) => _$$CustomEmojiResponseImplFromJson(json); @override final CustomEmojiView customEmoji; @@ -136,11 +128,7 @@ class _$CustomEmojiResponseImpl extends _CustomEmojiResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$CustomEmojiResponseImpl && - (identical(other.customEmoji, customEmoji) || - other.customEmoji == customEmoji)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$CustomEmojiResponseImpl && (identical(other.customEmoji, customEmoji) || other.customEmoji == customEmoji)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -152,25 +140,19 @@ class _$CustomEmojiResponseImpl extends _CustomEmojiResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CustomEmojiResponseImplCopyWith<_$CustomEmojiResponseImpl> get copyWith => - __$$CustomEmojiResponseImplCopyWithImpl<_$CustomEmojiResponseImpl>( - this, _$identity); + _$$CustomEmojiResponseImplCopyWith<_$CustomEmojiResponseImpl> get copyWith => __$$CustomEmojiResponseImplCopyWithImpl<_$CustomEmojiResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CustomEmojiResponseImplToJson( - this, - ); + return _$$CustomEmojiResponseImplToJson(this); } } abstract class _CustomEmojiResponse extends CustomEmojiResponse { - const factory _CustomEmojiResponse( - {required final CustomEmojiView customEmoji}) = _$CustomEmojiResponseImpl; + const factory _CustomEmojiResponse({required final CustomEmojiView customEmoji}) = _$CustomEmojiResponseImpl; const _CustomEmojiResponse._() : super._(); - factory _CustomEmojiResponse.fromJson(Map json) = - _$CustomEmojiResponseImpl.fromJson; + factory _CustomEmojiResponse.fromJson(Map json) = _$CustomEmojiResponseImpl.fromJson; @override CustomEmojiView get customEmoji; @@ -179,6 +161,5 @@ abstract class _CustomEmojiResponse extends CustomEmojiResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CustomEmojiResponseImplCopyWith<_$CustomEmojiResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CustomEmojiResponseImplCopyWith<_$CustomEmojiResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/custom_emoji/custom_emoji_response.g.dart b/lib/src/v3/models/custom_emoji/custom_emoji_response.g.dart index dfa085d0..46d6499f 100644 --- a/lib/src/v3/models/custom_emoji/custom_emoji_response.g.dart +++ b/lib/src/v3/models/custom_emoji/custom_emoji_response.g.dart @@ -6,15 +6,7 @@ part of 'custom_emoji_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CustomEmojiResponseImpl _$$CustomEmojiResponseImplFromJson( - Map json) => - _$CustomEmojiResponseImpl( - customEmoji: CustomEmojiView.fromJson( - json['custom_emoji'] as Map), - ); +_$CustomEmojiResponseImpl _$$CustomEmojiResponseImplFromJson(Map json) => + _$CustomEmojiResponseImpl(customEmoji: CustomEmojiView.fromJson(json['custom_emoji'] as Map)); -Map _$$CustomEmojiResponseImplToJson( - _$CustomEmojiResponseImpl instance) => - { - 'custom_emoji': instance.customEmoji.toJson(), - }; +Map _$$CustomEmojiResponseImplToJson(_$CustomEmojiResponseImpl instance) => {'custom_emoji': instance.customEmoji.toJson()}; diff --git a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.dart b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.dart index b3644bdd..55d99fe0 100644 --- a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.dart +++ b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.dart @@ -14,6 +14,5 @@ class DeleteCustomEmojiResponse with _$DeleteCustomEmojiResponse { }) = _DeleteCustomEmojiResponse; const DeleteCustomEmojiResponse._(); - factory DeleteCustomEmojiResponse.fromJson(Map json) => - _$DeleteCustomEmojiResponseFromJson(json); + factory DeleteCustomEmojiResponse.fromJson(Map json) => _$DeleteCustomEmojiResponseFromJson(json); } diff --git a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.freezed.dart b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.freezed.dart index 41c35a02..79e46c6f 100644 --- a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.freezed.dart +++ b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.freezed.dart @@ -12,18 +12,17 @@ part of 'delete_custom_emoji_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -DeleteCustomEmojiResponse _$DeleteCustomEmojiResponseFromJson( - Map json) { +DeleteCustomEmojiResponse _$DeleteCustomEmojiResponseFromJson(Map json) { return _DeleteCustomEmojiResponse.fromJson(json); } /// @nodoc mixin _$DeleteCustomEmojiResponse { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] bool get success => throw _privateConstructorUsedError; /// Serializes this DeleteCustomEmojiResponse to a JSON map. @@ -32,23 +31,18 @@ mixin _$DeleteCustomEmojiResponse { /// Create a copy of DeleteCustomEmojiResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteCustomEmojiResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteCustomEmojiResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteCustomEmojiResponseCopyWith<$Res> { - factory $DeleteCustomEmojiResponseCopyWith(DeleteCustomEmojiResponse value, - $Res Function(DeleteCustomEmojiResponse) then) = - _$DeleteCustomEmojiResponseCopyWithImpl<$Res, DeleteCustomEmojiResponse>; + factory $DeleteCustomEmojiResponseCopyWith(DeleteCustomEmojiResponse value, $Res Function(DeleteCustomEmojiResponse) then) = _$DeleteCustomEmojiResponseCopyWithImpl<$Res, DeleteCustomEmojiResponse>; @useResult $Res call({@deprecated int? id, bool success}); } /// @nodoc -class _$DeleteCustomEmojiResponseCopyWithImpl<$Res, - $Val extends DeleteCustomEmojiResponse> - implements $DeleteCustomEmojiResponseCopyWith<$Res> { +class _$DeleteCustomEmojiResponseCopyWithImpl<$Res, $Val extends DeleteCustomEmojiResponse> implements $DeleteCustomEmojiResponseCopyWith<$Res> { _$DeleteCustomEmojiResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,63 +54,57 @@ class _$DeleteCustomEmojiResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? success = null, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? id = freezed, Object? success = null}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$DeleteCustomEmojiResponseImplCopyWith<$Res> - implements $DeleteCustomEmojiResponseCopyWith<$Res> { - factory _$$DeleteCustomEmojiResponseImplCopyWith( - _$DeleteCustomEmojiResponseImpl value, - $Res Function(_$DeleteCustomEmojiResponseImpl) then) = - __$$DeleteCustomEmojiResponseImplCopyWithImpl<$Res>; +abstract class _$$DeleteCustomEmojiResponseImplCopyWith<$Res> implements $DeleteCustomEmojiResponseCopyWith<$Res> { + factory _$$DeleteCustomEmojiResponseImplCopyWith(_$DeleteCustomEmojiResponseImpl value, $Res Function(_$DeleteCustomEmojiResponseImpl) then) = __$$DeleteCustomEmojiResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({@deprecated int? id, bool success}); } /// @nodoc -class __$$DeleteCustomEmojiResponseImplCopyWithImpl<$Res> - extends _$DeleteCustomEmojiResponseCopyWithImpl<$Res, - _$DeleteCustomEmojiResponseImpl> +class __$$DeleteCustomEmojiResponseImplCopyWithImpl<$Res> extends _$DeleteCustomEmojiResponseCopyWithImpl<$Res, _$DeleteCustomEmojiResponseImpl> implements _$$DeleteCustomEmojiResponseImplCopyWith<$Res> { - __$$DeleteCustomEmojiResponseImplCopyWithImpl( - _$DeleteCustomEmojiResponseImpl _value, - $Res Function(_$DeleteCustomEmojiResponseImpl) _then) - : super(_value, _then); + __$$DeleteCustomEmojiResponseImplCopyWithImpl(_$DeleteCustomEmojiResponseImpl _value, $Res Function(_$DeleteCustomEmojiResponseImpl) _then) : super(_value, _then); /// Create a copy of DeleteCustomEmojiResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? success = null, - }) { - return _then(_$DeleteCustomEmojiResponseImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? id = freezed, Object? success = null}) { + return _then( + _$DeleteCustomEmojiResponseImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -124,17 +112,14 @@ class __$$DeleteCustomEmojiResponseImplCopyWithImpl<$Res> @modelSerde class _$DeleteCustomEmojiResponseImpl extends _DeleteCustomEmojiResponse { - const _$DeleteCustomEmojiResponseImpl( - {@deprecated this.id, required this.success}) - : super._(); + const _$DeleteCustomEmojiResponseImpl({@deprecated this.id, required this.success}) : super._(); - factory _$DeleteCustomEmojiResponseImpl.fromJson(Map json) => - _$$DeleteCustomEmojiResponseImplFromJson(json); + factory _$DeleteCustomEmojiResponseImpl.fromJson(Map json) => _$$DeleteCustomEmojiResponseImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final bool success; @@ -161,26 +146,19 @@ class _$DeleteCustomEmojiResponseImpl extends _DeleteCustomEmojiResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteCustomEmojiResponseImplCopyWith<_$DeleteCustomEmojiResponseImpl> - get copyWith => __$$DeleteCustomEmojiResponseImplCopyWithImpl< - _$DeleteCustomEmojiResponseImpl>(this, _$identity); + _$$DeleteCustomEmojiResponseImplCopyWith<_$DeleteCustomEmojiResponseImpl> get copyWith => __$$DeleteCustomEmojiResponseImplCopyWithImpl<_$DeleteCustomEmojiResponseImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteCustomEmojiResponseImplToJson( - this, - ); + return _$$DeleteCustomEmojiResponseImplToJson(this); } } abstract class _DeleteCustomEmojiResponse extends DeleteCustomEmojiResponse { - const factory _DeleteCustomEmojiResponse( - {@deprecated final int? id, - required final bool success}) = _$DeleteCustomEmojiResponseImpl; + const factory _DeleteCustomEmojiResponse({@deprecated final int? id, required final bool success}) = _$DeleteCustomEmojiResponseImpl; const _DeleteCustomEmojiResponse._() : super._(); - factory _DeleteCustomEmojiResponse.fromJson(Map json) = - _$DeleteCustomEmojiResponseImpl.fromJson; + factory _DeleteCustomEmojiResponse.fromJson(Map json) = _$DeleteCustomEmojiResponseImpl.fromJson; @override @deprecated @@ -192,6 +170,5 @@ abstract class _DeleteCustomEmojiResponse extends DeleteCustomEmojiResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteCustomEmojiResponseImplCopyWith<_$DeleteCustomEmojiResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DeleteCustomEmojiResponseImplCopyWith<_$DeleteCustomEmojiResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.g.dart b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.g.dart index 12446f50..2e596847 100644 --- a/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.g.dart +++ b/lib/src/v3/models/custom_emoji/delete_custom_emoji_response.g.dart @@ -6,16 +6,7 @@ part of 'delete_custom_emoji_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$DeleteCustomEmojiResponseImpl _$$DeleteCustomEmojiResponseImplFromJson( - Map json) => - _$DeleteCustomEmojiResponseImpl( - id: (json['id'] as num?)?.toInt(), - success: json['success'] as bool, - ); +_$DeleteCustomEmojiResponseImpl _$$DeleteCustomEmojiResponseImplFromJson(Map json) => + _$DeleteCustomEmojiResponseImpl(id: (json['id'] as num?)?.toInt(), success: json['success'] as bool); -Map _$$DeleteCustomEmojiResponseImplToJson( - _$DeleteCustomEmojiResponseImpl instance) => - { - 'id': instance.id, - 'success': instance.success, - }; +Map _$$DeleteCustomEmojiResponseImplToJson(_$DeleteCustomEmojiResponseImpl instance) => {'id': instance.id, 'success': instance.success}; diff --git a/lib/src/v3/models/federated_instances/federated_instances.dart b/lib/src/v3/models/federated_instances/federated_instances.dart index 7e096e48..a84a27c6 100644 --- a/lib/src/v3/models/federated_instances/federated_instances.dart +++ b/lib/src/v3/models/federated_instances/federated_instances.dart @@ -16,6 +16,5 @@ class FederatedInstances with _$FederatedInstances { }) = _FederatedInstances; const FederatedInstances._(); - factory FederatedInstances.fromJson(Map json) => - _$FederatedInstancesFromJson(json); + factory FederatedInstances.fromJson(Map json) => _$FederatedInstancesFromJson(json); } diff --git a/lib/src/v3/models/federated_instances/federated_instances.freezed.dart b/lib/src/v3/models/federated_instances/federated_instances.freezed.dart index 0a9477cb..79393d80 100644 --- a/lib/src/v3/models/federated_instances/federated_instances.freezed.dart +++ b/lib/src/v3/models/federated_instances/federated_instances.freezed.dart @@ -12,7 +12,8 @@ part of 'federated_instances.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); FederatedInstances _$FederatedInstancesFromJson(Map json) { return _FederatedInstances.fromJson(json); @@ -20,12 +21,9 @@ FederatedInstances _$FederatedInstancesFromJson(Map json) { /// @nodoc mixin _$FederatedInstances { - List get linked => - throw _privateConstructorUsedError; // v0.18.0 - List get allowed => - throw _privateConstructorUsedError; // v0.18.0 - List get blocked => - throw _privateConstructorUsedError; + List get linked => throw _privateConstructorUsedError; // v0.18.0 + List get allowed => throw _privateConstructorUsedError; // v0.18.0 + List get blocked => throw _privateConstructorUsedError; /// Serializes this FederatedInstances to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -33,25 +31,18 @@ mixin _$FederatedInstances { /// Create a copy of FederatedInstances /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $FederatedInstancesCopyWith get copyWith => - throw _privateConstructorUsedError; + $FederatedInstancesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $FederatedInstancesCopyWith<$Res> { - factory $FederatedInstancesCopyWith( - FederatedInstances value, $Res Function(FederatedInstances) then) = - _$FederatedInstancesCopyWithImpl<$Res, FederatedInstances>; + factory $FederatedInstancesCopyWith(FederatedInstances value, $Res Function(FederatedInstances) then) = _$FederatedInstancesCopyWithImpl<$Res, FederatedInstances>; @useResult - $Res call( - {List linked, - List allowed, - List blocked}); + $Res call({List linked, List allowed, List blocked}); } /// @nodoc -class _$FederatedInstancesCopyWithImpl<$Res, $Val extends FederatedInstances> - implements $FederatedInstancesCopyWith<$Res> { +class _$FederatedInstancesCopyWithImpl<$Res, $Val extends FederatedInstances> implements $FederatedInstancesCopyWith<$Res> { _$FederatedInstancesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,73 +54,66 @@ class _$FederatedInstancesCopyWithImpl<$Res, $Val extends FederatedInstances> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? linked = null, - Object? allowed = null, - Object? blocked = null, - }) { - return _then(_value.copyWith( - linked: null == linked - ? _value.linked - : linked // ignore: cast_nullable_to_non_nullable - as List, - allowed: null == allowed - ? _value.allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? linked = null, Object? allowed = null, Object? blocked = null}) { + return _then( + _value.copyWith( + linked: + null == linked + ? _value.linked + : linked // ignore: cast_nullable_to_non_nullable + as List, + allowed: + null == allowed + ? _value.allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$FederatedInstancesImplCopyWith<$Res> - implements $FederatedInstancesCopyWith<$Res> { - factory _$$FederatedInstancesImplCopyWith(_$FederatedInstancesImpl value, - $Res Function(_$FederatedInstancesImpl) then) = - __$$FederatedInstancesImplCopyWithImpl<$Res>; +abstract class _$$FederatedInstancesImplCopyWith<$Res> implements $FederatedInstancesCopyWith<$Res> { + factory _$$FederatedInstancesImplCopyWith(_$FederatedInstancesImpl value, $Res Function(_$FederatedInstancesImpl) then) = __$$FederatedInstancesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List linked, - List allowed, - List blocked}); + $Res call({List linked, List allowed, List blocked}); } /// @nodoc -class __$$FederatedInstancesImplCopyWithImpl<$Res> - extends _$FederatedInstancesCopyWithImpl<$Res, _$FederatedInstancesImpl> - implements _$$FederatedInstancesImplCopyWith<$Res> { - __$$FederatedInstancesImplCopyWithImpl(_$FederatedInstancesImpl _value, - $Res Function(_$FederatedInstancesImpl) _then) - : super(_value, _then); +class __$$FederatedInstancesImplCopyWithImpl<$Res> extends _$FederatedInstancesCopyWithImpl<$Res, _$FederatedInstancesImpl> implements _$$FederatedInstancesImplCopyWith<$Res> { + __$$FederatedInstancesImplCopyWithImpl(_$FederatedInstancesImpl _value, $Res Function(_$FederatedInstancesImpl) _then) : super(_value, _then); /// Create a copy of FederatedInstances /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? linked = null, - Object? allowed = null, - Object? blocked = null, - }) { - return _then(_$FederatedInstancesImpl( - linked: null == linked - ? _value._linked - : linked // ignore: cast_nullable_to_non_nullable - as List, - allowed: null == allowed - ? _value._allowed - : allowed // ignore: cast_nullable_to_non_nullable - as List, - blocked: null == blocked - ? _value._blocked - : blocked // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? linked = null, Object? allowed = null, Object? blocked = null}) { + return _then( + _$FederatedInstancesImpl( + linked: + null == linked + ? _value._linked + : linked // ignore: cast_nullable_to_non_nullable + as List, + allowed: + null == allowed + ? _value._allowed + : allowed // ignore: cast_nullable_to_non_nullable + as List, + blocked: + null == blocked + ? _value._blocked + : blocked // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -137,17 +121,16 @@ class __$$FederatedInstancesImplCopyWithImpl<$Res> @modelSerde class _$FederatedInstancesImpl extends _FederatedInstances { - const _$FederatedInstancesImpl( - {required final List linked, - required final List allowed, - required final List blocked}) - : _linked = linked, - _allowed = allowed, - _blocked = blocked, - super._(); - - factory _$FederatedInstancesImpl.fromJson(Map json) => - _$$FederatedInstancesImplFromJson(json); + const _$FederatedInstancesImpl({ + required final List linked, + required final List allowed, + required final List blocked, + }) : _linked = linked, + _allowed = allowed, + _blocked = blocked, + super._(); + + factory _$FederatedInstancesImpl.fromJson(Map json) => _$$FederatedInstancesImplFromJson(json); final List _linked; @override @@ -157,9 +140,9 @@ class _$FederatedInstancesImpl extends _FederatedInstances { return EqualUnmodifiableListView(_linked); } -// v0.18.0 + // v0.18.0 final List _allowed; -// v0.18.0 + // v0.18.0 @override List get allowed { if (_allowed is EqualUnmodifiableListView) return _allowed; @@ -167,9 +150,9 @@ class _$FederatedInstancesImpl extends _FederatedInstances { return EqualUnmodifiableListView(_allowed); } -// v0.18.0 + // v0.18.0 final List _blocked; -// v0.18.0 + // v0.18.0 @override List get blocked { if (_blocked is EqualUnmodifiableListView) return _blocked; @@ -194,39 +177,30 @@ class _$FederatedInstancesImpl extends _FederatedInstances { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_linked), - const DeepCollectionEquality().hash(_allowed), - const DeepCollectionEquality().hash(_blocked)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_linked), const DeepCollectionEquality().hash(_allowed), const DeepCollectionEquality().hash(_blocked)); /// Create a copy of FederatedInstances /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$FederatedInstancesImplCopyWith<_$FederatedInstancesImpl> get copyWith => - __$$FederatedInstancesImplCopyWithImpl<_$FederatedInstancesImpl>( - this, _$identity); + _$$FederatedInstancesImplCopyWith<_$FederatedInstancesImpl> get copyWith => __$$FederatedInstancesImplCopyWithImpl<_$FederatedInstancesImpl>(this, _$identity); @override Map toJson() { - return _$$FederatedInstancesImplToJson( - this, - ); + return _$$FederatedInstancesImplToJson(this); } } abstract class _FederatedInstances extends FederatedInstances { - const factory _FederatedInstances( - {required final List linked, - required final List allowed, - required final List blocked}) = - _$FederatedInstancesImpl; + const factory _FederatedInstances({ + required final List linked, + required final List allowed, + required final List blocked, + }) = _$FederatedInstancesImpl; const _FederatedInstances._() : super._(); - factory _FederatedInstances.fromJson(Map json) = - _$FederatedInstancesImpl.fromJson; + factory _FederatedInstances.fromJson(Map json) = _$FederatedInstancesImpl.fromJson; @override List get linked; // v0.18.0 @@ -239,6 +213,5 @@ abstract class _FederatedInstances extends FederatedInstances { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$FederatedInstancesImplCopyWith<_$FederatedInstancesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$FederatedInstancesImplCopyWith<_$FederatedInstancesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/federated_instances/federated_instances.g.dart b/lib/src/v3/models/federated_instances/federated_instances.g.dart index c5254750..b0fdeb3e 100644 --- a/lib/src/v3/models/federated_instances/federated_instances.g.dart +++ b/lib/src/v3/models/federated_instances/federated_instances.g.dart @@ -6,27 +6,14 @@ part of 'federated_instances.dart'; // JsonSerializableGenerator // ************************************************************************** -_$FederatedInstancesImpl _$$FederatedInstancesImplFromJson( - Map json) => - _$FederatedInstancesImpl( - linked: (json['linked'] as List) - .map((e) => - InstanceWithFederationState.fromJson(e as Map)) - .toList(), - allowed: (json['allowed'] as List) - .map((e) => - InstanceWithFederationState.fromJson(e as Map)) - .toList(), - blocked: (json['blocked'] as List) - .map((e) => - InstanceWithFederationState.fromJson(e as Map)) - .toList(), - ); +_$FederatedInstancesImpl _$$FederatedInstancesImplFromJson(Map json) => _$FederatedInstancesImpl( + linked: (json['linked'] as List).map((e) => InstanceWithFederationState.fromJson(e as Map)).toList(), + allowed: (json['allowed'] as List).map((e) => InstanceWithFederationState.fromJson(e as Map)).toList(), + blocked: (json['blocked'] as List).map((e) => InstanceWithFederationState.fromJson(e as Map)).toList(), +); -Map _$$FederatedInstancesImplToJson( - _$FederatedInstancesImpl instance) => - { - 'linked': instance.linked.map((e) => e.toJson()).toList(), - 'allowed': instance.allowed.map((e) => e.toJson()).toList(), - 'blocked': instance.blocked.map((e) => e.toJson()).toList(), - }; +Map _$$FederatedInstancesImplToJson(_$FederatedInstancesImpl instance) => { + 'linked': instance.linked.map((e) => e.toJson()).toList(), + 'allowed': instance.allowed.map((e) => e.toJson()).toList(), + 'blocked': instance.blocked.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/federated_instances/get_federated_instances_response.dart b/lib/src/v3/models/federated_instances/get_federated_instances_response.dart index 7777282a..449afd70 100644 --- a/lib/src/v3/models/federated_instances/get_federated_instances_response.dart +++ b/lib/src/v3/models/federated_instances/get_federated_instances_response.dart @@ -14,6 +14,5 @@ class GetFederatedInstancesResponse with _$GetFederatedInstancesResponse { }) = _GetFederatedInstancesResponse; const GetFederatedInstancesResponse._(); - factory GetFederatedInstancesResponse.fromJson(Map json) => - _$GetFederatedInstancesResponseFromJson(json); + factory GetFederatedInstancesResponse.fromJson(Map json) => _$GetFederatedInstancesResponseFromJson(json); } diff --git a/lib/src/v3/models/federated_instances/get_federated_instances_response.freezed.dart b/lib/src/v3/models/federated_instances/get_federated_instances_response.freezed.dart index dec9bdc9..e5f2aa7c 100644 --- a/lib/src/v3/models/federated_instances/get_federated_instances_response.freezed.dart +++ b/lib/src/v3/models/federated_instances/get_federated_instances_response.freezed.dart @@ -12,17 +12,16 @@ part of 'get_federated_instances_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetFederatedInstancesResponse _$GetFederatedInstancesResponseFromJson( - Map json) { +GetFederatedInstancesResponse _$GetFederatedInstancesResponseFromJson(Map json) { return _GetFederatedInstancesResponse.fromJson(json); } /// @nodoc mixin _$GetFederatedInstancesResponse { - FederatedInstances? get federatedInstances => - throw _privateConstructorUsedError; + FederatedInstances? get federatedInstances => throw _privateConstructorUsedError; /// Serializes this GetFederatedInstancesResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,17 +29,13 @@ mixin _$GetFederatedInstancesResponse { /// Create a copy of GetFederatedInstancesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetFederatedInstancesResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $GetFederatedInstancesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetFederatedInstancesResponseCopyWith<$Res> { - factory $GetFederatedInstancesResponseCopyWith( - GetFederatedInstancesResponse value, - $Res Function(GetFederatedInstancesResponse) then) = - _$GetFederatedInstancesResponseCopyWithImpl<$Res, - GetFederatedInstancesResponse>; + factory $GetFederatedInstancesResponseCopyWith(GetFederatedInstancesResponse value, $Res Function(GetFederatedInstancesResponse) then) = + _$GetFederatedInstancesResponseCopyWithImpl<$Res, GetFederatedInstancesResponse>; @useResult $Res call({FederatedInstances? federatedInstances}); @@ -48,9 +43,7 @@ abstract class $GetFederatedInstancesResponseCopyWith<$Res> { } /// @nodoc -class _$GetFederatedInstancesResponseCopyWithImpl<$Res, - $Val extends GetFederatedInstancesResponse> - implements $GetFederatedInstancesResponseCopyWith<$Res> { +class _$GetFederatedInstancesResponseCopyWithImpl<$Res, $Val extends GetFederatedInstancesResponse> implements $GetFederatedInstancesResponseCopyWith<$Res> { _$GetFederatedInstancesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,15 +55,17 @@ class _$GetFederatedInstancesResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? federatedInstances = freezed, - }) { - return _then(_value.copyWith( - federatedInstances: freezed == federatedInstances - ? _value.federatedInstances - : federatedInstances // ignore: cast_nullable_to_non_nullable - as FederatedInstances?, - ) as $Val); + $Res call({Object? federatedInstances = freezed}) { + return _then( + _value.copyWith( + federatedInstances: + freezed == federatedInstances + ? _value.federatedInstances + : federatedInstances // ignore: cast_nullable_to_non_nullable + as FederatedInstances?, + ) + as $Val, + ); } /// Create a copy of GetFederatedInstancesResponse @@ -82,19 +77,15 @@ class _$GetFederatedInstancesResponseCopyWithImpl<$Res, return null; } - return $FederatedInstancesCopyWith<$Res>(_value.federatedInstances!, - (value) { + return $FederatedInstancesCopyWith<$Res>(_value.federatedInstances!, (value) { return _then(_value.copyWith(federatedInstances: value) as $Val); }); } } /// @nodoc -abstract class _$$GetFederatedInstancesResponseImplCopyWith<$Res> - implements $GetFederatedInstancesResponseCopyWith<$Res> { - factory _$$GetFederatedInstancesResponseImplCopyWith( - _$GetFederatedInstancesResponseImpl value, - $Res Function(_$GetFederatedInstancesResponseImpl) then) = +abstract class _$$GetFederatedInstancesResponseImplCopyWith<$Res> implements $GetFederatedInstancesResponseCopyWith<$Res> { + factory _$$GetFederatedInstancesResponseImplCopyWith(_$GetFederatedInstancesResponseImpl value, $Res Function(_$GetFederatedInstancesResponseImpl) then) = __$$GetFederatedInstancesResponseImplCopyWithImpl<$Res>; @override @useResult @@ -105,42 +96,34 @@ abstract class _$$GetFederatedInstancesResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetFederatedInstancesResponseImplCopyWithImpl<$Res> - extends _$GetFederatedInstancesResponseCopyWithImpl<$Res, - _$GetFederatedInstancesResponseImpl> +class __$$GetFederatedInstancesResponseImplCopyWithImpl<$Res> extends _$GetFederatedInstancesResponseCopyWithImpl<$Res, _$GetFederatedInstancesResponseImpl> implements _$$GetFederatedInstancesResponseImplCopyWith<$Res> { - __$$GetFederatedInstancesResponseImplCopyWithImpl( - _$GetFederatedInstancesResponseImpl _value, - $Res Function(_$GetFederatedInstancesResponseImpl) _then) - : super(_value, _then); + __$$GetFederatedInstancesResponseImplCopyWithImpl(_$GetFederatedInstancesResponseImpl _value, $Res Function(_$GetFederatedInstancesResponseImpl) _then) : super(_value, _then); /// Create a copy of GetFederatedInstancesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? federatedInstances = freezed, - }) { - return _then(_$GetFederatedInstancesResponseImpl( - federatedInstances: freezed == federatedInstances - ? _value.federatedInstances - : federatedInstances // ignore: cast_nullable_to_non_nullable - as FederatedInstances?, - )); + $Res call({Object? federatedInstances = freezed}) { + return _then( + _$GetFederatedInstancesResponseImpl( + federatedInstances: + freezed == federatedInstances + ? _value.federatedInstances + : federatedInstances // ignore: cast_nullable_to_non_nullable + as FederatedInstances?, + ), + ); } } /// @nodoc @modelSerde -class _$GetFederatedInstancesResponseImpl - extends _GetFederatedInstancesResponse { - const _$GetFederatedInstancesResponseImpl({this.federatedInstances}) - : super._(); +class _$GetFederatedInstancesResponseImpl extends _GetFederatedInstancesResponse { + const _$GetFederatedInstancesResponseImpl({this.federatedInstances}) : super._(); - factory _$GetFederatedInstancesResponseImpl.fromJson( - Map json) => - _$$GetFederatedInstancesResponseImplFromJson(json); + factory _$GetFederatedInstancesResponseImpl.fromJson(Map json) => _$$GetFederatedInstancesResponseImplFromJson(json); @override final FederatedInstances? federatedInstances; @@ -155,8 +138,7 @@ class _$GetFederatedInstancesResponseImpl return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetFederatedInstancesResponseImpl && - (identical(other.federatedInstances, federatedInstances) || - other.federatedInstances == federatedInstances)); + (identical(other.federatedInstances, federatedInstances) || other.federatedInstances == federatedInstances)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -168,28 +150,20 @@ class _$GetFederatedInstancesResponseImpl @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetFederatedInstancesResponseImplCopyWith< - _$GetFederatedInstancesResponseImpl> - get copyWith => __$$GetFederatedInstancesResponseImplCopyWithImpl< - _$GetFederatedInstancesResponseImpl>(this, _$identity); + _$$GetFederatedInstancesResponseImplCopyWith<_$GetFederatedInstancesResponseImpl> get copyWith => + __$$GetFederatedInstancesResponseImplCopyWithImpl<_$GetFederatedInstancesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetFederatedInstancesResponseImplToJson( - this, - ); + return _$$GetFederatedInstancesResponseImplToJson(this); } } -abstract class _GetFederatedInstancesResponse - extends GetFederatedInstancesResponse { - const factory _GetFederatedInstancesResponse( - {final FederatedInstances? federatedInstances}) = - _$GetFederatedInstancesResponseImpl; +abstract class _GetFederatedInstancesResponse extends GetFederatedInstancesResponse { + const factory _GetFederatedInstancesResponse({final FederatedInstances? federatedInstances}) = _$GetFederatedInstancesResponseImpl; const _GetFederatedInstancesResponse._() : super._(); - factory _GetFederatedInstancesResponse.fromJson(Map json) = - _$GetFederatedInstancesResponseImpl.fromJson; + factory _GetFederatedInstancesResponse.fromJson(Map json) = _$GetFederatedInstancesResponseImpl.fromJson; @override FederatedInstances? get federatedInstances; @@ -198,7 +172,5 @@ abstract class _GetFederatedInstancesResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetFederatedInstancesResponseImplCopyWith< - _$GetFederatedInstancesResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetFederatedInstancesResponseImplCopyWith<_$GetFederatedInstancesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/federated_instances/get_federated_instances_response.g.dart b/lib/src/v3/models/federated_instances/get_federated_instances_response.g.dart index 1f6b3b3a..f0dce777 100644 --- a/lib/src/v3/models/federated_instances/get_federated_instances_response.g.dart +++ b/lib/src/v3/models/federated_instances/get_federated_instances_response.g.dart @@ -6,17 +6,7 @@ part of 'get_federated_instances_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetFederatedInstancesResponseImpl - _$$GetFederatedInstancesResponseImplFromJson(Map json) => - _$GetFederatedInstancesResponseImpl( - federatedInstances: json['federated_instances'] == null - ? null - : FederatedInstances.fromJson( - json['federated_instances'] as Map), - ); +_$GetFederatedInstancesResponseImpl _$$GetFederatedInstancesResponseImplFromJson(Map json) => + _$GetFederatedInstancesResponseImpl(federatedInstances: json['federated_instances'] == null ? null : FederatedInstances.fromJson(json['federated_instances'] as Map)); -Map _$$GetFederatedInstancesResponseImplToJson( - _$GetFederatedInstancesResponseImpl instance) => - { - 'federated_instances': instance.federatedInstances?.toJson(), - }; +Map _$$GetFederatedInstancesResponseImplToJson(_$GetFederatedInstancesResponseImpl instance) => {'federated_instances': instance.federatedInstances?.toJson()}; diff --git a/lib/src/v3/models/federated_instances/instance.dart b/lib/src/v3/models/federated_instances/instance.dart index c2c18b3d..22245a87 100644 --- a/lib/src/v3/models/federated_instances/instance.dart +++ b/lib/src/v3/models/federated_instances/instance.dart @@ -19,6 +19,5 @@ class Instance with _$Instance { }) = _Instance; const Instance._(); - factory Instance.fromJson(Map json) => - _$InstanceFromJson(json); + factory Instance.fromJson(Map json) => _$InstanceFromJson(json); } diff --git a/lib/src/v3/models/federated_instances/instance.freezed.dart b/lib/src/v3/models/federated_instances/instance.freezed.dart index ef2ecf5b..e2f893f5 100644 --- a/lib/src/v3/models/federated_instances/instance.freezed.dart +++ b/lib/src/v3/models/federated_instances/instance.freezed.dart @@ -12,7 +12,8 @@ part of 'instance.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Instance _$InstanceFromJson(Map json) { return _Instance.fromJson(json); @@ -33,27 +34,18 @@ mixin _$Instance { /// Create a copy of Instance /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $InstanceCopyWith get copyWith => - throw _privateConstructorUsedError; + $InstanceCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $InstanceCopyWith<$Res> { - factory $InstanceCopyWith(Instance value, $Res Function(Instance) then) = - _$InstanceCopyWithImpl<$Res, Instance>; + factory $InstanceCopyWith(Instance value, $Res Function(Instance) then) = _$InstanceCopyWithImpl<$Res, Instance>; @useResult - $Res call( - {int id, - String domain, - DateTime published, - DateTime? updated, - String? software, - String? version}); + $Res call({int id, String domain, DateTime published, DateTime? updated, String? software, String? version}); } /// @nodoc -class _$InstanceCopyWithImpl<$Res, $Val extends Instance> - implements $InstanceCopyWith<$Res> { +class _$InstanceCopyWithImpl<$Res, $Val extends Instance> implements $InstanceCopyWith<$Res> { _$InstanceCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -65,106 +57,96 @@ class _$InstanceCopyWithImpl<$Res, $Val extends Instance> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? domain = null, - Object? published = null, - Object? updated = freezed, - Object? software = freezed, - Object? version = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - domain: null == domain - ? _value.domain - : domain // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - software: freezed == software - ? _value.software - : software // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? id = null, Object? domain = null, Object? published = null, Object? updated = freezed, Object? software = freezed, Object? version = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + domain: + null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + software: + freezed == software + ? _value.software + : software // ignore: cast_nullable_to_non_nullable + as String?, + version: + freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$InstanceImplCopyWith<$Res> - implements $InstanceCopyWith<$Res> { - factory _$$InstanceImplCopyWith( - _$InstanceImpl value, $Res Function(_$InstanceImpl) then) = - __$$InstanceImplCopyWithImpl<$Res>; +abstract class _$$InstanceImplCopyWith<$Res> implements $InstanceCopyWith<$Res> { + factory _$$InstanceImplCopyWith(_$InstanceImpl value, $Res Function(_$InstanceImpl) then) = __$$InstanceImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String domain, - DateTime published, - DateTime? updated, - String? software, - String? version}); + $Res call({int id, String domain, DateTime published, DateTime? updated, String? software, String? version}); } /// @nodoc -class __$$InstanceImplCopyWithImpl<$Res> - extends _$InstanceCopyWithImpl<$Res, _$InstanceImpl> - implements _$$InstanceImplCopyWith<$Res> { - __$$InstanceImplCopyWithImpl( - _$InstanceImpl _value, $Res Function(_$InstanceImpl) _then) - : super(_value, _then); +class __$$InstanceImplCopyWithImpl<$Res> extends _$InstanceCopyWithImpl<$Res, _$InstanceImpl> implements _$$InstanceImplCopyWith<$Res> { + __$$InstanceImplCopyWithImpl(_$InstanceImpl _value, $Res Function(_$InstanceImpl) _then) : super(_value, _then); /// Create a copy of Instance /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? domain = null, - Object? published = null, - Object? updated = freezed, - Object? software = freezed, - Object? version = freezed, - }) { - return _then(_$InstanceImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - domain: null == domain - ? _value.domain - : domain // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - software: freezed == software - ? _value.software - : software // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? id = null, Object? domain = null, Object? published = null, Object? updated = freezed, Object? software = freezed, Object? version = freezed}) { + return _then( + _$InstanceImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + domain: + null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + software: + freezed == software + ? _value.software + : software // ignore: cast_nullable_to_non_nullable + as String?, + version: + freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -172,33 +154,25 @@ class __$$InstanceImplCopyWithImpl<$Res> @modelSerde class _$InstanceImpl extends _Instance { - const _$InstanceImpl( - {required this.id, - required this.domain, - required this.published, - this.updated, - this.software, - this.version}) - : super._(); + const _$InstanceImpl({required this.id, required this.domain, required this.published, this.updated, this.software, this.version}) : super._(); - factory _$InstanceImpl.fromJson(Map json) => - _$$InstanceImplFromJson(json); + factory _$InstanceImpl.fromJson(Map json) => _$$InstanceImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String domain; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final String? software; -// v0.18.0 + // v0.18.0 @override final String? version; @@ -214,47 +188,35 @@ class _$InstanceImpl extends _Instance { other is _$InstanceImpl && (identical(other.id, id) || other.id == id) && (identical(other.domain, domain) || other.domain == domain) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && - (identical(other.software, software) || - other.software == software) && + (identical(other.software, software) || other.software == software) && (identical(other.version, version) || other.version == version)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, domain, published, updated, software, version); + int get hashCode => Object.hash(runtimeType, id, domain, published, updated, software, version); /// Create a copy of Instance /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$InstanceImplCopyWith<_$InstanceImpl> get copyWith => - __$$InstanceImplCopyWithImpl<_$InstanceImpl>(this, _$identity); + _$$InstanceImplCopyWith<_$InstanceImpl> get copyWith => __$$InstanceImplCopyWithImpl<_$InstanceImpl>(this, _$identity); @override Map toJson() { - return _$$InstanceImplToJson( - this, - ); + return _$$InstanceImplToJson(this); } } abstract class _Instance extends Instance { - const factory _Instance( - {required final int id, - required final String domain, - required final DateTime published, - final DateTime? updated, - final String? software, - final String? version}) = _$InstanceImpl; + const factory _Instance({required final int id, required final String domain, required final DateTime published, final DateTime? updated, final String? software, final String? version}) = + _$InstanceImpl; const _Instance._() : super._(); - factory _Instance.fromJson(Map json) = - _$InstanceImpl.fromJson; + factory _Instance.fromJson(Map json) = _$InstanceImpl.fromJson; @override int get id; // v0.18.0 @@ -273,6 +235,5 @@ abstract class _Instance extends Instance { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$InstanceImplCopyWith<_$InstanceImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InstanceImplCopyWith<_$InstanceImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/federated_instances/instance.g.dart b/lib/src/v3/models/federated_instances/instance.g.dart index 60f49f2d..9ebfc18c 100644 --- a/lib/src/v3/models/federated_instances/instance.g.dart +++ b/lib/src/v3/models/federated_instances/instance.g.dart @@ -6,36 +6,24 @@ part of 'instance.dart'; // JsonSerializableGenerator // ************************************************************************** -_$InstanceImpl _$$InstanceImplFromJson(Map json) => - _$InstanceImpl( - id: (json['id'] as num).toInt(), - domain: json['domain'] as String, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - software: json['software'] as String?, - version: json['version'] as String?, - ); +_$InstanceImpl _$$InstanceImplFromJson(Map json) => _$InstanceImpl( + id: (json['id'] as num).toInt(), + domain: json['domain'] as String, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + software: json['software'] as String?, + version: json['version'] as String?, +); -Map _$$InstanceImplToJson(_$InstanceImpl instance) => - { - 'id': instance.id, - 'domain': instance.domain, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'software': instance.software, - 'version': instance.version, - }; +Map _$$InstanceImplToJson(_$InstanceImpl instance) => { + 'id': instance.id, + 'domain': instance.domain, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'software': instance.software, + 'version': instance.version, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/federated_instances/instance_with_federation_state.dart b/lib/src/v3/models/federated_instances/instance_with_federation_state.dart index ad2c7700..c2dcaad9 100644 --- a/lib/src/v3/models/federated_instances/instance_with_federation_state.dart +++ b/lib/src/v3/models/federated_instances/instance_with_federation_state.dart @@ -21,6 +21,5 @@ class InstanceWithFederationState with _$InstanceWithFederationState { }) = _InstanceWithFederationState; const InstanceWithFederationState._(); - factory InstanceWithFederationState.fromJson(Map json) => - _$InstanceWithFederationStateFromJson(json); + factory InstanceWithFederationState.fromJson(Map json) => _$InstanceWithFederationStateFromJson(json); } diff --git a/lib/src/v3/models/federated_instances/instance_with_federation_state.freezed.dart b/lib/src/v3/models/federated_instances/instance_with_federation_state.freezed.dart index ff2f5deb..be8d6a04 100644 --- a/lib/src/v3/models/federated_instances/instance_with_federation_state.freezed.dart +++ b/lib/src/v3/models/federated_instances/instance_with_federation_state.freezed.dart @@ -12,10 +12,10 @@ part of 'instance_with_federation_state.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -InstanceWithFederationState _$InstanceWithFederationStateFromJson( - Map json) { +InstanceWithFederationState _$InstanceWithFederationStateFromJson(Map json) { return _InstanceWithFederationState.fromJson(json); } @@ -23,16 +23,11 @@ InstanceWithFederationState _$InstanceWithFederationStateFromJson( mixin _$InstanceWithFederationState { int get id => throw _privateConstructorUsedError; // v0.19.0 (required) String get domain => throw _privateConstructorUsedError; // v0.19.0 (required) - DateTime get published => - throw _privateConstructorUsedError; // v0.19.0 (required) - DateTime? get updated => - throw _privateConstructorUsedError; // v0.19.0 (optional) - String? get software => - throw _privateConstructorUsedError; // v0.19.0 (optional) - String? get version => - throw _privateConstructorUsedError; // v0.19.0 (optional) - ReadableFederationState? get federationState => - throw _privateConstructorUsedError; + DateTime get published => throw _privateConstructorUsedError; // v0.19.0 (required) + DateTime? get updated => throw _privateConstructorUsedError; // v0.19.0 (optional) + String? get software => throw _privateConstructorUsedError; // v0.19.0 (optional) + String? get version => throw _privateConstructorUsedError; // v0.19.0 (optional) + ReadableFederationState? get federationState => throw _privateConstructorUsedError; /// Serializes this InstanceWithFederationState to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -40,34 +35,21 @@ mixin _$InstanceWithFederationState { /// Create a copy of InstanceWithFederationState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $InstanceWithFederationStateCopyWith - get copyWith => throw _privateConstructorUsedError; + $InstanceWithFederationStateCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $InstanceWithFederationStateCopyWith<$Res> { - factory $InstanceWithFederationStateCopyWith( - InstanceWithFederationState value, - $Res Function(InstanceWithFederationState) then) = - _$InstanceWithFederationStateCopyWithImpl<$Res, - InstanceWithFederationState>; + factory $InstanceWithFederationStateCopyWith(InstanceWithFederationState value, $Res Function(InstanceWithFederationState) then) = + _$InstanceWithFederationStateCopyWithImpl<$Res, InstanceWithFederationState>; @useResult - $Res call( - {int id, - String domain, - DateTime published, - DateTime? updated, - String? software, - String? version, - ReadableFederationState? federationState}); + $Res call({int id, String domain, DateTime published, DateTime? updated, String? software, String? version, ReadableFederationState? federationState}); $ReadableFederationStateCopyWith<$Res>? get federationState; } /// @nodoc -class _$InstanceWithFederationStateCopyWithImpl<$Res, - $Val extends InstanceWithFederationState> - implements $InstanceWithFederationStateCopyWith<$Res> { +class _$InstanceWithFederationStateCopyWithImpl<$Res, $Val extends InstanceWithFederationState> implements $InstanceWithFederationStateCopyWith<$Res> { _$InstanceWithFederationStateCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -79,45 +61,47 @@ class _$InstanceWithFederationStateCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? domain = null, - Object? published = null, - Object? updated = freezed, - Object? software = freezed, - Object? version = freezed, - Object? federationState = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - domain: null == domain - ? _value.domain - : domain // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - software: freezed == software - ? _value.software - : software // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, - federationState: freezed == federationState - ? _value.federationState - : federationState // ignore: cast_nullable_to_non_nullable - as ReadableFederationState?, - ) as $Val); + $Res call({Object? id = null, Object? domain = null, Object? published = null, Object? updated = freezed, Object? software = freezed, Object? version = freezed, Object? federationState = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + domain: + null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + software: + freezed == software + ? _value.software + : software // ignore: cast_nullable_to_non_nullable + as String?, + version: + freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, + federationState: + freezed == federationState + ? _value.federationState + : federationState // ignore: cast_nullable_to_non_nullable + as ReadableFederationState?, + ) + as $Val, + ); } /// Create a copy of InstanceWithFederationState @@ -129,88 +113,73 @@ class _$InstanceWithFederationStateCopyWithImpl<$Res, return null; } - return $ReadableFederationStateCopyWith<$Res>(_value.federationState!, - (value) { + return $ReadableFederationStateCopyWith<$Res>(_value.federationState!, (value) { return _then(_value.copyWith(federationState: value) as $Val); }); } } /// @nodoc -abstract class _$$InstanceWithFederationStateImplCopyWith<$Res> - implements $InstanceWithFederationStateCopyWith<$Res> { - factory _$$InstanceWithFederationStateImplCopyWith( - _$InstanceWithFederationStateImpl value, - $Res Function(_$InstanceWithFederationStateImpl) then) = +abstract class _$$InstanceWithFederationStateImplCopyWith<$Res> implements $InstanceWithFederationStateCopyWith<$Res> { + factory _$$InstanceWithFederationStateImplCopyWith(_$InstanceWithFederationStateImpl value, $Res Function(_$InstanceWithFederationStateImpl) then) = __$$InstanceWithFederationStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String domain, - DateTime published, - DateTime? updated, - String? software, - String? version, - ReadableFederationState? federationState}); + $Res call({int id, String domain, DateTime published, DateTime? updated, String? software, String? version, ReadableFederationState? federationState}); @override $ReadableFederationStateCopyWith<$Res>? get federationState; } /// @nodoc -class __$$InstanceWithFederationStateImplCopyWithImpl<$Res> - extends _$InstanceWithFederationStateCopyWithImpl<$Res, - _$InstanceWithFederationStateImpl> +class __$$InstanceWithFederationStateImplCopyWithImpl<$Res> extends _$InstanceWithFederationStateCopyWithImpl<$Res, _$InstanceWithFederationStateImpl> implements _$$InstanceWithFederationStateImplCopyWith<$Res> { - __$$InstanceWithFederationStateImplCopyWithImpl( - _$InstanceWithFederationStateImpl _value, - $Res Function(_$InstanceWithFederationStateImpl) _then) - : super(_value, _then); + __$$InstanceWithFederationStateImplCopyWithImpl(_$InstanceWithFederationStateImpl _value, $Res Function(_$InstanceWithFederationStateImpl) _then) : super(_value, _then); /// Create a copy of InstanceWithFederationState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? domain = null, - Object? published = null, - Object? updated = freezed, - Object? software = freezed, - Object? version = freezed, - Object? federationState = freezed, - }) { - return _then(_$InstanceWithFederationStateImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - domain: null == domain - ? _value.domain - : domain // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - software: freezed == software - ? _value.software - : software // ignore: cast_nullable_to_non_nullable - as String?, - version: freezed == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String?, - federationState: freezed == federationState - ? _value.federationState - : federationState // ignore: cast_nullable_to_non_nullable - as ReadableFederationState?, - )); + $Res call({Object? id = null, Object? domain = null, Object? published = null, Object? updated = freezed, Object? software = freezed, Object? version = freezed, Object? federationState = freezed}) { + return _then( + _$InstanceWithFederationStateImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + domain: + null == domain + ? _value.domain + : domain // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + software: + freezed == software + ? _value.software + : software // ignore: cast_nullable_to_non_nullable + as String?, + version: + freezed == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String?, + federationState: + freezed == federationState + ? _value.federationState + : federationState // ignore: cast_nullable_to_non_nullable + as ReadableFederationState?, + ), + ); } } @@ -218,38 +187,28 @@ class __$$InstanceWithFederationStateImplCopyWithImpl<$Res> @modelSerde class _$InstanceWithFederationStateImpl extends _InstanceWithFederationState { - const _$InstanceWithFederationStateImpl( - {required this.id, - required this.domain, - required this.published, - this.updated, - this.software, - this.version, - this.federationState}) - : super._(); - - factory _$InstanceWithFederationStateImpl.fromJson( - Map json) => - _$$InstanceWithFederationStateImplFromJson(json); + const _$InstanceWithFederationStateImpl({required this.id, required this.domain, required this.published, this.updated, this.software, this.version, this.federationState}) : super._(); + + factory _$InstanceWithFederationStateImpl.fromJson(Map json) => _$$InstanceWithFederationStateImplFromJson(json); @override final int id; -// v0.19.0 (required) + // v0.19.0 (required) @override final String domain; -// v0.19.0 (required) + // v0.19.0 (required) @override final DateTime published; -// v0.19.0 (required) + // v0.19.0 (required) @override final DateTime? updated; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String? software; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String? version; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final ReadableFederationState? federationState; @@ -265,53 +224,43 @@ class _$InstanceWithFederationStateImpl extends _InstanceWithFederationState { other is _$InstanceWithFederationStateImpl && (identical(other.id, id) || other.id == id) && (identical(other.domain, domain) || other.domain == domain) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && - (identical(other.software, software) || - other.software == software) && + (identical(other.software, software) || other.software == software) && (identical(other.version, version) || other.version == version) && - (identical(other.federationState, federationState) || - other.federationState == federationState)); + (identical(other.federationState, federationState) || other.federationState == federationState)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, domain, published, updated, - software, version, federationState); + int get hashCode => Object.hash(runtimeType, id, domain, published, updated, software, version, federationState); /// Create a copy of InstanceWithFederationState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$InstanceWithFederationStateImplCopyWith<_$InstanceWithFederationStateImpl> - get copyWith => __$$InstanceWithFederationStateImplCopyWithImpl< - _$InstanceWithFederationStateImpl>(this, _$identity); + _$$InstanceWithFederationStateImplCopyWith<_$InstanceWithFederationStateImpl> get copyWith => __$$InstanceWithFederationStateImplCopyWithImpl<_$InstanceWithFederationStateImpl>(this, _$identity); @override Map toJson() { - return _$$InstanceWithFederationStateImplToJson( - this, - ); + return _$$InstanceWithFederationStateImplToJson(this); } } -abstract class _InstanceWithFederationState - extends InstanceWithFederationState { - const factory _InstanceWithFederationState( - {required final int id, - required final String domain, - required final DateTime published, - final DateTime? updated, - final String? software, - final String? version, - final ReadableFederationState? federationState}) = - _$InstanceWithFederationStateImpl; +abstract class _InstanceWithFederationState extends InstanceWithFederationState { + const factory _InstanceWithFederationState({ + required final int id, + required final String domain, + required final DateTime published, + final DateTime? updated, + final String? software, + final String? version, + final ReadableFederationState? federationState, + }) = _$InstanceWithFederationStateImpl; const _InstanceWithFederationState._() : super._(); - factory _InstanceWithFederationState.fromJson(Map json) = - _$InstanceWithFederationStateImpl.fromJson; + factory _InstanceWithFederationState.fromJson(Map json) = _$InstanceWithFederationStateImpl.fromJson; @override int get id; // v0.19.0 (required) @@ -332,6 +281,5 @@ abstract class _InstanceWithFederationState /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$InstanceWithFederationStateImplCopyWith<_$InstanceWithFederationStateImpl> - get copyWith => throw _privateConstructorUsedError; + _$$InstanceWithFederationStateImplCopyWith<_$InstanceWithFederationStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/federated_instances/instance_with_federation_state.g.dart b/lib/src/v3/models/federated_instances/instance_with_federation_state.g.dart index 482212c2..05197676 100644 --- a/lib/src/v3/models/federated_instances/instance_with_federation_state.g.dart +++ b/lib/src/v3/models/federated_instances/instance_with_federation_state.g.dart @@ -6,43 +6,26 @@ part of 'instance_with_federation_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$InstanceWithFederationStateImpl _$$InstanceWithFederationStateImplFromJson( - Map json) => - _$InstanceWithFederationStateImpl( - id: (json['id'] as num).toInt(), - domain: json['domain'] as String, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - software: json['software'] as String?, - version: json['version'] as String?, - federationState: json['federation_state'] == null - ? null - : ReadableFederationState.fromJson( - json['federation_state'] as Map), - ); +_$InstanceWithFederationStateImpl _$$InstanceWithFederationStateImplFromJson(Map json) => _$InstanceWithFederationStateImpl( + id: (json['id'] as num).toInt(), + domain: json['domain'] as String, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + software: json['software'] as String?, + version: json['version'] as String?, + federationState: json['federation_state'] == null ? null : ReadableFederationState.fromJson(json['federation_state'] as Map), +); -Map _$$InstanceWithFederationStateImplToJson( - _$InstanceWithFederationStateImpl instance) => - { - 'id': instance.id, - 'domain': instance.domain, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'software': instance.software, - 'version': instance.version, - 'federation_state': instance.federationState?.toJson(), - }; +Map _$$InstanceWithFederationStateImplToJson(_$InstanceWithFederationStateImpl instance) => { + 'id': instance.id, + 'domain': instance.domain, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'software': instance.software, + 'version': instance.version, + 'federation_state': instance.federationState?.toJson(), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/federated_instances/readable_federation_state.dart b/lib/src/v3/models/federated_instances/readable_federation_state.dart index 1e8bee92..066dea9e 100644 --- a/lib/src/v3/models/federated_instances/readable_federation_state.dart +++ b/lib/src/v3/models/federated_instances/readable_federation_state.dart @@ -19,6 +19,5 @@ class ReadableFederationState with _$ReadableFederationState { }) = _ReadableFederationState; const ReadableFederationState._(); - factory ReadableFederationState.fromJson(Map json) => - _$ReadableFederationStateFromJson(json); + factory ReadableFederationState.fromJson(Map json) => _$ReadableFederationStateFromJson(json); } diff --git a/lib/src/v3/models/federated_instances/readable_federation_state.freezed.dart b/lib/src/v3/models/federated_instances/readable_federation_state.freezed.dart index 58209bae..0c0a3ed5 100644 --- a/lib/src/v3/models/federated_instances/readable_federation_state.freezed.dart +++ b/lib/src/v3/models/federated_instances/readable_federation_state.freezed.dart @@ -12,24 +12,20 @@ part of 'readable_federation_state.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ReadableFederationState _$ReadableFederationStateFromJson( - Map json) { +ReadableFederationState _$ReadableFederationStateFromJson(Map json) { return _ReadableFederationState.fromJson(json); } /// @nodoc mixin _$ReadableFederationState { - int get instanceId => - throw _privateConstructorUsedError; // v0.19.0 (required) - int? get lastSuccessfulId => - throw _privateConstructorUsedError; // v0.19.0 (optional) - DateTime? get lastSuccessfulPublishedTime => - throw _privateConstructorUsedError; // v0.19.0 (optional) + int get instanceId => throw _privateConstructorUsedError; // v0.19.0 (required) + int? get lastSuccessfulId => throw _privateConstructorUsedError; // v0.19.0 (optional) + DateTime? get lastSuccessfulPublishedTime => throw _privateConstructorUsedError; // v0.19.0 (optional) int get failCount => throw _privateConstructorUsedError; // v0.19.0 (required) - DateTime? get lastRetry => - throw _privateConstructorUsedError; // v0.19.0 (optional) + DateTime? get lastRetry => throw _privateConstructorUsedError; // v0.19.0 (optional) DateTime? get nextRetry => throw _privateConstructorUsedError; /// Serializes this ReadableFederationState to a JSON map. @@ -38,29 +34,18 @@ mixin _$ReadableFederationState { /// Create a copy of ReadableFederationState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ReadableFederationStateCopyWith get copyWith => - throw _privateConstructorUsedError; + $ReadableFederationStateCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ReadableFederationStateCopyWith<$Res> { - factory $ReadableFederationStateCopyWith(ReadableFederationState value, - $Res Function(ReadableFederationState) then) = - _$ReadableFederationStateCopyWithImpl<$Res, ReadableFederationState>; + factory $ReadableFederationStateCopyWith(ReadableFederationState value, $Res Function(ReadableFederationState) then) = _$ReadableFederationStateCopyWithImpl<$Res, ReadableFederationState>; @useResult - $Res call( - {int instanceId, - int? lastSuccessfulId, - DateTime? lastSuccessfulPublishedTime, - int failCount, - DateTime? lastRetry, - DateTime? nextRetry}); + $Res call({int instanceId, int? lastSuccessfulId, DateTime? lastSuccessfulPublishedTime, int failCount, DateTime? lastRetry, DateTime? nextRetry}); } /// @nodoc -class _$ReadableFederationStateCopyWithImpl<$Res, - $Val extends ReadableFederationState> - implements $ReadableFederationStateCopyWith<$Res> { +class _$ReadableFederationStateCopyWithImpl<$Res, $Val extends ReadableFederationState> implements $ReadableFederationStateCopyWith<$Res> { _$ReadableFederationStateCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -80,62 +65,55 @@ class _$ReadableFederationStateCopyWithImpl<$Res, Object? lastRetry = freezed, Object? nextRetry = freezed, }) { - return _then(_value.copyWith( - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - lastSuccessfulId: freezed == lastSuccessfulId - ? _value.lastSuccessfulId - : lastSuccessfulId // ignore: cast_nullable_to_non_nullable - as int?, - lastSuccessfulPublishedTime: freezed == lastSuccessfulPublishedTime - ? _value.lastSuccessfulPublishedTime - : lastSuccessfulPublishedTime // ignore: cast_nullable_to_non_nullable - as DateTime?, - failCount: null == failCount - ? _value.failCount - : failCount // ignore: cast_nullable_to_non_nullable - as int, - lastRetry: freezed == lastRetry - ? _value.lastRetry - : lastRetry // ignore: cast_nullable_to_non_nullable - as DateTime?, - nextRetry: freezed == nextRetry - ? _value.nextRetry - : nextRetry // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + return _then( + _value.copyWith( + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + lastSuccessfulId: + freezed == lastSuccessfulId + ? _value.lastSuccessfulId + : lastSuccessfulId // ignore: cast_nullable_to_non_nullable + as int?, + lastSuccessfulPublishedTime: + freezed == lastSuccessfulPublishedTime + ? _value.lastSuccessfulPublishedTime + : lastSuccessfulPublishedTime // ignore: cast_nullable_to_non_nullable + as DateTime?, + failCount: + null == failCount + ? _value.failCount + : failCount // ignore: cast_nullable_to_non_nullable + as int, + lastRetry: + freezed == lastRetry + ? _value.lastRetry + : lastRetry // ignore: cast_nullable_to_non_nullable + as DateTime?, + nextRetry: + freezed == nextRetry + ? _value.nextRetry + : nextRetry // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ReadableFederationStateImplCopyWith<$Res> - implements $ReadableFederationStateCopyWith<$Res> { - factory _$$ReadableFederationStateImplCopyWith( - _$ReadableFederationStateImpl value, - $Res Function(_$ReadableFederationStateImpl) then) = - __$$ReadableFederationStateImplCopyWithImpl<$Res>; +abstract class _$$ReadableFederationStateImplCopyWith<$Res> implements $ReadableFederationStateCopyWith<$Res> { + factory _$$ReadableFederationStateImplCopyWith(_$ReadableFederationStateImpl value, $Res Function(_$ReadableFederationStateImpl) then) = __$$ReadableFederationStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int instanceId, - int? lastSuccessfulId, - DateTime? lastSuccessfulPublishedTime, - int failCount, - DateTime? lastRetry, - DateTime? nextRetry}); + $Res call({int instanceId, int? lastSuccessfulId, DateTime? lastSuccessfulPublishedTime, int failCount, DateTime? lastRetry, DateTime? nextRetry}); } /// @nodoc -class __$$ReadableFederationStateImplCopyWithImpl<$Res> - extends _$ReadableFederationStateCopyWithImpl<$Res, - _$ReadableFederationStateImpl> - implements _$$ReadableFederationStateImplCopyWith<$Res> { - __$$ReadableFederationStateImplCopyWithImpl( - _$ReadableFederationStateImpl _value, - $Res Function(_$ReadableFederationStateImpl) _then) - : super(_value, _then); +class __$$ReadableFederationStateImplCopyWithImpl<$Res> extends _$ReadableFederationStateCopyWithImpl<$Res, _$ReadableFederationStateImpl> implements _$$ReadableFederationStateImplCopyWith<$Res> { + __$$ReadableFederationStateImplCopyWithImpl(_$ReadableFederationStateImpl _value, $Res Function(_$ReadableFederationStateImpl) _then) : super(_value, _then); /// Create a copy of ReadableFederationState /// with the given fields replaced by the non-null parameter values. @@ -149,32 +127,40 @@ class __$$ReadableFederationStateImplCopyWithImpl<$Res> Object? lastRetry = freezed, Object? nextRetry = freezed, }) { - return _then(_$ReadableFederationStateImpl( - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - lastSuccessfulId: freezed == lastSuccessfulId - ? _value.lastSuccessfulId - : lastSuccessfulId // ignore: cast_nullable_to_non_nullable - as int?, - lastSuccessfulPublishedTime: freezed == lastSuccessfulPublishedTime - ? _value.lastSuccessfulPublishedTime - : lastSuccessfulPublishedTime // ignore: cast_nullable_to_non_nullable - as DateTime?, - failCount: null == failCount - ? _value.failCount - : failCount // ignore: cast_nullable_to_non_nullable - as int, - lastRetry: freezed == lastRetry - ? _value.lastRetry - : lastRetry // ignore: cast_nullable_to_non_nullable - as DateTime?, - nextRetry: freezed == nextRetry - ? _value.nextRetry - : nextRetry // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + return _then( + _$ReadableFederationStateImpl( + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + lastSuccessfulId: + freezed == lastSuccessfulId + ? _value.lastSuccessfulId + : lastSuccessfulId // ignore: cast_nullable_to_non_nullable + as int?, + lastSuccessfulPublishedTime: + freezed == lastSuccessfulPublishedTime + ? _value.lastSuccessfulPublishedTime + : lastSuccessfulPublishedTime // ignore: cast_nullable_to_non_nullable + as DateTime?, + failCount: + null == failCount + ? _value.failCount + : failCount // ignore: cast_nullable_to_non_nullable + as int, + lastRetry: + freezed == lastRetry + ? _value.lastRetry + : lastRetry // ignore: cast_nullable_to_non_nullable + as DateTime?, + nextRetry: + freezed == nextRetry + ? _value.nextRetry + : nextRetry // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -182,33 +168,25 @@ class __$$ReadableFederationStateImplCopyWithImpl<$Res> @modelSerde class _$ReadableFederationStateImpl extends _ReadableFederationState { - const _$ReadableFederationStateImpl( - {required this.instanceId, - this.lastSuccessfulId, - this.lastSuccessfulPublishedTime, - required this.failCount, - this.lastRetry, - this.nextRetry}) - : super._(); + const _$ReadableFederationStateImpl({required this.instanceId, this.lastSuccessfulId, this.lastSuccessfulPublishedTime, required this.failCount, this.lastRetry, this.nextRetry}) : super._(); - factory _$ReadableFederationStateImpl.fromJson(Map json) => - _$$ReadableFederationStateImplFromJson(json); + factory _$ReadableFederationStateImpl.fromJson(Map json) => _$$ReadableFederationStateImplFromJson(json); @override final int instanceId; -// v0.19.0 (required) + // v0.19.0 (required) @override final int? lastSuccessfulId; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final DateTime? lastSuccessfulPublishedTime; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final int failCount; -// v0.19.0 (required) + // v0.19.0 (required) @override final DateTime? lastRetry; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final DateTime? nextRetry; @@ -222,56 +200,43 @@ class _$ReadableFederationStateImpl extends _ReadableFederationState { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ReadableFederationStateImpl && - (identical(other.instanceId, instanceId) || - other.instanceId == instanceId) && - (identical(other.lastSuccessfulId, lastSuccessfulId) || - other.lastSuccessfulId == lastSuccessfulId) && - (identical(other.lastSuccessfulPublishedTime, - lastSuccessfulPublishedTime) || - other.lastSuccessfulPublishedTime == - lastSuccessfulPublishedTime) && - (identical(other.failCount, failCount) || - other.failCount == failCount) && - (identical(other.lastRetry, lastRetry) || - other.lastRetry == lastRetry) && - (identical(other.nextRetry, nextRetry) || - other.nextRetry == nextRetry)); + (identical(other.instanceId, instanceId) || other.instanceId == instanceId) && + (identical(other.lastSuccessfulId, lastSuccessfulId) || other.lastSuccessfulId == lastSuccessfulId) && + (identical(other.lastSuccessfulPublishedTime, lastSuccessfulPublishedTime) || other.lastSuccessfulPublishedTime == lastSuccessfulPublishedTime) && + (identical(other.failCount, failCount) || other.failCount == failCount) && + (identical(other.lastRetry, lastRetry) || other.lastRetry == lastRetry) && + (identical(other.nextRetry, nextRetry) || other.nextRetry == nextRetry)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, instanceId, lastSuccessfulId, - lastSuccessfulPublishedTime, failCount, lastRetry, nextRetry); + int get hashCode => Object.hash(runtimeType, instanceId, lastSuccessfulId, lastSuccessfulPublishedTime, failCount, lastRetry, nextRetry); /// Create a copy of ReadableFederationState /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ReadableFederationStateImplCopyWith<_$ReadableFederationStateImpl> - get copyWith => __$$ReadableFederationStateImplCopyWithImpl< - _$ReadableFederationStateImpl>(this, _$identity); + _$$ReadableFederationStateImplCopyWith<_$ReadableFederationStateImpl> get copyWith => __$$ReadableFederationStateImplCopyWithImpl<_$ReadableFederationStateImpl>(this, _$identity); @override Map toJson() { - return _$$ReadableFederationStateImplToJson( - this, - ); + return _$$ReadableFederationStateImplToJson(this); } } abstract class _ReadableFederationState extends ReadableFederationState { - const factory _ReadableFederationState( - {required final int instanceId, - final int? lastSuccessfulId, - final DateTime? lastSuccessfulPublishedTime, - required final int failCount, - final DateTime? lastRetry, - final DateTime? nextRetry}) = _$ReadableFederationStateImpl; + const factory _ReadableFederationState({ + required final int instanceId, + final int? lastSuccessfulId, + final DateTime? lastSuccessfulPublishedTime, + required final int failCount, + final DateTime? lastRetry, + final DateTime? nextRetry, + }) = _$ReadableFederationStateImpl; const _ReadableFederationState._() : super._(); - factory _ReadableFederationState.fromJson(Map json) = - _$ReadableFederationStateImpl.fromJson; + factory _ReadableFederationState.fromJson(Map json) = _$ReadableFederationStateImpl.fromJson; @override int get instanceId; // v0.19.0 (required) @@ -290,6 +255,5 @@ abstract class _ReadableFederationState extends ReadableFederationState { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ReadableFederationStateImplCopyWith<_$ReadableFederationStateImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ReadableFederationStateImplCopyWith<_$ReadableFederationStateImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/federated_instances/readable_federation_state.g.dart b/lib/src/v3/models/federated_instances/readable_federation_state.g.dart index 00edf149..b00e263f 100644 --- a/lib/src/v3/models/federated_instances/readable_federation_state.g.dart +++ b/lib/src/v3/models/federated_instances/readable_federation_state.g.dart @@ -6,44 +6,24 @@ part of 'readable_federation_state.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ReadableFederationStateImpl _$$ReadableFederationStateImplFromJson( - Map json) => - _$ReadableFederationStateImpl( - instanceId: (json['instance_id'] as num).toInt(), - lastSuccessfulId: (json['last_successful_id'] as num?)?.toInt(), - lastSuccessfulPublishedTime: _$JsonConverterFromJson( - json['last_successful_published_time'], - const ForceUtcDateTime().fromJson), - failCount: (json['fail_count'] as num).toInt(), - lastRetry: _$JsonConverterFromJson( - json['last_retry'], const ForceUtcDateTime().fromJson), - nextRetry: _$JsonConverterFromJson( - json['next_retry'], const ForceUtcDateTime().fromJson), - ); +_$ReadableFederationStateImpl _$$ReadableFederationStateImplFromJson(Map json) => _$ReadableFederationStateImpl( + instanceId: (json['instance_id'] as num).toInt(), + lastSuccessfulId: (json['last_successful_id'] as num?)?.toInt(), + lastSuccessfulPublishedTime: _$JsonConverterFromJson(json['last_successful_published_time'], const ForceUtcDateTime().fromJson), + failCount: (json['fail_count'] as num).toInt(), + lastRetry: _$JsonConverterFromJson(json['last_retry'], const ForceUtcDateTime().fromJson), + nextRetry: _$JsonConverterFromJson(json['next_retry'], const ForceUtcDateTime().fromJson), +); -Map _$$ReadableFederationStateImplToJson( - _$ReadableFederationStateImpl instance) => - { - 'instance_id': instance.instanceId, - 'last_successful_id': instance.lastSuccessfulId, - 'last_successful_published_time': _$JsonConverterToJson( - instance.lastSuccessfulPublishedTime, - const ForceUtcDateTime().toJson), - 'fail_count': instance.failCount, - 'last_retry': _$JsonConverterToJson( - instance.lastRetry, const ForceUtcDateTime().toJson), - 'next_retry': _$JsonConverterToJson( - instance.nextRetry, const ForceUtcDateTime().toJson), - }; +Map _$$ReadableFederationStateImplToJson(_$ReadableFederationStateImpl instance) => { + 'instance_id': instance.instanceId, + 'last_successful_id': instance.lastSuccessfulId, + 'last_successful_published_time': _$JsonConverterToJson(instance.lastSuccessfulPublishedTime, const ForceUtcDateTime().toJson), + 'fail_count': instance.failCount, + 'last_retry': _$JsonConverterToJson(instance.lastRetry, const ForceUtcDateTime().toJson), + 'next_retry': _$JsonConverterToJson(instance.nextRetry, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/image/image_details.dart b/lib/src/v3/models/image/image_details.dart index 01b25cf4..a0257ef6 100644 --- a/lib/src/v3/models/image/image_details.dart +++ b/lib/src/v3/models/image/image_details.dart @@ -16,6 +16,5 @@ class ImageDetails with _$ImageDetails { }) = _ImageDetails; const ImageDetails._(); - factory ImageDetails.fromJson(Map json) => - _$ImageDetailsFromJson(json); + factory ImageDetails.fromJson(Map json) => _$ImageDetailsFromJson(json); } diff --git a/lib/src/v3/models/image/image_details.freezed.dart b/lib/src/v3/models/image/image_details.freezed.dart index 740534ef..9d24da3f 100644 --- a/lib/src/v3/models/image/image_details.freezed.dart +++ b/lib/src/v3/models/image/image_details.freezed.dart @@ -12,7 +12,8 @@ part of 'image_details.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ImageDetails _$ImageDetailsFromJson(Map json) { return _ImageDetails.fromJson(json); @@ -31,22 +32,18 @@ mixin _$ImageDetails { /// Create a copy of ImageDetails /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ImageDetailsCopyWith get copyWith => - throw _privateConstructorUsedError; + $ImageDetailsCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ImageDetailsCopyWith<$Res> { - factory $ImageDetailsCopyWith( - ImageDetails value, $Res Function(ImageDetails) then) = - _$ImageDetailsCopyWithImpl<$Res, ImageDetails>; + factory $ImageDetailsCopyWith(ImageDetails value, $Res Function(ImageDetails) then) = _$ImageDetailsCopyWithImpl<$Res, ImageDetails>; @useResult $Res call({String link, int width, int height, String contentType}); } /// @nodoc -class _$ImageDetailsCopyWithImpl<$Res, $Val extends ImageDetails> - implements $ImageDetailsCopyWith<$Res> { +class _$ImageDetailsCopyWithImpl<$Res, $Val extends ImageDetails> implements $ImageDetailsCopyWith<$Res> { _$ImageDetailsCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,80 +55,76 @@ class _$ImageDetailsCopyWithImpl<$Res, $Val extends ImageDetails> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? link = null, - Object? width = null, - Object? height = null, - Object? contentType = null, - }) { - return _then(_value.copyWith( - link: null == link - ? _value.link - : link // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - contentType: null == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? link = null, Object? width = null, Object? height = null, Object? contentType = null}) { + return _then( + _value.copyWith( + link: + null == link + ? _value.link + : link // ignore: cast_nullable_to_non_nullable + as String, + width: + null == width + ? _value.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + contentType: + null == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ImageDetailsImplCopyWith<$Res> - implements $ImageDetailsCopyWith<$Res> { - factory _$$ImageDetailsImplCopyWith( - _$ImageDetailsImpl value, $Res Function(_$ImageDetailsImpl) then) = - __$$ImageDetailsImplCopyWithImpl<$Res>; +abstract class _$$ImageDetailsImplCopyWith<$Res> implements $ImageDetailsCopyWith<$Res> { + factory _$$ImageDetailsImplCopyWith(_$ImageDetailsImpl value, $Res Function(_$ImageDetailsImpl) then) = __$$ImageDetailsImplCopyWithImpl<$Res>; @override @useResult $Res call({String link, int width, int height, String contentType}); } /// @nodoc -class __$$ImageDetailsImplCopyWithImpl<$Res> - extends _$ImageDetailsCopyWithImpl<$Res, _$ImageDetailsImpl> - implements _$$ImageDetailsImplCopyWith<$Res> { - __$$ImageDetailsImplCopyWithImpl( - _$ImageDetailsImpl _value, $Res Function(_$ImageDetailsImpl) _then) - : super(_value, _then); +class __$$ImageDetailsImplCopyWithImpl<$Res> extends _$ImageDetailsCopyWithImpl<$Res, _$ImageDetailsImpl> implements _$$ImageDetailsImplCopyWith<$Res> { + __$$ImageDetailsImplCopyWithImpl(_$ImageDetailsImpl _value, $Res Function(_$ImageDetailsImpl) _then) : super(_value, _then); /// Create a copy of ImageDetails /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? link = null, - Object? width = null, - Object? height = null, - Object? contentType = null, - }) { - return _then(_$ImageDetailsImpl( - link: null == link - ? _value.link - : link // ignore: cast_nullable_to_non_nullable - as String, - width: null == width - ? _value.width - : width // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - contentType: null == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? link = null, Object? width = null, Object? height = null, Object? contentType = null}) { + return _then( + _$ImageDetailsImpl( + link: + null == link + ? _value.link + : link // ignore: cast_nullable_to_non_nullable + as String, + width: + null == width + ? _value.width + : width // ignore: cast_nullable_to_non_nullable + as int, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + contentType: + null == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -139,25 +132,19 @@ class __$$ImageDetailsImplCopyWithImpl<$Res> @modelSerde class _$ImageDetailsImpl extends _ImageDetails { - const _$ImageDetailsImpl( - {required this.link, - required this.width, - required this.height, - required this.contentType}) - : super._(); + const _$ImageDetailsImpl({required this.link, required this.width, required this.height, required this.contentType}) : super._(); - factory _$ImageDetailsImpl.fromJson(Map json) => - _$$ImageDetailsImplFromJson(json); + factory _$ImageDetailsImpl.fromJson(Map json) => _$$ImageDetailsImplFromJson(json); @override final String link; -// v0.19.6 (required) + // v0.19.6 (required) @override final int width; -// v0.19.6 (required) + // v0.19.6 (required) @override final int height; -// v0.19.6 (required) + // v0.19.6 (required) @override final String contentType; @@ -174,41 +161,31 @@ class _$ImageDetailsImpl extends _ImageDetails { (identical(other.link, link) || other.link == link) && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && - (identical(other.contentType, contentType) || - other.contentType == contentType)); + (identical(other.contentType, contentType) || other.contentType == contentType)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, link, width, height, contentType); + int get hashCode => Object.hash(runtimeType, link, width, height, contentType); /// Create a copy of ImageDetails /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ImageDetailsImplCopyWith<_$ImageDetailsImpl> get copyWith => - __$$ImageDetailsImplCopyWithImpl<_$ImageDetailsImpl>(this, _$identity); + _$$ImageDetailsImplCopyWith<_$ImageDetailsImpl> get copyWith => __$$ImageDetailsImplCopyWithImpl<_$ImageDetailsImpl>(this, _$identity); @override Map toJson() { - return _$$ImageDetailsImplToJson( - this, - ); + return _$$ImageDetailsImplToJson(this); } } abstract class _ImageDetails extends ImageDetails { - const factory _ImageDetails( - {required final String link, - required final int width, - required final int height, - required final String contentType}) = _$ImageDetailsImpl; + const factory _ImageDetails({required final String link, required final int width, required final int height, required final String contentType}) = _$ImageDetailsImpl; const _ImageDetails._() : super._(); - factory _ImageDetails.fromJson(Map json) = - _$ImageDetailsImpl.fromJson; + factory _ImageDetails.fromJson(Map json) = _$ImageDetailsImpl.fromJson; @override String get link; // v0.19.6 (required) @@ -223,6 +200,5 @@ abstract class _ImageDetails extends ImageDetails { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ImageDetailsImplCopyWith<_$ImageDetailsImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ImageDetailsImplCopyWith<_$ImageDetailsImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/image/image_details.g.dart b/lib/src/v3/models/image/image_details.g.dart index e77ba815..5673bda1 100644 --- a/lib/src/v3/models/image/image_details.g.dart +++ b/lib/src/v3/models/image/image_details.g.dart @@ -7,17 +7,11 @@ part of 'image_details.dart'; // ************************************************************************** _$ImageDetailsImpl _$$ImageDetailsImplFromJson(Map json) => - _$ImageDetailsImpl( - link: json['link'] as String, - width: (json['width'] as num).toInt(), - height: (json['height'] as num).toInt(), - contentType: json['content_type'] as String, - ); + _$ImageDetailsImpl(link: json['link'] as String, width: (json['width'] as num).toInt(), height: (json['height'] as num).toInt(), contentType: json['content_type'] as String); -Map _$$ImageDetailsImplToJson(_$ImageDetailsImpl instance) => - { - 'link': instance.link, - 'width': instance.width, - 'height': instance.height, - 'content_type': instance.contentType, - }; +Map _$$ImageDetailsImplToJson(_$ImageDetailsImpl instance) => { + 'link': instance.link, + 'width': instance.width, + 'height': instance.height, + 'content_type': instance.contentType, +}; diff --git a/lib/src/v3/models/image/local_image.dart b/lib/src/v3/models/image/local_image.dart index f5ac37e8..0700d973 100644 --- a/lib/src/v3/models/image/local_image.dart +++ b/lib/src/v3/models/image/local_image.dart @@ -16,6 +16,5 @@ class LocalImage with _$LocalImage { }) = _LocalImage; const LocalImage._(); - factory LocalImage.fromJson(Map json) => - _$LocalImageFromJson(json); + factory LocalImage.fromJson(Map json) => _$LocalImageFromJson(json); } diff --git a/lib/src/v3/models/image/local_image.freezed.dart b/lib/src/v3/models/image/local_image.freezed.dart index 34447c5b..56a28b79 100644 --- a/lib/src/v3/models/image/local_image.freezed.dart +++ b/lib/src/v3/models/image/local_image.freezed.dart @@ -12,7 +12,8 @@ part of 'local_image.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalImage _$LocalImageFromJson(Map json) { return _LocalImage.fromJson(json); @@ -20,8 +21,7 @@ LocalImage _$LocalImageFromJson(Map json) { /// @nodoc mixin _$LocalImage { - int? get localUserId => - throw _privateConstructorUsedError; // v0.19.0 (optional) + int? get localUserId => throw _privateConstructorUsedError; // v0.19.0 (optional) String get pictrsAlias => throw _privateConstructorUsedError; // v0.19.0 String get pictrsDeleteToken => throw _privateConstructorUsedError; // v0.19.0 String get published => throw _privateConstructorUsedError; @@ -32,26 +32,18 @@ mixin _$LocalImage { /// Create a copy of LocalImage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalImageCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalImageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalImageCopyWith<$Res> { - factory $LocalImageCopyWith( - LocalImage value, $Res Function(LocalImage) then) = - _$LocalImageCopyWithImpl<$Res, LocalImage>; + factory $LocalImageCopyWith(LocalImage value, $Res Function(LocalImage) then) = _$LocalImageCopyWithImpl<$Res, LocalImage>; @useResult - $Res call( - {int? localUserId, - String pictrsAlias, - String pictrsDeleteToken, - String published}); + $Res call({int? localUserId, String pictrsAlias, String pictrsDeleteToken, String published}); } /// @nodoc -class _$LocalImageCopyWithImpl<$Res, $Val extends LocalImage> - implements $LocalImageCopyWith<$Res> { +class _$LocalImageCopyWithImpl<$Res, $Val extends LocalImage> implements $LocalImageCopyWith<$Res> { _$LocalImageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,84 +55,76 @@ class _$LocalImageCopyWithImpl<$Res, $Val extends LocalImage> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUserId = freezed, - Object? pictrsAlias = null, - Object? pictrsDeleteToken = null, - Object? published = null, - }) { - return _then(_value.copyWith( - localUserId: freezed == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int?, - pictrsAlias: null == pictrsAlias - ? _value.pictrsAlias - : pictrsAlias // ignore: cast_nullable_to_non_nullable - as String, - pictrsDeleteToken: null == pictrsDeleteToken - ? _value.pictrsDeleteToken - : pictrsDeleteToken // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? localUserId = freezed, Object? pictrsAlias = null, Object? pictrsDeleteToken = null, Object? published = null}) { + return _then( + _value.copyWith( + localUserId: + freezed == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int?, + pictrsAlias: + null == pictrsAlias + ? _value.pictrsAlias + : pictrsAlias // ignore: cast_nullable_to_non_nullable + as String, + pictrsDeleteToken: + null == pictrsDeleteToken + ? _value.pictrsDeleteToken + : pictrsDeleteToken // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalImageImplCopyWith<$Res> - implements $LocalImageCopyWith<$Res> { - factory _$$LocalImageImplCopyWith( - _$LocalImageImpl value, $Res Function(_$LocalImageImpl) then) = - __$$LocalImageImplCopyWithImpl<$Res>; +abstract class _$$LocalImageImplCopyWith<$Res> implements $LocalImageCopyWith<$Res> { + factory _$$LocalImageImplCopyWith(_$LocalImageImpl value, $Res Function(_$LocalImageImpl) then) = __$$LocalImageImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? localUserId, - String pictrsAlias, - String pictrsDeleteToken, - String published}); + $Res call({int? localUserId, String pictrsAlias, String pictrsDeleteToken, String published}); } /// @nodoc -class __$$LocalImageImplCopyWithImpl<$Res> - extends _$LocalImageCopyWithImpl<$Res, _$LocalImageImpl> - implements _$$LocalImageImplCopyWith<$Res> { - __$$LocalImageImplCopyWithImpl( - _$LocalImageImpl _value, $Res Function(_$LocalImageImpl) _then) - : super(_value, _then); +class __$$LocalImageImplCopyWithImpl<$Res> extends _$LocalImageCopyWithImpl<$Res, _$LocalImageImpl> implements _$$LocalImageImplCopyWith<$Res> { + __$$LocalImageImplCopyWithImpl(_$LocalImageImpl _value, $Res Function(_$LocalImageImpl) _then) : super(_value, _then); /// Create a copy of LocalImage /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUserId = freezed, - Object? pictrsAlias = null, - Object? pictrsDeleteToken = null, - Object? published = null, - }) { - return _then(_$LocalImageImpl( - localUserId: freezed == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int?, - pictrsAlias: null == pictrsAlias - ? _value.pictrsAlias - : pictrsAlias // ignore: cast_nullable_to_non_nullable - as String, - pictrsDeleteToken: null == pictrsDeleteToken - ? _value.pictrsDeleteToken - : pictrsDeleteToken // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? localUserId = freezed, Object? pictrsAlias = null, Object? pictrsDeleteToken = null, Object? published = null}) { + return _then( + _$LocalImageImpl( + localUserId: + freezed == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int?, + pictrsAlias: + null == pictrsAlias + ? _value.pictrsAlias + : pictrsAlias // ignore: cast_nullable_to_non_nullable + as String, + pictrsDeleteToken: + null == pictrsDeleteToken + ? _value.pictrsDeleteToken + : pictrsDeleteToken // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -148,25 +132,19 @@ class __$$LocalImageImplCopyWithImpl<$Res> @modelSerde class _$LocalImageImpl extends _LocalImage { - const _$LocalImageImpl( - {this.localUserId, - required this.pictrsAlias, - required this.pictrsDeleteToken, - required this.published}) - : super._(); + const _$LocalImageImpl({this.localUserId, required this.pictrsAlias, required this.pictrsDeleteToken, required this.published}) : super._(); - factory _$LocalImageImpl.fromJson(Map json) => - _$$LocalImageImplFromJson(json); + factory _$LocalImageImpl.fromJson(Map json) => _$$LocalImageImplFromJson(json); @override final int? localUserId; -// v0.19.0 (optional) + // v0.19.0 (optional) @override final String pictrsAlias; -// v0.19.0 + // v0.19.0 @override final String pictrsDeleteToken; -// v0.19.0 + // v0.19.0 @override final String published; @@ -180,47 +158,34 @@ class _$LocalImageImpl extends _LocalImage { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LocalImageImpl && - (identical(other.localUserId, localUserId) || - other.localUserId == localUserId) && - (identical(other.pictrsAlias, pictrsAlias) || - other.pictrsAlias == pictrsAlias) && - (identical(other.pictrsDeleteToken, pictrsDeleteToken) || - other.pictrsDeleteToken == pictrsDeleteToken) && - (identical(other.published, published) || - other.published == published)); + (identical(other.localUserId, localUserId) || other.localUserId == localUserId) && + (identical(other.pictrsAlias, pictrsAlias) || other.pictrsAlias == pictrsAlias) && + (identical(other.pictrsDeleteToken, pictrsDeleteToken) || other.pictrsDeleteToken == pictrsDeleteToken) && + (identical(other.published, published) || other.published == published)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, localUserId, pictrsAlias, pictrsDeleteToken, published); + int get hashCode => Object.hash(runtimeType, localUserId, pictrsAlias, pictrsDeleteToken, published); /// Create a copy of LocalImage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalImageImplCopyWith<_$LocalImageImpl> get copyWith => - __$$LocalImageImplCopyWithImpl<_$LocalImageImpl>(this, _$identity); + _$$LocalImageImplCopyWith<_$LocalImageImpl> get copyWith => __$$LocalImageImplCopyWithImpl<_$LocalImageImpl>(this, _$identity); @override Map toJson() { - return _$$LocalImageImplToJson( - this, - ); + return _$$LocalImageImplToJson(this); } } abstract class _LocalImage extends LocalImage { - const factory _LocalImage( - {final int? localUserId, - required final String pictrsAlias, - required final String pictrsDeleteToken, - required final String published}) = _$LocalImageImpl; + const factory _LocalImage({final int? localUserId, required final String pictrsAlias, required final String pictrsDeleteToken, required final String published}) = _$LocalImageImpl; const _LocalImage._() : super._(); - factory _LocalImage.fromJson(Map json) = - _$LocalImageImpl.fromJson; + factory _LocalImage.fromJson(Map json) = _$LocalImageImpl.fromJson; @override int? get localUserId; // v0.19.0 (optional) @@ -235,6 +200,5 @@ abstract class _LocalImage extends LocalImage { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalImageImplCopyWith<_$LocalImageImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalImageImplCopyWith<_$LocalImageImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/image/local_image.g.dart b/lib/src/v3/models/image/local_image.g.dart index 1a2ce1e4..f4405432 100644 --- a/lib/src/v3/models/image/local_image.g.dart +++ b/lib/src/v3/models/image/local_image.g.dart @@ -6,18 +6,16 @@ part of 'local_image.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalImageImpl _$$LocalImageImplFromJson(Map json) => - _$LocalImageImpl( - localUserId: (json['local_user_id'] as num?)?.toInt(), - pictrsAlias: json['pictrs_alias'] as String, - pictrsDeleteToken: json['pictrs_delete_token'] as String, - published: json['published'] as String, - ); +_$LocalImageImpl _$$LocalImageImplFromJson(Map json) => _$LocalImageImpl( + localUserId: (json['local_user_id'] as num?)?.toInt(), + pictrsAlias: json['pictrs_alias'] as String, + pictrsDeleteToken: json['pictrs_delete_token'] as String, + published: json['published'] as String, +); -Map _$$LocalImageImplToJson(_$LocalImageImpl instance) => - { - 'local_user_id': instance.localUserId, - 'pictrs_alias': instance.pictrsAlias, - 'pictrs_delete_token': instance.pictrsDeleteToken, - 'published': instance.published, - }; +Map _$$LocalImageImplToJson(_$LocalImageImpl instance) => { + 'local_user_id': instance.localUserId, + 'pictrs_alias': instance.pictrsAlias, + 'pictrs_delete_token': instance.pictrsDeleteToken, + 'published': instance.published, +}; diff --git a/lib/src/v3/models/image/local_image_view.dart b/lib/src/v3/models/image/local_image_view.dart index f839055c..752f12b3 100644 --- a/lib/src/v3/models/image/local_image_view.dart +++ b/lib/src/v3/models/image/local_image_view.dart @@ -15,6 +15,5 @@ class LocalImageView with _$LocalImageView { }) = _LocalImageView; const LocalImageView._(); - factory LocalImageView.fromJson(Map json) => - _$LocalImageViewFromJson(json); + factory LocalImageView.fromJson(Map json) => _$LocalImageViewFromJson(json); } diff --git a/lib/src/v3/models/image/local_image_view.freezed.dart b/lib/src/v3/models/image/local_image_view.freezed.dart index 34c96e9d..9bffbfae 100644 --- a/lib/src/v3/models/image/local_image_view.freezed.dart +++ b/lib/src/v3/models/image/local_image_view.freezed.dart @@ -12,7 +12,8 @@ part of 'local_image_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalImageView _$LocalImageViewFromJson(Map json) { return _LocalImageView.fromJson(json); @@ -29,15 +30,12 @@ mixin _$LocalImageView { /// Create a copy of LocalImageView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalImageViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalImageViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalImageViewCopyWith<$Res> { - factory $LocalImageViewCopyWith( - LocalImageView value, $Res Function(LocalImageView) then) = - _$LocalImageViewCopyWithImpl<$Res, LocalImageView>; + factory $LocalImageViewCopyWith(LocalImageView value, $Res Function(LocalImageView) then) = _$LocalImageViewCopyWithImpl<$Res, LocalImageView>; @useResult $Res call({Person person, LocalImage localImage}); @@ -46,8 +44,7 @@ abstract class $LocalImageViewCopyWith<$Res> { } /// @nodoc -class _$LocalImageViewCopyWithImpl<$Res, $Val extends LocalImageView> - implements $LocalImageViewCopyWith<$Res> { +class _$LocalImageViewCopyWithImpl<$Res, $Val extends LocalImageView> implements $LocalImageViewCopyWith<$Res> { _$LocalImageViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,20 +56,22 @@ class _$LocalImageViewCopyWithImpl<$Res, $Val extends LocalImageView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? localImage = null, - }) { - return _then(_value.copyWith( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - localImage: null == localImage - ? _value.localImage - : localImage // ignore: cast_nullable_to_non_nullable - as LocalImage, - ) as $Val); + $Res call({Object? person = null, Object? localImage = null}) { + return _then( + _value.copyWith( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + localImage: + null == localImage + ? _value.localImage + : localImage // ignore: cast_nullable_to_non_nullable + as LocalImage, + ) + as $Val, + ); } /// Create a copy of LocalImageView @@ -97,11 +96,8 @@ class _$LocalImageViewCopyWithImpl<$Res, $Val extends LocalImageView> } /// @nodoc -abstract class _$$LocalImageViewImplCopyWith<$Res> - implements $LocalImageViewCopyWith<$Res> { - factory _$$LocalImageViewImplCopyWith(_$LocalImageViewImpl value, - $Res Function(_$LocalImageViewImpl) then) = - __$$LocalImageViewImplCopyWithImpl<$Res>; +abstract class _$$LocalImageViewImplCopyWith<$Res> implements $LocalImageViewCopyWith<$Res> { + factory _$$LocalImageViewImplCopyWith(_$LocalImageViewImpl value, $Res Function(_$LocalImageViewImpl) then) = __$$LocalImageViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person person, LocalImage localImage}); @@ -113,31 +109,28 @@ abstract class _$$LocalImageViewImplCopyWith<$Res> } /// @nodoc -class __$$LocalImageViewImplCopyWithImpl<$Res> - extends _$LocalImageViewCopyWithImpl<$Res, _$LocalImageViewImpl> - implements _$$LocalImageViewImplCopyWith<$Res> { - __$$LocalImageViewImplCopyWithImpl( - _$LocalImageViewImpl _value, $Res Function(_$LocalImageViewImpl) _then) - : super(_value, _then); +class __$$LocalImageViewImplCopyWithImpl<$Res> extends _$LocalImageViewCopyWithImpl<$Res, _$LocalImageViewImpl> implements _$$LocalImageViewImplCopyWith<$Res> { + __$$LocalImageViewImplCopyWithImpl(_$LocalImageViewImpl _value, $Res Function(_$LocalImageViewImpl) _then) : super(_value, _then); /// Create a copy of LocalImageView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? localImage = null, - }) { - return _then(_$LocalImageViewImpl( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - localImage: null == localImage - ? _value.localImage - : localImage // ignore: cast_nullable_to_non_nullable - as LocalImage, - )); + $Res call({Object? person = null, Object? localImage = null}) { + return _then( + _$LocalImageViewImpl( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + localImage: + null == localImage + ? _value.localImage + : localImage // ignore: cast_nullable_to_non_nullable + as LocalImage, + ), + ); } } @@ -145,15 +138,13 @@ class __$$LocalImageViewImplCopyWithImpl<$Res> @modelSerde class _$LocalImageViewImpl extends _LocalImageView { - const _$LocalImageViewImpl({required this.person, required this.localImage}) - : super._(); + const _$LocalImageViewImpl({required this.person, required this.localImage}) : super._(); - factory _$LocalImageViewImpl.fromJson(Map json) => - _$$LocalImageViewImplFromJson(json); + factory _$LocalImageViewImpl.fromJson(Map json) => _$$LocalImageViewImplFromJson(json); @override final Person person; -// v0.19.4 + // v0.19.4 @override final LocalImage localImage; @@ -168,8 +159,7 @@ class _$LocalImageViewImpl extends _LocalImageView { (other.runtimeType == runtimeType && other is _$LocalImageViewImpl && (identical(other.person, person) || other.person == person) && - (identical(other.localImage, localImage) || - other.localImage == localImage)); + (identical(other.localImage, localImage) || other.localImage == localImage)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -181,26 +171,19 @@ class _$LocalImageViewImpl extends _LocalImageView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalImageViewImplCopyWith<_$LocalImageViewImpl> get copyWith => - __$$LocalImageViewImplCopyWithImpl<_$LocalImageViewImpl>( - this, _$identity); + _$$LocalImageViewImplCopyWith<_$LocalImageViewImpl> get copyWith => __$$LocalImageViewImplCopyWithImpl<_$LocalImageViewImpl>(this, _$identity); @override Map toJson() { - return _$$LocalImageViewImplToJson( - this, - ); + return _$$LocalImageViewImplToJson(this); } } abstract class _LocalImageView extends LocalImageView { - const factory _LocalImageView( - {required final Person person, - required final LocalImage localImage}) = _$LocalImageViewImpl; + const factory _LocalImageView({required final Person person, required final LocalImage localImage}) = _$LocalImageViewImpl; const _LocalImageView._() : super._(); - factory _LocalImageView.fromJson(Map json) = - _$LocalImageViewImpl.fromJson; + factory _LocalImageView.fromJson(Map json) = _$LocalImageViewImpl.fromJson; @override Person get person; // v0.19.4 @@ -211,6 +194,5 @@ abstract class _LocalImageView extends LocalImageView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalImageViewImplCopyWith<_$LocalImageViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalImageViewImplCopyWith<_$LocalImageViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/image/local_image_view.g.dart b/lib/src/v3/models/image/local_image_view.g.dart index 6d6c4c50..0702f979 100644 --- a/lib/src/v3/models/image/local_image_view.g.dart +++ b/lib/src/v3/models/image/local_image_view.g.dart @@ -7,15 +7,6 @@ part of 'local_image_view.dart'; // ************************************************************************** _$LocalImageViewImpl _$$LocalImageViewImplFromJson(Map json) => - _$LocalImageViewImpl( - person: Person.fromJson(json['person'] as Map), - localImage: - LocalImage.fromJson(json['local_image'] as Map), - ); + _$LocalImageViewImpl(person: Person.fromJson(json['person'] as Map), localImage: LocalImage.fromJson(json['local_image'] as Map)); -Map _$$LocalImageViewImplToJson( - _$LocalImageViewImpl instance) => - { - 'person': instance.person.toJson(), - 'local_image': instance.localImage.toJson(), - }; +Map _$$LocalImageViewImplToJson(_$LocalImageViewImpl instance) => {'person': instance.person.toJson(), 'local_image': instance.localImage.toJson()}; diff --git a/lib/src/v3/models/language/language.dart b/lib/src/v3/models/language/language.dart index 634b77fe..ecedd81a 100644 --- a/lib/src/v3/models/language/language.dart +++ b/lib/src/v3/models/language/language.dart @@ -15,6 +15,5 @@ class Language with _$Language { }) = _Language; const Language._(); - factory Language.fromJson(Map json) => - _$LanguageFromJson(json); + factory Language.fromJson(Map json) => _$LanguageFromJson(json); } diff --git a/lib/src/v3/models/language/language.freezed.dart b/lib/src/v3/models/language/language.freezed.dart index e56a1f33..7a3d9d5f 100644 --- a/lib/src/v3/models/language/language.freezed.dart +++ b/lib/src/v3/models/language/language.freezed.dart @@ -12,7 +12,8 @@ part of 'language.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Language _$LanguageFromJson(Map json) { return _Language.fromJson(json); @@ -30,21 +31,18 @@ mixin _$Language { /// Create a copy of Language /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LanguageCopyWith get copyWith => - throw _privateConstructorUsedError; + $LanguageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LanguageCopyWith<$Res> { - factory $LanguageCopyWith(Language value, $Res Function(Language) then) = - _$LanguageCopyWithImpl<$Res, Language>; + factory $LanguageCopyWith(Language value, $Res Function(Language) then) = _$LanguageCopyWithImpl<$Res, Language>; @useResult $Res call({int id, String code, String name}); } /// @nodoc -class _$LanguageCopyWithImpl<$Res, $Val extends Language> - implements $LanguageCopyWith<$Res> { +class _$LanguageCopyWithImpl<$Res, $Val extends Language> implements $LanguageCopyWith<$Res> { _$LanguageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -56,70 +54,66 @@ class _$LanguageCopyWithImpl<$Res, $Val extends Language> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? code = null, - Object? name = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - code: null == code - ? _value.code - : code // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? code = null, Object? name = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + code: + null == code + ? _value.code + : code // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LanguageImplCopyWith<$Res> - implements $LanguageCopyWith<$Res> { - factory _$$LanguageImplCopyWith( - _$LanguageImpl value, $Res Function(_$LanguageImpl) then) = - __$$LanguageImplCopyWithImpl<$Res>; +abstract class _$$LanguageImplCopyWith<$Res> implements $LanguageCopyWith<$Res> { + factory _$$LanguageImplCopyWith(_$LanguageImpl value, $Res Function(_$LanguageImpl) then) = __$$LanguageImplCopyWithImpl<$Res>; @override @useResult $Res call({int id, String code, String name}); } /// @nodoc -class __$$LanguageImplCopyWithImpl<$Res> - extends _$LanguageCopyWithImpl<$Res, _$LanguageImpl> - implements _$$LanguageImplCopyWith<$Res> { - __$$LanguageImplCopyWithImpl( - _$LanguageImpl _value, $Res Function(_$LanguageImpl) _then) - : super(_value, _then); +class __$$LanguageImplCopyWithImpl<$Res> extends _$LanguageCopyWithImpl<$Res, _$LanguageImpl> implements _$$LanguageImplCopyWith<$Res> { + __$$LanguageImplCopyWithImpl(_$LanguageImpl _value, $Res Function(_$LanguageImpl) _then) : super(_value, _then); /// Create a copy of Language /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? code = null, - Object? name = null, - }) { - return _then(_$LanguageImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - code: null == code - ? _value.code - : code // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? code = null, Object? name = null}) { + return _then( + _$LanguageImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + code: + null == code + ? _value.code + : code // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -127,19 +121,16 @@ class __$$LanguageImplCopyWithImpl<$Res> @modelSerde class _$LanguageImpl extends _Language { - const _$LanguageImpl( - {required this.id, required this.code, required this.name}) - : super._(); + const _$LanguageImpl({required this.id, required this.code, required this.name}) : super._(); - factory _$LanguageImpl.fromJson(Map json) => - _$$LanguageImplFromJson(json); + factory _$LanguageImpl.fromJson(Map json) => _$$LanguageImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String code; -// v0.18.0 + // v0.18.0 @override final String name; @@ -167,26 +158,19 @@ class _$LanguageImpl extends _Language { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LanguageImplCopyWith<_$LanguageImpl> get copyWith => - __$$LanguageImplCopyWithImpl<_$LanguageImpl>(this, _$identity); + _$$LanguageImplCopyWith<_$LanguageImpl> get copyWith => __$$LanguageImplCopyWithImpl<_$LanguageImpl>(this, _$identity); @override Map toJson() { - return _$$LanguageImplToJson( - this, - ); + return _$$LanguageImplToJson(this); } } abstract class _Language extends Language { - const factory _Language( - {required final int id, - required final String code, - required final String name}) = _$LanguageImpl; + const factory _Language({required final int id, required final String code, required final String name}) = _$LanguageImpl; const _Language._() : super._(); - factory _Language.fromJson(Map json) = - _$LanguageImpl.fromJson; + factory _Language.fromJson(Map json) = _$LanguageImpl.fromJson; @override int get id; // v0.18.0 @@ -199,6 +183,5 @@ abstract class _Language extends Language { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LanguageImplCopyWith<_$LanguageImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LanguageImplCopyWith<_$LanguageImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/language/language.g.dart b/lib/src/v3/models/language/language.g.dart index 61f39020..d7452394 100644 --- a/lib/src/v3/models/language/language.g.dart +++ b/lib/src/v3/models/language/language.g.dart @@ -6,16 +6,6 @@ part of 'language.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LanguageImpl _$$LanguageImplFromJson(Map json) => - _$LanguageImpl( - id: (json['id'] as num).toInt(), - code: json['code'] as String, - name: json['name'] as String, - ); +_$LanguageImpl _$$LanguageImplFromJson(Map json) => _$LanguageImpl(id: (json['id'] as num).toInt(), code: json['code'] as String, name: json['name'] as String); -Map _$$LanguageImplToJson(_$LanguageImpl instance) => - { - 'id': instance.id, - 'code': instance.code, - 'name': instance.name, - }; +Map _$$LanguageImplToJson(_$LanguageImpl instance) => {'id': instance.id, 'code': instance.code, 'name': instance.name}; diff --git a/lib/src/v3/models/local_user/local_user.dart b/lib/src/v3/models/local_user/local_user.dart index 6bd420b1..ba6f7460 100644 --- a/lib/src/v3/models/local_user/local_user.dart +++ b/lib/src/v3/models/local_user/local_user.dart @@ -41,6 +41,5 @@ class LocalUser with _$LocalUser { }) = _LocalUser; const LocalUser._(); - factory LocalUser.fromJson(Map json) => - _$LocalUserFromJson(json); + factory LocalUser.fromJson(Map json) => _$LocalUserFromJson(json); } diff --git a/lib/src/v3/models/local_user/local_user.freezed.dart b/lib/src/v3/models/local_user/local_user.freezed.dart index b0885438..eeb1f734 100644 --- a/lib/src/v3/models/local_user/local_user.freezed.dart +++ b/lib/src/v3/models/local_user/local_user.freezed.dart @@ -12,7 +12,8 @@ part of 'local_user.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalUser _$LocalUserFromJson(Map json) { return _LocalUser.fromJson(json); @@ -28,38 +29,28 @@ mixin _$LocalUser { bool? get autoExpand => throw _privateConstructorUsedError; // v0.18.3 String get theme => throw _privateConstructorUsedError; // v0.18.0 SortType get defaultSortType => throw _privateConstructorUsedError; // v0.18.0 - ListingType get defaultListingType => - throw _privateConstructorUsedError; // v0.18.0 + ListingType get defaultListingType => throw _privateConstructorUsedError; // v0.18.0 String get interfaceLanguage => throw _privateConstructorUsedError; // v0.18.0 bool get showAvatars => throw _privateConstructorUsedError; // v0.18.0 - bool get sendNotificationsToEmail => - throw _privateConstructorUsedError; // v0.18.0 + bool get sendNotificationsToEmail => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get validatorTime => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get validatorTime => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] bool get showScores => throw _privateConstructorUsedError; // v0.18.0 bool get showBotAccounts => throw _privateConstructorUsedError; // v0.18.0 bool get showReadPosts => throw _privateConstructorUsedError; // v0.18.0 @deprecated - bool? get showNewPostNotifs => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + bool? get showNewPostNotifs => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] bool get emailVerified => throw _privateConstructorUsedError; // v0.18.0 bool get acceptedApplication => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get totp2faUrl => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get totp2faUrl => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] bool? get openLinksInNewTab => throw _privateConstructorUsedError; // v0.18.1 - bool? get infiniteScrollEnabled => - throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get infiniteScrollEnabled => throw _privateConstructorUsedError; // v0.19.0 (required) bool? get admin => throw _privateConstructorUsedError; // v0.19.0 (required) - String? get postListingMode => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get totp2faEnabled => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get enableKeyboardNavigation => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get enableAnimatedImages => - throw _privateConstructorUsedError; // v0.19.0 (required) + String? get postListingMode => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get totp2faEnabled => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get enableKeyboardNavigation => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get enableAnimatedImages => throw _privateConstructorUsedError; // v0.19.0 (required) bool? get collapseBotComments => throw _privateConstructorUsedError; /// Serializes this LocalUser to a JSON map. @@ -68,49 +59,47 @@ mixin _$LocalUser { /// Create a copy of LocalUser /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalUserCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalUserCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalUserCopyWith<$Res> { - factory $LocalUserCopyWith(LocalUser value, $Res Function(LocalUser) then) = - _$LocalUserCopyWithImpl<$Res, LocalUser>; + factory $LocalUserCopyWith(LocalUser value, $Res Function(LocalUser) then) = _$LocalUserCopyWithImpl<$Res, LocalUser>; @useResult - $Res call( - {int id, - int personId, - String? email, - bool showNsfw, - bool? blurNsfw, - bool? autoExpand, - String theme, - SortType defaultSortType, - ListingType defaultListingType, - String interfaceLanguage, - bool showAvatars, - bool sendNotificationsToEmail, - @deprecated String? validatorTime, - bool showScores, - bool showBotAccounts, - bool showReadPosts, - @deprecated bool? showNewPostNotifs, - bool emailVerified, - bool acceptedApplication, - @deprecated String? totp2faUrl, - bool? openLinksInNewTab, - bool? infiniteScrollEnabled, - bool? admin, - String? postListingMode, - bool? totp2faEnabled, - bool? enableKeyboardNavigation, - bool? enableAnimatedImages, - bool? collapseBotComments}); + $Res call({ + int id, + int personId, + String? email, + bool showNsfw, + bool? blurNsfw, + bool? autoExpand, + String theme, + SortType defaultSortType, + ListingType defaultListingType, + String interfaceLanguage, + bool showAvatars, + bool sendNotificationsToEmail, + @deprecated String? validatorTime, + bool showScores, + bool showBotAccounts, + bool showReadPosts, + @deprecated bool? showNewPostNotifs, + bool emailVerified, + bool acceptedApplication, + @deprecated String? totp2faUrl, + bool? openLinksInNewTab, + bool? infiniteScrollEnabled, + bool? admin, + String? postListingMode, + bool? totp2faEnabled, + bool? enableKeyboardNavigation, + bool? enableAnimatedImages, + bool? collapseBotComments, + }); } /// @nodoc -class _$LocalUserCopyWithImpl<$Res, $Val extends LocalUser> - implements $LocalUserCopyWith<$Res> { +class _$LocalUserCopyWithImpl<$Res, $Val extends LocalUser> implements $LocalUserCopyWith<$Res> { _$LocalUserCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -152,169 +141,194 @@ class _$LocalUserCopyWithImpl<$Res, $Val extends LocalUser> Object? enableAnimatedImages = freezed, Object? collapseBotComments = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - showNsfw: null == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool, - blurNsfw: freezed == blurNsfw - ? _value.blurNsfw - : blurNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoExpand: freezed == autoExpand - ? _value.autoExpand - : autoExpand // ignore: cast_nullable_to_non_nullable - as bool?, - theme: null == theme - ? _value.theme - : theme // ignore: cast_nullable_to_non_nullable - as String, - defaultSortType: null == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType, - defaultListingType: null == defaultListingType - ? _value.defaultListingType - : defaultListingType // ignore: cast_nullable_to_non_nullable - as ListingType, - interfaceLanguage: null == interfaceLanguage - ? _value.interfaceLanguage - : interfaceLanguage // ignore: cast_nullable_to_non_nullable - as String, - showAvatars: null == showAvatars - ? _value.showAvatars - : showAvatars // ignore: cast_nullable_to_non_nullable - as bool, - sendNotificationsToEmail: null == sendNotificationsToEmail - ? _value.sendNotificationsToEmail - : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable - as bool, - validatorTime: freezed == validatorTime - ? _value.validatorTime - : validatorTime // ignore: cast_nullable_to_non_nullable - as String?, - showScores: null == showScores - ? _value.showScores - : showScores // ignore: cast_nullable_to_non_nullable - as bool, - showBotAccounts: null == showBotAccounts - ? _value.showBotAccounts - : showBotAccounts // ignore: cast_nullable_to_non_nullable - as bool, - showReadPosts: null == showReadPosts - ? _value.showReadPosts - : showReadPosts // ignore: cast_nullable_to_non_nullable - as bool, - showNewPostNotifs: freezed == showNewPostNotifs - ? _value.showNewPostNotifs - : showNewPostNotifs // ignore: cast_nullable_to_non_nullable - as bool?, - emailVerified: null == emailVerified - ? _value.emailVerified - : emailVerified // ignore: cast_nullable_to_non_nullable - as bool, - acceptedApplication: null == acceptedApplication - ? _value.acceptedApplication - : acceptedApplication // ignore: cast_nullable_to_non_nullable - as bool, - totp2faUrl: freezed == totp2faUrl - ? _value.totp2faUrl - : totp2faUrl // ignore: cast_nullable_to_non_nullable - as String?, - openLinksInNewTab: freezed == openLinksInNewTab - ? _value.openLinksInNewTab - : openLinksInNewTab // ignore: cast_nullable_to_non_nullable - as bool?, - infiniteScrollEnabled: freezed == infiniteScrollEnabled - ? _value.infiniteScrollEnabled - : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as bool?, - postListingMode: freezed == postListingMode - ? _value.postListingMode - : postListingMode // ignore: cast_nullable_to_non_nullable - as String?, - totp2faEnabled: freezed == totp2faEnabled - ? _value.totp2faEnabled - : totp2faEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - enableKeyboardNavigation: freezed == enableKeyboardNavigation - ? _value.enableKeyboardNavigation - : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable - as bool?, - enableAnimatedImages: freezed == enableAnimatedImages - ? _value.enableAnimatedImages - : enableAnimatedImages // ignore: cast_nullable_to_non_nullable - as bool?, - collapseBotComments: freezed == collapseBotComments - ? _value.collapseBotComments - : collapseBotComments // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + showNsfw: + null == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool, + blurNsfw: + freezed == blurNsfw + ? _value.blurNsfw + : blurNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + autoExpand: + freezed == autoExpand + ? _value.autoExpand + : autoExpand // ignore: cast_nullable_to_non_nullable + as bool?, + theme: + null == theme + ? _value.theme + : theme // ignore: cast_nullable_to_non_nullable + as String, + defaultSortType: + null == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType, + defaultListingType: + null == defaultListingType + ? _value.defaultListingType + : defaultListingType // ignore: cast_nullable_to_non_nullable + as ListingType, + interfaceLanguage: + null == interfaceLanguage + ? _value.interfaceLanguage + : interfaceLanguage // ignore: cast_nullable_to_non_nullable + as String, + showAvatars: + null == showAvatars + ? _value.showAvatars + : showAvatars // ignore: cast_nullable_to_non_nullable + as bool, + sendNotificationsToEmail: + null == sendNotificationsToEmail + ? _value.sendNotificationsToEmail + : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable + as bool, + validatorTime: + freezed == validatorTime + ? _value.validatorTime + : validatorTime // ignore: cast_nullable_to_non_nullable + as String?, + showScores: + null == showScores + ? _value.showScores + : showScores // ignore: cast_nullable_to_non_nullable + as bool, + showBotAccounts: + null == showBotAccounts + ? _value.showBotAccounts + : showBotAccounts // ignore: cast_nullable_to_non_nullable + as bool, + showReadPosts: + null == showReadPosts + ? _value.showReadPosts + : showReadPosts // ignore: cast_nullable_to_non_nullable + as bool, + showNewPostNotifs: + freezed == showNewPostNotifs + ? _value.showNewPostNotifs + : showNewPostNotifs // ignore: cast_nullable_to_non_nullable + as bool?, + emailVerified: + null == emailVerified + ? _value.emailVerified + : emailVerified // ignore: cast_nullable_to_non_nullable + as bool, + acceptedApplication: + null == acceptedApplication + ? _value.acceptedApplication + : acceptedApplication // ignore: cast_nullable_to_non_nullable + as bool, + totp2faUrl: + freezed == totp2faUrl + ? _value.totp2faUrl + : totp2faUrl // ignore: cast_nullable_to_non_nullable + as String?, + openLinksInNewTab: + freezed == openLinksInNewTab + ? _value.openLinksInNewTab + : openLinksInNewTab // ignore: cast_nullable_to_non_nullable + as bool?, + infiniteScrollEnabled: + freezed == infiniteScrollEnabled + ? _value.infiniteScrollEnabled + : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as bool?, + postListingMode: + freezed == postListingMode + ? _value.postListingMode + : postListingMode // ignore: cast_nullable_to_non_nullable + as String?, + totp2faEnabled: + freezed == totp2faEnabled + ? _value.totp2faEnabled + : totp2faEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + enableKeyboardNavigation: + freezed == enableKeyboardNavigation + ? _value.enableKeyboardNavigation + : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable + as bool?, + enableAnimatedImages: + freezed == enableAnimatedImages + ? _value.enableAnimatedImages + : enableAnimatedImages // ignore: cast_nullable_to_non_nullable + as bool?, + collapseBotComments: + freezed == collapseBotComments + ? _value.collapseBotComments + : collapseBotComments // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalUserImplCopyWith<$Res> - implements $LocalUserCopyWith<$Res> { - factory _$$LocalUserImplCopyWith( - _$LocalUserImpl value, $Res Function(_$LocalUserImpl) then) = - __$$LocalUserImplCopyWithImpl<$Res>; +abstract class _$$LocalUserImplCopyWith<$Res> implements $LocalUserCopyWith<$Res> { + factory _$$LocalUserImplCopyWith(_$LocalUserImpl value, $Res Function(_$LocalUserImpl) then) = __$$LocalUserImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int personId, - String? email, - bool showNsfw, - bool? blurNsfw, - bool? autoExpand, - String theme, - SortType defaultSortType, - ListingType defaultListingType, - String interfaceLanguage, - bool showAvatars, - bool sendNotificationsToEmail, - @deprecated String? validatorTime, - bool showScores, - bool showBotAccounts, - bool showReadPosts, - @deprecated bool? showNewPostNotifs, - bool emailVerified, - bool acceptedApplication, - @deprecated String? totp2faUrl, - bool? openLinksInNewTab, - bool? infiniteScrollEnabled, - bool? admin, - String? postListingMode, - bool? totp2faEnabled, - bool? enableKeyboardNavigation, - bool? enableAnimatedImages, - bool? collapseBotComments}); + $Res call({ + int id, + int personId, + String? email, + bool showNsfw, + bool? blurNsfw, + bool? autoExpand, + String theme, + SortType defaultSortType, + ListingType defaultListingType, + String interfaceLanguage, + bool showAvatars, + bool sendNotificationsToEmail, + @deprecated String? validatorTime, + bool showScores, + bool showBotAccounts, + bool showReadPosts, + @deprecated bool? showNewPostNotifs, + bool emailVerified, + bool acceptedApplication, + @deprecated String? totp2faUrl, + bool? openLinksInNewTab, + bool? infiniteScrollEnabled, + bool? admin, + String? postListingMode, + bool? totp2faEnabled, + bool? enableKeyboardNavigation, + bool? enableAnimatedImages, + bool? collapseBotComments, + }); } /// @nodoc -class __$$LocalUserImplCopyWithImpl<$Res> - extends _$LocalUserCopyWithImpl<$Res, _$LocalUserImpl> - implements _$$LocalUserImplCopyWith<$Res> { - __$$LocalUserImplCopyWithImpl( - _$LocalUserImpl _value, $Res Function(_$LocalUserImpl) _then) - : super(_value, _then); +class __$$LocalUserImplCopyWithImpl<$Res> extends _$LocalUserCopyWithImpl<$Res, _$LocalUserImpl> implements _$$LocalUserImplCopyWith<$Res> { + __$$LocalUserImplCopyWithImpl(_$LocalUserImpl _value, $Res Function(_$LocalUserImpl) _then) : super(_value, _then); /// Create a copy of LocalUser /// with the given fields replaced by the non-null parameter values. @@ -350,120 +364,150 @@ class __$$LocalUserImplCopyWithImpl<$Res> Object? enableAnimatedImages = freezed, Object? collapseBotComments = freezed, }) { - return _then(_$LocalUserImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - email: freezed == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String?, - showNsfw: null == showNsfw - ? _value.showNsfw - : showNsfw // ignore: cast_nullable_to_non_nullable - as bool, - blurNsfw: freezed == blurNsfw - ? _value.blurNsfw - : blurNsfw // ignore: cast_nullable_to_non_nullable - as bool?, - autoExpand: freezed == autoExpand - ? _value.autoExpand - : autoExpand // ignore: cast_nullable_to_non_nullable - as bool?, - theme: null == theme - ? _value.theme - : theme // ignore: cast_nullable_to_non_nullable - as String, - defaultSortType: null == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType, - defaultListingType: null == defaultListingType - ? _value.defaultListingType - : defaultListingType // ignore: cast_nullable_to_non_nullable - as ListingType, - interfaceLanguage: null == interfaceLanguage - ? _value.interfaceLanguage - : interfaceLanguage // ignore: cast_nullable_to_non_nullable - as String, - showAvatars: null == showAvatars - ? _value.showAvatars - : showAvatars // ignore: cast_nullable_to_non_nullable - as bool, - sendNotificationsToEmail: null == sendNotificationsToEmail - ? _value.sendNotificationsToEmail - : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable - as bool, - validatorTime: freezed == validatorTime - ? _value.validatorTime - : validatorTime // ignore: cast_nullable_to_non_nullable - as String?, - showScores: null == showScores - ? _value.showScores - : showScores // ignore: cast_nullable_to_non_nullable - as bool, - showBotAccounts: null == showBotAccounts - ? _value.showBotAccounts - : showBotAccounts // ignore: cast_nullable_to_non_nullable - as bool, - showReadPosts: null == showReadPosts - ? _value.showReadPosts - : showReadPosts // ignore: cast_nullable_to_non_nullable - as bool, - showNewPostNotifs: freezed == showNewPostNotifs - ? _value.showNewPostNotifs - : showNewPostNotifs // ignore: cast_nullable_to_non_nullable - as bool?, - emailVerified: null == emailVerified - ? _value.emailVerified - : emailVerified // ignore: cast_nullable_to_non_nullable - as bool, - acceptedApplication: null == acceptedApplication - ? _value.acceptedApplication - : acceptedApplication // ignore: cast_nullable_to_non_nullable - as bool, - totp2faUrl: freezed == totp2faUrl - ? _value.totp2faUrl - : totp2faUrl // ignore: cast_nullable_to_non_nullable - as String?, - openLinksInNewTab: freezed == openLinksInNewTab - ? _value.openLinksInNewTab - : openLinksInNewTab // ignore: cast_nullable_to_non_nullable - as bool?, - infiniteScrollEnabled: freezed == infiniteScrollEnabled - ? _value.infiniteScrollEnabled - : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as bool?, - postListingMode: freezed == postListingMode - ? _value.postListingMode - : postListingMode // ignore: cast_nullable_to_non_nullable - as String?, - totp2faEnabled: freezed == totp2faEnabled - ? _value.totp2faEnabled - : totp2faEnabled // ignore: cast_nullable_to_non_nullable - as bool?, - enableKeyboardNavigation: freezed == enableKeyboardNavigation - ? _value.enableKeyboardNavigation - : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable - as bool?, - enableAnimatedImages: freezed == enableAnimatedImages - ? _value.enableAnimatedImages - : enableAnimatedImages // ignore: cast_nullable_to_non_nullable - as bool?, - collapseBotComments: freezed == collapseBotComments - ? _value.collapseBotComments - : collapseBotComments // ignore: cast_nullable_to_non_nullable - as bool?, - )); + return _then( + _$LocalUserImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + email: + freezed == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String?, + showNsfw: + null == showNsfw + ? _value.showNsfw + : showNsfw // ignore: cast_nullable_to_non_nullable + as bool, + blurNsfw: + freezed == blurNsfw + ? _value.blurNsfw + : blurNsfw // ignore: cast_nullable_to_non_nullable + as bool?, + autoExpand: + freezed == autoExpand + ? _value.autoExpand + : autoExpand // ignore: cast_nullable_to_non_nullable + as bool?, + theme: + null == theme + ? _value.theme + : theme // ignore: cast_nullable_to_non_nullable + as String, + defaultSortType: + null == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType, + defaultListingType: + null == defaultListingType + ? _value.defaultListingType + : defaultListingType // ignore: cast_nullable_to_non_nullable + as ListingType, + interfaceLanguage: + null == interfaceLanguage + ? _value.interfaceLanguage + : interfaceLanguage // ignore: cast_nullable_to_non_nullable + as String, + showAvatars: + null == showAvatars + ? _value.showAvatars + : showAvatars // ignore: cast_nullable_to_non_nullable + as bool, + sendNotificationsToEmail: + null == sendNotificationsToEmail + ? _value.sendNotificationsToEmail + : sendNotificationsToEmail // ignore: cast_nullable_to_non_nullable + as bool, + validatorTime: + freezed == validatorTime + ? _value.validatorTime + : validatorTime // ignore: cast_nullable_to_non_nullable + as String?, + showScores: + null == showScores + ? _value.showScores + : showScores // ignore: cast_nullable_to_non_nullable + as bool, + showBotAccounts: + null == showBotAccounts + ? _value.showBotAccounts + : showBotAccounts // ignore: cast_nullable_to_non_nullable + as bool, + showReadPosts: + null == showReadPosts + ? _value.showReadPosts + : showReadPosts // ignore: cast_nullable_to_non_nullable + as bool, + showNewPostNotifs: + freezed == showNewPostNotifs + ? _value.showNewPostNotifs + : showNewPostNotifs // ignore: cast_nullable_to_non_nullable + as bool?, + emailVerified: + null == emailVerified + ? _value.emailVerified + : emailVerified // ignore: cast_nullable_to_non_nullable + as bool, + acceptedApplication: + null == acceptedApplication + ? _value.acceptedApplication + : acceptedApplication // ignore: cast_nullable_to_non_nullable + as bool, + totp2faUrl: + freezed == totp2faUrl + ? _value.totp2faUrl + : totp2faUrl // ignore: cast_nullable_to_non_nullable + as String?, + openLinksInNewTab: + freezed == openLinksInNewTab + ? _value.openLinksInNewTab + : openLinksInNewTab // ignore: cast_nullable_to_non_nullable + as bool?, + infiniteScrollEnabled: + freezed == infiniteScrollEnabled + ? _value.infiniteScrollEnabled + : infiniteScrollEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as bool?, + postListingMode: + freezed == postListingMode + ? _value.postListingMode + : postListingMode // ignore: cast_nullable_to_non_nullable + as String?, + totp2faEnabled: + freezed == totp2faEnabled + ? _value.totp2faEnabled + : totp2faEnabled // ignore: cast_nullable_to_non_nullable + as bool?, + enableKeyboardNavigation: + freezed == enableKeyboardNavigation + ? _value.enableKeyboardNavigation + : enableKeyboardNavigation // ignore: cast_nullable_to_non_nullable + as bool?, + enableAnimatedImages: + freezed == enableAnimatedImages + ? _value.enableAnimatedImages + : enableAnimatedImages // ignore: cast_nullable_to_non_nullable + as bool?, + collapseBotComments: + freezed == collapseBotComments + ? _value.collapseBotComments + : collapseBotComments // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -471,124 +515,123 @@ class __$$LocalUserImplCopyWithImpl<$Res> @modelSerde class _$LocalUserImpl extends _LocalUser { - const _$LocalUserImpl( - {required this.id, - required this.personId, - this.email, - required this.showNsfw, - this.blurNsfw, - this.autoExpand, - required this.theme, - required this.defaultSortType, - required this.defaultListingType, - required this.interfaceLanguage, - required this.showAvatars, - required this.sendNotificationsToEmail, - @deprecated this.validatorTime, - required this.showScores, - required this.showBotAccounts, - required this.showReadPosts, - @deprecated this.showNewPostNotifs, - required this.emailVerified, - required this.acceptedApplication, - @deprecated this.totp2faUrl, - this.openLinksInNewTab, - this.infiniteScrollEnabled, - this.admin, - this.postListingMode, - this.totp2faEnabled, - this.enableKeyboardNavigation, - this.enableAnimatedImages, - this.collapseBotComments}) - : super._(); + const _$LocalUserImpl({ + required this.id, + required this.personId, + this.email, + required this.showNsfw, + this.blurNsfw, + this.autoExpand, + required this.theme, + required this.defaultSortType, + required this.defaultListingType, + required this.interfaceLanguage, + required this.showAvatars, + required this.sendNotificationsToEmail, + @deprecated this.validatorTime, + required this.showScores, + required this.showBotAccounts, + required this.showReadPosts, + @deprecated this.showNewPostNotifs, + required this.emailVerified, + required this.acceptedApplication, + @deprecated this.totp2faUrl, + this.openLinksInNewTab, + this.infiniteScrollEnabled, + this.admin, + this.postListingMode, + this.totp2faEnabled, + this.enableKeyboardNavigation, + this.enableAnimatedImages, + this.collapseBotComments, + }) : super._(); - factory _$LocalUserImpl.fromJson(Map json) => - _$$LocalUserImplFromJson(json); + factory _$LocalUserImpl.fromJson(Map json) => _$$LocalUserImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int personId; -// v0.18.0 + // v0.18.0 @override final String? email; -// v0.18.0 + // v0.18.0 @override final bool showNsfw; -// v0.18.0 + // v0.18.0 @override final bool? blurNsfw; -// v0.18.3 + // v0.18.3 @override final bool? autoExpand; -// v0.18.3 + // v0.18.3 @override final String theme; -// v0.18.0 + // v0.18.0 @override final SortType defaultSortType; -// v0.18.0 + // v0.18.0 @override final ListingType defaultListingType; -// v0.18.0 + // v0.18.0 @override final String interfaceLanguage; -// v0.18.0 + // v0.18.0 @override final bool showAvatars; -// v0.18.0 + // v0.18.0 @override final bool sendNotificationsToEmail; -// v0.18.0 + // v0.18.0 @override @deprecated final String? validatorTime; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final bool showScores; -// v0.18.0 + // v0.18.0 @override final bool showBotAccounts; -// v0.18.0 + // v0.18.0 @override final bool showReadPosts; -// v0.18.0 + // v0.18.0 @override @deprecated final bool? showNewPostNotifs; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final bool emailVerified; -// v0.18.0 + // v0.18.0 @override final bool acceptedApplication; -// v0.18.0 + // v0.18.0 @override @deprecated final String? totp2faUrl; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final bool? openLinksInNewTab; -// v0.18.1 + // v0.18.1 @override final bool? infiniteScrollEnabled; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? admin; -// v0.19.0 (required) + // v0.19.0 (required) @override final String? postListingMode; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? totp2faEnabled; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? enableKeyboardNavigation; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? enableAnimatedImages; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? collapseBotComments; @@ -603,145 +646,116 @@ class _$LocalUserImpl extends _LocalUser { (other.runtimeType == runtimeType && other is _$LocalUserImpl && (identical(other.id, id) || other.id == id) && - (identical(other.personId, personId) || - other.personId == personId) && + (identical(other.personId, personId) || other.personId == personId) && (identical(other.email, email) || other.email == email) && - (identical(other.showNsfw, showNsfw) || - other.showNsfw == showNsfw) && - (identical(other.blurNsfw, blurNsfw) || - other.blurNsfw == blurNsfw) && - (identical(other.autoExpand, autoExpand) || - other.autoExpand == autoExpand) && + (identical(other.showNsfw, showNsfw) || other.showNsfw == showNsfw) && + (identical(other.blurNsfw, blurNsfw) || other.blurNsfw == blurNsfw) && + (identical(other.autoExpand, autoExpand) || other.autoExpand == autoExpand) && (identical(other.theme, theme) || other.theme == theme) && - (identical(other.defaultSortType, defaultSortType) || - other.defaultSortType == defaultSortType) && - (identical(other.defaultListingType, defaultListingType) || - other.defaultListingType == defaultListingType) && - (identical(other.interfaceLanguage, interfaceLanguage) || - other.interfaceLanguage == interfaceLanguage) && - (identical(other.showAvatars, showAvatars) || - other.showAvatars == showAvatars) && - (identical( - other.sendNotificationsToEmail, sendNotificationsToEmail) || - other.sendNotificationsToEmail == sendNotificationsToEmail) && - (identical(other.validatorTime, validatorTime) || - other.validatorTime == validatorTime) && - (identical(other.showScores, showScores) || - other.showScores == showScores) && - (identical(other.showBotAccounts, showBotAccounts) || - other.showBotAccounts == showBotAccounts) && - (identical(other.showReadPosts, showReadPosts) || - other.showReadPosts == showReadPosts) && - (identical(other.showNewPostNotifs, showNewPostNotifs) || - other.showNewPostNotifs == showNewPostNotifs) && - (identical(other.emailVerified, emailVerified) || - other.emailVerified == emailVerified) && - (identical(other.acceptedApplication, acceptedApplication) || - other.acceptedApplication == acceptedApplication) && - (identical(other.totp2faUrl, totp2faUrl) || - other.totp2faUrl == totp2faUrl) && - (identical(other.openLinksInNewTab, openLinksInNewTab) || - other.openLinksInNewTab == openLinksInNewTab) && - (identical(other.infiniteScrollEnabled, infiniteScrollEnabled) || - other.infiniteScrollEnabled == infiniteScrollEnabled) && + (identical(other.defaultSortType, defaultSortType) || other.defaultSortType == defaultSortType) && + (identical(other.defaultListingType, defaultListingType) || other.defaultListingType == defaultListingType) && + (identical(other.interfaceLanguage, interfaceLanguage) || other.interfaceLanguage == interfaceLanguage) && + (identical(other.showAvatars, showAvatars) || other.showAvatars == showAvatars) && + (identical(other.sendNotificationsToEmail, sendNotificationsToEmail) || other.sendNotificationsToEmail == sendNotificationsToEmail) && + (identical(other.validatorTime, validatorTime) || other.validatorTime == validatorTime) && + (identical(other.showScores, showScores) || other.showScores == showScores) && + (identical(other.showBotAccounts, showBotAccounts) || other.showBotAccounts == showBotAccounts) && + (identical(other.showReadPosts, showReadPosts) || other.showReadPosts == showReadPosts) && + (identical(other.showNewPostNotifs, showNewPostNotifs) || other.showNewPostNotifs == showNewPostNotifs) && + (identical(other.emailVerified, emailVerified) || other.emailVerified == emailVerified) && + (identical(other.acceptedApplication, acceptedApplication) || other.acceptedApplication == acceptedApplication) && + (identical(other.totp2faUrl, totp2faUrl) || other.totp2faUrl == totp2faUrl) && + (identical(other.openLinksInNewTab, openLinksInNewTab) || other.openLinksInNewTab == openLinksInNewTab) && + (identical(other.infiniteScrollEnabled, infiniteScrollEnabled) || other.infiniteScrollEnabled == infiniteScrollEnabled) && (identical(other.admin, admin) || other.admin == admin) && - (identical(other.postListingMode, postListingMode) || - other.postListingMode == postListingMode) && - (identical(other.totp2faEnabled, totp2faEnabled) || - other.totp2faEnabled == totp2faEnabled) && - (identical( - other.enableKeyboardNavigation, enableKeyboardNavigation) || - other.enableKeyboardNavigation == enableKeyboardNavigation) && - (identical(other.enableAnimatedImages, enableAnimatedImages) || - other.enableAnimatedImages == enableAnimatedImages) && - (identical(other.collapseBotComments, collapseBotComments) || - other.collapseBotComments == collapseBotComments)); + (identical(other.postListingMode, postListingMode) || other.postListingMode == postListingMode) && + (identical(other.totp2faEnabled, totp2faEnabled) || other.totp2faEnabled == totp2faEnabled) && + (identical(other.enableKeyboardNavigation, enableKeyboardNavigation) || other.enableKeyboardNavigation == enableKeyboardNavigation) && + (identical(other.enableAnimatedImages, enableAnimatedImages) || other.enableAnimatedImages == enableAnimatedImages) && + (identical(other.collapseBotComments, collapseBotComments) || other.collapseBotComments == collapseBotComments)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - personId, - email, - showNsfw, - blurNsfw, - autoExpand, - theme, - defaultSortType, - defaultListingType, - interfaceLanguage, - showAvatars, - sendNotificationsToEmail, - validatorTime, - showScores, - showBotAccounts, - showReadPosts, - showNewPostNotifs, - emailVerified, - acceptedApplication, - totp2faUrl, - openLinksInNewTab, - infiniteScrollEnabled, - admin, - postListingMode, - totp2faEnabled, - enableKeyboardNavigation, - enableAnimatedImages, - collapseBotComments - ]); + runtimeType, + id, + personId, + email, + showNsfw, + blurNsfw, + autoExpand, + theme, + defaultSortType, + defaultListingType, + interfaceLanguage, + showAvatars, + sendNotificationsToEmail, + validatorTime, + showScores, + showBotAccounts, + showReadPosts, + showNewPostNotifs, + emailVerified, + acceptedApplication, + totp2faUrl, + openLinksInNewTab, + infiniteScrollEnabled, + admin, + postListingMode, + totp2faEnabled, + enableKeyboardNavigation, + enableAnimatedImages, + collapseBotComments, + ]); /// Create a copy of LocalUser /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalUserImplCopyWith<_$LocalUserImpl> get copyWith => - __$$LocalUserImplCopyWithImpl<_$LocalUserImpl>(this, _$identity); + _$$LocalUserImplCopyWith<_$LocalUserImpl> get copyWith => __$$LocalUserImplCopyWithImpl<_$LocalUserImpl>(this, _$identity); @override Map toJson() { - return _$$LocalUserImplToJson( - this, - ); + return _$$LocalUserImplToJson(this); } } abstract class _LocalUser extends LocalUser { - const factory _LocalUser( - {required final int id, - required final int personId, - final String? email, - required final bool showNsfw, - final bool? blurNsfw, - final bool? autoExpand, - required final String theme, - required final SortType defaultSortType, - required final ListingType defaultListingType, - required final String interfaceLanguage, - required final bool showAvatars, - required final bool sendNotificationsToEmail, - @deprecated final String? validatorTime, - required final bool showScores, - required final bool showBotAccounts, - required final bool showReadPosts, - @deprecated final bool? showNewPostNotifs, - required final bool emailVerified, - required final bool acceptedApplication, - @deprecated final String? totp2faUrl, - final bool? openLinksInNewTab, - final bool? infiniteScrollEnabled, - final bool? admin, - final String? postListingMode, - final bool? totp2faEnabled, - final bool? enableKeyboardNavigation, - final bool? enableAnimatedImages, - final bool? collapseBotComments}) = _$LocalUserImpl; + const factory _LocalUser({ + required final int id, + required final int personId, + final String? email, + required final bool showNsfw, + final bool? blurNsfw, + final bool? autoExpand, + required final String theme, + required final SortType defaultSortType, + required final ListingType defaultListingType, + required final String interfaceLanguage, + required final bool showAvatars, + required final bool sendNotificationsToEmail, + @deprecated final String? validatorTime, + required final bool showScores, + required final bool showBotAccounts, + required final bool showReadPosts, + @deprecated final bool? showNewPostNotifs, + required final bool emailVerified, + required final bool acceptedApplication, + @deprecated final String? totp2faUrl, + final bool? openLinksInNewTab, + final bool? infiniteScrollEnabled, + final bool? admin, + final String? postListingMode, + final bool? totp2faEnabled, + final bool? enableKeyboardNavigation, + final bool? enableAnimatedImages, + final bool? collapseBotComments, + }) = _$LocalUserImpl; const _LocalUser._() : super._(); - factory _LocalUser.fromJson(Map json) = - _$LocalUserImpl.fromJson; + factory _LocalUser.fromJson(Map json) = _$LocalUserImpl.fromJson; @override int get id; // v0.18.0 @@ -807,6 +821,5 @@ abstract class _LocalUser extends LocalUser { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalUserImplCopyWith<_$LocalUserImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalUserImplCopyWith<_$LocalUserImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/local_user/local_user.g.dart b/lib/src/v3/models/local_user/local_user.g.dart index 6a1aba0e..c7095d31 100644 --- a/lib/src/v3/models/local_user/local_user.g.dart +++ b/lib/src/v3/models/local_user/local_user.g.dart @@ -6,66 +6,64 @@ part of 'local_user.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalUserImpl _$$LocalUserImplFromJson(Map json) => - _$LocalUserImpl( - id: (json['id'] as num).toInt(), - personId: (json['person_id'] as num).toInt(), - email: json['email'] as String?, - showNsfw: json['show_nsfw'] as bool, - blurNsfw: json['blur_nsfw'] as bool?, - autoExpand: json['auto_expand'] as bool?, - theme: json['theme'] as String, - defaultSortType: SortType.fromJson(json['default_sort_type']), - defaultListingType: ListingType.fromJson(json['default_listing_type']), - interfaceLanguage: json['interface_language'] as String, - showAvatars: json['show_avatars'] as bool, - sendNotificationsToEmail: json['send_notifications_to_email'] as bool, - validatorTime: json['validator_time'] as String?, - showScores: json['show_scores'] as bool, - showBotAccounts: json['show_bot_accounts'] as bool, - showReadPosts: json['show_read_posts'] as bool, - showNewPostNotifs: json['show_new_post_notifs'] as bool?, - emailVerified: json['email_verified'] as bool, - acceptedApplication: json['accepted_application'] as bool, - totp2faUrl: json['totp2fa_url'] as String?, - openLinksInNewTab: json['open_links_in_new_tab'] as bool?, - infiniteScrollEnabled: json['infinite_scroll_enabled'] as bool?, - admin: json['admin'] as bool?, - postListingMode: json['post_listing_mode'] as String?, - totp2faEnabled: json['totp2fa_enabled'] as bool?, - enableKeyboardNavigation: json['enable_keyboard_navigation'] as bool?, - enableAnimatedImages: json['enable_animated_images'] as bool?, - collapseBotComments: json['collapse_bot_comments'] as bool?, - ); +_$LocalUserImpl _$$LocalUserImplFromJson(Map json) => _$LocalUserImpl( + id: (json['id'] as num).toInt(), + personId: (json['person_id'] as num).toInt(), + email: json['email'] as String?, + showNsfw: json['show_nsfw'] as bool, + blurNsfw: json['blur_nsfw'] as bool?, + autoExpand: json['auto_expand'] as bool?, + theme: json['theme'] as String, + defaultSortType: SortType.fromJson(json['default_sort_type']), + defaultListingType: ListingType.fromJson(json['default_listing_type']), + interfaceLanguage: json['interface_language'] as String, + showAvatars: json['show_avatars'] as bool, + sendNotificationsToEmail: json['send_notifications_to_email'] as bool, + validatorTime: json['validator_time'] as String?, + showScores: json['show_scores'] as bool, + showBotAccounts: json['show_bot_accounts'] as bool, + showReadPosts: json['show_read_posts'] as bool, + showNewPostNotifs: json['show_new_post_notifs'] as bool?, + emailVerified: json['email_verified'] as bool, + acceptedApplication: json['accepted_application'] as bool, + totp2faUrl: json['totp2fa_url'] as String?, + openLinksInNewTab: json['open_links_in_new_tab'] as bool?, + infiniteScrollEnabled: json['infinite_scroll_enabled'] as bool?, + admin: json['admin'] as bool?, + postListingMode: json['post_listing_mode'] as String?, + totp2faEnabled: json['totp2fa_enabled'] as bool?, + enableKeyboardNavigation: json['enable_keyboard_navigation'] as bool?, + enableAnimatedImages: json['enable_animated_images'] as bool?, + collapseBotComments: json['collapse_bot_comments'] as bool?, +); -Map _$$LocalUserImplToJson(_$LocalUserImpl instance) => - { - 'id': instance.id, - 'person_id': instance.personId, - 'email': instance.email, - 'show_nsfw': instance.showNsfw, - 'blur_nsfw': instance.blurNsfw, - 'auto_expand': instance.autoExpand, - 'theme': instance.theme, - 'default_sort_type': instance.defaultSortType.toJson(), - 'default_listing_type': instance.defaultListingType.toJson(), - 'interface_language': instance.interfaceLanguage, - 'show_avatars': instance.showAvatars, - 'send_notifications_to_email': instance.sendNotificationsToEmail, - 'validator_time': instance.validatorTime, - 'show_scores': instance.showScores, - 'show_bot_accounts': instance.showBotAccounts, - 'show_read_posts': instance.showReadPosts, - 'show_new_post_notifs': instance.showNewPostNotifs, - 'email_verified': instance.emailVerified, - 'accepted_application': instance.acceptedApplication, - 'totp2fa_url': instance.totp2faUrl, - 'open_links_in_new_tab': instance.openLinksInNewTab, - 'infinite_scroll_enabled': instance.infiniteScrollEnabled, - 'admin': instance.admin, - 'post_listing_mode': instance.postListingMode, - 'totp2fa_enabled': instance.totp2faEnabled, - 'enable_keyboard_navigation': instance.enableKeyboardNavigation, - 'enable_animated_images': instance.enableAnimatedImages, - 'collapse_bot_comments': instance.collapseBotComments, - }; +Map _$$LocalUserImplToJson(_$LocalUserImpl instance) => { + 'id': instance.id, + 'person_id': instance.personId, + 'email': instance.email, + 'show_nsfw': instance.showNsfw, + 'blur_nsfw': instance.blurNsfw, + 'auto_expand': instance.autoExpand, + 'theme': instance.theme, + 'default_sort_type': instance.defaultSortType.toJson(), + 'default_listing_type': instance.defaultListingType.toJson(), + 'interface_language': instance.interfaceLanguage, + 'show_avatars': instance.showAvatars, + 'send_notifications_to_email': instance.sendNotificationsToEmail, + 'validator_time': instance.validatorTime, + 'show_scores': instance.showScores, + 'show_bot_accounts': instance.showBotAccounts, + 'show_read_posts': instance.showReadPosts, + 'show_new_post_notifs': instance.showNewPostNotifs, + 'email_verified': instance.emailVerified, + 'accepted_application': instance.acceptedApplication, + 'totp2fa_url': instance.totp2faUrl, + 'open_links_in_new_tab': instance.openLinksInNewTab, + 'infinite_scroll_enabled': instance.infiniteScrollEnabled, + 'admin': instance.admin, + 'post_listing_mode': instance.postListingMode, + 'totp2fa_enabled': instance.totp2faEnabled, + 'enable_keyboard_navigation': instance.enableKeyboardNavigation, + 'enable_animated_images': instance.enableAnimatedImages, + 'collapse_bot_comments': instance.collapseBotComments, +}; diff --git a/lib/src/v3/models/local_user/local_user_vote_display_mode.dart b/lib/src/v3/models/local_user/local_user_vote_display_mode.dart index a7d89fa1..b233eb8a 100644 --- a/lib/src/v3/models/local_user/local_user_vote_display_mode.dart +++ b/lib/src/v3/models/local_user/local_user_vote_display_mode.dart @@ -17,6 +17,5 @@ class LocalUserVoteDisplayMode with _$LocalUserVoteDisplayMode { }) = _LocalUserVoteDisplayMode; const LocalUserVoteDisplayMode._(); - factory LocalUserVoteDisplayMode.fromJson(Map json) => - _$LocalUserVoteDisplayModeFromJson(json); + factory LocalUserVoteDisplayMode.fromJson(Map json) => _$LocalUserVoteDisplayModeFromJson(json); } diff --git a/lib/src/v3/models/local_user/local_user_vote_display_mode.freezed.dart b/lib/src/v3/models/local_user/local_user_vote_display_mode.freezed.dart index 28986c0c..fcc55ea7 100644 --- a/lib/src/v3/models/local_user/local_user_vote_display_mode.freezed.dart +++ b/lib/src/v3/models/local_user/local_user_vote_display_mode.freezed.dart @@ -12,21 +12,19 @@ part of 'local_user_vote_display_mode.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -LocalUserVoteDisplayMode _$LocalUserVoteDisplayModeFromJson( - Map json) { +LocalUserVoteDisplayMode _$LocalUserVoteDisplayModeFromJson(Map json) { return _LocalUserVoteDisplayMode.fromJson(json); } /// @nodoc mixin _$LocalUserVoteDisplayMode { - int? get localUserId => - throw _privateConstructorUsedError; // v0.19.4 (required) + int? get localUserId => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get score => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get upvotes => throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get downvotes => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get downvotes => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get upvotePercentage => throw _privateConstructorUsedError; /// Serializes this LocalUserVoteDisplayMode to a JSON map. @@ -35,28 +33,18 @@ mixin _$LocalUserVoteDisplayMode { /// Create a copy of LocalUserVoteDisplayMode /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalUserVoteDisplayModeCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalUserVoteDisplayModeCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalUserVoteDisplayModeCopyWith<$Res> { - factory $LocalUserVoteDisplayModeCopyWith(LocalUserVoteDisplayMode value, - $Res Function(LocalUserVoteDisplayMode) then) = - _$LocalUserVoteDisplayModeCopyWithImpl<$Res, LocalUserVoteDisplayMode>; + factory $LocalUserVoteDisplayModeCopyWith(LocalUserVoteDisplayMode value, $Res Function(LocalUserVoteDisplayMode) then) = _$LocalUserVoteDisplayModeCopyWithImpl<$Res, LocalUserVoteDisplayMode>; @useResult - $Res call( - {int? localUserId, - bool? score, - bool? upvotes, - bool? downvotes, - bool? upvotePercentage}); + $Res call({int? localUserId, bool? score, bool? upvotes, bool? downvotes, bool? upvotePercentage}); } /// @nodoc -class _$LocalUserVoteDisplayModeCopyWithImpl<$Res, - $Val extends LocalUserVoteDisplayMode> - implements $LocalUserVoteDisplayModeCopyWith<$Res> { +class _$LocalUserVoteDisplayModeCopyWithImpl<$Res, $Val extends LocalUserVoteDisplayMode> implements $LocalUserVoteDisplayModeCopyWith<$Res> { _$LocalUserVoteDisplayModeCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,98 +56,86 @@ class _$LocalUserVoteDisplayModeCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUserId = freezed, - Object? score = freezed, - Object? upvotes = freezed, - Object? downvotes = freezed, - Object? upvotePercentage = freezed, - }) { - return _then(_value.copyWith( - localUserId: freezed == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int?, - score: freezed == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as bool?, - upvotes: freezed == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as bool?, - downvotes: freezed == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as bool?, - upvotePercentage: freezed == upvotePercentage - ? _value.upvotePercentage - : upvotePercentage // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? localUserId = freezed, Object? score = freezed, Object? upvotes = freezed, Object? downvotes = freezed, Object? upvotePercentage = freezed}) { + return _then( + _value.copyWith( + localUserId: + freezed == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int?, + score: + freezed == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as bool?, + upvotes: + freezed == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as bool?, + downvotes: + freezed == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as bool?, + upvotePercentage: + freezed == upvotePercentage + ? _value.upvotePercentage + : upvotePercentage // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalUserVoteDisplayModeImplCopyWith<$Res> - implements $LocalUserVoteDisplayModeCopyWith<$Res> { - factory _$$LocalUserVoteDisplayModeImplCopyWith( - _$LocalUserVoteDisplayModeImpl value, - $Res Function(_$LocalUserVoteDisplayModeImpl) then) = - __$$LocalUserVoteDisplayModeImplCopyWithImpl<$Res>; +abstract class _$$LocalUserVoteDisplayModeImplCopyWith<$Res> implements $LocalUserVoteDisplayModeCopyWith<$Res> { + factory _$$LocalUserVoteDisplayModeImplCopyWith(_$LocalUserVoteDisplayModeImpl value, $Res Function(_$LocalUserVoteDisplayModeImpl) then) = __$$LocalUserVoteDisplayModeImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? localUserId, - bool? score, - bool? upvotes, - bool? downvotes, - bool? upvotePercentage}); + $Res call({int? localUserId, bool? score, bool? upvotes, bool? downvotes, bool? upvotePercentage}); } /// @nodoc -class __$$LocalUserVoteDisplayModeImplCopyWithImpl<$Res> - extends _$LocalUserVoteDisplayModeCopyWithImpl<$Res, - _$LocalUserVoteDisplayModeImpl> - implements _$$LocalUserVoteDisplayModeImplCopyWith<$Res> { - __$$LocalUserVoteDisplayModeImplCopyWithImpl( - _$LocalUserVoteDisplayModeImpl _value, - $Res Function(_$LocalUserVoteDisplayModeImpl) _then) - : super(_value, _then); +class __$$LocalUserVoteDisplayModeImplCopyWithImpl<$Res> extends _$LocalUserVoteDisplayModeCopyWithImpl<$Res, _$LocalUserVoteDisplayModeImpl> implements _$$LocalUserVoteDisplayModeImplCopyWith<$Res> { + __$$LocalUserVoteDisplayModeImplCopyWithImpl(_$LocalUserVoteDisplayModeImpl _value, $Res Function(_$LocalUserVoteDisplayModeImpl) _then) : super(_value, _then); /// Create a copy of LocalUserVoteDisplayMode /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUserId = freezed, - Object? score = freezed, - Object? upvotes = freezed, - Object? downvotes = freezed, - Object? upvotePercentage = freezed, - }) { - return _then(_$LocalUserVoteDisplayModeImpl( - localUserId: freezed == localUserId - ? _value.localUserId - : localUserId // ignore: cast_nullable_to_non_nullable - as int?, - score: freezed == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as bool?, - upvotes: freezed == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as bool?, - downvotes: freezed == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as bool?, - upvotePercentage: freezed == upvotePercentage - ? _value.upvotePercentage - : upvotePercentage // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? localUserId = freezed, Object? score = freezed, Object? upvotes = freezed, Object? downvotes = freezed, Object? upvotePercentage = freezed}) { + return _then( + _$LocalUserVoteDisplayModeImpl( + localUserId: + freezed == localUserId + ? _value.localUserId + : localUserId // ignore: cast_nullable_to_non_nullable + as int?, + score: + freezed == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as bool?, + upvotes: + freezed == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as bool?, + downvotes: + freezed == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as bool?, + upvotePercentage: + freezed == upvotePercentage + ? _value.upvotePercentage + : upvotePercentage // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -167,29 +143,22 @@ class __$$LocalUserVoteDisplayModeImplCopyWithImpl<$Res> @modelSerde class _$LocalUserVoteDisplayModeImpl extends _LocalUserVoteDisplayMode { - const _$LocalUserVoteDisplayModeImpl( - {this.localUserId, - this.score, - this.upvotes, - this.downvotes, - this.upvotePercentage}) - : super._(); + const _$LocalUserVoteDisplayModeImpl({this.localUserId, this.score, this.upvotes, this.downvotes, this.upvotePercentage}) : super._(); - factory _$LocalUserVoteDisplayModeImpl.fromJson(Map json) => - _$$LocalUserVoteDisplayModeImplFromJson(json); + factory _$LocalUserVoteDisplayModeImpl.fromJson(Map json) => _$$LocalUserVoteDisplayModeImplFromJson(json); @override final int? localUserId; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? score; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? upvotes; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? downvotes; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? upvotePercentage; @@ -203,49 +172,35 @@ class _$LocalUserVoteDisplayModeImpl extends _LocalUserVoteDisplayMode { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LocalUserVoteDisplayModeImpl && - (identical(other.localUserId, localUserId) || - other.localUserId == localUserId) && + (identical(other.localUserId, localUserId) || other.localUserId == localUserId) && (identical(other.score, score) || other.score == score) && (identical(other.upvotes, upvotes) || other.upvotes == upvotes) && - (identical(other.downvotes, downvotes) || - other.downvotes == downvotes) && - (identical(other.upvotePercentage, upvotePercentage) || - other.upvotePercentage == upvotePercentage)); + (identical(other.downvotes, downvotes) || other.downvotes == downvotes) && + (identical(other.upvotePercentage, upvotePercentage) || other.upvotePercentage == upvotePercentage)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, localUserId, score, upvotes, downvotes, upvotePercentage); + int get hashCode => Object.hash(runtimeType, localUserId, score, upvotes, downvotes, upvotePercentage); /// Create a copy of LocalUserVoteDisplayMode /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalUserVoteDisplayModeImplCopyWith<_$LocalUserVoteDisplayModeImpl> - get copyWith => __$$LocalUserVoteDisplayModeImplCopyWithImpl< - _$LocalUserVoteDisplayModeImpl>(this, _$identity); + _$$LocalUserVoteDisplayModeImplCopyWith<_$LocalUserVoteDisplayModeImpl> get copyWith => __$$LocalUserVoteDisplayModeImplCopyWithImpl<_$LocalUserVoteDisplayModeImpl>(this, _$identity); @override Map toJson() { - return _$$LocalUserVoteDisplayModeImplToJson( - this, - ); + return _$$LocalUserVoteDisplayModeImplToJson(this); } } abstract class _LocalUserVoteDisplayMode extends LocalUserVoteDisplayMode { - const factory _LocalUserVoteDisplayMode( - {final int? localUserId, - final bool? score, - final bool? upvotes, - final bool? downvotes, - final bool? upvotePercentage}) = _$LocalUserVoteDisplayModeImpl; + const factory _LocalUserVoteDisplayMode({final int? localUserId, final bool? score, final bool? upvotes, final bool? downvotes, final bool? upvotePercentage}) = _$LocalUserVoteDisplayModeImpl; const _LocalUserVoteDisplayMode._() : super._(); - factory _LocalUserVoteDisplayMode.fromJson(Map json) = - _$LocalUserVoteDisplayModeImpl.fromJson; + factory _LocalUserVoteDisplayMode.fromJson(Map json) = _$LocalUserVoteDisplayModeImpl.fromJson; @override int? get localUserId; // v0.19.4 (required) @@ -262,6 +217,5 @@ abstract class _LocalUserVoteDisplayMode extends LocalUserVoteDisplayMode { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalUserVoteDisplayModeImplCopyWith<_$LocalUserVoteDisplayModeImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LocalUserVoteDisplayModeImplCopyWith<_$LocalUserVoteDisplayModeImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/local_user/local_user_vote_display_mode.g.dart b/lib/src/v3/models/local_user/local_user_vote_display_mode.g.dart index 961654d4..36757ccd 100644 --- a/lib/src/v3/models/local_user/local_user_vote_display_mode.g.dart +++ b/lib/src/v3/models/local_user/local_user_vote_display_mode.g.dart @@ -6,22 +6,18 @@ part of 'local_user_vote_display_mode.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalUserVoteDisplayModeImpl _$$LocalUserVoteDisplayModeImplFromJson( - Map json) => - _$LocalUserVoteDisplayModeImpl( - localUserId: (json['local_user_id'] as num?)?.toInt(), - score: json['score'] as bool?, - upvotes: json['upvotes'] as bool?, - downvotes: json['downvotes'] as bool?, - upvotePercentage: json['upvote_percentage'] as bool?, - ); +_$LocalUserVoteDisplayModeImpl _$$LocalUserVoteDisplayModeImplFromJson(Map json) => _$LocalUserVoteDisplayModeImpl( + localUserId: (json['local_user_id'] as num?)?.toInt(), + score: json['score'] as bool?, + upvotes: json['upvotes'] as bool?, + downvotes: json['downvotes'] as bool?, + upvotePercentage: json['upvote_percentage'] as bool?, +); -Map _$$LocalUserVoteDisplayModeImplToJson( - _$LocalUserVoteDisplayModeImpl instance) => - { - 'local_user_id': instance.localUserId, - 'score': instance.score, - 'upvotes': instance.upvotes, - 'downvotes': instance.downvotes, - 'upvote_percentage': instance.upvotePercentage, - }; +Map _$$LocalUserVoteDisplayModeImplToJson(_$LocalUserVoteDisplayModeImpl instance) => { + 'local_user_id': instance.localUserId, + 'score': instance.score, + 'upvotes': instance.upvotes, + 'downvotes': instance.downvotes, + 'upvote_percentage': instance.upvotePercentage, +}; diff --git a/lib/src/v3/models/mod/mod_add.freezed.dart b/lib/src/v3/models/mod/mod_add.freezed.dart index 139fa71f..003cf57e 100644 --- a/lib/src/v3/models/mod/mod_add.freezed.dart +++ b/lib/src/v3/models/mod/mod_add.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_add.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModAdd _$ModAddFromJson(Map json) { return _ModAdd.fromJson(json); @@ -38,20 +39,13 @@ mixin _$ModAdd { /// @nodoc abstract class $ModAddCopyWith<$Res> { - factory $ModAddCopyWith(ModAdd value, $Res Function(ModAdd) then) = - _$ModAddCopyWithImpl<$Res, ModAdd>; + factory $ModAddCopyWith(ModAdd value, $Res Function(ModAdd) then) = _$ModAddCopyWithImpl<$Res, ModAdd>; @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModAddCopyWithImpl<$Res, $Val extends ModAdd> - implements $ModAddCopyWith<$Res> { +class _$ModAddCopyWithImpl<$Res, $Val extends ModAdd> implements $ModAddCopyWith<$Res> { _$ModAddCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,94 +57,86 @@ class _$ModAddCopyWithImpl<$Res, $Val extends ModAdd> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? removed = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? removed = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ModAddImplCopyWith<$Res> implements $ModAddCopyWith<$Res> { - factory _$$ModAddImplCopyWith( - _$ModAddImpl value, $Res Function(_$ModAddImpl) then) = - __$$ModAddImplCopyWithImpl<$Res>; + factory _$$ModAddImplCopyWith(_$ModAddImpl value, $Res Function(_$ModAddImpl) then) = __$$ModAddImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModAddImplCopyWithImpl<$Res> - extends _$ModAddCopyWithImpl<$Res, _$ModAddImpl> - implements _$$ModAddImplCopyWith<$Res> { - __$$ModAddImplCopyWithImpl( - _$ModAddImpl _value, $Res Function(_$ModAddImpl) _then) - : super(_value, _then); +class __$$ModAddImplCopyWithImpl<$Res> extends _$ModAddCopyWithImpl<$Res, _$ModAddImpl> implements _$$ModAddImplCopyWith<$Res> { + __$$ModAddImplCopyWithImpl(_$ModAddImpl _value, $Res Function(_$ModAddImpl) _then) : super(_value, _then); /// Create a copy of ModAdd /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? removed = null, - Object? when = null, - }) { - return _then(_$ModAddImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? removed = null, Object? when = null}) { + return _then( + _$ModAddImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -158,29 +144,22 @@ class __$$ModAddImplCopyWithImpl<$Res> @modelSerde class _$ModAddImpl extends _ModAdd { - const _$ModAddImpl( - {required this.id, - required this.modPersonId, - required this.otherPersonId, - required this.removed, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModAddImpl({required this.id, required this.modPersonId, required this.otherPersonId, required this.removed, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$ModAddImpl.fromJson(Map json) => - _$$ModAddImplFromJson(json); + factory _$ModAddImpl.fromJson(Map json) => _$$ModAddImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int otherPersonId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -196,42 +175,32 @@ class _$ModAddImpl extends _ModAdd { (other.runtimeType == runtimeType && other is _$ModAddImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.when, when) || other.when == when)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, modPersonId, otherPersonId, removed, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, removed, when); /// Create a copy of ModAdd /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModAddImplCopyWith<_$ModAddImpl> get copyWith => - __$$ModAddImplCopyWithImpl<_$ModAddImpl>(this, _$identity); + _$$ModAddImplCopyWith<_$ModAddImpl> get copyWith => __$$ModAddImplCopyWithImpl<_$ModAddImpl>(this, _$identity); @override Map toJson() { - return _$$ModAddImplToJson( - this, - ); + return _$$ModAddImplToJson(this); } } abstract class _ModAdd extends ModAdd { - const factory _ModAdd( - {required final int id, - required final int modPersonId, - required final int otherPersonId, - required final bool removed, - @JsonKey(name: 'when_') required final String when}) = _$ModAddImpl; + const factory _ModAdd({required final int id, required final int modPersonId, required final int otherPersonId, required final bool removed, @JsonKey(name: 'when_') required final String when}) = + _$ModAddImpl; const _ModAdd._() : super._(); factory _ModAdd.fromJson(Map json) = _$ModAddImpl.fromJson; @@ -252,6 +221,5 @@ abstract class _ModAdd extends ModAdd { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModAddImplCopyWith<_$ModAddImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModAddImplCopyWith<_$ModAddImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_add.g.dart b/lib/src/v3/models/mod/mod_add.g.dart index e24f57ca..c814f5d8 100644 --- a/lib/src/v3/models/mod/mod_add.g.dart +++ b/lib/src/v3/models/mod/mod_add.g.dart @@ -7,18 +7,17 @@ part of 'mod_add.dart'; // ************************************************************************** _$ModAddImpl _$$ModAddImplFromJson(Map json) => _$ModAddImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - otherPersonId: (json['other_person_id'] as num).toInt(), - removed: json['removed'] as bool, - when: json['when_'] as String, - ); + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + otherPersonId: (json['other_person_id'] as num).toInt(), + removed: json['removed'] as bool, + when: json['when_'] as String, +); -Map _$$ModAddImplToJson(_$ModAddImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'other_person_id': instance.otherPersonId, - 'removed': instance.removed, - 'when_': instance.when, - }; +Map _$$ModAddImplToJson(_$ModAddImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'other_person_id': instance.otherPersonId, + 'removed': instance.removed, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_add_community.dart b/lib/src/v3/models/mod/mod_add_community.dart index f95693f1..9b8fc747 100644 --- a/lib/src/v3/models/mod/mod_add_community.dart +++ b/lib/src/v3/models/mod/mod_add_community.dart @@ -18,6 +18,5 @@ class ModAddCommunity with _$ModAddCommunity { }) = _ModAddCommunity; const ModAddCommunity._(); - factory ModAddCommunity.fromJson(Map json) => - _$ModAddCommunityFromJson(json); + factory ModAddCommunity.fromJson(Map json) => _$ModAddCommunityFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_add_community.freezed.dart b/lib/src/v3/models/mod/mod_add_community.freezed.dart index b5e02c38..77d5b56a 100644 --- a/lib/src/v3/models/mod/mod_add_community.freezed.dart +++ b/lib/src/v3/models/mod/mod_add_community.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_add_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModAddCommunity _$ModAddCommunityFromJson(Map json) { return _ModAddCommunity.fromJson(json); @@ -34,28 +35,18 @@ mixin _$ModAddCommunity { /// Create a copy of ModAddCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModAddCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModAddCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModAddCommunityCopyWith<$Res> { - factory $ModAddCommunityCopyWith( - ModAddCommunity value, $Res Function(ModAddCommunity) then) = - _$ModAddCommunityCopyWithImpl<$Res, ModAddCommunity>; + factory $ModAddCommunityCopyWith(ModAddCommunity value, $Res Function(ModAddCommunity) then) = _$ModAddCommunityCopyWithImpl<$Res, ModAddCommunity>; @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModAddCommunityCopyWithImpl<$Res, $Val extends ModAddCommunity> - implements $ModAddCommunityCopyWith<$Res> { +class _$ModAddCommunityCopyWithImpl<$Res, $Val extends ModAddCommunity> implements $ModAddCommunityCopyWith<$Res> { _$ModAddCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,106 +58,96 @@ class _$ModAddCommunityCopyWithImpl<$Res, $Val extends ModAddCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? communityId = null, - Object? removed = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? communityId = null, Object? removed = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModAddCommunityImplCopyWith<$Res> - implements $ModAddCommunityCopyWith<$Res> { - factory _$$ModAddCommunityImplCopyWith(_$ModAddCommunityImpl value, - $Res Function(_$ModAddCommunityImpl) then) = - __$$ModAddCommunityImplCopyWithImpl<$Res>; +abstract class _$$ModAddCommunityImplCopyWith<$Res> implements $ModAddCommunityCopyWith<$Res> { + factory _$$ModAddCommunityImplCopyWith(_$ModAddCommunityImpl value, $Res Function(_$ModAddCommunityImpl) then) = __$$ModAddCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModAddCommunityImplCopyWithImpl<$Res> - extends _$ModAddCommunityCopyWithImpl<$Res, _$ModAddCommunityImpl> - implements _$$ModAddCommunityImplCopyWith<$Res> { - __$$ModAddCommunityImplCopyWithImpl( - _$ModAddCommunityImpl _value, $Res Function(_$ModAddCommunityImpl) _then) - : super(_value, _then); +class __$$ModAddCommunityImplCopyWithImpl<$Res> extends _$ModAddCommunityCopyWithImpl<$Res, _$ModAddCommunityImpl> implements _$$ModAddCommunityImplCopyWith<$Res> { + __$$ModAddCommunityImplCopyWithImpl(_$ModAddCommunityImpl _value, $Res Function(_$ModAddCommunityImpl) _then) : super(_value, _then); /// Create a copy of ModAddCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? communityId = null, - Object? removed = null, - Object? when = null, - }) { - return _then(_$ModAddCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? communityId = null, Object? removed = null, Object? when = null}) { + return _then( + _$ModAddCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -174,33 +155,26 @@ class __$$ModAddCommunityImplCopyWithImpl<$Res> @modelSerde class _$ModAddCommunityImpl extends _ModAddCommunity { - const _$ModAddCommunityImpl( - {required this.id, - required this.modPersonId, - required this.otherPersonId, - required this.communityId, - required this.removed, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModAddCommunityImpl({required this.id, required this.modPersonId, required this.otherPersonId, required this.communityId, required this.removed, @JsonKey(name: 'when_') required this.when}) + : super._(); - factory _$ModAddCommunityImpl.fromJson(Map json) => - _$$ModAddCommunityImplFromJson(json); + factory _$ModAddCommunityImpl.fromJson(Map json) => _$$ModAddCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int otherPersonId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -216,51 +190,42 @@ class _$ModAddCommunityImpl extends _ModAddCommunity { (other.runtimeType == runtimeType && other is _$ModAddCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.when, when) || other.when == when)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, modPersonId, otherPersonId, communityId, removed, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, communityId, removed, when); /// Create a copy of ModAddCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModAddCommunityImplCopyWith<_$ModAddCommunityImpl> get copyWith => - __$$ModAddCommunityImplCopyWithImpl<_$ModAddCommunityImpl>( - this, _$identity); + _$$ModAddCommunityImplCopyWith<_$ModAddCommunityImpl> get copyWith => __$$ModAddCommunityImplCopyWithImpl<_$ModAddCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$ModAddCommunityImplToJson( - this, - ); + return _$$ModAddCommunityImplToJson(this); } } abstract class _ModAddCommunity extends ModAddCommunity { - const factory _ModAddCommunity( - {required final int id, - required final int modPersonId, - required final int otherPersonId, - required final int communityId, - required final bool removed, - @JsonKey(name: 'when_') required final String when}) = - _$ModAddCommunityImpl; + const factory _ModAddCommunity({ + required final int id, + required final int modPersonId, + required final int otherPersonId, + required final int communityId, + required final bool removed, + @JsonKey(name: 'when_') required final String when, + }) = _$ModAddCommunityImpl; const _ModAddCommunity._() : super._(); - factory _ModAddCommunity.fromJson(Map json) = - _$ModAddCommunityImpl.fromJson; + factory _ModAddCommunity.fromJson(Map json) = _$ModAddCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -280,6 +245,5 @@ abstract class _ModAddCommunity extends ModAddCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModAddCommunityImplCopyWith<_$ModAddCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModAddCommunityImplCopyWith<_$ModAddCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_add_community.g.dart b/lib/src/v3/models/mod/mod_add_community.g.dart index 03da96ee..3316b0ef 100644 --- a/lib/src/v3/models/mod/mod_add_community.g.dart +++ b/lib/src/v3/models/mod/mod_add_community.g.dart @@ -6,24 +6,20 @@ part of 'mod_add_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModAddCommunityImpl _$$ModAddCommunityImplFromJson( - Map json) => - _$ModAddCommunityImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - otherPersonId: (json['other_person_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - removed: json['removed'] as bool, - when: json['when_'] as String, - ); +_$ModAddCommunityImpl _$$ModAddCommunityImplFromJson(Map json) => _$ModAddCommunityImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + otherPersonId: (json['other_person_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + removed: json['removed'] as bool, + when: json['when_'] as String, +); -Map _$$ModAddCommunityImplToJson( - _$ModAddCommunityImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'other_person_id': instance.otherPersonId, - 'community_id': instance.communityId, - 'removed': instance.removed, - 'when_': instance.when, - }; +Map _$$ModAddCommunityImplToJson(_$ModAddCommunityImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'other_person_id': instance.otherPersonId, + 'community_id': instance.communityId, + 'removed': instance.removed, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_ban.freezed.dart b/lib/src/v3/models/mod/mod_ban.freezed.dart index 6fee6ea2..0bd988b1 100644 --- a/lib/src/v3/models/mod/mod_ban.freezed.dart +++ b/lib/src/v3/models/mod/mod_ban.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_ban.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModBan _$ModBanFromJson(Map json) { return _ModBan.fromJson(json); @@ -40,22 +41,13 @@ mixin _$ModBan { /// @nodoc abstract class $ModBanCopyWith<$Res> { - factory $ModBanCopyWith(ModBan value, $Res Function(ModBan) then) = - _$ModBanCopyWithImpl<$Res, ModBan>; + factory $ModBanCopyWith(ModBan value, $Res Function(ModBan) then) = _$ModBanCopyWithImpl<$Res, ModBan>; @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - String? reason, - bool banned, - String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, String? reason, bool banned, String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModBanCopyWithImpl<$Res, $Val extends ModBan> - implements $ModBanCopyWith<$Res> { +class _$ModBanCopyWithImpl<$Res, $Val extends ModBan> implements $ModBanCopyWith<$Res> { _$ModBanCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,116 +59,106 @@ class _$ModBanCopyWithImpl<$Res, $Val extends ModBan> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? reason = freezed, - Object? banned = null, - Object? expires = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? reason = freezed, Object? banned = null, Object? expires = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ModBanImplCopyWith<$Res> implements $ModBanCopyWith<$Res> { - factory _$$ModBanImplCopyWith( - _$ModBanImpl value, $Res Function(_$ModBanImpl) then) = - __$$ModBanImplCopyWithImpl<$Res>; + factory _$$ModBanImplCopyWith(_$ModBanImpl value, $Res Function(_$ModBanImpl) then) = __$$ModBanImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - String? reason, - bool banned, - String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, String? reason, bool banned, String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModBanImplCopyWithImpl<$Res> - extends _$ModBanCopyWithImpl<$Res, _$ModBanImpl> - implements _$$ModBanImplCopyWith<$Res> { - __$$ModBanImplCopyWithImpl( - _$ModBanImpl _value, $Res Function(_$ModBanImpl) _then) - : super(_value, _then); +class __$$ModBanImplCopyWithImpl<$Res> extends _$ModBanCopyWithImpl<$Res, _$ModBanImpl> implements _$$ModBanImplCopyWith<$Res> { + __$$ModBanImplCopyWithImpl(_$ModBanImpl _value, $Res Function(_$ModBanImpl) _then) : super(_value, _then); /// Create a copy of ModBan /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? reason = freezed, - Object? banned = null, - Object? expires = freezed, - Object? when = null, - }) { - return _then(_$ModBanImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? reason = freezed, Object? banned = null, Object? expires = freezed, Object? when = null}) { + return _then( + _$ModBanImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -184,37 +166,29 @@ class __$$ModBanImplCopyWithImpl<$Res> @modelSerde class _$ModBanImpl extends _ModBan { - const _$ModBanImpl( - {required this.id, - required this.modPersonId, - required this.otherPersonId, - this.reason, - required this.banned, - this.expires, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModBanImpl({required this.id, required this.modPersonId, required this.otherPersonId, this.reason, required this.banned, this.expires, @JsonKey(name: 'when_') required this.when}) + : super._(); - factory _$ModBanImpl.fromJson(Map json) => - _$$ModBanImplFromJson(json); + factory _$ModBanImpl.fromJson(Map json) => _$$ModBanImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int otherPersonId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool banned; -// v0.18.0 + // v0.18.0 @override final String? expires; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -230,10 +204,8 @@ class _$ModBanImpl extends _ModBan { (other.runtimeType == runtimeType && other is _$ModBanImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.banned, banned) || other.banned == banned) && (identical(other.expires, expires) || other.expires == expires) && @@ -242,34 +214,31 @@ class _$ModBanImpl extends _ModBan { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, - reason, banned, expires, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, reason, banned, expires, when); /// Create a copy of ModBan /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModBanImplCopyWith<_$ModBanImpl> get copyWith => - __$$ModBanImplCopyWithImpl<_$ModBanImpl>(this, _$identity); + _$$ModBanImplCopyWith<_$ModBanImpl> get copyWith => __$$ModBanImplCopyWithImpl<_$ModBanImpl>(this, _$identity); @override Map toJson() { - return _$$ModBanImplToJson( - this, - ); + return _$$ModBanImplToJson(this); } } abstract class _ModBan extends ModBan { - const factory _ModBan( - {required final int id, - required final int modPersonId, - required final int otherPersonId, - final String? reason, - required final bool banned, - final String? expires, - @JsonKey(name: 'when_') required final String when}) = _$ModBanImpl; + const factory _ModBan({ + required final int id, + required final int modPersonId, + required final int otherPersonId, + final String? reason, + required final bool banned, + final String? expires, + @JsonKey(name: 'when_') required final String when, + }) = _$ModBanImpl; const _ModBan._() : super._(); factory _ModBan.fromJson(Map json) = _$ModBanImpl.fromJson; @@ -294,6 +263,5 @@ abstract class _ModBan extends ModBan { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModBanImplCopyWith<_$ModBanImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModBanImplCopyWith<_$ModBanImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_ban.g.dart b/lib/src/v3/models/mod/mod_ban.g.dart index a0af8765..07ce2c8f 100644 --- a/lib/src/v3/models/mod/mod_ban.g.dart +++ b/lib/src/v3/models/mod/mod_ban.g.dart @@ -7,22 +7,21 @@ part of 'mod_ban.dart'; // ************************************************************************** _$ModBanImpl _$$ModBanImplFromJson(Map json) => _$ModBanImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - otherPersonId: (json['other_person_id'] as num).toInt(), - reason: json['reason'] as String?, - banned: json['banned'] as bool, - expires: json['expires'] as String?, - when: json['when_'] as String, - ); + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + otherPersonId: (json['other_person_id'] as num).toInt(), + reason: json['reason'] as String?, + banned: json['banned'] as bool, + expires: json['expires'] as String?, + when: json['when_'] as String, +); -Map _$$ModBanImplToJson(_$ModBanImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'other_person_id': instance.otherPersonId, - 'reason': instance.reason, - 'banned': instance.banned, - 'expires': instance.expires, - 'when_': instance.when, - }; +Map _$$ModBanImplToJson(_$ModBanImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'other_person_id': instance.otherPersonId, + 'reason': instance.reason, + 'banned': instance.banned, + 'expires': instance.expires, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_ban_from_community.dart b/lib/src/v3/models/mod/mod_ban_from_community.dart index cc7c7cf3..ac301095 100644 --- a/lib/src/v3/models/mod/mod_ban_from_community.dart +++ b/lib/src/v3/models/mod/mod_ban_from_community.dart @@ -20,6 +20,5 @@ class ModBanFromCommunity with _$ModBanFromCommunity { }) = _ModBanFromCommunity; const ModBanFromCommunity._(); - factory ModBanFromCommunity.fromJson(Map json) => - _$ModBanFromCommunityFromJson(json); + factory ModBanFromCommunity.fromJson(Map json) => _$ModBanFromCommunityFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_ban_from_community.freezed.dart b/lib/src/v3/models/mod/mod_ban_from_community.freezed.dart index 6c78f45c..e444abf4 100644 --- a/lib/src/v3/models/mod/mod_ban_from_community.freezed.dart +++ b/lib/src/v3/models/mod/mod_ban_from_community.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_ban_from_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModBanFromCommunity _$ModBanFromCommunityFromJson(Map json) { return _ModBanFromCommunity.fromJson(json); @@ -36,30 +37,18 @@ mixin _$ModBanFromCommunity { /// Create a copy of ModBanFromCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModBanFromCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModBanFromCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModBanFromCommunityCopyWith<$Res> { - factory $ModBanFromCommunityCopyWith( - ModBanFromCommunity value, $Res Function(ModBanFromCommunity) then) = - _$ModBanFromCommunityCopyWithImpl<$Res, ModBanFromCommunity>; + factory $ModBanFromCommunityCopyWith(ModBanFromCommunity value, $Res Function(ModBanFromCommunity) then) = _$ModBanFromCommunityCopyWithImpl<$Res, ModBanFromCommunity>; @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - String? reason, - bool banned, - String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, String? reason, bool banned, String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModBanFromCommunityCopyWithImpl<$Res, $Val extends ModBanFromCommunity> - implements $ModBanFromCommunityCopyWith<$Res> { +class _$ModBanFromCommunityCopyWithImpl<$Res, $Val extends ModBanFromCommunity> implements $ModBanFromCommunityCopyWith<$Res> { _$ModBanFromCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -81,69 +70,65 @@ class _$ModBanFromCommunityCopyWithImpl<$Res, $Val extends ModBanFromCommunity> Object? expires = freezed, Object? when = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModBanFromCommunityImplCopyWith<$Res> - implements $ModBanFromCommunityCopyWith<$Res> { - factory _$$ModBanFromCommunityImplCopyWith(_$ModBanFromCommunityImpl value, - $Res Function(_$ModBanFromCommunityImpl) then) = - __$$ModBanFromCommunityImplCopyWithImpl<$Res>; +abstract class _$$ModBanFromCommunityImplCopyWith<$Res> implements $ModBanFromCommunityCopyWith<$Res> { + factory _$$ModBanFromCommunityImplCopyWith(_$ModBanFromCommunityImpl value, $Res Function(_$ModBanFromCommunityImpl) then) = __$$ModBanFromCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - String? reason, - bool banned, - String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, String? reason, bool banned, String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModBanFromCommunityImplCopyWithImpl<$Res> - extends _$ModBanFromCommunityCopyWithImpl<$Res, _$ModBanFromCommunityImpl> - implements _$$ModBanFromCommunityImplCopyWith<$Res> { - __$$ModBanFromCommunityImplCopyWithImpl(_$ModBanFromCommunityImpl _value, - $Res Function(_$ModBanFromCommunityImpl) _then) - : super(_value, _then); +class __$$ModBanFromCommunityImplCopyWithImpl<$Res> extends _$ModBanFromCommunityCopyWithImpl<$Res, _$ModBanFromCommunityImpl> implements _$$ModBanFromCommunityImplCopyWith<$Res> { + __$$ModBanFromCommunityImplCopyWithImpl(_$ModBanFromCommunityImpl _value, $Res Function(_$ModBanFromCommunityImpl) _then) : super(_value, _then); /// Create a copy of ModBanFromCommunity /// with the given fields replaced by the non-null parameter values. @@ -159,40 +144,50 @@ class __$$ModBanFromCommunityImplCopyWithImpl<$Res> Object? expires = freezed, Object? when = null, }) { - return _then(_$ModBanFromCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$ModBanFromCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -200,41 +195,40 @@ class __$$ModBanFromCommunityImplCopyWithImpl<$Res> @modelSerde class _$ModBanFromCommunityImpl extends _ModBanFromCommunity { - const _$ModBanFromCommunityImpl( - {required this.id, - required this.modPersonId, - required this.otherPersonId, - required this.communityId, - this.reason, - required this.banned, - this.expires, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModBanFromCommunityImpl({ + required this.id, + required this.modPersonId, + required this.otherPersonId, + required this.communityId, + this.reason, + required this.banned, + this.expires, + @JsonKey(name: 'when_') required this.when, + }) : super._(); - factory _$ModBanFromCommunityImpl.fromJson(Map json) => - _$$ModBanFromCommunityImplFromJson(json); + factory _$ModBanFromCommunityImpl.fromJson(Map json) => _$$ModBanFromCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int otherPersonId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool banned; -// v0.18.0 + // v0.18.0 @override final String? expires; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -250,12 +244,9 @@ class _$ModBanFromCommunityImpl extends _ModBanFromCommunity { (other.runtimeType == runtimeType && other is _$ModBanFromCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.banned, banned) || other.banned == banned) && (identical(other.expires, expires) || other.expires == expires) && @@ -264,41 +255,35 @@ class _$ModBanFromCommunityImpl extends _ModBanFromCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, - communityId, reason, banned, expires, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, communityId, reason, banned, expires, when); /// Create a copy of ModBanFromCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModBanFromCommunityImplCopyWith<_$ModBanFromCommunityImpl> get copyWith => - __$$ModBanFromCommunityImplCopyWithImpl<_$ModBanFromCommunityImpl>( - this, _$identity); + _$$ModBanFromCommunityImplCopyWith<_$ModBanFromCommunityImpl> get copyWith => __$$ModBanFromCommunityImplCopyWithImpl<_$ModBanFromCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$ModBanFromCommunityImplToJson( - this, - ); + return _$$ModBanFromCommunityImplToJson(this); } } abstract class _ModBanFromCommunity extends ModBanFromCommunity { - const factory _ModBanFromCommunity( - {required final int id, - required final int modPersonId, - required final int otherPersonId, - required final int communityId, - final String? reason, - required final bool banned, - final String? expires, - @JsonKey(name: 'when_') required final String when}) = - _$ModBanFromCommunityImpl; + const factory _ModBanFromCommunity({ + required final int id, + required final int modPersonId, + required final int otherPersonId, + required final int communityId, + final String? reason, + required final bool banned, + final String? expires, + @JsonKey(name: 'when_') required final String when, + }) = _$ModBanFromCommunityImpl; const _ModBanFromCommunity._() : super._(); - factory _ModBanFromCommunity.fromJson(Map json) = - _$ModBanFromCommunityImpl.fromJson; + factory _ModBanFromCommunity.fromJson(Map json) = _$ModBanFromCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -322,6 +307,5 @@ abstract class _ModBanFromCommunity extends ModBanFromCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModBanFromCommunityImplCopyWith<_$ModBanFromCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModBanFromCommunityImplCopyWith<_$ModBanFromCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_ban_from_community.g.dart b/lib/src/v3/models/mod/mod_ban_from_community.g.dart index ba06661d..d231d8f8 100644 --- a/lib/src/v3/models/mod/mod_ban_from_community.g.dart +++ b/lib/src/v3/models/mod/mod_ban_from_community.g.dart @@ -6,28 +6,24 @@ part of 'mod_ban_from_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModBanFromCommunityImpl _$$ModBanFromCommunityImplFromJson( - Map json) => - _$ModBanFromCommunityImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - otherPersonId: (json['other_person_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - reason: json['reason'] as String?, - banned: json['banned'] as bool, - expires: json['expires'] as String?, - when: json['when_'] as String, - ); +_$ModBanFromCommunityImpl _$$ModBanFromCommunityImplFromJson(Map json) => _$ModBanFromCommunityImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + otherPersonId: (json['other_person_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + reason: json['reason'] as String?, + banned: json['banned'] as bool, + expires: json['expires'] as String?, + when: json['when_'] as String, +); -Map _$$ModBanFromCommunityImplToJson( - _$ModBanFromCommunityImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'other_person_id': instance.otherPersonId, - 'community_id': instance.communityId, - 'reason': instance.reason, - 'banned': instance.banned, - 'expires': instance.expires, - 'when_': instance.when, - }; +Map _$$ModBanFromCommunityImplToJson(_$ModBanFromCommunityImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'other_person_id': instance.otherPersonId, + 'community_id': instance.communityId, + 'reason': instance.reason, + 'banned': instance.banned, + 'expires': instance.expires, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_feature_post.dart b/lib/src/v3/models/mod/mod_feature_post.dart index c0cd73b3..141b2c79 100644 --- a/lib/src/v3/models/mod/mod_feature_post.dart +++ b/lib/src/v3/models/mod/mod_feature_post.dart @@ -18,6 +18,5 @@ class ModFeaturePost with _$ModFeaturePost { }) = _ModFeaturePost; const ModFeaturePost._(); - factory ModFeaturePost.fromJson(Map json) => - _$ModFeaturePostFromJson(json); + factory ModFeaturePost.fromJson(Map json) => _$ModFeaturePostFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_feature_post.freezed.dart b/lib/src/v3/models/mod/mod_feature_post.freezed.dart index 990a2d1c..b13233f8 100644 --- a/lib/src/v3/models/mod/mod_feature_post.freezed.dart +++ b/lib/src/v3/models/mod/mod_feature_post.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_feature_post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModFeaturePost _$ModFeaturePostFromJson(Map json) { return _ModFeaturePost.fromJson(json); @@ -34,28 +35,18 @@ mixin _$ModFeaturePost { /// Create a copy of ModFeaturePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModFeaturePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModFeaturePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModFeaturePostCopyWith<$Res> { - factory $ModFeaturePostCopyWith( - ModFeaturePost value, $Res Function(ModFeaturePost) then) = - _$ModFeaturePostCopyWithImpl<$Res, ModFeaturePost>; + factory $ModFeaturePostCopyWith(ModFeaturePost value, $Res Function(ModFeaturePost) then) = _$ModFeaturePostCopyWithImpl<$Res, ModFeaturePost>; @useResult - $Res call( - {int id, - int modPersonId, - int postId, - bool featured, - @JsonKey(name: 'when_') String when, - bool isFeaturedCommunity}); + $Res call({int id, int modPersonId, int postId, bool featured, @JsonKey(name: 'when_') String when, bool isFeaturedCommunity}); } /// @nodoc -class _$ModFeaturePostCopyWithImpl<$Res, $Val extends ModFeaturePost> - implements $ModFeaturePostCopyWith<$Res> { +class _$ModFeaturePostCopyWithImpl<$Res, $Val extends ModFeaturePost> implements $ModFeaturePostCopyWith<$Res> { _$ModFeaturePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,106 +58,96 @@ class _$ModFeaturePostCopyWithImpl<$Res, $Val extends ModFeaturePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? featured = null, - Object? when = null, - Object? isFeaturedCommunity = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - featured: null == featured - ? _value.featured - : featured // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - isFeaturedCommunity: null == isFeaturedCommunity - ? _value.isFeaturedCommunity - : isFeaturedCommunity // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? featured = null, Object? when = null, Object? isFeaturedCommunity = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + featured: + null == featured + ? _value.featured + : featured // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + isFeaturedCommunity: + null == isFeaturedCommunity + ? _value.isFeaturedCommunity + : isFeaturedCommunity // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModFeaturePostImplCopyWith<$Res> - implements $ModFeaturePostCopyWith<$Res> { - factory _$$ModFeaturePostImplCopyWith(_$ModFeaturePostImpl value, - $Res Function(_$ModFeaturePostImpl) then) = - __$$ModFeaturePostImplCopyWithImpl<$Res>; +abstract class _$$ModFeaturePostImplCopyWith<$Res> implements $ModFeaturePostCopyWith<$Res> { + factory _$$ModFeaturePostImplCopyWith(_$ModFeaturePostImpl value, $Res Function(_$ModFeaturePostImpl) then) = __$$ModFeaturePostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int postId, - bool featured, - @JsonKey(name: 'when_') String when, - bool isFeaturedCommunity}); + $Res call({int id, int modPersonId, int postId, bool featured, @JsonKey(name: 'when_') String when, bool isFeaturedCommunity}); } /// @nodoc -class __$$ModFeaturePostImplCopyWithImpl<$Res> - extends _$ModFeaturePostCopyWithImpl<$Res, _$ModFeaturePostImpl> - implements _$$ModFeaturePostImplCopyWith<$Res> { - __$$ModFeaturePostImplCopyWithImpl( - _$ModFeaturePostImpl _value, $Res Function(_$ModFeaturePostImpl) _then) - : super(_value, _then); +class __$$ModFeaturePostImplCopyWithImpl<$Res> extends _$ModFeaturePostCopyWithImpl<$Res, _$ModFeaturePostImpl> implements _$$ModFeaturePostImplCopyWith<$Res> { + __$$ModFeaturePostImplCopyWithImpl(_$ModFeaturePostImpl _value, $Res Function(_$ModFeaturePostImpl) _then) : super(_value, _then); /// Create a copy of ModFeaturePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? featured = null, - Object? when = null, - Object? isFeaturedCommunity = null, - }) { - return _then(_$ModFeaturePostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - featured: null == featured - ? _value.featured - : featured // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - isFeaturedCommunity: null == isFeaturedCommunity - ? _value.isFeaturedCommunity - : isFeaturedCommunity // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? featured = null, Object? when = null, Object? isFeaturedCommunity = null}) { + return _then( + _$ModFeaturePostImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + featured: + null == featured + ? _value.featured + : featured // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + isFeaturedCommunity: + null == isFeaturedCommunity + ? _value.isFeaturedCommunity + : isFeaturedCommunity // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -174,34 +155,27 @@ class __$$ModFeaturePostImplCopyWithImpl<$Res> @modelSerde class _$ModFeaturePostImpl extends _ModFeaturePost { - const _$ModFeaturePostImpl( - {required this.id, - required this.modPersonId, - required this.postId, - required this.featured, - @JsonKey(name: 'when_') required this.when, - required this.isFeaturedCommunity}) - : super._(); + const _$ModFeaturePostImpl({required this.id, required this.modPersonId, required this.postId, required this.featured, @JsonKey(name: 'when_') required this.when, required this.isFeaturedCommunity}) + : super._(); - factory _$ModFeaturePostImpl.fromJson(Map json) => - _$$ModFeaturePostImplFromJson(json); + factory _$ModFeaturePostImpl.fromJson(Map json) => _$$ModFeaturePostImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool featured; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; -// v0.18.0 + // v0.18.0 @override final bool isFeaturedCommunity; @@ -216,50 +190,42 @@ class _$ModFeaturePostImpl extends _ModFeaturePost { (other.runtimeType == runtimeType && other is _$ModFeaturePostImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.featured, featured) || - other.featured == featured) && + (identical(other.featured, featured) || other.featured == featured) && (identical(other.when, when) || other.when == when) && - (identical(other.isFeaturedCommunity, isFeaturedCommunity) || - other.isFeaturedCommunity == isFeaturedCommunity)); + (identical(other.isFeaturedCommunity, isFeaturedCommunity) || other.isFeaturedCommunity == isFeaturedCommunity)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, modPersonId, postId, - featured, when, isFeaturedCommunity); + int get hashCode => Object.hash(runtimeType, id, modPersonId, postId, featured, when, isFeaturedCommunity); /// Create a copy of ModFeaturePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModFeaturePostImplCopyWith<_$ModFeaturePostImpl> get copyWith => - __$$ModFeaturePostImplCopyWithImpl<_$ModFeaturePostImpl>( - this, _$identity); + _$$ModFeaturePostImplCopyWith<_$ModFeaturePostImpl> get copyWith => __$$ModFeaturePostImplCopyWithImpl<_$ModFeaturePostImpl>(this, _$identity); @override Map toJson() { - return _$$ModFeaturePostImplToJson( - this, - ); + return _$$ModFeaturePostImplToJson(this); } } abstract class _ModFeaturePost extends ModFeaturePost { - const factory _ModFeaturePost( - {required final int id, - required final int modPersonId, - required final int postId, - required final bool featured, - @JsonKey(name: 'when_') required final String when, - required final bool isFeaturedCommunity}) = _$ModFeaturePostImpl; + const factory _ModFeaturePost({ + required final int id, + required final int modPersonId, + required final int postId, + required final bool featured, + @JsonKey(name: 'when_') required final String when, + required final bool isFeaturedCommunity, + }) = _$ModFeaturePostImpl; const _ModFeaturePost._() : super._(); - factory _ModFeaturePost.fromJson(Map json) = - _$ModFeaturePostImpl.fromJson; + factory _ModFeaturePost.fromJson(Map json) = _$ModFeaturePostImpl.fromJson; @override int get id; // v0.18.0 @@ -279,6 +245,5 @@ abstract class _ModFeaturePost extends ModFeaturePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModFeaturePostImplCopyWith<_$ModFeaturePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModFeaturePostImplCopyWith<_$ModFeaturePostImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_feature_post.g.dart b/lib/src/v3/models/mod/mod_feature_post.g.dart index 57b34e61..44ad60fe 100644 --- a/lib/src/v3/models/mod/mod_feature_post.g.dart +++ b/lib/src/v3/models/mod/mod_feature_post.g.dart @@ -6,23 +6,20 @@ part of 'mod_feature_post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModFeaturePostImpl _$$ModFeaturePostImplFromJson(Map json) => - _$ModFeaturePostImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - featured: json['featured'] as bool, - when: json['when_'] as String, - isFeaturedCommunity: json['is_featured_community'] as bool, - ); +_$ModFeaturePostImpl _$$ModFeaturePostImplFromJson(Map json) => _$ModFeaturePostImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + featured: json['featured'] as bool, + when: json['when_'] as String, + isFeaturedCommunity: json['is_featured_community'] as bool, +); -Map _$$ModFeaturePostImplToJson( - _$ModFeaturePostImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'post_id': instance.postId, - 'featured': instance.featured, - 'when_': instance.when, - 'is_featured_community': instance.isFeaturedCommunity, - }; +Map _$$ModFeaturePostImplToJson(_$ModFeaturePostImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'post_id': instance.postId, + 'featured': instance.featured, + 'when_': instance.when, + 'is_featured_community': instance.isFeaturedCommunity, +}; diff --git a/lib/src/v3/models/mod/mod_hide_community.dart b/lib/src/v3/models/mod/mod_hide_community.dart index 134fe7b3..bc167853 100644 --- a/lib/src/v3/models/mod/mod_hide_community.dart +++ b/lib/src/v3/models/mod/mod_hide_community.dart @@ -18,6 +18,5 @@ class ModHideCommunity with _$ModHideCommunity { }) = _ModHideCommunity; const ModHideCommunity._(); - factory ModHideCommunity.fromJson(Map json) => - _$ModHideCommunityFromJson(json); + factory ModHideCommunity.fromJson(Map json) => _$ModHideCommunityFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_hide_community.freezed.dart b/lib/src/v3/models/mod/mod_hide_community.freezed.dart index 0284120a..608cb287 100644 --- a/lib/src/v3/models/mod/mod_hide_community.freezed.dart +++ b/lib/src/v3/models/mod/mod_hide_community.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_hide_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModHideCommunity _$ModHideCommunityFromJson(Map json) { return _ModHideCommunity.fromJson(json); @@ -34,28 +35,18 @@ mixin _$ModHideCommunity { /// Create a copy of ModHideCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModHideCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModHideCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModHideCommunityCopyWith<$Res> { - factory $ModHideCommunityCopyWith( - ModHideCommunity value, $Res Function(ModHideCommunity) then) = - _$ModHideCommunityCopyWithImpl<$Res, ModHideCommunity>; + factory $ModHideCommunityCopyWith(ModHideCommunity value, $Res Function(ModHideCommunity) then) = _$ModHideCommunityCopyWithImpl<$Res, ModHideCommunity>; @useResult - $Res call( - {int id, - int communityId, - int modPersonId, - @JsonKey(name: 'when_') String when, - String? reason, - bool hidden}); + $Res call({int id, int communityId, int modPersonId, @JsonKey(name: 'when_') String when, String? reason, bool hidden}); } /// @nodoc -class _$ModHideCommunityCopyWithImpl<$Res, $Val extends ModHideCommunity> - implements $ModHideCommunityCopyWith<$Res> { +class _$ModHideCommunityCopyWithImpl<$Res, $Val extends ModHideCommunity> implements $ModHideCommunityCopyWith<$Res> { _$ModHideCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,106 +58,96 @@ class _$ModHideCommunityCopyWithImpl<$Res, $Val extends ModHideCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? communityId = null, - Object? modPersonId = null, - Object? when = null, - Object? reason = freezed, - Object? hidden = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? id = null, Object? communityId = null, Object? modPersonId = null, Object? when = null, Object? reason = freezed, Object? hidden = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModHideCommunityImplCopyWith<$Res> - implements $ModHideCommunityCopyWith<$Res> { - factory _$$ModHideCommunityImplCopyWith(_$ModHideCommunityImpl value, - $Res Function(_$ModHideCommunityImpl) then) = - __$$ModHideCommunityImplCopyWithImpl<$Res>; +abstract class _$$ModHideCommunityImplCopyWith<$Res> implements $ModHideCommunityCopyWith<$Res> { + factory _$$ModHideCommunityImplCopyWith(_$ModHideCommunityImpl value, $Res Function(_$ModHideCommunityImpl) then) = __$$ModHideCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int communityId, - int modPersonId, - @JsonKey(name: 'when_') String when, - String? reason, - bool hidden}); + $Res call({int id, int communityId, int modPersonId, @JsonKey(name: 'when_') String when, String? reason, bool hidden}); } /// @nodoc -class __$$ModHideCommunityImplCopyWithImpl<$Res> - extends _$ModHideCommunityCopyWithImpl<$Res, _$ModHideCommunityImpl> - implements _$$ModHideCommunityImplCopyWith<$Res> { - __$$ModHideCommunityImplCopyWithImpl(_$ModHideCommunityImpl _value, - $Res Function(_$ModHideCommunityImpl) _then) - : super(_value, _then); +class __$$ModHideCommunityImplCopyWithImpl<$Res> extends _$ModHideCommunityCopyWithImpl<$Res, _$ModHideCommunityImpl> implements _$$ModHideCommunityImplCopyWith<$Res> { + __$$ModHideCommunityImplCopyWithImpl(_$ModHideCommunityImpl _value, $Res Function(_$ModHideCommunityImpl) _then) : super(_value, _then); /// Create a copy of ModHideCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? communityId = null, - Object? modPersonId = null, - Object? when = null, - Object? reason = freezed, - Object? hidden = null, - }) { - return _then(_$ModHideCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - hidden: null == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? id = null, Object? communityId = null, Object? modPersonId = null, Object? when = null, Object? reason = freezed, Object? hidden = null}) { + return _then( + _$ModHideCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + hidden: + null == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -174,34 +155,26 @@ class __$$ModHideCommunityImplCopyWithImpl<$Res> @modelSerde class _$ModHideCommunityImpl extends _ModHideCommunity { - const _$ModHideCommunityImpl( - {required this.id, - required this.communityId, - required this.modPersonId, - @JsonKey(name: 'when_') required this.when, - this.reason, - required this.hidden}) - : super._(); + const _$ModHideCommunityImpl({required this.id, required this.communityId, required this.modPersonId, @JsonKey(name: 'when_') required this.when, this.reason, required this.hidden}) : super._(); - factory _$ModHideCommunityImpl.fromJson(Map json) => - _$$ModHideCommunityImplFromJson(json); + factory _$ModHideCommunityImpl.fromJson(Map json) => _$$ModHideCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool hidden; @@ -216,10 +189,8 @@ class _$ModHideCommunityImpl extends _ModHideCommunity { (other.runtimeType == runtimeType && other is _$ModHideCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && (identical(other.when, when) || other.when == when) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.hidden, hidden) || other.hidden == hidden)); @@ -227,38 +198,33 @@ class _$ModHideCommunityImpl extends _ModHideCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, communityId, modPersonId, when, reason, hidden); + int get hashCode => Object.hash(runtimeType, id, communityId, modPersonId, when, reason, hidden); /// Create a copy of ModHideCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModHideCommunityImplCopyWith<_$ModHideCommunityImpl> get copyWith => - __$$ModHideCommunityImplCopyWithImpl<_$ModHideCommunityImpl>( - this, _$identity); + _$$ModHideCommunityImplCopyWith<_$ModHideCommunityImpl> get copyWith => __$$ModHideCommunityImplCopyWithImpl<_$ModHideCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$ModHideCommunityImplToJson( - this, - ); + return _$$ModHideCommunityImplToJson(this); } } abstract class _ModHideCommunity extends ModHideCommunity { - const factory _ModHideCommunity( - {required final int id, - required final int communityId, - required final int modPersonId, - @JsonKey(name: 'when_') required final String when, - final String? reason, - required final bool hidden}) = _$ModHideCommunityImpl; + const factory _ModHideCommunity({ + required final int id, + required final int communityId, + required final int modPersonId, + @JsonKey(name: 'when_') required final String when, + final String? reason, + required final bool hidden, + }) = _$ModHideCommunityImpl; const _ModHideCommunity._() : super._(); - factory _ModHideCommunity.fromJson(Map json) = - _$ModHideCommunityImpl.fromJson; + factory _ModHideCommunity.fromJson(Map json) = _$ModHideCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -278,6 +244,5 @@ abstract class _ModHideCommunity extends ModHideCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModHideCommunityImplCopyWith<_$ModHideCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModHideCommunityImplCopyWith<_$ModHideCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_hide_community.g.dart b/lib/src/v3/models/mod/mod_hide_community.g.dart index 8fc74775..cb26d008 100644 --- a/lib/src/v3/models/mod/mod_hide_community.g.dart +++ b/lib/src/v3/models/mod/mod_hide_community.g.dart @@ -6,24 +6,20 @@ part of 'mod_hide_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModHideCommunityImpl _$$ModHideCommunityImplFromJson( - Map json) => - _$ModHideCommunityImpl( - id: (json['id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - when: json['when_'] as String, - reason: json['reason'] as String?, - hidden: json['hidden'] as bool, - ); +_$ModHideCommunityImpl _$$ModHideCommunityImplFromJson(Map json) => _$ModHideCommunityImpl( + id: (json['id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + when: json['when_'] as String, + reason: json['reason'] as String?, + hidden: json['hidden'] as bool, +); -Map _$$ModHideCommunityImplToJson( - _$ModHideCommunityImpl instance) => - { - 'id': instance.id, - 'community_id': instance.communityId, - 'mod_person_id': instance.modPersonId, - 'when_': instance.when, - 'reason': instance.reason, - 'hidden': instance.hidden, - }; +Map _$$ModHideCommunityImplToJson(_$ModHideCommunityImpl instance) => { + 'id': instance.id, + 'community_id': instance.communityId, + 'mod_person_id': instance.modPersonId, + 'when_': instance.when, + 'reason': instance.reason, + 'hidden': instance.hidden, +}; diff --git a/lib/src/v3/models/mod/mod_lock_post.dart b/lib/src/v3/models/mod/mod_lock_post.dart index 1a61d076..82b8fb8b 100644 --- a/lib/src/v3/models/mod/mod_lock_post.dart +++ b/lib/src/v3/models/mod/mod_lock_post.dart @@ -17,6 +17,5 @@ class ModLockPost with _$ModLockPost { }) = _ModLockPost; const ModLockPost._(); - factory ModLockPost.fromJson(Map json) => - _$ModLockPostFromJson(json); + factory ModLockPost.fromJson(Map json) => _$ModLockPostFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_lock_post.freezed.dart b/lib/src/v3/models/mod/mod_lock_post.freezed.dart index 712e24f7..f7beb0e1 100644 --- a/lib/src/v3/models/mod/mod_lock_post.freezed.dart +++ b/lib/src/v3/models/mod/mod_lock_post.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_lock_post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModLockPost _$ModLockPostFromJson(Map json) { return _ModLockPost.fromJson(json); @@ -33,27 +34,18 @@ mixin _$ModLockPost { /// Create a copy of ModLockPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModLockPostCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModLockPostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModLockPostCopyWith<$Res> { - factory $ModLockPostCopyWith( - ModLockPost value, $Res Function(ModLockPost) then) = - _$ModLockPostCopyWithImpl<$Res, ModLockPost>; + factory $ModLockPostCopyWith(ModLockPost value, $Res Function(ModLockPost) then) = _$ModLockPostCopyWithImpl<$Res, ModLockPost>; @useResult - $Res call( - {int id, - int modPersonId, - int postId, - bool locked, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int postId, bool locked, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModLockPostCopyWithImpl<$Res, $Val extends ModLockPost> - implements $ModLockPostCopyWith<$Res> { +class _$ModLockPostCopyWithImpl<$Res, $Val extends ModLockPost> implements $ModLockPostCopyWith<$Res> { _$ModLockPostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -65,95 +57,86 @@ class _$ModLockPostCopyWithImpl<$Res, $Val extends ModLockPost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? locked = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? locked = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModLockPostImplCopyWith<$Res> - implements $ModLockPostCopyWith<$Res> { - factory _$$ModLockPostImplCopyWith( - _$ModLockPostImpl value, $Res Function(_$ModLockPostImpl) then) = - __$$ModLockPostImplCopyWithImpl<$Res>; +abstract class _$$ModLockPostImplCopyWith<$Res> implements $ModLockPostCopyWith<$Res> { + factory _$$ModLockPostImplCopyWith(_$ModLockPostImpl value, $Res Function(_$ModLockPostImpl) then) = __$$ModLockPostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int postId, - bool locked, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int postId, bool locked, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModLockPostImplCopyWithImpl<$Res> - extends _$ModLockPostCopyWithImpl<$Res, _$ModLockPostImpl> - implements _$$ModLockPostImplCopyWith<$Res> { - __$$ModLockPostImplCopyWithImpl( - _$ModLockPostImpl _value, $Res Function(_$ModLockPostImpl) _then) - : super(_value, _then); +class __$$ModLockPostImplCopyWithImpl<$Res> extends _$ModLockPostCopyWithImpl<$Res, _$ModLockPostImpl> implements _$$ModLockPostImplCopyWith<$Res> { + __$$ModLockPostImplCopyWithImpl(_$ModLockPostImpl _value, $Res Function(_$ModLockPostImpl) _then) : super(_value, _then); /// Create a copy of ModLockPost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? locked = null, - Object? when = null, - }) { - return _then(_$ModLockPostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? locked = null, Object? when = null}) { + return _then( + _$ModLockPostImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -161,29 +144,22 @@ class __$$ModLockPostImplCopyWithImpl<$Res> @modelSerde class _$ModLockPostImpl extends _ModLockPost { - const _$ModLockPostImpl( - {required this.id, - required this.modPersonId, - required this.postId, - required this.locked, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModLockPostImpl({required this.id, required this.modPersonId, required this.postId, required this.locked, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$ModLockPostImpl.fromJson(Map json) => - _$$ModLockPostImplFromJson(json); + factory _$ModLockPostImpl.fromJson(Map json) => _$$ModLockPostImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final bool locked; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -199,8 +175,7 @@ class _$ModLockPostImpl extends _ModLockPost { (other.runtimeType == runtimeType && other is _$ModLockPostImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && (identical(other.postId, postId) || other.postId == postId) && (identical(other.locked, locked) || other.locked == locked) && (identical(other.when, when) || other.when == when)); @@ -208,36 +183,27 @@ class _$ModLockPostImpl extends _ModLockPost { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, modPersonId, postId, locked, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, postId, locked, when); /// Create a copy of ModLockPost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModLockPostImplCopyWith<_$ModLockPostImpl> get copyWith => - __$$ModLockPostImplCopyWithImpl<_$ModLockPostImpl>(this, _$identity); + _$$ModLockPostImplCopyWith<_$ModLockPostImpl> get copyWith => __$$ModLockPostImplCopyWithImpl<_$ModLockPostImpl>(this, _$identity); @override Map toJson() { - return _$$ModLockPostImplToJson( - this, - ); + return _$$ModLockPostImplToJson(this); } } abstract class _ModLockPost extends ModLockPost { - const factory _ModLockPost( - {required final int id, - required final int modPersonId, - required final int postId, - required final bool locked, - @JsonKey(name: 'when_') required final String when}) = _$ModLockPostImpl; + const factory _ModLockPost({required final int id, required final int modPersonId, required final int postId, required final bool locked, @JsonKey(name: 'when_') required final String when}) = + _$ModLockPostImpl; const _ModLockPost._() : super._(); - factory _ModLockPost.fromJson(Map json) = - _$ModLockPostImpl.fromJson; + factory _ModLockPost.fromJson(Map json) = _$ModLockPostImpl.fromJson; @override int get id; // v0.18.0 @@ -255,6 +221,5 @@ abstract class _ModLockPost extends ModLockPost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModLockPostImplCopyWith<_$ModLockPostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModLockPostImplCopyWith<_$ModLockPostImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_lock_post.g.dart b/lib/src/v3/models/mod/mod_lock_post.g.dart index 9b6466a7..84ae3054 100644 --- a/lib/src/v3/models/mod/mod_lock_post.g.dart +++ b/lib/src/v3/models/mod/mod_lock_post.g.dart @@ -6,20 +6,18 @@ part of 'mod_lock_post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModLockPostImpl _$$ModLockPostImplFromJson(Map json) => - _$ModLockPostImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - locked: json['locked'] as bool, - when: json['when_'] as String, - ); +_$ModLockPostImpl _$$ModLockPostImplFromJson(Map json) => _$ModLockPostImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + locked: json['locked'] as bool, + when: json['when_'] as String, +); -Map _$$ModLockPostImplToJson(_$ModLockPostImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'post_id': instance.postId, - 'locked': instance.locked, - 'when_': instance.when, - }; +Map _$$ModLockPostImplToJson(_$ModLockPostImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'post_id': instance.postId, + 'locked': instance.locked, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_remove_comment.dart b/lib/src/v3/models/mod/mod_remove_comment.dart index 7a0fdc51..5264b470 100644 --- a/lib/src/v3/models/mod/mod_remove_comment.dart +++ b/lib/src/v3/models/mod/mod_remove_comment.dart @@ -18,6 +18,5 @@ class ModRemoveComment with _$ModRemoveComment { }) = _ModRemoveComment; const ModRemoveComment._(); - factory ModRemoveComment.fromJson(Map json) => - _$ModRemoveCommentFromJson(json); + factory ModRemoveComment.fromJson(Map json) => _$ModRemoveCommentFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_remove_comment.freezed.dart b/lib/src/v3/models/mod/mod_remove_comment.freezed.dart index 7f95fd21..1bdc6c3d 100644 --- a/lib/src/v3/models/mod/mod_remove_comment.freezed.dart +++ b/lib/src/v3/models/mod/mod_remove_comment.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_remove_comment.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModRemoveComment _$ModRemoveCommentFromJson(Map json) { return _ModRemoveComment.fromJson(json); @@ -34,28 +35,18 @@ mixin _$ModRemoveComment { /// Create a copy of ModRemoveComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemoveCommentCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemoveCommentCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemoveCommentCopyWith<$Res> { - factory $ModRemoveCommentCopyWith( - ModRemoveComment value, $Res Function(ModRemoveComment) then) = - _$ModRemoveCommentCopyWithImpl<$Res, ModRemoveComment>; + factory $ModRemoveCommentCopyWith(ModRemoveComment value, $Res Function(ModRemoveComment) then) = _$ModRemoveCommentCopyWithImpl<$Res, ModRemoveComment>; @useResult - $Res call( - {int id, - int modPersonId, - int commentId, - String? reason, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int commentId, String? reason, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModRemoveCommentCopyWithImpl<$Res, $Val extends ModRemoveComment> - implements $ModRemoveCommentCopyWith<$Res> { +class _$ModRemoveCommentCopyWithImpl<$Res, $Val extends ModRemoveComment> implements $ModRemoveCommentCopyWith<$Res> { _$ModRemoveCommentCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,106 +58,96 @@ class _$ModRemoveCommentCopyWithImpl<$Res, $Val extends ModRemoveComment> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? commentId = null, - Object? reason = freezed, - Object? removed = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? commentId = null, Object? reason = freezed, Object? removed = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModRemoveCommentImplCopyWith<$Res> - implements $ModRemoveCommentCopyWith<$Res> { - factory _$$ModRemoveCommentImplCopyWith(_$ModRemoveCommentImpl value, - $Res Function(_$ModRemoveCommentImpl) then) = - __$$ModRemoveCommentImplCopyWithImpl<$Res>; +abstract class _$$ModRemoveCommentImplCopyWith<$Res> implements $ModRemoveCommentCopyWith<$Res> { + factory _$$ModRemoveCommentImplCopyWith(_$ModRemoveCommentImpl value, $Res Function(_$ModRemoveCommentImpl) then) = __$$ModRemoveCommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int commentId, - String? reason, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int commentId, String? reason, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModRemoveCommentImplCopyWithImpl<$Res> - extends _$ModRemoveCommentCopyWithImpl<$Res, _$ModRemoveCommentImpl> - implements _$$ModRemoveCommentImplCopyWith<$Res> { - __$$ModRemoveCommentImplCopyWithImpl(_$ModRemoveCommentImpl _value, - $Res Function(_$ModRemoveCommentImpl) _then) - : super(_value, _then); +class __$$ModRemoveCommentImplCopyWithImpl<$Res> extends _$ModRemoveCommentCopyWithImpl<$Res, _$ModRemoveCommentImpl> implements _$$ModRemoveCommentImplCopyWith<$Res> { + __$$ModRemoveCommentImplCopyWithImpl(_$ModRemoveCommentImpl _value, $Res Function(_$ModRemoveCommentImpl) _then) : super(_value, _then); /// Create a copy of ModRemoveComment /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? commentId = null, - Object? reason = freezed, - Object? removed = null, - Object? when = null, - }) { - return _then(_$ModRemoveCommentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? commentId = null, Object? reason = freezed, Object? removed = null, Object? when = null}) { + return _then( + _$ModRemoveCommentImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -174,33 +155,25 @@ class __$$ModRemoveCommentImplCopyWithImpl<$Res> @modelSerde class _$ModRemoveCommentImpl extends _ModRemoveComment { - const _$ModRemoveCommentImpl( - {required this.id, - required this.modPersonId, - required this.commentId, - this.reason, - required this.removed, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModRemoveCommentImpl({required this.id, required this.modPersonId, required this.commentId, this.reason, required this.removed, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$ModRemoveCommentImpl.fromJson(Map json) => - _$$ModRemoveCommentImplFromJson(json); + factory _$ModRemoveCommentImpl.fromJson(Map json) => _$$ModRemoveCommentImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int commentId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -216,10 +189,8 @@ class _$ModRemoveCommentImpl extends _ModRemoveComment { (other.runtimeType == runtimeType && other is _$ModRemoveCommentImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.when, when) || other.when == when)); @@ -227,39 +198,33 @@ class _$ModRemoveCommentImpl extends _ModRemoveComment { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, modPersonId, commentId, reason, removed, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, commentId, reason, removed, when); /// Create a copy of ModRemoveComment /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemoveCommentImplCopyWith<_$ModRemoveCommentImpl> get copyWith => - __$$ModRemoveCommentImplCopyWithImpl<_$ModRemoveCommentImpl>( - this, _$identity); + _$$ModRemoveCommentImplCopyWith<_$ModRemoveCommentImpl> get copyWith => __$$ModRemoveCommentImplCopyWithImpl<_$ModRemoveCommentImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemoveCommentImplToJson( - this, - ); + return _$$ModRemoveCommentImplToJson(this); } } abstract class _ModRemoveComment extends ModRemoveComment { - const factory _ModRemoveComment( - {required final int id, - required final int modPersonId, - required final int commentId, - final String? reason, - required final bool removed, - @JsonKey(name: 'when_') required final String when}) = - _$ModRemoveCommentImpl; + const factory _ModRemoveComment({ + required final int id, + required final int modPersonId, + required final int commentId, + final String? reason, + required final bool removed, + @JsonKey(name: 'when_') required final String when, + }) = _$ModRemoveCommentImpl; const _ModRemoveComment._() : super._(); - factory _ModRemoveComment.fromJson(Map json) = - _$ModRemoveCommentImpl.fromJson; + factory _ModRemoveComment.fromJson(Map json) = _$ModRemoveCommentImpl.fromJson; @override int get id; // v0.18.0 @@ -279,6 +244,5 @@ abstract class _ModRemoveComment extends ModRemoveComment { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemoveCommentImplCopyWith<_$ModRemoveCommentImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModRemoveCommentImplCopyWith<_$ModRemoveCommentImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_remove_comment.g.dart b/lib/src/v3/models/mod/mod_remove_comment.g.dart index 2bdb047b..f5f05d17 100644 --- a/lib/src/v3/models/mod/mod_remove_comment.g.dart +++ b/lib/src/v3/models/mod/mod_remove_comment.g.dart @@ -6,24 +6,20 @@ part of 'mod_remove_comment.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemoveCommentImpl _$$ModRemoveCommentImplFromJson( - Map json) => - _$ModRemoveCommentImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - commentId: (json['comment_id'] as num).toInt(), - reason: json['reason'] as String?, - removed: json['removed'] as bool, - when: json['when_'] as String, - ); +_$ModRemoveCommentImpl _$$ModRemoveCommentImplFromJson(Map json) => _$ModRemoveCommentImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + commentId: (json['comment_id'] as num).toInt(), + reason: json['reason'] as String?, + removed: json['removed'] as bool, + when: json['when_'] as String, +); -Map _$$ModRemoveCommentImplToJson( - _$ModRemoveCommentImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'comment_id': instance.commentId, - 'reason': instance.reason, - 'removed': instance.removed, - 'when_': instance.when, - }; +Map _$$ModRemoveCommentImplToJson(_$ModRemoveCommentImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'comment_id': instance.commentId, + 'reason': instance.reason, + 'removed': instance.removed, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_remove_community.dart b/lib/src/v3/models/mod/mod_remove_community.dart index 9e9a6ed3..929981d5 100644 --- a/lib/src/v3/models/mod/mod_remove_community.dart +++ b/lib/src/v3/models/mod/mod_remove_community.dart @@ -19,6 +19,5 @@ class ModRemoveCommunity with _$ModRemoveCommunity { }) = _ModRemoveCommunity; const ModRemoveCommunity._(); - factory ModRemoveCommunity.fromJson(Map json) => - _$ModRemoveCommunityFromJson(json); + factory ModRemoveCommunity.fromJson(Map json) => _$ModRemoveCommunityFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_remove_community.freezed.dart b/lib/src/v3/models/mod/mod_remove_community.freezed.dart index a1641c3e..c5e59b55 100644 --- a/lib/src/v3/models/mod/mod_remove_community.freezed.dart +++ b/lib/src/v3/models/mod/mod_remove_community.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_remove_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModRemoveCommunity _$ModRemoveCommunityFromJson(Map json) { return _ModRemoveCommunity.fromJson(json); @@ -26,8 +27,7 @@ mixin _$ModRemoveCommunity { String? get reason => throw _privateConstructorUsedError; // v0.18.0 bool get removed => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get expires => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get expires => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] @JsonKey(name: 'when_') String get when => throw _privateConstructorUsedError; @@ -37,29 +37,18 @@ mixin _$ModRemoveCommunity { /// Create a copy of ModRemoveCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemoveCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemoveCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemoveCommunityCopyWith<$Res> { - factory $ModRemoveCommunityCopyWith( - ModRemoveCommunity value, $Res Function(ModRemoveCommunity) then) = - _$ModRemoveCommunityCopyWithImpl<$Res, ModRemoveCommunity>; + factory $ModRemoveCommunityCopyWith(ModRemoveCommunity value, $Res Function(ModRemoveCommunity) then) = _$ModRemoveCommunityCopyWithImpl<$Res, ModRemoveCommunity>; @useResult - $Res call( - {int id, - int modPersonId, - int communityId, - String? reason, - bool removed, - @deprecated String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int communityId, String? reason, bool removed, @deprecated String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModRemoveCommunityCopyWithImpl<$Res, $Val extends ModRemoveCommunity> - implements $ModRemoveCommunityCopyWith<$Res> { +class _$ModRemoveCommunityCopyWithImpl<$Res, $Val extends ModRemoveCommunity> implements $ModRemoveCommunityCopyWith<$Res> { _$ModRemoveCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -71,117 +60,106 @@ class _$ModRemoveCommunityCopyWithImpl<$Res, $Val extends ModRemoveCommunity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? communityId = null, - Object? reason = freezed, - Object? removed = null, - Object? expires = freezed, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? communityId = null, Object? reason = freezed, Object? removed = null, Object? expires = freezed, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModRemoveCommunityImplCopyWith<$Res> - implements $ModRemoveCommunityCopyWith<$Res> { - factory _$$ModRemoveCommunityImplCopyWith(_$ModRemoveCommunityImpl value, - $Res Function(_$ModRemoveCommunityImpl) then) = - __$$ModRemoveCommunityImplCopyWithImpl<$Res>; +abstract class _$$ModRemoveCommunityImplCopyWith<$Res> implements $ModRemoveCommunityCopyWith<$Res> { + factory _$$ModRemoveCommunityImplCopyWith(_$ModRemoveCommunityImpl value, $Res Function(_$ModRemoveCommunityImpl) then) = __$$ModRemoveCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int communityId, - String? reason, - bool removed, - @deprecated String? expires, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int communityId, String? reason, bool removed, @deprecated String? expires, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModRemoveCommunityImplCopyWithImpl<$Res> - extends _$ModRemoveCommunityCopyWithImpl<$Res, _$ModRemoveCommunityImpl> - implements _$$ModRemoveCommunityImplCopyWith<$Res> { - __$$ModRemoveCommunityImplCopyWithImpl(_$ModRemoveCommunityImpl _value, - $Res Function(_$ModRemoveCommunityImpl) _then) - : super(_value, _then); +class __$$ModRemoveCommunityImplCopyWithImpl<$Res> extends _$ModRemoveCommunityCopyWithImpl<$Res, _$ModRemoveCommunityImpl> implements _$$ModRemoveCommunityImplCopyWith<$Res> { + __$$ModRemoveCommunityImplCopyWithImpl(_$ModRemoveCommunityImpl _value, $Res Function(_$ModRemoveCommunityImpl) _then) : super(_value, _then); /// Create a copy of ModRemoveCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? communityId = null, - Object? reason = freezed, - Object? removed = null, - Object? expires = freezed, - Object? when = null, - }) { - return _then(_$ModRemoveCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - expires: freezed == expires - ? _value.expires - : expires // ignore: cast_nullable_to_non_nullable - as String?, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? communityId = null, Object? reason = freezed, Object? removed = null, Object? expires = freezed, Object? when = null}) { + return _then( + _$ModRemoveCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + expires: + freezed == expires + ? _value.expires + : expires // ignore: cast_nullable_to_non_nullable + as String?, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -189,38 +167,37 @@ class __$$ModRemoveCommunityImplCopyWithImpl<$Res> @modelSerde class _$ModRemoveCommunityImpl extends _ModRemoveCommunity { - const _$ModRemoveCommunityImpl( - {required this.id, - required this.modPersonId, - required this.communityId, - this.reason, - required this.removed, - @deprecated this.expires, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModRemoveCommunityImpl({ + required this.id, + required this.modPersonId, + required this.communityId, + this.reason, + required this.removed, + @deprecated this.expires, + @JsonKey(name: 'when_') required this.when, + }) : super._(); - factory _$ModRemoveCommunityImpl.fromJson(Map json) => - _$$ModRemoveCommunityImplFromJson(json); + factory _$ModRemoveCommunityImpl.fromJson(Map json) => _$$ModRemoveCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override @deprecated final String? expires; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override @JsonKey(name: 'when_') final String when; @@ -236,10 +213,8 @@ class _$ModRemoveCommunityImpl extends _ModRemoveCommunity { (other.runtimeType == runtimeType && other is _$ModRemoveCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.expires, expires) || other.expires == expires) && @@ -248,40 +223,34 @@ class _$ModRemoveCommunityImpl extends _ModRemoveCommunity { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, modPersonId, communityId, - reason, removed, expires, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, communityId, reason, removed, expires, when); /// Create a copy of ModRemoveCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemoveCommunityImplCopyWith<_$ModRemoveCommunityImpl> get copyWith => - __$$ModRemoveCommunityImplCopyWithImpl<_$ModRemoveCommunityImpl>( - this, _$identity); + _$$ModRemoveCommunityImplCopyWith<_$ModRemoveCommunityImpl> get copyWith => __$$ModRemoveCommunityImplCopyWithImpl<_$ModRemoveCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemoveCommunityImplToJson( - this, - ); + return _$$ModRemoveCommunityImplToJson(this); } } abstract class _ModRemoveCommunity extends ModRemoveCommunity { - const factory _ModRemoveCommunity( - {required final int id, - required final int modPersonId, - required final int communityId, - final String? reason, - required final bool removed, - @deprecated final String? expires, - @JsonKey(name: 'when_') required final String when}) = - _$ModRemoveCommunityImpl; + const factory _ModRemoveCommunity({ + required final int id, + required final int modPersonId, + required final int communityId, + final String? reason, + required final bool removed, + @deprecated final String? expires, + @JsonKey(name: 'when_') required final String when, + }) = _$ModRemoveCommunityImpl; const _ModRemoveCommunity._() : super._(); - factory _ModRemoveCommunity.fromJson(Map json) = - _$ModRemoveCommunityImpl.fromJson; + factory _ModRemoveCommunity.fromJson(Map json) = _$ModRemoveCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -304,6 +273,5 @@ abstract class _ModRemoveCommunity extends ModRemoveCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemoveCommunityImplCopyWith<_$ModRemoveCommunityImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModRemoveCommunityImplCopyWith<_$ModRemoveCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_remove_community.g.dart b/lib/src/v3/models/mod/mod_remove_community.g.dart index 64735197..9db76aaa 100644 --- a/lib/src/v3/models/mod/mod_remove_community.g.dart +++ b/lib/src/v3/models/mod/mod_remove_community.g.dart @@ -6,26 +6,22 @@ part of 'mod_remove_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemoveCommunityImpl _$$ModRemoveCommunityImplFromJson( - Map json) => - _$ModRemoveCommunityImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - reason: json['reason'] as String?, - removed: json['removed'] as bool, - expires: json['expires'] as String?, - when: json['when_'] as String, - ); +_$ModRemoveCommunityImpl _$$ModRemoveCommunityImplFromJson(Map json) => _$ModRemoveCommunityImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + reason: json['reason'] as String?, + removed: json['removed'] as bool, + expires: json['expires'] as String?, + when: json['when_'] as String, +); -Map _$$ModRemoveCommunityImplToJson( - _$ModRemoveCommunityImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'community_id': instance.communityId, - 'reason': instance.reason, - 'removed': instance.removed, - 'expires': instance.expires, - 'when_': instance.when, - }; +Map _$$ModRemoveCommunityImplToJson(_$ModRemoveCommunityImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'community_id': instance.communityId, + 'reason': instance.reason, + 'removed': instance.removed, + 'expires': instance.expires, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_remove_post.dart b/lib/src/v3/models/mod/mod_remove_post.dart index 53eefdf9..0a6776aa 100644 --- a/lib/src/v3/models/mod/mod_remove_post.dart +++ b/lib/src/v3/models/mod/mod_remove_post.dart @@ -18,6 +18,5 @@ class ModRemovePost with _$ModRemovePost { }) = _ModRemovePost; const ModRemovePost._(); - factory ModRemovePost.fromJson(Map json) => - _$ModRemovePostFromJson(json); + factory ModRemovePost.fromJson(Map json) => _$ModRemovePostFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_remove_post.freezed.dart b/lib/src/v3/models/mod/mod_remove_post.freezed.dart index bec1457a..3dc7fd20 100644 --- a/lib/src/v3/models/mod/mod_remove_post.freezed.dart +++ b/lib/src/v3/models/mod/mod_remove_post.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_remove_post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModRemovePost _$ModRemovePostFromJson(Map json) { return _ModRemovePost.fromJson(json); @@ -34,28 +35,18 @@ mixin _$ModRemovePost { /// Create a copy of ModRemovePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemovePostCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemovePostCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemovePostCopyWith<$Res> { - factory $ModRemovePostCopyWith( - ModRemovePost value, $Res Function(ModRemovePost) then) = - _$ModRemovePostCopyWithImpl<$Res, ModRemovePost>; + factory $ModRemovePostCopyWith(ModRemovePost value, $Res Function(ModRemovePost) then) = _$ModRemovePostCopyWithImpl<$Res, ModRemovePost>; @useResult - $Res call( - {int id, - int modPersonId, - int postId, - String? reason, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int postId, String? reason, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModRemovePostCopyWithImpl<$Res, $Val extends ModRemovePost> - implements $ModRemovePostCopyWith<$Res> { +class _$ModRemovePostCopyWithImpl<$Res, $Val extends ModRemovePost> implements $ModRemovePostCopyWith<$Res> { _$ModRemovePostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,106 +58,96 @@ class _$ModRemovePostCopyWithImpl<$Res, $Val extends ModRemovePost> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? reason = freezed, - Object? removed = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? reason = freezed, Object? removed = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModRemovePostImplCopyWith<$Res> - implements $ModRemovePostCopyWith<$Res> { - factory _$$ModRemovePostImplCopyWith( - _$ModRemovePostImpl value, $Res Function(_$ModRemovePostImpl) then) = - __$$ModRemovePostImplCopyWithImpl<$Res>; +abstract class _$$ModRemovePostImplCopyWith<$Res> implements $ModRemovePostCopyWith<$Res> { + factory _$$ModRemovePostImplCopyWith(_$ModRemovePostImpl value, $Res Function(_$ModRemovePostImpl) then) = __$$ModRemovePostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int postId, - String? reason, - bool removed, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int postId, String? reason, bool removed, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModRemovePostImplCopyWithImpl<$Res> - extends _$ModRemovePostCopyWithImpl<$Res, _$ModRemovePostImpl> - implements _$$ModRemovePostImplCopyWith<$Res> { - __$$ModRemovePostImplCopyWithImpl( - _$ModRemovePostImpl _value, $Res Function(_$ModRemovePostImpl) _then) - : super(_value, _then); +class __$$ModRemovePostImplCopyWithImpl<$Res> extends _$ModRemovePostCopyWithImpl<$Res, _$ModRemovePostImpl> implements _$$ModRemovePostImplCopyWith<$Res> { + __$$ModRemovePostImplCopyWithImpl(_$ModRemovePostImpl _value, $Res Function(_$ModRemovePostImpl) _then) : super(_value, _then); /// Create a copy of ModRemovePost /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? postId = null, - Object? reason = freezed, - Object? removed = null, - Object? when = null, - }) { - return _then(_$ModRemovePostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - reason: freezed == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String?, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? postId = null, Object? reason = freezed, Object? removed = null, Object? when = null}) { + return _then( + _$ModRemovePostImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + reason: + freezed == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String?, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -174,33 +155,25 @@ class __$$ModRemovePostImplCopyWithImpl<$Res> @modelSerde class _$ModRemovePostImpl extends _ModRemovePost { - const _$ModRemovePostImpl( - {required this.id, - required this.modPersonId, - required this.postId, - this.reason, - required this.removed, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModRemovePostImpl({required this.id, required this.modPersonId, required this.postId, this.reason, required this.removed, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$ModRemovePostImpl.fromJson(Map json) => - _$$ModRemovePostImplFromJson(json); + factory _$ModRemovePostImpl.fromJson(Map json) => _$$ModRemovePostImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final String? reason; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -216,8 +189,7 @@ class _$ModRemovePostImpl extends _ModRemovePost { (other.runtimeType == runtimeType && other is _$ModRemovePostImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && (identical(other.postId, postId) || other.postId == postId) && (identical(other.reason, reason) || other.reason == reason) && (identical(other.removed, removed) || other.removed == removed) && @@ -226,38 +198,33 @@ class _$ModRemovePostImpl extends _ModRemovePost { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, modPersonId, postId, reason, removed, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, postId, reason, removed, when); /// Create a copy of ModRemovePost /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemovePostImplCopyWith<_$ModRemovePostImpl> get copyWith => - __$$ModRemovePostImplCopyWithImpl<_$ModRemovePostImpl>(this, _$identity); + _$$ModRemovePostImplCopyWith<_$ModRemovePostImpl> get copyWith => __$$ModRemovePostImplCopyWithImpl<_$ModRemovePostImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemovePostImplToJson( - this, - ); + return _$$ModRemovePostImplToJson(this); } } abstract class _ModRemovePost extends ModRemovePost { - const factory _ModRemovePost( - {required final int id, - required final int modPersonId, - required final int postId, - final String? reason, - required final bool removed, - @JsonKey(name: 'when_') required final String when}) = - _$ModRemovePostImpl; + const factory _ModRemovePost({ + required final int id, + required final int modPersonId, + required final int postId, + final String? reason, + required final bool removed, + @JsonKey(name: 'when_') required final String when, + }) = _$ModRemovePostImpl; const _ModRemovePost._() : super._(); - factory _ModRemovePost.fromJson(Map json) = - _$ModRemovePostImpl.fromJson; + factory _ModRemovePost.fromJson(Map json) = _$ModRemovePostImpl.fromJson; @override int get id; // v0.18.0 @@ -277,6 +244,5 @@ abstract class _ModRemovePost extends ModRemovePost { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemovePostImplCopyWith<_$ModRemovePostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModRemovePostImplCopyWith<_$ModRemovePostImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_remove_post.g.dart b/lib/src/v3/models/mod/mod_remove_post.g.dart index 8ac548f0..dd2df460 100644 --- a/lib/src/v3/models/mod/mod_remove_post.g.dart +++ b/lib/src/v3/models/mod/mod_remove_post.g.dart @@ -6,22 +6,20 @@ part of 'mod_remove_post.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemovePostImpl _$$ModRemovePostImplFromJson(Map json) => - _$ModRemovePostImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - reason: json['reason'] as String?, - removed: json['removed'] as bool, - when: json['when_'] as String, - ); +_$ModRemovePostImpl _$$ModRemovePostImplFromJson(Map json) => _$ModRemovePostImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + reason: json['reason'] as String?, + removed: json['removed'] as bool, + when: json['when_'] as String, +); -Map _$$ModRemovePostImplToJson(_$ModRemovePostImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'post_id': instance.postId, - 'reason': instance.reason, - 'removed': instance.removed, - 'when_': instance.when, - }; +Map _$$ModRemovePostImplToJson(_$ModRemovePostImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'post_id': instance.postId, + 'reason': instance.reason, + 'removed': instance.removed, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/mod/mod_transfer_community.dart b/lib/src/v3/models/mod/mod_transfer_community.dart index 865c8210..cfcf3dbe 100644 --- a/lib/src/v3/models/mod/mod_transfer_community.dart +++ b/lib/src/v3/models/mod/mod_transfer_community.dart @@ -17,6 +17,5 @@ class ModTransferCommunity with _$ModTransferCommunity { }) = _ModTransferCommunity; const ModTransferCommunity._(); - factory ModTransferCommunity.fromJson(Map json) => - _$ModTransferCommunityFromJson(json); + factory ModTransferCommunity.fromJson(Map json) => _$ModTransferCommunityFromJson(json); } diff --git a/lib/src/v3/models/mod/mod_transfer_community.freezed.dart b/lib/src/v3/models/mod/mod_transfer_community.freezed.dart index 48e166d0..495d4d4b 100644 --- a/lib/src/v3/models/mod/mod_transfer_community.freezed.dart +++ b/lib/src/v3/models/mod/mod_transfer_community.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_transfer_community.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModTransferCommunity _$ModTransferCommunityFromJson(Map json) { return _ModTransferCommunity.fromJson(json); @@ -33,28 +34,18 @@ mixin _$ModTransferCommunity { /// Create a copy of ModTransferCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModTransferCommunityCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModTransferCommunityCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModTransferCommunityCopyWith<$Res> { - factory $ModTransferCommunityCopyWith(ModTransferCommunity value, - $Res Function(ModTransferCommunity) then) = - _$ModTransferCommunityCopyWithImpl<$Res, ModTransferCommunity>; + factory $ModTransferCommunityCopyWith(ModTransferCommunity value, $Res Function(ModTransferCommunity) then) = _$ModTransferCommunityCopyWithImpl<$Res, ModTransferCommunity>; @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, @JsonKey(name: 'when_') String when}); } /// @nodoc -class _$ModTransferCommunityCopyWithImpl<$Res, - $Val extends ModTransferCommunity> - implements $ModTransferCommunityCopyWith<$Res> { +class _$ModTransferCommunityCopyWithImpl<$Res, $Val extends ModTransferCommunity> implements $ModTransferCommunityCopyWith<$Res> { _$ModTransferCommunityCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -66,95 +57,86 @@ class _$ModTransferCommunityCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? communityId = null, - Object? when = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? communityId = null, Object? when = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ModTransferCommunityImplCopyWith<$Res> - implements $ModTransferCommunityCopyWith<$Res> { - factory _$$ModTransferCommunityImplCopyWith(_$ModTransferCommunityImpl value, - $Res Function(_$ModTransferCommunityImpl) then) = - __$$ModTransferCommunityImplCopyWithImpl<$Res>; +abstract class _$$ModTransferCommunityImplCopyWith<$Res> implements $ModTransferCommunityCopyWith<$Res> { + factory _$$ModTransferCommunityImplCopyWith(_$ModTransferCommunityImpl value, $Res Function(_$ModTransferCommunityImpl) then) = __$$ModTransferCommunityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int modPersonId, - int otherPersonId, - int communityId, - @JsonKey(name: 'when_') String when}); + $Res call({int id, int modPersonId, int otherPersonId, int communityId, @JsonKey(name: 'when_') String when}); } /// @nodoc -class __$$ModTransferCommunityImplCopyWithImpl<$Res> - extends _$ModTransferCommunityCopyWithImpl<$Res, _$ModTransferCommunityImpl> - implements _$$ModTransferCommunityImplCopyWith<$Res> { - __$$ModTransferCommunityImplCopyWithImpl(_$ModTransferCommunityImpl _value, - $Res Function(_$ModTransferCommunityImpl) _then) - : super(_value, _then); +class __$$ModTransferCommunityImplCopyWithImpl<$Res> extends _$ModTransferCommunityCopyWithImpl<$Res, _$ModTransferCommunityImpl> implements _$$ModTransferCommunityImplCopyWith<$Res> { + __$$ModTransferCommunityImplCopyWithImpl(_$ModTransferCommunityImpl _value, $Res Function(_$ModTransferCommunityImpl) _then) : super(_value, _then); /// Create a copy of ModTransferCommunity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? modPersonId = null, - Object? otherPersonId = null, - Object? communityId = null, - Object? when = null, - }) { - return _then(_$ModTransferCommunityImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - modPersonId: null == modPersonId - ? _value.modPersonId - : modPersonId // ignore: cast_nullable_to_non_nullable - as int, - otherPersonId: null == otherPersonId - ? _value.otherPersonId - : otherPersonId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - when: null == when - ? _value.when - : when // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? modPersonId = null, Object? otherPersonId = null, Object? communityId = null, Object? when = null}) { + return _then( + _$ModTransferCommunityImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + modPersonId: + null == modPersonId + ? _value.modPersonId + : modPersonId // ignore: cast_nullable_to_non_nullable + as int, + otherPersonId: + null == otherPersonId + ? _value.otherPersonId + : otherPersonId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + when: + null == when + ? _value.when + : when // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -162,29 +144,22 @@ class __$$ModTransferCommunityImplCopyWithImpl<$Res> @modelSerde class _$ModTransferCommunityImpl extends _ModTransferCommunity { - const _$ModTransferCommunityImpl( - {required this.id, - required this.modPersonId, - required this.otherPersonId, - required this.communityId, - @JsonKey(name: 'when_') required this.when}) - : super._(); + const _$ModTransferCommunityImpl({required this.id, required this.modPersonId, required this.otherPersonId, required this.communityId, @JsonKey(name: 'when_') required this.when}) : super._(); - factory _$ModTransferCommunityImpl.fromJson(Map json) => - _$$ModTransferCommunityImplFromJson(json); + factory _$ModTransferCommunityImpl.fromJson(Map json) => _$$ModTransferCommunityImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int modPersonId; -// v0.18.0 + // v0.18.0 @override final int otherPersonId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override @JsonKey(name: 'when_') final String when; @@ -200,50 +175,40 @@ class _$ModTransferCommunityImpl extends _ModTransferCommunity { (other.runtimeType == runtimeType && other is _$ModTransferCommunityImpl && (identical(other.id, id) || other.id == id) && - (identical(other.modPersonId, modPersonId) || - other.modPersonId == modPersonId) && - (identical(other.otherPersonId, otherPersonId) || - other.otherPersonId == otherPersonId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.modPersonId, modPersonId) || other.modPersonId == modPersonId) && + (identical(other.otherPersonId, otherPersonId) || other.otherPersonId == otherPersonId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.when, when) || other.when == when)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, id, modPersonId, otherPersonId, communityId, when); + int get hashCode => Object.hash(runtimeType, id, modPersonId, otherPersonId, communityId, when); /// Create a copy of ModTransferCommunity /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModTransferCommunityImplCopyWith<_$ModTransferCommunityImpl> - get copyWith => - __$$ModTransferCommunityImplCopyWithImpl<_$ModTransferCommunityImpl>( - this, _$identity); + _$$ModTransferCommunityImplCopyWith<_$ModTransferCommunityImpl> get copyWith => __$$ModTransferCommunityImplCopyWithImpl<_$ModTransferCommunityImpl>(this, _$identity); @override Map toJson() { - return _$$ModTransferCommunityImplToJson( - this, - ); + return _$$ModTransferCommunityImplToJson(this); } } abstract class _ModTransferCommunity extends ModTransferCommunity { - const factory _ModTransferCommunity( - {required final int id, - required final int modPersonId, - required final int otherPersonId, - required final int communityId, - @JsonKey(name: 'when_') required final String when}) = - _$ModTransferCommunityImpl; + const factory _ModTransferCommunity({ + required final int id, + required final int modPersonId, + required final int otherPersonId, + required final int communityId, + @JsonKey(name: 'when_') required final String when, + }) = _$ModTransferCommunityImpl; const _ModTransferCommunity._() : super._(); - factory _ModTransferCommunity.fromJson(Map json) = - _$ModTransferCommunityImpl.fromJson; + factory _ModTransferCommunity.fromJson(Map json) = _$ModTransferCommunityImpl.fromJson; @override int get id; // v0.18.0 @@ -261,6 +226,5 @@ abstract class _ModTransferCommunity extends ModTransferCommunity { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModTransferCommunityImplCopyWith<_$ModTransferCommunityImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModTransferCommunityImplCopyWith<_$ModTransferCommunityImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/mod/mod_transfer_community.g.dart b/lib/src/v3/models/mod/mod_transfer_community.g.dart index eda29f22..4706b499 100644 --- a/lib/src/v3/models/mod/mod_transfer_community.g.dart +++ b/lib/src/v3/models/mod/mod_transfer_community.g.dart @@ -6,22 +6,18 @@ part of 'mod_transfer_community.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModTransferCommunityImpl _$$ModTransferCommunityImplFromJson( - Map json) => - _$ModTransferCommunityImpl( - id: (json['id'] as num).toInt(), - modPersonId: (json['mod_person_id'] as num).toInt(), - otherPersonId: (json['other_person_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - when: json['when_'] as String, - ); +_$ModTransferCommunityImpl _$$ModTransferCommunityImplFromJson(Map json) => _$ModTransferCommunityImpl( + id: (json['id'] as num).toInt(), + modPersonId: (json['mod_person_id'] as num).toInt(), + otherPersonId: (json['other_person_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + when: json['when_'] as String, +); -Map _$$ModTransferCommunityImplToJson( - _$ModTransferCommunityImpl instance) => - { - 'id': instance.id, - 'mod_person_id': instance.modPersonId, - 'other_person_id': instance.otherPersonId, - 'community_id': instance.communityId, - 'when_': instance.when, - }; +Map _$$ModTransferCommunityImplToJson(_$ModTransferCommunityImpl instance) => { + 'id': instance.id, + 'mod_person_id': instance.modPersonId, + 'other_person_id': instance.otherPersonId, + 'community_id': instance.communityId, + 'when_': instance.when, +}; diff --git a/lib/src/v3/models/modlog/get_modlog_response.dart b/lib/src/v3/models/modlog/get_modlog_response.dart index b11c8f59..7904581a 100644 --- a/lib/src/v3/models/modlog/get_modlog_response.dart +++ b/lib/src/v3/models/modlog/get_modlog_response.dart @@ -28,6 +28,5 @@ class GetModlogResponse with _$GetModlogResponse { }) = _GetModlogResponse; const GetModlogResponse._(); - factory GetModlogResponse.fromJson(Map json) => - _$GetModlogResponseFromJson(json); + factory GetModlogResponse.fromJson(Map json) => _$GetModlogResponseFromJson(json); } diff --git a/lib/src/v3/models/modlog/get_modlog_response.freezed.dart b/lib/src/v3/models/modlog/get_modlog_response.freezed.dart index a676238e..5be19436 100644 --- a/lib/src/v3/models/modlog/get_modlog_response.freezed.dart +++ b/lib/src/v3/models/modlog/get_modlog_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_modlog_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetModlogResponse _$GetModlogResponseFromJson(Map json) { return _GetModlogResponse.fromJson(json); @@ -20,34 +21,21 @@ GetModlogResponse _$GetModlogResponseFromJson(Map json) { /// @nodoc mixin _$GetModlogResponse { - List get removedPosts => - throw _privateConstructorUsedError; // v0.18.0 - List get lockedPosts => - throw _privateConstructorUsedError; // v0.18.0 - List get featuredPosts => - throw _privateConstructorUsedError; // v0.18.0 - List get removedComments => - throw _privateConstructorUsedError; // v0.18.0 - List get removedCommunities => - throw _privateConstructorUsedError; // v0.18.0 - List get bannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 + List get removedPosts => throw _privateConstructorUsedError; // v0.18.0 + List get lockedPosts => throw _privateConstructorUsedError; // v0.18.0 + List get featuredPosts => throw _privateConstructorUsedError; // v0.18.0 + List get removedComments => throw _privateConstructorUsedError; // v0.18.0 + List get removedCommunities => throw _privateConstructorUsedError; // v0.18.0 + List get bannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 List get banned => throw _privateConstructorUsedError; // v0.18.0 - List get addedToCommunity => - throw _privateConstructorUsedError; // v0.18.0 - List get transferredToCommunity => - throw _privateConstructorUsedError; // v0.18.0 + List get addedToCommunity => throw _privateConstructorUsedError; // v0.18.0 + List get transferredToCommunity => throw _privateConstructorUsedError; // v0.18.0 List get added => throw _privateConstructorUsedError; // v0.18.0 - List get adminPurgedPersons => - throw _privateConstructorUsedError; // v0.18.0 - List get adminPurgedCommunities => - throw _privateConstructorUsedError; // v0.18.0 - List get adminPurgedPosts => - throw _privateConstructorUsedError; // v0.18.0 - List get adminPurgedComments => - throw _privateConstructorUsedError; // v0.18.0 - List get hiddenCommunities => - throw _privateConstructorUsedError; + List get adminPurgedPersons => throw _privateConstructorUsedError; // v0.18.0 + List get adminPurgedCommunities => throw _privateConstructorUsedError; // v0.18.0 + List get adminPurgedPosts => throw _privateConstructorUsedError; // v0.18.0 + List get adminPurgedComments => throw _privateConstructorUsedError; // v0.18.0 + List get hiddenCommunities => throw _privateConstructorUsedError; /// Serializes this GetModlogResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -55,37 +43,34 @@ mixin _$GetModlogResponse { /// Create a copy of GetModlogResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetModlogResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetModlogResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetModlogResponseCopyWith<$Res> { - factory $GetModlogResponseCopyWith( - GetModlogResponse value, $Res Function(GetModlogResponse) then) = - _$GetModlogResponseCopyWithImpl<$Res, GetModlogResponse>; + factory $GetModlogResponseCopyWith(GetModlogResponse value, $Res Function(GetModlogResponse) then) = _$GetModlogResponseCopyWithImpl<$Res, GetModlogResponse>; @useResult - $Res call( - {List removedPosts, - List lockedPosts, - List featuredPosts, - List removedComments, - List removedCommunities, - List bannedFromCommunity, - List banned, - List addedToCommunity, - List transferredToCommunity, - List added, - List adminPurgedPersons, - List adminPurgedCommunities, - List adminPurgedPosts, - List adminPurgedComments, - List hiddenCommunities}); + $Res call({ + List removedPosts, + List lockedPosts, + List featuredPosts, + List removedComments, + List removedCommunities, + List bannedFromCommunity, + List banned, + List addedToCommunity, + List transferredToCommunity, + List added, + List adminPurgedPersons, + List adminPurgedCommunities, + List adminPurgedPosts, + List adminPurgedComments, + List hiddenCommunities, + }); } /// @nodoc -class _$GetModlogResponseCopyWithImpl<$Res, $Val extends GetModlogResponse> - implements $GetModlogResponseCopyWith<$Res> { +class _$GetModlogResponseCopyWithImpl<$Res, $Val extends GetModlogResponse> implements $GetModlogResponseCopyWith<$Res> { _$GetModlogResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -114,104 +99,116 @@ class _$GetModlogResponseCopyWithImpl<$Res, $Val extends GetModlogResponse> Object? adminPurgedComments = null, Object? hiddenCommunities = null, }) { - return _then(_value.copyWith( - removedPosts: null == removedPosts - ? _value.removedPosts - : removedPosts // ignore: cast_nullable_to_non_nullable - as List, - lockedPosts: null == lockedPosts - ? _value.lockedPosts - : lockedPosts // ignore: cast_nullable_to_non_nullable - as List, - featuredPosts: null == featuredPosts - ? _value.featuredPosts - : featuredPosts // ignore: cast_nullable_to_non_nullable - as List, - removedComments: null == removedComments - ? _value.removedComments - : removedComments // ignore: cast_nullable_to_non_nullable - as List, - removedCommunities: null == removedCommunities - ? _value.removedCommunities - : removedCommunities // ignore: cast_nullable_to_non_nullable - as List, - bannedFromCommunity: null == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as List, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as List, - addedToCommunity: null == addedToCommunity - ? _value.addedToCommunity - : addedToCommunity // ignore: cast_nullable_to_non_nullable - as List, - transferredToCommunity: null == transferredToCommunity - ? _value.transferredToCommunity - : transferredToCommunity // ignore: cast_nullable_to_non_nullable - as List, - added: null == added - ? _value.added - : added // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedPersons: null == adminPurgedPersons - ? _value.adminPurgedPersons - : adminPurgedPersons // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedCommunities: null == adminPurgedCommunities - ? _value.adminPurgedCommunities - : adminPurgedCommunities // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedPosts: null == adminPurgedPosts - ? _value.adminPurgedPosts - : adminPurgedPosts // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedComments: null == adminPurgedComments - ? _value.adminPurgedComments - : adminPurgedComments // ignore: cast_nullable_to_non_nullable - as List, - hiddenCommunities: null == hiddenCommunities - ? _value.hiddenCommunities - : hiddenCommunities // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + removedPosts: + null == removedPosts + ? _value.removedPosts + : removedPosts // ignore: cast_nullable_to_non_nullable + as List, + lockedPosts: + null == lockedPosts + ? _value.lockedPosts + : lockedPosts // ignore: cast_nullable_to_non_nullable + as List, + featuredPosts: + null == featuredPosts + ? _value.featuredPosts + : featuredPosts // ignore: cast_nullable_to_non_nullable + as List, + removedComments: + null == removedComments + ? _value.removedComments + : removedComments // ignore: cast_nullable_to_non_nullable + as List, + removedCommunities: + null == removedCommunities + ? _value.removedCommunities + : removedCommunities // ignore: cast_nullable_to_non_nullable + as List, + bannedFromCommunity: + null == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as List, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as List, + addedToCommunity: + null == addedToCommunity + ? _value.addedToCommunity + : addedToCommunity // ignore: cast_nullable_to_non_nullable + as List, + transferredToCommunity: + null == transferredToCommunity + ? _value.transferredToCommunity + : transferredToCommunity // ignore: cast_nullable_to_non_nullable + as List, + added: + null == added + ? _value.added + : added // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedPersons: + null == adminPurgedPersons + ? _value.adminPurgedPersons + : adminPurgedPersons // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedCommunities: + null == adminPurgedCommunities + ? _value.adminPurgedCommunities + : adminPurgedCommunities // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedPosts: + null == adminPurgedPosts + ? _value.adminPurgedPosts + : adminPurgedPosts // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedComments: + null == adminPurgedComments + ? _value.adminPurgedComments + : adminPurgedComments // ignore: cast_nullable_to_non_nullable + as List, + hiddenCommunities: + null == hiddenCommunities + ? _value.hiddenCommunities + : hiddenCommunities // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetModlogResponseImplCopyWith<$Res> - implements $GetModlogResponseCopyWith<$Res> { - factory _$$GetModlogResponseImplCopyWith(_$GetModlogResponseImpl value, - $Res Function(_$GetModlogResponseImpl) then) = - __$$GetModlogResponseImplCopyWithImpl<$Res>; +abstract class _$$GetModlogResponseImplCopyWith<$Res> implements $GetModlogResponseCopyWith<$Res> { + factory _$$GetModlogResponseImplCopyWith(_$GetModlogResponseImpl value, $Res Function(_$GetModlogResponseImpl) then) = __$$GetModlogResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List removedPosts, - List lockedPosts, - List featuredPosts, - List removedComments, - List removedCommunities, - List bannedFromCommunity, - List banned, - List addedToCommunity, - List transferredToCommunity, - List added, - List adminPurgedPersons, - List adminPurgedCommunities, - List adminPurgedPosts, - List adminPurgedComments, - List hiddenCommunities}); + $Res call({ + List removedPosts, + List lockedPosts, + List featuredPosts, + List removedComments, + List removedCommunities, + List bannedFromCommunity, + List banned, + List addedToCommunity, + List transferredToCommunity, + List added, + List adminPurgedPersons, + List adminPurgedCommunities, + List adminPurgedPosts, + List adminPurgedComments, + List hiddenCommunities, + }); } /// @nodoc -class __$$GetModlogResponseImplCopyWithImpl<$Res> - extends _$GetModlogResponseCopyWithImpl<$Res, _$GetModlogResponseImpl> - implements _$$GetModlogResponseImplCopyWith<$Res> { - __$$GetModlogResponseImplCopyWithImpl(_$GetModlogResponseImpl _value, - $Res Function(_$GetModlogResponseImpl) _then) - : super(_value, _then); +class __$$GetModlogResponseImplCopyWithImpl<$Res> extends _$GetModlogResponseCopyWithImpl<$Res, _$GetModlogResponseImpl> implements _$$GetModlogResponseImplCopyWith<$Res> { + __$$GetModlogResponseImplCopyWithImpl(_$GetModlogResponseImpl _value, $Res Function(_$GetModlogResponseImpl) _then) : super(_value, _then); /// Create a copy of GetModlogResponse /// with the given fields replaced by the non-null parameter values. @@ -234,68 +231,85 @@ class __$$GetModlogResponseImplCopyWithImpl<$Res> Object? adminPurgedComments = null, Object? hiddenCommunities = null, }) { - return _then(_$GetModlogResponseImpl( - removedPosts: null == removedPosts - ? _value._removedPosts - : removedPosts // ignore: cast_nullable_to_non_nullable - as List, - lockedPosts: null == lockedPosts - ? _value._lockedPosts - : lockedPosts // ignore: cast_nullable_to_non_nullable - as List, - featuredPosts: null == featuredPosts - ? _value._featuredPosts - : featuredPosts // ignore: cast_nullable_to_non_nullable - as List, - removedComments: null == removedComments - ? _value._removedComments - : removedComments // ignore: cast_nullable_to_non_nullable - as List, - removedCommunities: null == removedCommunities - ? _value._removedCommunities - : removedCommunities // ignore: cast_nullable_to_non_nullable - as List, - bannedFromCommunity: null == bannedFromCommunity - ? _value._bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as List, - banned: null == banned - ? _value._banned - : banned // ignore: cast_nullable_to_non_nullable - as List, - addedToCommunity: null == addedToCommunity - ? _value._addedToCommunity - : addedToCommunity // ignore: cast_nullable_to_non_nullable - as List, - transferredToCommunity: null == transferredToCommunity - ? _value._transferredToCommunity - : transferredToCommunity // ignore: cast_nullable_to_non_nullable - as List, - added: null == added - ? _value._added - : added // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedPersons: null == adminPurgedPersons - ? _value._adminPurgedPersons - : adminPurgedPersons // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedCommunities: null == adminPurgedCommunities - ? _value._adminPurgedCommunities - : adminPurgedCommunities // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedPosts: null == adminPurgedPosts - ? _value._adminPurgedPosts - : adminPurgedPosts // ignore: cast_nullable_to_non_nullable - as List, - adminPurgedComments: null == adminPurgedComments - ? _value._adminPurgedComments - : adminPurgedComments // ignore: cast_nullable_to_non_nullable - as List, - hiddenCommunities: null == hiddenCommunities - ? _value._hiddenCommunities - : hiddenCommunities // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$GetModlogResponseImpl( + removedPosts: + null == removedPosts + ? _value._removedPosts + : removedPosts // ignore: cast_nullable_to_non_nullable + as List, + lockedPosts: + null == lockedPosts + ? _value._lockedPosts + : lockedPosts // ignore: cast_nullable_to_non_nullable + as List, + featuredPosts: + null == featuredPosts + ? _value._featuredPosts + : featuredPosts // ignore: cast_nullable_to_non_nullable + as List, + removedComments: + null == removedComments + ? _value._removedComments + : removedComments // ignore: cast_nullable_to_non_nullable + as List, + removedCommunities: + null == removedCommunities + ? _value._removedCommunities + : removedCommunities // ignore: cast_nullable_to_non_nullable + as List, + bannedFromCommunity: + null == bannedFromCommunity + ? _value._bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as List, + banned: + null == banned + ? _value._banned + : banned // ignore: cast_nullable_to_non_nullable + as List, + addedToCommunity: + null == addedToCommunity + ? _value._addedToCommunity + : addedToCommunity // ignore: cast_nullable_to_non_nullable + as List, + transferredToCommunity: + null == transferredToCommunity + ? _value._transferredToCommunity + : transferredToCommunity // ignore: cast_nullable_to_non_nullable + as List, + added: + null == added + ? _value._added + : added // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedPersons: + null == adminPurgedPersons + ? _value._adminPurgedPersons + : adminPurgedPersons // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedCommunities: + null == adminPurgedCommunities + ? _value._adminPurgedCommunities + : adminPurgedCommunities // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedPosts: + null == adminPurgedPosts + ? _value._adminPurgedPosts + : adminPurgedPosts // ignore: cast_nullable_to_non_nullable + as List, + adminPurgedComments: + null == adminPurgedComments + ? _value._adminPurgedComments + : adminPurgedComments // ignore: cast_nullable_to_non_nullable + as List, + hiddenCommunities: + null == hiddenCommunities + ? _value._hiddenCommunities + : hiddenCommunities // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -303,41 +317,40 @@ class __$$GetModlogResponseImplCopyWithImpl<$Res> @modelSerde class _$GetModlogResponseImpl extends _GetModlogResponse { - const _$GetModlogResponseImpl( - {required final List removedPosts, - required final List lockedPosts, - required final List featuredPosts, - required final List removedComments, - required final List removedCommunities, - required final List bannedFromCommunity, - required final List banned, - required final List addedToCommunity, - required final List transferredToCommunity, - required final List added, - required final List adminPurgedPersons, - required final List adminPurgedCommunities, - required final List adminPurgedPosts, - required final List adminPurgedComments, - required final List hiddenCommunities}) - : _removedPosts = removedPosts, - _lockedPosts = lockedPosts, - _featuredPosts = featuredPosts, - _removedComments = removedComments, - _removedCommunities = removedCommunities, - _bannedFromCommunity = bannedFromCommunity, - _banned = banned, - _addedToCommunity = addedToCommunity, - _transferredToCommunity = transferredToCommunity, - _added = added, - _adminPurgedPersons = adminPurgedPersons, - _adminPurgedCommunities = adminPurgedCommunities, - _adminPurgedPosts = adminPurgedPosts, - _adminPurgedComments = adminPurgedComments, - _hiddenCommunities = hiddenCommunities, - super._(); - - factory _$GetModlogResponseImpl.fromJson(Map json) => - _$$GetModlogResponseImplFromJson(json); + const _$GetModlogResponseImpl({ + required final List removedPosts, + required final List lockedPosts, + required final List featuredPosts, + required final List removedComments, + required final List removedCommunities, + required final List bannedFromCommunity, + required final List banned, + required final List addedToCommunity, + required final List transferredToCommunity, + required final List added, + required final List adminPurgedPersons, + required final List adminPurgedCommunities, + required final List adminPurgedPosts, + required final List adminPurgedComments, + required final List hiddenCommunities, + }) : _removedPosts = removedPosts, + _lockedPosts = lockedPosts, + _featuredPosts = featuredPosts, + _removedComments = removedComments, + _removedCommunities = removedCommunities, + _bannedFromCommunity = bannedFromCommunity, + _banned = banned, + _addedToCommunity = addedToCommunity, + _transferredToCommunity = transferredToCommunity, + _added = added, + _adminPurgedPersons = adminPurgedPersons, + _adminPurgedCommunities = adminPurgedCommunities, + _adminPurgedPosts = adminPurgedPosts, + _adminPurgedComments = adminPurgedComments, + _hiddenCommunities = hiddenCommunities, + super._(); + + factory _$GetModlogResponseImpl.fromJson(Map json) => _$$GetModlogResponseImplFromJson(json); final List _removedPosts; @override @@ -347,9 +360,9 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_removedPosts); } -// v0.18.0 + // v0.18.0 final List _lockedPosts; -// v0.18.0 + // v0.18.0 @override List get lockedPosts { if (_lockedPosts is EqualUnmodifiableListView) return _lockedPosts; @@ -357,9 +370,9 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_lockedPosts); } -// v0.18.0 + // v0.18.0 final List _featuredPosts; -// v0.18.0 + // v0.18.0 @override List get featuredPosts { if (_featuredPosts is EqualUnmodifiableListView) return _featuredPosts; @@ -367,9 +380,9 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_featuredPosts); } -// v0.18.0 + // v0.18.0 final List _removedComments; -// v0.18.0 + // v0.18.0 @override List get removedComments { if (_removedComments is EqualUnmodifiableListView) return _removedComments; @@ -377,31 +390,29 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_removedComments); } -// v0.18.0 + // v0.18.0 final List _removedCommunities; -// v0.18.0 + // v0.18.0 @override List get removedCommunities { - if (_removedCommunities is EqualUnmodifiableListView) - return _removedCommunities; + if (_removedCommunities is EqualUnmodifiableListView) return _removedCommunities; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_removedCommunities); } -// v0.18.0 + // v0.18.0 final List _bannedFromCommunity; -// v0.18.0 + // v0.18.0 @override List get bannedFromCommunity { - if (_bannedFromCommunity is EqualUnmodifiableListView) - return _bannedFromCommunity; + if (_bannedFromCommunity is EqualUnmodifiableListView) return _bannedFromCommunity; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_bannedFromCommunity); } -// v0.18.0 + // v0.18.0 final List _banned; -// v0.18.0 + // v0.18.0 @override List get banned { if (_banned is EqualUnmodifiableListView) return _banned; @@ -409,31 +420,29 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_banned); } -// v0.18.0 + // v0.18.0 final List _addedToCommunity; -// v0.18.0 + // v0.18.0 @override List get addedToCommunity { - if (_addedToCommunity is EqualUnmodifiableListView) - return _addedToCommunity; + if (_addedToCommunity is EqualUnmodifiableListView) return _addedToCommunity; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_addedToCommunity); } -// v0.18.0 + // v0.18.0 final List _transferredToCommunity; -// v0.18.0 + // v0.18.0 @override List get transferredToCommunity { - if (_transferredToCommunity is EqualUnmodifiableListView) - return _transferredToCommunity; + if (_transferredToCommunity is EqualUnmodifiableListView) return _transferredToCommunity; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_transferredToCommunity); } -// v0.18.0 + // v0.18.0 final List _added; -// v0.18.0 + // v0.18.0 @override List get added { if (_added is EqualUnmodifiableListView) return _added; @@ -441,57 +450,52 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return EqualUnmodifiableListView(_added); } -// v0.18.0 + // v0.18.0 final List _adminPurgedPersons; -// v0.18.0 + // v0.18.0 @override List get adminPurgedPersons { - if (_adminPurgedPersons is EqualUnmodifiableListView) - return _adminPurgedPersons; + if (_adminPurgedPersons is EqualUnmodifiableListView) return _adminPurgedPersons; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_adminPurgedPersons); } -// v0.18.0 + // v0.18.0 final List _adminPurgedCommunities; -// v0.18.0 + // v0.18.0 @override List get adminPurgedCommunities { - if (_adminPurgedCommunities is EqualUnmodifiableListView) - return _adminPurgedCommunities; + if (_adminPurgedCommunities is EqualUnmodifiableListView) return _adminPurgedCommunities; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_adminPurgedCommunities); } -// v0.18.0 + // v0.18.0 final List _adminPurgedPosts; -// v0.18.0 + // v0.18.0 @override List get adminPurgedPosts { - if (_adminPurgedPosts is EqualUnmodifiableListView) - return _adminPurgedPosts; + if (_adminPurgedPosts is EqualUnmodifiableListView) return _adminPurgedPosts; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_adminPurgedPosts); } -// v0.18.0 + // v0.18.0 final List _adminPurgedComments; -// v0.18.0 + // v0.18.0 @override List get adminPurgedComments { - if (_adminPurgedComments is EqualUnmodifiableListView) - return _adminPurgedComments; + if (_adminPurgedComments is EqualUnmodifiableListView) return _adminPurgedComments; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_adminPurgedComments); } -// v0.18.0 + // v0.18.0 final List _hiddenCommunities; -// v0.18.0 + // v0.18.0 @override List get hiddenCommunities { - if (_hiddenCommunities is EqualUnmodifiableListView) - return _hiddenCommunities; + if (_hiddenCommunities is EqualUnmodifiableListView) return _hiddenCommunities; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_hiddenCommunities); } @@ -506,95 +510,78 @@ class _$GetModlogResponseImpl extends _GetModlogResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetModlogResponseImpl && - const DeepCollectionEquality() - .equals(other._removedPosts, _removedPosts) && - const DeepCollectionEquality() - .equals(other._lockedPosts, _lockedPosts) && - const DeepCollectionEquality() - .equals(other._featuredPosts, _featuredPosts) && - const DeepCollectionEquality() - .equals(other._removedComments, _removedComments) && - const DeepCollectionEquality() - .equals(other._removedCommunities, _removedCommunities) && - const DeepCollectionEquality() - .equals(other._bannedFromCommunity, _bannedFromCommunity) && + const DeepCollectionEquality().equals(other._removedPosts, _removedPosts) && + const DeepCollectionEquality().equals(other._lockedPosts, _lockedPosts) && + const DeepCollectionEquality().equals(other._featuredPosts, _featuredPosts) && + const DeepCollectionEquality().equals(other._removedComments, _removedComments) && + const DeepCollectionEquality().equals(other._removedCommunities, _removedCommunities) && + const DeepCollectionEquality().equals(other._bannedFromCommunity, _bannedFromCommunity) && const DeepCollectionEquality().equals(other._banned, _banned) && - const DeepCollectionEquality() - .equals(other._addedToCommunity, _addedToCommunity) && - const DeepCollectionEquality().equals( - other._transferredToCommunity, _transferredToCommunity) && + const DeepCollectionEquality().equals(other._addedToCommunity, _addedToCommunity) && + const DeepCollectionEquality().equals(other._transferredToCommunity, _transferredToCommunity) && const DeepCollectionEquality().equals(other._added, _added) && - const DeepCollectionEquality() - .equals(other._adminPurgedPersons, _adminPurgedPersons) && - const DeepCollectionEquality().equals( - other._adminPurgedCommunities, _adminPurgedCommunities) && - const DeepCollectionEquality() - .equals(other._adminPurgedPosts, _adminPurgedPosts) && - const DeepCollectionEquality() - .equals(other._adminPurgedComments, _adminPurgedComments) && - const DeepCollectionEquality() - .equals(other._hiddenCommunities, _hiddenCommunities)); + const DeepCollectionEquality().equals(other._adminPurgedPersons, _adminPurgedPersons) && + const DeepCollectionEquality().equals(other._adminPurgedCommunities, _adminPurgedCommunities) && + const DeepCollectionEquality().equals(other._adminPurgedPosts, _adminPurgedPosts) && + const DeepCollectionEquality().equals(other._adminPurgedComments, _adminPurgedComments) && + const DeepCollectionEquality().equals(other._hiddenCommunities, _hiddenCommunities)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_removedPosts), - const DeepCollectionEquality().hash(_lockedPosts), - const DeepCollectionEquality().hash(_featuredPosts), - const DeepCollectionEquality().hash(_removedComments), - const DeepCollectionEquality().hash(_removedCommunities), - const DeepCollectionEquality().hash(_bannedFromCommunity), - const DeepCollectionEquality().hash(_banned), - const DeepCollectionEquality().hash(_addedToCommunity), - const DeepCollectionEquality().hash(_transferredToCommunity), - const DeepCollectionEquality().hash(_added), - const DeepCollectionEquality().hash(_adminPurgedPersons), - const DeepCollectionEquality().hash(_adminPurgedCommunities), - const DeepCollectionEquality().hash(_adminPurgedPosts), - const DeepCollectionEquality().hash(_adminPurgedComments), - const DeepCollectionEquality().hash(_hiddenCommunities)); + runtimeType, + const DeepCollectionEquality().hash(_removedPosts), + const DeepCollectionEquality().hash(_lockedPosts), + const DeepCollectionEquality().hash(_featuredPosts), + const DeepCollectionEquality().hash(_removedComments), + const DeepCollectionEquality().hash(_removedCommunities), + const DeepCollectionEquality().hash(_bannedFromCommunity), + const DeepCollectionEquality().hash(_banned), + const DeepCollectionEquality().hash(_addedToCommunity), + const DeepCollectionEquality().hash(_transferredToCommunity), + const DeepCollectionEquality().hash(_added), + const DeepCollectionEquality().hash(_adminPurgedPersons), + const DeepCollectionEquality().hash(_adminPurgedCommunities), + const DeepCollectionEquality().hash(_adminPurgedPosts), + const DeepCollectionEquality().hash(_adminPurgedComments), + const DeepCollectionEquality().hash(_hiddenCommunities), + ); /// Create a copy of GetModlogResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetModlogResponseImplCopyWith<_$GetModlogResponseImpl> get copyWith => - __$$GetModlogResponseImplCopyWithImpl<_$GetModlogResponseImpl>( - this, _$identity); + _$$GetModlogResponseImplCopyWith<_$GetModlogResponseImpl> get copyWith => __$$GetModlogResponseImplCopyWithImpl<_$GetModlogResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetModlogResponseImplToJson( - this, - ); + return _$$GetModlogResponseImplToJson(this); } } abstract class _GetModlogResponse extends GetModlogResponse { - const factory _GetModlogResponse( - {required final List removedPosts, - required final List lockedPosts, - required final List featuredPosts, - required final List removedComments, - required final List removedCommunities, - required final List bannedFromCommunity, - required final List banned, - required final List addedToCommunity, - required final List transferredToCommunity, - required final List added, - required final List adminPurgedPersons, - required final List adminPurgedCommunities, - required final List adminPurgedPosts, - required final List adminPurgedComments, - required final List hiddenCommunities}) = - _$GetModlogResponseImpl; + const factory _GetModlogResponse({ + required final List removedPosts, + required final List lockedPosts, + required final List featuredPosts, + required final List removedComments, + required final List removedCommunities, + required final List bannedFromCommunity, + required final List banned, + required final List addedToCommunity, + required final List transferredToCommunity, + required final List added, + required final List adminPurgedPersons, + required final List adminPurgedCommunities, + required final List adminPurgedPosts, + required final List adminPurgedComments, + required final List hiddenCommunities, + }) = _$GetModlogResponseImpl; const _GetModlogResponse._() : super._(); - factory _GetModlogResponse.fromJson(Map json) = - _$GetModlogResponseImpl.fromJson; + factory _GetModlogResponse.fromJson(Map json) = _$GetModlogResponseImpl.fromJson; @override List get removedPosts; // v0.18.0 @@ -631,6 +618,5 @@ abstract class _GetModlogResponse extends GetModlogResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetModlogResponseImplCopyWith<_$GetModlogResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetModlogResponseImplCopyWith<_$GetModlogResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/modlog/get_modlog_response.g.dart b/lib/src/v3/models/modlog/get_modlog_response.g.dart index 435390ce..cfecbc33 100644 --- a/lib/src/v3/models/modlog/get_modlog_response.g.dart +++ b/lib/src/v3/models/modlog/get_modlog_response.g.dart @@ -6,88 +6,38 @@ part of 'get_modlog_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetModlogResponseImpl _$$GetModlogResponseImplFromJson( - Map json) => - _$GetModlogResponseImpl( - removedPosts: (json['removed_posts'] as List) - .map((e) => ModRemovePostView.fromJson(e as Map)) - .toList(), - lockedPosts: (json['locked_posts'] as List) - .map((e) => ModLockPostView.fromJson(e as Map)) - .toList(), - featuredPosts: (json['featured_posts'] as List) - .map((e) => ModFeaturePostView.fromJson(e as Map)) - .toList(), - removedComments: (json['removed_comments'] as List) - .map((e) => ModRemoveCommentView.fromJson(e as Map)) - .toList(), - removedCommunities: (json['removed_communities'] as List) - .map( - (e) => ModRemoveCommunityView.fromJson(e as Map)) - .toList(), - bannedFromCommunity: (json['banned_from_community'] as List) - .map((e) => - ModBanFromCommunityView.fromJson(e as Map)) - .toList(), - banned: (json['banned'] as List) - .map((e) => ModBanView.fromJson(e as Map)) - .toList(), - addedToCommunity: (json['added_to_community'] as List) - .map((e) => ModAddCommunityView.fromJson(e as Map)) - .toList(), - transferredToCommunity: - (json['transferred_to_community'] as List) - .map((e) => - ModTransferCommunityView.fromJson(e as Map)) - .toList(), - added: (json['added'] as List) - .map((e) => ModAddView.fromJson(e as Map)) - .toList(), - adminPurgedPersons: (json['admin_purged_persons'] as List) - .map((e) => AdminPurgePersonView.fromJson(e as Map)) - .toList(), - adminPurgedCommunities: - (json['admin_purged_communities'] as List) - .map((e) => - AdminPurgeCommunityView.fromJson(e as Map)) - .toList(), - adminPurgedPosts: (json['admin_purged_posts'] as List) - .map((e) => AdminPurgePostView.fromJson(e as Map)) - .toList(), - adminPurgedComments: (json['admin_purged_comments'] as List) - .map((e) => AdminPurgeCommentView.fromJson(e as Map)) - .toList(), - hiddenCommunities: (json['hidden_communities'] as List) - .map((e) => ModHideCommunityView.fromJson(e as Map)) - .toList(), - ); +_$GetModlogResponseImpl _$$GetModlogResponseImplFromJson(Map json) => _$GetModlogResponseImpl( + removedPosts: (json['removed_posts'] as List).map((e) => ModRemovePostView.fromJson(e as Map)).toList(), + lockedPosts: (json['locked_posts'] as List).map((e) => ModLockPostView.fromJson(e as Map)).toList(), + featuredPosts: (json['featured_posts'] as List).map((e) => ModFeaturePostView.fromJson(e as Map)).toList(), + removedComments: (json['removed_comments'] as List).map((e) => ModRemoveCommentView.fromJson(e as Map)).toList(), + removedCommunities: (json['removed_communities'] as List).map((e) => ModRemoveCommunityView.fromJson(e as Map)).toList(), + bannedFromCommunity: (json['banned_from_community'] as List).map((e) => ModBanFromCommunityView.fromJson(e as Map)).toList(), + banned: (json['banned'] as List).map((e) => ModBanView.fromJson(e as Map)).toList(), + addedToCommunity: (json['added_to_community'] as List).map((e) => ModAddCommunityView.fromJson(e as Map)).toList(), + transferredToCommunity: (json['transferred_to_community'] as List).map((e) => ModTransferCommunityView.fromJson(e as Map)).toList(), + added: (json['added'] as List).map((e) => ModAddView.fromJson(e as Map)).toList(), + adminPurgedPersons: (json['admin_purged_persons'] as List).map((e) => AdminPurgePersonView.fromJson(e as Map)).toList(), + adminPurgedCommunities: (json['admin_purged_communities'] as List).map((e) => AdminPurgeCommunityView.fromJson(e as Map)).toList(), + adminPurgedPosts: (json['admin_purged_posts'] as List).map((e) => AdminPurgePostView.fromJson(e as Map)).toList(), + adminPurgedComments: (json['admin_purged_comments'] as List).map((e) => AdminPurgeCommentView.fromJson(e as Map)).toList(), + hiddenCommunities: (json['hidden_communities'] as List).map((e) => ModHideCommunityView.fromJson(e as Map)).toList(), +); -Map _$$GetModlogResponseImplToJson( - _$GetModlogResponseImpl instance) => - { - 'removed_posts': instance.removedPosts.map((e) => e.toJson()).toList(), - 'locked_posts': instance.lockedPosts.map((e) => e.toJson()).toList(), - 'featured_posts': instance.featuredPosts.map((e) => e.toJson()).toList(), - 'removed_comments': - instance.removedComments.map((e) => e.toJson()).toList(), - 'removed_communities': - instance.removedCommunities.map((e) => e.toJson()).toList(), - 'banned_from_community': - instance.bannedFromCommunity.map((e) => e.toJson()).toList(), - 'banned': instance.banned.map((e) => e.toJson()).toList(), - 'added_to_community': - instance.addedToCommunity.map((e) => e.toJson()).toList(), - 'transferred_to_community': - instance.transferredToCommunity.map((e) => e.toJson()).toList(), - 'added': instance.added.map((e) => e.toJson()).toList(), - 'admin_purged_persons': - instance.adminPurgedPersons.map((e) => e.toJson()).toList(), - 'admin_purged_communities': - instance.adminPurgedCommunities.map((e) => e.toJson()).toList(), - 'admin_purged_posts': - instance.adminPurgedPosts.map((e) => e.toJson()).toList(), - 'admin_purged_comments': - instance.adminPurgedComments.map((e) => e.toJson()).toList(), - 'hidden_communities': - instance.hiddenCommunities.map((e) => e.toJson()).toList(), - }; +Map _$$GetModlogResponseImplToJson(_$GetModlogResponseImpl instance) => { + 'removed_posts': instance.removedPosts.map((e) => e.toJson()).toList(), + 'locked_posts': instance.lockedPosts.map((e) => e.toJson()).toList(), + 'featured_posts': instance.featuredPosts.map((e) => e.toJson()).toList(), + 'removed_comments': instance.removedComments.map((e) => e.toJson()).toList(), + 'removed_communities': instance.removedCommunities.map((e) => e.toJson()).toList(), + 'banned_from_community': instance.bannedFromCommunity.map((e) => e.toJson()).toList(), + 'banned': instance.banned.map((e) => e.toJson()).toList(), + 'added_to_community': instance.addedToCommunity.map((e) => e.toJson()).toList(), + 'transferred_to_community': instance.transferredToCommunity.map((e) => e.toJson()).toList(), + 'added': instance.added.map((e) => e.toJson()).toList(), + 'admin_purged_persons': instance.adminPurgedPersons.map((e) => e.toJson()).toList(), + 'admin_purged_communities': instance.adminPurgedCommunities.map((e) => e.toJson()).toList(), + 'admin_purged_posts': instance.adminPurgedPosts.map((e) => e.toJson()).toList(), + 'admin_purged_comments': instance.adminPurgedComments.map((e) => e.toJson()).toList(), + 'hidden_communities': instance.hiddenCommunities.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/my_user_info/my_user_info.dart b/lib/src/v3/models/my_user_info/my_user_info.dart index cabd00ba..ae8a24a4 100644 --- a/lib/src/v3/models/my_user_info/my_user_info.dart +++ b/lib/src/v3/models/my_user_info/my_user_info.dart @@ -20,6 +20,5 @@ class MyUserInfo with _$MyUserInfo { }) = _MyUserInfo; const MyUserInfo._(); - factory MyUserInfo.fromJson(Map json) => - _$MyUserInfoFromJson(json); + factory MyUserInfo.fromJson(Map json) => _$MyUserInfoFromJson(json); } diff --git a/lib/src/v3/models/my_user_info/my_user_info.freezed.dart b/lib/src/v3/models/my_user_info/my_user_info.freezed.dart index 5f026f9e..6c537ed3 100644 --- a/lib/src/v3/models/my_user_info/my_user_info.freezed.dart +++ b/lib/src/v3/models/my_user_info/my_user_info.freezed.dart @@ -12,7 +12,8 @@ part of 'my_user_info.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); MyUserInfo _$MyUserInfoFromJson(Map json) { return _MyUserInfo.fromJson(json); @@ -20,18 +21,12 @@ MyUserInfo _$MyUserInfoFromJson(Map json) { /// @nodoc mixin _$MyUserInfo { - LocalUserView get localUserView => - throw _privateConstructorUsedError; // v0.18.0 - List get follows => - throw _privateConstructorUsedError; // v0.18.0 - List get moderates => - throw _privateConstructorUsedError; // v0.18.0 - List get communityBlocks => - throw _privateConstructorUsedError; // v0.18.0 - List? get instanceBlocks => - throw _privateConstructorUsedError; // v0.19.0 (required) - List get personBlocks => - throw _privateConstructorUsedError; // v0.18.0 + LocalUserView get localUserView => throw _privateConstructorUsedError; // v0.18.0 + List get follows => throw _privateConstructorUsedError; // v0.18.0 + List get moderates => throw _privateConstructorUsedError; // v0.18.0 + List get communityBlocks => throw _privateConstructorUsedError; // v0.18.0 + List? get instanceBlocks => throw _privateConstructorUsedError; // v0.19.0 (required) + List get personBlocks => throw _privateConstructorUsedError; // v0.18.0 List get discussionLanguages => throw _privateConstructorUsedError; /// Serializes this MyUserInfo to a JSON map. @@ -40,31 +35,28 @@ mixin _$MyUserInfo { /// Create a copy of MyUserInfo /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MyUserInfoCopyWith get copyWith => - throw _privateConstructorUsedError; + $MyUserInfoCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MyUserInfoCopyWith<$Res> { - factory $MyUserInfoCopyWith( - MyUserInfo value, $Res Function(MyUserInfo) then) = - _$MyUserInfoCopyWithImpl<$Res, MyUserInfo>; + factory $MyUserInfoCopyWith(MyUserInfo value, $Res Function(MyUserInfo) then) = _$MyUserInfoCopyWithImpl<$Res, MyUserInfo>; @useResult - $Res call( - {LocalUserView localUserView, - List follows, - List moderates, - List communityBlocks, - List? instanceBlocks, - List personBlocks, - List discussionLanguages}); + $Res call({ + LocalUserView localUserView, + List follows, + List moderates, + List communityBlocks, + List? instanceBlocks, + List personBlocks, + List discussionLanguages, + }); $LocalUserViewCopyWith<$Res> get localUserView; } /// @nodoc -class _$MyUserInfoCopyWithImpl<$Res, $Val extends MyUserInfo> - implements $MyUserInfoCopyWith<$Res> { +class _$MyUserInfoCopyWithImpl<$Res, $Val extends MyUserInfo> implements $MyUserInfoCopyWith<$Res> { _$MyUserInfoCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -85,36 +77,46 @@ class _$MyUserInfoCopyWithImpl<$Res, $Val extends MyUserInfo> Object? personBlocks = null, Object? discussionLanguages = null, }) { - return _then(_value.copyWith( - localUserView: null == localUserView - ? _value.localUserView - : localUserView // ignore: cast_nullable_to_non_nullable - as LocalUserView, - follows: null == follows - ? _value.follows - : follows // ignore: cast_nullable_to_non_nullable - as List, - moderates: null == moderates - ? _value.moderates - : moderates // ignore: cast_nullable_to_non_nullable - as List, - communityBlocks: null == communityBlocks - ? _value.communityBlocks - : communityBlocks // ignore: cast_nullable_to_non_nullable - as List, - instanceBlocks: freezed == instanceBlocks - ? _value.instanceBlocks - : instanceBlocks // ignore: cast_nullable_to_non_nullable - as List?, - personBlocks: null == personBlocks - ? _value.personBlocks - : personBlocks // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + localUserView: + null == localUserView + ? _value.localUserView + : localUserView // ignore: cast_nullable_to_non_nullable + as LocalUserView, + follows: + null == follows + ? _value.follows + : follows // ignore: cast_nullable_to_non_nullable + as List, + moderates: + null == moderates + ? _value.moderates + : moderates // ignore: cast_nullable_to_non_nullable + as List, + communityBlocks: + null == communityBlocks + ? _value.communityBlocks + : communityBlocks // ignore: cast_nullable_to_non_nullable + as List, + instanceBlocks: + freezed == instanceBlocks + ? _value.instanceBlocks + : instanceBlocks // ignore: cast_nullable_to_non_nullable + as List?, + personBlocks: + null == personBlocks + ? _value.personBlocks + : personBlocks // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of MyUserInfo @@ -129,33 +131,27 @@ class _$MyUserInfoCopyWithImpl<$Res, $Val extends MyUserInfo> } /// @nodoc -abstract class _$$MyUserInfoImplCopyWith<$Res> - implements $MyUserInfoCopyWith<$Res> { - factory _$$MyUserInfoImplCopyWith( - _$MyUserInfoImpl value, $Res Function(_$MyUserInfoImpl) then) = - __$$MyUserInfoImplCopyWithImpl<$Res>; +abstract class _$$MyUserInfoImplCopyWith<$Res> implements $MyUserInfoCopyWith<$Res> { + factory _$$MyUserInfoImplCopyWith(_$MyUserInfoImpl value, $Res Function(_$MyUserInfoImpl) then) = __$$MyUserInfoImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {LocalUserView localUserView, - List follows, - List moderates, - List communityBlocks, - List? instanceBlocks, - List personBlocks, - List discussionLanguages}); + $Res call({ + LocalUserView localUserView, + List follows, + List moderates, + List communityBlocks, + List? instanceBlocks, + List personBlocks, + List discussionLanguages, + }); @override $LocalUserViewCopyWith<$Res> get localUserView; } /// @nodoc -class __$$MyUserInfoImplCopyWithImpl<$Res> - extends _$MyUserInfoCopyWithImpl<$Res, _$MyUserInfoImpl> - implements _$$MyUserInfoImplCopyWith<$Res> { - __$$MyUserInfoImplCopyWithImpl( - _$MyUserInfoImpl _value, $Res Function(_$MyUserInfoImpl) _then) - : super(_value, _then); +class __$$MyUserInfoImplCopyWithImpl<$Res> extends _$MyUserInfoCopyWithImpl<$Res, _$MyUserInfoImpl> implements _$$MyUserInfoImplCopyWith<$Res> { + __$$MyUserInfoImplCopyWithImpl(_$MyUserInfoImpl _value, $Res Function(_$MyUserInfoImpl) _then) : super(_value, _then); /// Create a copy of MyUserInfo /// with the given fields replaced by the non-null parameter values. @@ -170,36 +166,45 @@ class __$$MyUserInfoImplCopyWithImpl<$Res> Object? personBlocks = null, Object? discussionLanguages = null, }) { - return _then(_$MyUserInfoImpl( - localUserView: null == localUserView - ? _value.localUserView - : localUserView // ignore: cast_nullable_to_non_nullable - as LocalUserView, - follows: null == follows - ? _value._follows - : follows // ignore: cast_nullable_to_non_nullable - as List, - moderates: null == moderates - ? _value._moderates - : moderates // ignore: cast_nullable_to_non_nullable - as List, - communityBlocks: null == communityBlocks - ? _value._communityBlocks - : communityBlocks // ignore: cast_nullable_to_non_nullable - as List, - instanceBlocks: freezed == instanceBlocks - ? _value._instanceBlocks - : instanceBlocks // ignore: cast_nullable_to_non_nullable - as List?, - personBlocks: null == personBlocks - ? _value._personBlocks - : personBlocks // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$MyUserInfoImpl( + localUserView: + null == localUserView + ? _value.localUserView + : localUserView // ignore: cast_nullable_to_non_nullable + as LocalUserView, + follows: + null == follows + ? _value._follows + : follows // ignore: cast_nullable_to_non_nullable + as List, + moderates: + null == moderates + ? _value._moderates + : moderates // ignore: cast_nullable_to_non_nullable + as List, + communityBlocks: + null == communityBlocks + ? _value._communityBlocks + : communityBlocks // ignore: cast_nullable_to_non_nullable + as List, + instanceBlocks: + freezed == instanceBlocks + ? _value._instanceBlocks + : instanceBlocks // ignore: cast_nullable_to_non_nullable + as List?, + personBlocks: + null == personBlocks + ? _value._personBlocks + : personBlocks // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -207,30 +212,29 @@ class __$$MyUserInfoImplCopyWithImpl<$Res> @modelSerde class _$MyUserInfoImpl extends _MyUserInfo { - const _$MyUserInfoImpl( - {required this.localUserView, - required final List follows, - required final List moderates, - required final List communityBlocks, - final List? instanceBlocks, - required final List personBlocks, - required final List discussionLanguages}) - : _follows = follows, - _moderates = moderates, - _communityBlocks = communityBlocks, - _instanceBlocks = instanceBlocks, - _personBlocks = personBlocks, - _discussionLanguages = discussionLanguages, - super._(); - - factory _$MyUserInfoImpl.fromJson(Map json) => - _$$MyUserInfoImplFromJson(json); + const _$MyUserInfoImpl({ + required this.localUserView, + required final List follows, + required final List moderates, + required final List communityBlocks, + final List? instanceBlocks, + required final List personBlocks, + required final List discussionLanguages, + }) : _follows = follows, + _moderates = moderates, + _communityBlocks = communityBlocks, + _instanceBlocks = instanceBlocks, + _personBlocks = personBlocks, + _discussionLanguages = discussionLanguages, + super._(); + + factory _$MyUserInfoImpl.fromJson(Map json) => _$$MyUserInfoImplFromJson(json); @override final LocalUserView localUserView; -// v0.18.0 + // v0.18.0 final List _follows; -// v0.18.0 + // v0.18.0 @override List get follows { if (_follows is EqualUnmodifiableListView) return _follows; @@ -238,9 +242,9 @@ class _$MyUserInfoImpl extends _MyUserInfo { return EqualUnmodifiableListView(_follows); } -// v0.18.0 + // v0.18.0 final List _moderates; -// v0.18.0 + // v0.18.0 @override List get moderates { if (_moderates is EqualUnmodifiableListView) return _moderates; @@ -248,9 +252,9 @@ class _$MyUserInfoImpl extends _MyUserInfo { return EqualUnmodifiableListView(_moderates); } -// v0.18.0 + // v0.18.0 final List _communityBlocks; -// v0.18.0 + // v0.18.0 @override List get communityBlocks { if (_communityBlocks is EqualUnmodifiableListView) return _communityBlocks; @@ -258,9 +262,9 @@ class _$MyUserInfoImpl extends _MyUserInfo { return EqualUnmodifiableListView(_communityBlocks); } -// v0.18.0 + // v0.18.0 final List? _instanceBlocks; -// v0.18.0 + // v0.18.0 @override List? get instanceBlocks { final value = _instanceBlocks; @@ -270,9 +274,9 @@ class _$MyUserInfoImpl extends _MyUserInfo { return EqualUnmodifiableListView(value); } -// v0.19.0 (required) + // v0.19.0 (required) final List _personBlocks; -// v0.19.0 (required) + // v0.19.0 (required) @override List get personBlocks { if (_personBlocks is EqualUnmodifiableListView) return _personBlocks; @@ -280,13 +284,12 @@ class _$MyUserInfoImpl extends _MyUserInfo { return EqualUnmodifiableListView(_personBlocks); } -// v0.18.0 + // v0.18.0 final List _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List get discussionLanguages { - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_discussionLanguages); } @@ -301,62 +304,54 @@ class _$MyUserInfoImpl extends _MyUserInfo { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MyUserInfoImpl && - (identical(other.localUserView, localUserView) || - other.localUserView == localUserView) && + (identical(other.localUserView, localUserView) || other.localUserView == localUserView) && const DeepCollectionEquality().equals(other._follows, _follows) && - const DeepCollectionEquality() - .equals(other._moderates, _moderates) && - const DeepCollectionEquality() - .equals(other._communityBlocks, _communityBlocks) && - const DeepCollectionEquality() - .equals(other._instanceBlocks, _instanceBlocks) && - const DeepCollectionEquality() - .equals(other._personBlocks, _personBlocks) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages)); + const DeepCollectionEquality().equals(other._moderates, _moderates) && + const DeepCollectionEquality().equals(other._communityBlocks, _communityBlocks) && + const DeepCollectionEquality().equals(other._instanceBlocks, _instanceBlocks) && + const DeepCollectionEquality().equals(other._personBlocks, _personBlocks) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - localUserView, - const DeepCollectionEquality().hash(_follows), - const DeepCollectionEquality().hash(_moderates), - const DeepCollectionEquality().hash(_communityBlocks), - const DeepCollectionEquality().hash(_instanceBlocks), - const DeepCollectionEquality().hash(_personBlocks), - const DeepCollectionEquality().hash(_discussionLanguages)); + runtimeType, + localUserView, + const DeepCollectionEquality().hash(_follows), + const DeepCollectionEquality().hash(_moderates), + const DeepCollectionEquality().hash(_communityBlocks), + const DeepCollectionEquality().hash(_instanceBlocks), + const DeepCollectionEquality().hash(_personBlocks), + const DeepCollectionEquality().hash(_discussionLanguages), + ); /// Create a copy of MyUserInfo /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MyUserInfoImplCopyWith<_$MyUserInfoImpl> get copyWith => - __$$MyUserInfoImplCopyWithImpl<_$MyUserInfoImpl>(this, _$identity); + _$$MyUserInfoImplCopyWith<_$MyUserInfoImpl> get copyWith => __$$MyUserInfoImplCopyWithImpl<_$MyUserInfoImpl>(this, _$identity); @override Map toJson() { - return _$$MyUserInfoImplToJson( - this, - ); + return _$$MyUserInfoImplToJson(this); } } abstract class _MyUserInfo extends MyUserInfo { - const factory _MyUserInfo( - {required final LocalUserView localUserView, - required final List follows, - required final List moderates, - required final List communityBlocks, - final List? instanceBlocks, - required final List personBlocks, - required final List discussionLanguages}) = _$MyUserInfoImpl; + const factory _MyUserInfo({ + required final LocalUserView localUserView, + required final List follows, + required final List moderates, + required final List communityBlocks, + final List? instanceBlocks, + required final List personBlocks, + required final List discussionLanguages, + }) = _$MyUserInfoImpl; const _MyUserInfo._() : super._(); - factory _MyUserInfo.fromJson(Map json) = - _$MyUserInfoImpl.fromJson; + factory _MyUserInfo.fromJson(Map json) = _$MyUserInfoImpl.fromJson; @override LocalUserView get localUserView; // v0.18.0 @@ -377,6 +372,5 @@ abstract class _MyUserInfo extends MyUserInfo { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MyUserInfoImplCopyWith<_$MyUserInfoImpl> get copyWith => - throw _privateConstructorUsedError; + _$$MyUserInfoImplCopyWith<_$MyUserInfoImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/my_user_info/my_user_info.g.dart b/lib/src/v3/models/my_user_info/my_user_info.g.dart index 1512d3e9..64f8ded7 100644 --- a/lib/src/v3/models/my_user_info/my_user_info.g.dart +++ b/lib/src/v3/models/my_user_info/my_user_info.g.dart @@ -6,40 +6,22 @@ part of 'my_user_info.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MyUserInfoImpl _$$MyUserInfoImplFromJson(Map json) => - _$MyUserInfoImpl( - localUserView: LocalUserView.fromJson( - json['local_user_view'] as Map), - follows: (json['follows'] as List) - .map((e) => CommunityFollowerView.fromJson(e as Map)) - .toList(), - moderates: (json['moderates'] as List) - .map( - (e) => CommunityModeratorView.fromJson(e as Map)) - .toList(), - communityBlocks: (json['community_blocks'] as List) - .map((e) => CommunityBlockView.fromJson(e as Map)) - .toList(), - instanceBlocks: (json['instance_blocks'] as List?) - ?.map((e) => InstanceBlockView.fromJson(e as Map)) - .toList(), - personBlocks: (json['person_blocks'] as List) - .map((e) => PersonBlockView.fromJson(e as Map)) - .toList(), - discussionLanguages: (json['discussion_languages'] as List) - .map((e) => (e as num).toInt()) - .toList(), - ); +_$MyUserInfoImpl _$$MyUserInfoImplFromJson(Map json) => _$MyUserInfoImpl( + localUserView: LocalUserView.fromJson(json['local_user_view'] as Map), + follows: (json['follows'] as List).map((e) => CommunityFollowerView.fromJson(e as Map)).toList(), + moderates: (json['moderates'] as List).map((e) => CommunityModeratorView.fromJson(e as Map)).toList(), + communityBlocks: (json['community_blocks'] as List).map((e) => CommunityBlockView.fromJson(e as Map)).toList(), + instanceBlocks: (json['instance_blocks'] as List?)?.map((e) => InstanceBlockView.fromJson(e as Map)).toList(), + personBlocks: (json['person_blocks'] as List).map((e) => PersonBlockView.fromJson(e as Map)).toList(), + discussionLanguages: (json['discussion_languages'] as List).map((e) => (e as num).toInt()).toList(), +); -Map _$$MyUserInfoImplToJson(_$MyUserInfoImpl instance) => - { - 'local_user_view': instance.localUserView.toJson(), - 'follows': instance.follows.map((e) => e.toJson()).toList(), - 'moderates': instance.moderates.map((e) => e.toJson()).toList(), - 'community_blocks': - instance.communityBlocks.map((e) => e.toJson()).toList(), - 'instance_blocks': - instance.instanceBlocks?.map((e) => e.toJson()).toList(), - 'person_blocks': instance.personBlocks.map((e) => e.toJson()).toList(), - 'discussion_languages': instance.discussionLanguages, - }; +Map _$$MyUserInfoImplToJson(_$MyUserInfoImpl instance) => { + 'local_user_view': instance.localUserView.toJson(), + 'follows': instance.follows.map((e) => e.toJson()).toList(), + 'moderates': instance.moderates.map((e) => e.toJson()).toList(), + 'community_blocks': instance.communityBlocks.map((e) => e.toJson()).toList(), + 'instance_blocks': instance.instanceBlocks?.map((e) => e.toJson()).toList(), + 'person_blocks': instance.personBlocks.map((e) => e.toJson()).toList(), + 'discussion_languages': instance.discussionLanguages, +}; diff --git a/lib/src/v3/models/person/person.freezed.dart b/lib/src/v3/models/person/person.freezed.dart index 5443e88b..22b55113 100644 --- a/lib/src/v3/models/person/person.freezed.dart +++ b/lib/src/v3/models/person/person.freezed.dart @@ -12,7 +12,8 @@ part of 'person.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Person _$PersonFromJson(Map json) { return _Person.fromJson(json); @@ -33,12 +34,10 @@ mixin _$Person { String? get banner => throw _privateConstructorUsedError; // v0.18.0 bool get deleted => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get inboxUrl => - throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] + String? get inboxUrl => throw _privateConstructorUsedError; // v0.18.1 [deprecated in v0.19.0] String? get matrixUserId => throw _privateConstructorUsedError; // v0.18.0 @deprecated - bool? get admin => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + bool? get admin => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] bool get botAccount => throw _privateConstructorUsedError; // v0.18.0 String? get banExpires => throw _privateConstructorUsedError; // v0.18.0 int get instanceId => throw _privateConstructorUsedError; @@ -54,33 +53,32 @@ mixin _$Person { /// @nodoc abstract class $PersonCopyWith<$Res> { - factory $PersonCopyWith(Person value, $Res Function(Person) then) = - _$PersonCopyWithImpl<$Res, Person>; + factory $PersonCopyWith(Person value, $Res Function(Person) then) = _$PersonCopyWithImpl<$Res, Person>; @useResult - $Res call( - {int id, - String name, - String? displayName, - String? avatar, - bool banned, - DateTime published, - DateTime? updated, - String actorId, - String? bio, - bool local, - String? banner, - bool deleted, - @deprecated String? inboxUrl, - String? matrixUserId, - @deprecated bool? admin, - bool botAccount, - String? banExpires, - int instanceId}); + $Res call({ + int id, + String name, + String? displayName, + String? avatar, + bool banned, + DateTime published, + DateTime? updated, + String actorId, + String? bio, + bool local, + String? banner, + bool deleted, + @deprecated String? inboxUrl, + String? matrixUserId, + @deprecated bool? admin, + bool botAccount, + String? banExpires, + int instanceId, + }); } /// @nodoc -class _$PersonCopyWithImpl<$Res, $Val extends Person> - implements $PersonCopyWith<$Res> { +class _$PersonCopyWithImpl<$Res, $Val extends Person> implements $PersonCopyWith<$Res> { _$PersonCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -112,118 +110,134 @@ class _$PersonCopyWithImpl<$Res, $Val extends Person> Object? banExpires = freezed, Object? instanceId = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - displayName: freezed == displayName - ? _value.displayName - : displayName // ignore: cast_nullable_to_non_nullable - as String?, - avatar: freezed == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - bio: freezed == bio - ? _value.bio - : bio // ignore: cast_nullable_to_non_nullable - as String?, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - inboxUrl: freezed == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String?, - matrixUserId: freezed == matrixUserId - ? _value.matrixUserId - : matrixUserId // ignore: cast_nullable_to_non_nullable - as String?, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as bool?, - botAccount: null == botAccount - ? _value.botAccount - : botAccount // ignore: cast_nullable_to_non_nullable - as bool, - banExpires: freezed == banExpires - ? _value.banExpires - : banExpires // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + displayName: + freezed == displayName + ? _value.displayName + : displayName // ignore: cast_nullable_to_non_nullable + as String?, + avatar: + freezed == avatar + ? _value.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + bio: + freezed == bio + ? _value.bio + : bio // ignore: cast_nullable_to_non_nullable + as String?, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + inboxUrl: + freezed == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String?, + matrixUserId: + freezed == matrixUserId + ? _value.matrixUserId + : matrixUserId // ignore: cast_nullable_to_non_nullable + as String?, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as bool?, + botAccount: + null == botAccount + ? _value.botAccount + : botAccount // ignore: cast_nullable_to_non_nullable + as bool, + banExpires: + freezed == banExpires + ? _value.banExpires + : banExpires // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$PersonImplCopyWith<$Res> implements $PersonCopyWith<$Res> { - factory _$$PersonImplCopyWith( - _$PersonImpl value, $Res Function(_$PersonImpl) then) = - __$$PersonImplCopyWithImpl<$Res>; + factory _$$PersonImplCopyWith(_$PersonImpl value, $Res Function(_$PersonImpl) then) = __$$PersonImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - String? displayName, - String? avatar, - bool banned, - DateTime published, - DateTime? updated, - String actorId, - String? bio, - bool local, - String? banner, - bool deleted, - @deprecated String? inboxUrl, - String? matrixUserId, - @deprecated bool? admin, - bool botAccount, - String? banExpires, - int instanceId}); + $Res call({ + int id, + String name, + String? displayName, + String? avatar, + bool banned, + DateTime published, + DateTime? updated, + String actorId, + String? bio, + bool local, + String? banner, + bool deleted, + @deprecated String? inboxUrl, + String? matrixUserId, + @deprecated bool? admin, + bool botAccount, + String? banExpires, + int instanceId, + }); } /// @nodoc -class __$$PersonImplCopyWithImpl<$Res> - extends _$PersonCopyWithImpl<$Res, _$PersonImpl> - implements _$$PersonImplCopyWith<$Res> { - __$$PersonImplCopyWithImpl( - _$PersonImpl _value, $Res Function(_$PersonImpl) _then) - : super(_value, _then); +class __$$PersonImplCopyWithImpl<$Res> extends _$PersonCopyWithImpl<$Res, _$PersonImpl> implements _$$PersonImplCopyWith<$Res> { + __$$PersonImplCopyWithImpl(_$PersonImpl _value, $Res Function(_$PersonImpl) _then) : super(_value, _then); /// Create a copy of Person /// with the given fields replaced by the non-null parameter values. @@ -249,80 +263,100 @@ class __$$PersonImplCopyWithImpl<$Res> Object? banExpires = freezed, Object? instanceId = null, }) { - return _then(_$PersonImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - displayName: freezed == displayName - ? _value.displayName - : displayName // ignore: cast_nullable_to_non_nullable - as String?, - avatar: freezed == avatar - ? _value.avatar - : avatar // ignore: cast_nullable_to_non_nullable - as String?, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - bio: freezed == bio - ? _value.bio - : bio // ignore: cast_nullable_to_non_nullable - as String?, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - inboxUrl: freezed == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String?, - matrixUserId: freezed == matrixUserId - ? _value.matrixUserId - : matrixUserId // ignore: cast_nullable_to_non_nullable - as String?, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as bool?, - botAccount: null == botAccount - ? _value.botAccount - : botAccount // ignore: cast_nullable_to_non_nullable - as bool, - banExpires: freezed == banExpires - ? _value.banExpires - : banExpires // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$PersonImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + displayName: + freezed == displayName + ? _value.displayName + : displayName // ignore: cast_nullable_to_non_nullable + as String?, + avatar: + freezed == avatar + ? _value.avatar + : avatar // ignore: cast_nullable_to_non_nullable + as String?, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + bio: + freezed == bio + ? _value.bio + : bio // ignore: cast_nullable_to_non_nullable + as String?, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + inboxUrl: + freezed == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String?, + matrixUserId: + freezed == matrixUserId + ? _value.matrixUserId + : matrixUserId // ignore: cast_nullable_to_non_nullable + as String?, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as bool?, + botAccount: + null == botAccount + ? _value.botAccount + : botAccount // ignore: cast_nullable_to_non_nullable + as bool, + banExpires: + freezed == banExpires + ? _value.banExpires + : banExpires // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -330,83 +364,82 @@ class __$$PersonImplCopyWithImpl<$Res> @modelSerde class _$PersonImpl extends _Person { - const _$PersonImpl( - {required this.id, - required this.name, - this.displayName, - this.avatar, - required this.banned, - required this.published, - this.updated, - required this.actorId, - this.bio, - required this.local, - this.banner, - required this.deleted, - @deprecated this.inboxUrl, - this.matrixUserId, - @deprecated this.admin, - required this.botAccount, - this.banExpires, - required this.instanceId}) - : super._(); + const _$PersonImpl({ + required this.id, + required this.name, + this.displayName, + this.avatar, + required this.banned, + required this.published, + this.updated, + required this.actorId, + this.bio, + required this.local, + this.banner, + required this.deleted, + @deprecated this.inboxUrl, + this.matrixUserId, + @deprecated this.admin, + required this.botAccount, + this.banExpires, + required this.instanceId, + }) : super._(); - factory _$PersonImpl.fromJson(Map json) => - _$$PersonImplFromJson(json); + factory _$PersonImpl.fromJson(Map json) => _$$PersonImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String name; -// v0.18.0 + // v0.18.0 @override final String? displayName; -// v0.18.0 + // v0.18.0 @override final String? avatar; -// v0.18.0 + // v0.18.0 @override final bool banned; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final String actorId; -// v0.18.0 + // v0.18.0 @override final String? bio; -// v0.18.0 + // v0.18.0 @override final bool local; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override @deprecated final String? inboxUrl; -// v0.18.1 [deprecated in v0.19.0] + // v0.18.1 [deprecated in v0.19.0] @override final String? matrixUserId; -// v0.18.0 + // v0.18.0 @override @deprecated final bool? admin; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final bool botAccount; -// v0.18.0 + // v0.18.0 @override final String? banExpires; -// v0.18.0 + // v0.18.0 @override final int instanceId; @@ -422,90 +455,63 @@ class _$PersonImpl extends _Person { other is _$PersonImpl && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && - (identical(other.displayName, displayName) || - other.displayName == displayName) && + (identical(other.displayName, displayName) || other.displayName == displayName) && (identical(other.avatar, avatar) || other.avatar == avatar) && (identical(other.banned, banned) || other.banned == banned) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.actorId, actorId) || other.actorId == actorId) && (identical(other.bio, bio) || other.bio == bio) && (identical(other.local, local) || other.local == local) && (identical(other.banner, banner) || other.banner == banner) && (identical(other.deleted, deleted) || other.deleted == deleted) && - (identical(other.inboxUrl, inboxUrl) || - other.inboxUrl == inboxUrl) && - (identical(other.matrixUserId, matrixUserId) || - other.matrixUserId == matrixUserId) && + (identical(other.inboxUrl, inboxUrl) || other.inboxUrl == inboxUrl) && + (identical(other.matrixUserId, matrixUserId) || other.matrixUserId == matrixUserId) && (identical(other.admin, admin) || other.admin == admin) && - (identical(other.botAccount, botAccount) || - other.botAccount == botAccount) && - (identical(other.banExpires, banExpires) || - other.banExpires == banExpires) && - (identical(other.instanceId, instanceId) || - other.instanceId == instanceId)); + (identical(other.botAccount, botAccount) || other.botAccount == botAccount) && + (identical(other.banExpires, banExpires) || other.banExpires == banExpires) && + (identical(other.instanceId, instanceId) || other.instanceId == instanceId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - displayName, - avatar, - banned, - published, - updated, - actorId, - bio, - local, - banner, - deleted, - inboxUrl, - matrixUserId, - admin, - botAccount, - banExpires, - instanceId); + int get hashCode => + Object.hash(runtimeType, id, name, displayName, avatar, banned, published, updated, actorId, bio, local, banner, deleted, inboxUrl, matrixUserId, admin, botAccount, banExpires, instanceId); /// Create a copy of Person /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonImplCopyWith<_$PersonImpl> get copyWith => - __$$PersonImplCopyWithImpl<_$PersonImpl>(this, _$identity); + _$$PersonImplCopyWith<_$PersonImpl> get copyWith => __$$PersonImplCopyWithImpl<_$PersonImpl>(this, _$identity); @override Map toJson() { - return _$$PersonImplToJson( - this, - ); + return _$$PersonImplToJson(this); } } abstract class _Person extends Person { - const factory _Person( - {required final int id, - required final String name, - final String? displayName, - final String? avatar, - required final bool banned, - required final DateTime published, - final DateTime? updated, - required final String actorId, - final String? bio, - required final bool local, - final String? banner, - required final bool deleted, - @deprecated final String? inboxUrl, - final String? matrixUserId, - @deprecated final bool? admin, - required final bool botAccount, - final String? banExpires, - required final int instanceId}) = _$PersonImpl; + const factory _Person({ + required final int id, + required final String name, + final String? displayName, + final String? avatar, + required final bool banned, + required final DateTime published, + final DateTime? updated, + required final String actorId, + final String? bio, + required final bool local, + final String? banner, + required final bool deleted, + @deprecated final String? inboxUrl, + final String? matrixUserId, + @deprecated final bool? admin, + required final bool botAccount, + final String? banExpires, + required final int instanceId, + }) = _$PersonImpl; const _Person._() : super._(); factory _Person.fromJson(Map json) = _$PersonImpl.fromJson; @@ -553,6 +559,5 @@ abstract class _Person extends Person { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonImplCopyWith<_$PersonImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonImplCopyWith<_$PersonImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/person/person.g.dart b/lib/src/v3/models/person/person.g.dart index 8d9abb8b..e6e42a7a 100644 --- a/lib/src/v3/models/person/person.g.dart +++ b/lib/src/v3/models/person/person.g.dart @@ -7,58 +7,47 @@ part of 'person.dart'; // ************************************************************************** _$PersonImpl _$$PersonImplFromJson(Map json) => _$PersonImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - displayName: json['display_name'] as String?, - avatar: json['avatar'] as String?, - banned: json['banned'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - actorId: json['actor_id'] as String, - bio: json['bio'] as String?, - local: json['local'] as bool, - banner: json['banner'] as String?, - deleted: json['deleted'] as bool, - inboxUrl: json['inbox_url'] as String?, - matrixUserId: json['matrix_user_id'] as String?, - admin: json['admin'] as bool?, - botAccount: json['bot_account'] as bool, - banExpires: json['ban_expires'] as String?, - instanceId: (json['instance_id'] as num).toInt(), - ); + id: (json['id'] as num).toInt(), + name: json['name'] as String, + displayName: json['display_name'] as String?, + avatar: json['avatar'] as String?, + banned: json['banned'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + actorId: json['actor_id'] as String, + bio: json['bio'] as String?, + local: json['local'] as bool, + banner: json['banner'] as String?, + deleted: json['deleted'] as bool, + inboxUrl: json['inbox_url'] as String?, + matrixUserId: json['matrix_user_id'] as String?, + admin: json['admin'] as bool?, + botAccount: json['bot_account'] as bool, + banExpires: json['ban_expires'] as String?, + instanceId: (json['instance_id'] as num).toInt(), +); -Map _$$PersonImplToJson(_$PersonImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'display_name': instance.displayName, - 'avatar': instance.avatar, - 'banned': instance.banned, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'actor_id': instance.actorId, - 'bio': instance.bio, - 'local': instance.local, - 'banner': instance.banner, - 'deleted': instance.deleted, - 'inbox_url': instance.inboxUrl, - 'matrix_user_id': instance.matrixUserId, - 'admin': instance.admin, - 'bot_account': instance.botAccount, - 'ban_expires': instance.banExpires, - 'instance_id': instance.instanceId, - }; +Map _$$PersonImplToJson(_$PersonImpl instance) => { + 'id': instance.id, + 'name': instance.name, + 'display_name': instance.displayName, + 'avatar': instance.avatar, + 'banned': instance.banned, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'actor_id': instance.actorId, + 'bio': instance.bio, + 'local': instance.local, + 'banner': instance.banner, + 'deleted': instance.deleted, + 'inbox_url': instance.inboxUrl, + 'matrix_user_id': instance.matrixUserId, + 'admin': instance.admin, + 'bot_account': instance.botAccount, + 'ban_expires': instance.banExpires, + 'instance_id': instance.instanceId, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/person/person_aggregates.dart b/lib/src/v3/models/person/person_aggregates.dart index 78676f27..c6166cb2 100644 --- a/lib/src/v3/models/person/person_aggregates.dart +++ b/lib/src/v3/models/person/person_aggregates.dart @@ -18,6 +18,5 @@ class PersonAggregates with _$PersonAggregates { }) = _PersonAggregates; const PersonAggregates._(); - factory PersonAggregates.fromJson(Map json) => - _$PersonAggregatesFromJson(json); + factory PersonAggregates.fromJson(Map json) => _$PersonAggregatesFromJson(json); } diff --git a/lib/src/v3/models/person/person_aggregates.freezed.dart b/lib/src/v3/models/person/person_aggregates.freezed.dart index 13183deb..0ef3bdb2 100644 --- a/lib/src/v3/models/person/person_aggregates.freezed.dart +++ b/lib/src/v3/models/person/person_aggregates.freezed.dart @@ -12,7 +12,8 @@ part of 'person_aggregates.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PersonAggregates _$PersonAggregatesFromJson(Map json) { return _PersonAggregates.fromJson(json); @@ -21,13 +22,11 @@ PersonAggregates _$PersonAggregatesFromJson(Map json) { /// @nodoc mixin _$PersonAggregates { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get personId => throw _privateConstructorUsedError; // v0.18.0 int get postCount => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get postScore => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get postScore => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get commentCount => throw _privateConstructorUsedError; // v0.18.0 @deprecated int? get commentScore => throw _privateConstructorUsedError; @@ -38,28 +37,18 @@ mixin _$PersonAggregates { /// Create a copy of PersonAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonAggregatesCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonAggregatesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonAggregatesCopyWith<$Res> { - factory $PersonAggregatesCopyWith( - PersonAggregates value, $Res Function(PersonAggregates) then) = - _$PersonAggregatesCopyWithImpl<$Res, PersonAggregates>; + factory $PersonAggregatesCopyWith(PersonAggregates value, $Res Function(PersonAggregates) then) = _$PersonAggregatesCopyWithImpl<$Res, PersonAggregates>; @useResult - $Res call( - {@deprecated int? id, - int personId, - int postCount, - @deprecated int? postScore, - int commentCount, - @deprecated int? commentScore}); + $Res call({@deprecated int? id, int personId, int postCount, @deprecated int? postScore, int commentCount, @deprecated int? commentScore}); } /// @nodoc -class _$PersonAggregatesCopyWithImpl<$Res, $Val extends PersonAggregates> - implements $PersonAggregatesCopyWith<$Res> { +class _$PersonAggregatesCopyWithImpl<$Res, $Val extends PersonAggregates> implements $PersonAggregatesCopyWith<$Res> { _$PersonAggregatesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -71,106 +60,96 @@ class _$PersonAggregatesCopyWithImpl<$Res, $Val extends PersonAggregates> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? personId = null, - Object? postCount = null, - Object? postScore = freezed, - Object? commentCount = null, - Object? commentScore = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - postCount: null == postCount - ? _value.postCount - : postCount // ignore: cast_nullable_to_non_nullable - as int, - postScore: freezed == postScore - ? _value.postScore - : postScore // ignore: cast_nullable_to_non_nullable - as int?, - commentCount: null == commentCount - ? _value.commentCount - : commentCount // ignore: cast_nullable_to_non_nullable - as int, - commentScore: freezed == commentScore - ? _value.commentScore - : commentScore // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + $Res call({Object? id = freezed, Object? personId = null, Object? postCount = null, Object? postScore = freezed, Object? commentCount = null, Object? commentScore = freezed}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + postCount: + null == postCount + ? _value.postCount + : postCount // ignore: cast_nullable_to_non_nullable + as int, + postScore: + freezed == postScore + ? _value.postScore + : postScore // ignore: cast_nullable_to_non_nullable + as int?, + commentCount: + null == commentCount + ? _value.commentCount + : commentCount // ignore: cast_nullable_to_non_nullable + as int, + commentScore: + freezed == commentScore + ? _value.commentScore + : commentScore // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PersonAggregatesImplCopyWith<$Res> - implements $PersonAggregatesCopyWith<$Res> { - factory _$$PersonAggregatesImplCopyWith(_$PersonAggregatesImpl value, - $Res Function(_$PersonAggregatesImpl) then) = - __$$PersonAggregatesImplCopyWithImpl<$Res>; +abstract class _$$PersonAggregatesImplCopyWith<$Res> implements $PersonAggregatesCopyWith<$Res> { + factory _$$PersonAggregatesImplCopyWith(_$PersonAggregatesImpl value, $Res Function(_$PersonAggregatesImpl) then) = __$$PersonAggregatesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int personId, - int postCount, - @deprecated int? postScore, - int commentCount, - @deprecated int? commentScore}); + $Res call({@deprecated int? id, int personId, int postCount, @deprecated int? postScore, int commentCount, @deprecated int? commentScore}); } /// @nodoc -class __$$PersonAggregatesImplCopyWithImpl<$Res> - extends _$PersonAggregatesCopyWithImpl<$Res, _$PersonAggregatesImpl> - implements _$$PersonAggregatesImplCopyWith<$Res> { - __$$PersonAggregatesImplCopyWithImpl(_$PersonAggregatesImpl _value, - $Res Function(_$PersonAggregatesImpl) _then) - : super(_value, _then); +class __$$PersonAggregatesImplCopyWithImpl<$Res> extends _$PersonAggregatesCopyWithImpl<$Res, _$PersonAggregatesImpl> implements _$$PersonAggregatesImplCopyWith<$Res> { + __$$PersonAggregatesImplCopyWithImpl(_$PersonAggregatesImpl _value, $Res Function(_$PersonAggregatesImpl) _then) : super(_value, _then); /// Create a copy of PersonAggregates /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? personId = null, - Object? postCount = null, - Object? postScore = freezed, - Object? commentCount = null, - Object? commentScore = freezed, - }) { - return _then(_$PersonAggregatesImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - personId: null == personId - ? _value.personId - : personId // ignore: cast_nullable_to_non_nullable - as int, - postCount: null == postCount - ? _value.postCount - : postCount // ignore: cast_nullable_to_non_nullable - as int, - postScore: freezed == postScore - ? _value.postScore - : postScore // ignore: cast_nullable_to_non_nullable - as int?, - commentCount: null == commentCount - ? _value.commentCount - : commentCount // ignore: cast_nullable_to_non_nullable - as int, - commentScore: freezed == commentScore - ? _value.commentScore - : commentScore // ignore: cast_nullable_to_non_nullable - as int?, - )); + $Res call({Object? id = freezed, Object? personId = null, Object? postCount = null, Object? postScore = freezed, Object? commentCount = null, Object? commentScore = freezed}) { + return _then( + _$PersonAggregatesImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + personId: + null == personId + ? _value.personId + : personId // ignore: cast_nullable_to_non_nullable + as int, + postCount: + null == postCount + ? _value.postCount + : postCount // ignore: cast_nullable_to_non_nullable + as int, + postScore: + freezed == postScore + ? _value.postScore + : postScore // ignore: cast_nullable_to_non_nullable + as int?, + commentCount: + null == commentCount + ? _value.commentCount + : commentCount // ignore: cast_nullable_to_non_nullable + as int, + commentScore: + freezed == commentScore + ? _value.commentScore + : commentScore // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -178,35 +157,28 @@ class __$$PersonAggregatesImplCopyWithImpl<$Res> @modelSerde class _$PersonAggregatesImpl extends _PersonAggregates { - const _$PersonAggregatesImpl( - {@deprecated this.id, - required this.personId, - required this.postCount, - @deprecated this.postScore, - required this.commentCount, - @deprecated this.commentScore}) - : super._(); + const _$PersonAggregatesImpl({@deprecated this.id, required this.personId, required this.postCount, @deprecated this.postScore, required this.commentCount, @deprecated this.commentScore}) + : super._(); - factory _$PersonAggregatesImpl.fromJson(Map json) => - _$$PersonAggregatesImplFromJson(json); + factory _$PersonAggregatesImpl.fromJson(Map json) => _$$PersonAggregatesImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int personId; -// v0.18.0 + // v0.18.0 @override final int postCount; -// v0.18.0 + // v0.18.0 @override @deprecated final int? postScore; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int commentCount; -// v0.18.0 + // v0.18.0 @override @deprecated final int? commentScore; @@ -222,52 +194,42 @@ class _$PersonAggregatesImpl extends _PersonAggregates { (other.runtimeType == runtimeType && other is _$PersonAggregatesImpl && (identical(other.id, id) || other.id == id) && - (identical(other.personId, personId) || - other.personId == personId) && - (identical(other.postCount, postCount) || - other.postCount == postCount) && - (identical(other.postScore, postScore) || - other.postScore == postScore) && - (identical(other.commentCount, commentCount) || - other.commentCount == commentCount) && - (identical(other.commentScore, commentScore) || - other.commentScore == commentScore)); + (identical(other.personId, personId) || other.personId == personId) && + (identical(other.postCount, postCount) || other.postCount == postCount) && + (identical(other.postScore, postScore) || other.postScore == postScore) && + (identical(other.commentCount, commentCount) || other.commentCount == commentCount) && + (identical(other.commentScore, commentScore) || other.commentScore == commentScore)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, personId, postCount, - postScore, commentCount, commentScore); + int get hashCode => Object.hash(runtimeType, id, personId, postCount, postScore, commentCount, commentScore); /// Create a copy of PersonAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonAggregatesImplCopyWith<_$PersonAggregatesImpl> get copyWith => - __$$PersonAggregatesImplCopyWithImpl<_$PersonAggregatesImpl>( - this, _$identity); + _$$PersonAggregatesImplCopyWith<_$PersonAggregatesImpl> get copyWith => __$$PersonAggregatesImplCopyWithImpl<_$PersonAggregatesImpl>(this, _$identity); @override Map toJson() { - return _$$PersonAggregatesImplToJson( - this, - ); + return _$$PersonAggregatesImplToJson(this); } } abstract class _PersonAggregates extends PersonAggregates { - const factory _PersonAggregates( - {@deprecated final int? id, - required final int personId, - required final int postCount, - @deprecated final int? postScore, - required final int commentCount, - @deprecated final int? commentScore}) = _$PersonAggregatesImpl; + const factory _PersonAggregates({ + @deprecated final int? id, + required final int personId, + required final int postCount, + @deprecated final int? postScore, + required final int commentCount, + @deprecated final int? commentScore, + }) = _$PersonAggregatesImpl; const _PersonAggregates._() : super._(); - factory _PersonAggregates.fromJson(Map json) = - _$PersonAggregatesImpl.fromJson; + factory _PersonAggregates.fromJson(Map json) = _$PersonAggregatesImpl.fromJson; @override @deprecated @@ -289,6 +251,5 @@ abstract class _PersonAggregates extends PersonAggregates { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonAggregatesImplCopyWith<_$PersonAggregatesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonAggregatesImplCopyWith<_$PersonAggregatesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/person/person_aggregates.g.dart b/lib/src/v3/models/person/person_aggregates.g.dart index 6ed5167b..1059c5d1 100644 --- a/lib/src/v3/models/person/person_aggregates.g.dart +++ b/lib/src/v3/models/person/person_aggregates.g.dart @@ -6,24 +6,20 @@ part of 'person_aggregates.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PersonAggregatesImpl _$$PersonAggregatesImplFromJson( - Map json) => - _$PersonAggregatesImpl( - id: (json['id'] as num?)?.toInt(), - personId: (json['person_id'] as num).toInt(), - postCount: (json['post_count'] as num).toInt(), - postScore: (json['post_score'] as num?)?.toInt(), - commentCount: (json['comment_count'] as num).toInt(), - commentScore: (json['comment_score'] as num?)?.toInt(), - ); +_$PersonAggregatesImpl _$$PersonAggregatesImplFromJson(Map json) => _$PersonAggregatesImpl( + id: (json['id'] as num?)?.toInt(), + personId: (json['person_id'] as num).toInt(), + postCount: (json['post_count'] as num).toInt(), + postScore: (json['post_score'] as num?)?.toInt(), + commentCount: (json['comment_count'] as num).toInt(), + commentScore: (json['comment_score'] as num?)?.toInt(), +); -Map _$$PersonAggregatesImplToJson( - _$PersonAggregatesImpl instance) => - { - 'id': instance.id, - 'person_id': instance.personId, - 'post_count': instance.postCount, - 'post_score': instance.postScore, - 'comment_count': instance.commentCount, - 'comment_score': instance.commentScore, - }; +Map _$$PersonAggregatesImplToJson(_$PersonAggregatesImpl instance) => { + 'id': instance.id, + 'person_id': instance.personId, + 'post_count': instance.postCount, + 'post_score': instance.postScore, + 'comment_count': instance.commentCount, + 'comment_score': instance.commentScore, +}; diff --git a/lib/src/v3/models/person/person_mention.dart b/lib/src/v3/models/person/person_mention.dart index ffa4f7db..b3969f24 100644 --- a/lib/src/v3/models/person/person_mention.dart +++ b/lib/src/v3/models/person/person_mention.dart @@ -18,6 +18,5 @@ class PersonMention with _$PersonMention { }) = _PersonMention; const PersonMention._(); - factory PersonMention.fromJson(Map json) => - _$PersonMentionFromJson(json); + factory PersonMention.fromJson(Map json) => _$PersonMentionFromJson(json); } diff --git a/lib/src/v3/models/person/person_mention.freezed.dart b/lib/src/v3/models/person/person_mention.freezed.dart index 9441dd1b..4a834326 100644 --- a/lib/src/v3/models/person/person_mention.freezed.dart +++ b/lib/src/v3/models/person/person_mention.freezed.dart @@ -12,7 +12,8 @@ part of 'person_mention.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PersonMention _$PersonMentionFromJson(Map json) { return _PersonMention.fromJson(json); @@ -32,23 +33,18 @@ mixin _$PersonMention { /// Create a copy of PersonMention /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonMentionCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonMentionCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonMentionCopyWith<$Res> { - factory $PersonMentionCopyWith( - PersonMention value, $Res Function(PersonMention) then) = - _$PersonMentionCopyWithImpl<$Res, PersonMention>; + factory $PersonMentionCopyWith(PersonMention value, $Res Function(PersonMention) then) = _$PersonMentionCopyWithImpl<$Res, PersonMention>; @useResult - $Res call( - {int id, int recipientId, int commentId, bool read, DateTime published}); + $Res call({int id, int recipientId, int commentId, bool read, DateTime published}); } /// @nodoc -class _$PersonMentionCopyWithImpl<$Res, $Val extends PersonMention> - implements $PersonMentionCopyWith<$Res> { +class _$PersonMentionCopyWithImpl<$Res, $Val extends PersonMention> implements $PersonMentionCopyWith<$Res> { _$PersonMentionCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,91 +56,86 @@ class _$PersonMentionCopyWithImpl<$Res, $Val extends PersonMention> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? recipientId = null, - Object? commentId = null, - Object? read = null, - Object? published = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + $Res call({Object? id = null, Object? recipientId = null, Object? commentId = null, Object? read = null, Object? published = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PersonMentionImplCopyWith<$Res> - implements $PersonMentionCopyWith<$Res> { - factory _$$PersonMentionImplCopyWith( - _$PersonMentionImpl value, $Res Function(_$PersonMentionImpl) then) = - __$$PersonMentionImplCopyWithImpl<$Res>; +abstract class _$$PersonMentionImplCopyWith<$Res> implements $PersonMentionCopyWith<$Res> { + factory _$$PersonMentionImplCopyWith(_$PersonMentionImpl value, $Res Function(_$PersonMentionImpl) then) = __$$PersonMentionImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, int recipientId, int commentId, bool read, DateTime published}); + $Res call({int id, int recipientId, int commentId, bool read, DateTime published}); } /// @nodoc -class __$$PersonMentionImplCopyWithImpl<$Res> - extends _$PersonMentionCopyWithImpl<$Res, _$PersonMentionImpl> - implements _$$PersonMentionImplCopyWith<$Res> { - __$$PersonMentionImplCopyWithImpl( - _$PersonMentionImpl _value, $Res Function(_$PersonMentionImpl) _then) - : super(_value, _then); +class __$$PersonMentionImplCopyWithImpl<$Res> extends _$PersonMentionCopyWithImpl<$Res, _$PersonMentionImpl> implements _$$PersonMentionImplCopyWith<$Res> { + __$$PersonMentionImplCopyWithImpl(_$PersonMentionImpl _value, $Res Function(_$PersonMentionImpl) _then) : super(_value, _then); /// Create a copy of PersonMention /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? recipientId = null, - Object? commentId = null, - Object? read = null, - Object? published = null, - }) { - return _then(_$PersonMentionImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - commentId: null == commentId - ? _value.commentId - : commentId // ignore: cast_nullable_to_non_nullable - as int, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + $Res call({Object? id = null, Object? recipientId = null, Object? commentId = null, Object? read = null, Object? published = null}) { + return _then( + _$PersonMentionImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + commentId: + null == commentId + ? _value.commentId + : commentId // ignore: cast_nullable_to_non_nullable + as int, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } @@ -152,29 +143,22 @@ class __$$PersonMentionImplCopyWithImpl<$Res> @modelSerde class _$PersonMentionImpl extends _PersonMention { - const _$PersonMentionImpl( - {required this.id, - required this.recipientId, - required this.commentId, - required this.read, - required this.published}) - : super._(); + const _$PersonMentionImpl({required this.id, required this.recipientId, required this.commentId, required this.read, required this.published}) : super._(); - factory _$PersonMentionImpl.fromJson(Map json) => - _$$PersonMentionImplFromJson(json); + factory _$PersonMentionImpl.fromJson(Map json) => _$$PersonMentionImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int recipientId; -// v0.18.0 + // v0.18.0 @override final int commentId; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final DateTime published; @@ -189,47 +173,35 @@ class _$PersonMentionImpl extends _PersonMention { (other.runtimeType == runtimeType && other is _$PersonMentionImpl && (identical(other.id, id) || other.id == id) && - (identical(other.recipientId, recipientId) || - other.recipientId == recipientId) && - (identical(other.commentId, commentId) || - other.commentId == commentId) && + (identical(other.recipientId, recipientId) || other.recipientId == recipientId) && + (identical(other.commentId, commentId) || other.commentId == commentId) && (identical(other.read, read) || other.read == read) && - (identical(other.published, published) || - other.published == published)); + (identical(other.published, published) || other.published == published)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, recipientId, commentId, read, published); + int get hashCode => Object.hash(runtimeType, id, recipientId, commentId, read, published); /// Create a copy of PersonMention /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonMentionImplCopyWith<_$PersonMentionImpl> get copyWith => - __$$PersonMentionImplCopyWithImpl<_$PersonMentionImpl>(this, _$identity); + _$$PersonMentionImplCopyWith<_$PersonMentionImpl> get copyWith => __$$PersonMentionImplCopyWithImpl<_$PersonMentionImpl>(this, _$identity); @override Map toJson() { - return _$$PersonMentionImplToJson( - this, - ); + return _$$PersonMentionImplToJson(this); } } abstract class _PersonMention extends PersonMention { - const factory _PersonMention( - {required final int id, - required final int recipientId, - required final int commentId, - required final bool read, - required final DateTime published}) = _$PersonMentionImpl; + const factory _PersonMention({required final int id, required final int recipientId, required final int commentId, required final bool read, required final DateTime published}) = + _$PersonMentionImpl; const _PersonMention._() : super._(); - factory _PersonMention.fromJson(Map json) = - _$PersonMentionImpl.fromJson; + factory _PersonMention.fromJson(Map json) = _$PersonMentionImpl.fromJson; @override int get id; // v0.18.0 @@ -246,6 +218,5 @@ abstract class _PersonMention extends PersonMention { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonMentionImplCopyWith<_$PersonMentionImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonMentionImplCopyWith<_$PersonMentionImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/person/person_mention.g.dart b/lib/src/v3/models/person/person_mention.g.dart index 889b6ace..1516f383 100644 --- a/lib/src/v3/models/person/person_mention.g.dart +++ b/lib/src/v3/models/person/person_mention.g.dart @@ -6,20 +6,18 @@ part of 'person_mention.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PersonMentionImpl _$$PersonMentionImplFromJson(Map json) => - _$PersonMentionImpl( - id: (json['id'] as num).toInt(), - recipientId: (json['recipient_id'] as num).toInt(), - commentId: (json['comment_id'] as num).toInt(), - read: json['read'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - ); +_$PersonMentionImpl _$$PersonMentionImplFromJson(Map json) => _$PersonMentionImpl( + id: (json['id'] as num).toInt(), + recipientId: (json['recipient_id'] as num).toInt(), + commentId: (json['comment_id'] as num).toInt(), + read: json['read'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), +); -Map _$$PersonMentionImplToJson(_$PersonMentionImpl instance) => - { - 'id': instance.id, - 'recipient_id': instance.recipientId, - 'comment_id': instance.commentId, - 'read': instance.read, - 'published': const ForceUtcDateTime().toJson(instance.published), - }; +Map _$$PersonMentionImplToJson(_$PersonMentionImpl instance) => { + 'id': instance.id, + 'recipient_id': instance.recipientId, + 'comment_id': instance.commentId, + 'read': instance.read, + 'published': const ForceUtcDateTime().toJson(instance.published), +}; diff --git a/lib/src/v3/models/post/get_post_response.dart b/lib/src/v3/models/post/get_post_response.dart index e067208d..38821f2e 100644 --- a/lib/src/v3/models/post/get_post_response.dart +++ b/lib/src/v3/models/post/get_post_response.dart @@ -17,6 +17,5 @@ class GetPostResponse with _$GetPostResponse { }) = _GetPostResponse; const GetPostResponse._(); - factory GetPostResponse.fromJson(Map json) => - _$GetPostResponseFromJson(json); + factory GetPostResponse.fromJson(Map json) => _$GetPostResponseFromJson(json); } diff --git a/lib/src/v3/models/post/get_post_response.freezed.dart b/lib/src/v3/models/post/get_post_response.freezed.dart index 9cbe3d60..629f978c 100644 --- a/lib/src/v3/models/post/get_post_response.freezed.dart +++ b/lib/src/v3/models/post/get_post_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_post_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetPostResponse _$GetPostResponseFromJson(Map json) { return _GetPostResponse.fromJson(json); @@ -21,10 +22,8 @@ GetPostResponse _$GetPostResponseFromJson(Map json) { /// @nodoc mixin _$GetPostResponse { PostView get postView => throw _privateConstructorUsedError; // v0.18.0 - CommunityView get communityView => - throw _privateConstructorUsedError; // v0.18.0 - List get moderators => - throw _privateConstructorUsedError; // v0.18.0 + CommunityView get communityView => throw _privateConstructorUsedError; // v0.18.0 + List get moderators => throw _privateConstructorUsedError; // v0.18.0 List get crossPosts => throw _privateConstructorUsedError; /// Serializes this GetPostResponse to a JSON map. @@ -33,29 +32,21 @@ mixin _$GetPostResponse { /// Create a copy of GetPostResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPostResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPostResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPostResponseCopyWith<$Res> { - factory $GetPostResponseCopyWith( - GetPostResponse value, $Res Function(GetPostResponse) then) = - _$GetPostResponseCopyWithImpl<$Res, GetPostResponse>; + factory $GetPostResponseCopyWith(GetPostResponse value, $Res Function(GetPostResponse) then) = _$GetPostResponseCopyWithImpl<$Res, GetPostResponse>; @useResult - $Res call( - {PostView postView, - CommunityView communityView, - List moderators, - List crossPosts}); + $Res call({PostView postView, CommunityView communityView, List moderators, List crossPosts}); $PostViewCopyWith<$Res> get postView; $CommunityViewCopyWith<$Res> get communityView; } /// @nodoc -class _$GetPostResponseCopyWithImpl<$Res, $Val extends GetPostResponse> - implements $GetPostResponseCopyWith<$Res> { +class _$GetPostResponseCopyWithImpl<$Res, $Val extends GetPostResponse> implements $GetPostResponseCopyWith<$Res> { _$GetPostResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,30 +58,32 @@ class _$GetPostResponseCopyWithImpl<$Res, $Val extends GetPostResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = null, - Object? communityView = null, - Object? moderators = null, - Object? crossPosts = null, - }) { - return _then(_value.copyWith( - postView: null == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView, - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - moderators: null == moderators - ? _value.moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - crossPosts: null == crossPosts - ? _value.crossPosts - : crossPosts // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? postView = null, Object? communityView = null, Object? moderators = null, Object? crossPosts = null}) { + return _then( + _value.copyWith( + postView: + null == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView, + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + moderators: + null == moderators + ? _value.moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + crossPosts: + null == crossPosts + ? _value.crossPosts + : crossPosts // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of GetPostResponse @@ -115,18 +108,11 @@ class _$GetPostResponseCopyWithImpl<$Res, $Val extends GetPostResponse> } /// @nodoc -abstract class _$$GetPostResponseImplCopyWith<$Res> - implements $GetPostResponseCopyWith<$Res> { - factory _$$GetPostResponseImplCopyWith(_$GetPostResponseImpl value, - $Res Function(_$GetPostResponseImpl) then) = - __$$GetPostResponseImplCopyWithImpl<$Res>; +abstract class _$$GetPostResponseImplCopyWith<$Res> implements $GetPostResponseCopyWith<$Res> { + factory _$$GetPostResponseImplCopyWith(_$GetPostResponseImpl value, $Res Function(_$GetPostResponseImpl) then) = __$$GetPostResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {PostView postView, - CommunityView communityView, - List moderators, - List crossPosts}); + $Res call({PostView postView, CommunityView communityView, List moderators, List crossPosts}); @override $PostViewCopyWith<$Res> get postView; @@ -135,41 +121,38 @@ abstract class _$$GetPostResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetPostResponseImplCopyWithImpl<$Res> - extends _$GetPostResponseCopyWithImpl<$Res, _$GetPostResponseImpl> - implements _$$GetPostResponseImplCopyWith<$Res> { - __$$GetPostResponseImplCopyWithImpl( - _$GetPostResponseImpl _value, $Res Function(_$GetPostResponseImpl) _then) - : super(_value, _then); +class __$$GetPostResponseImplCopyWithImpl<$Res> extends _$GetPostResponseCopyWithImpl<$Res, _$GetPostResponseImpl> implements _$$GetPostResponseImplCopyWith<$Res> { + __$$GetPostResponseImplCopyWithImpl(_$GetPostResponseImpl _value, $Res Function(_$GetPostResponseImpl) _then) : super(_value, _then); /// Create a copy of GetPostResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = null, - Object? communityView = null, - Object? moderators = null, - Object? crossPosts = null, - }) { - return _then(_$GetPostResponseImpl( - postView: null == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView, - communityView: null == communityView - ? _value.communityView - : communityView // ignore: cast_nullable_to_non_nullable - as CommunityView, - moderators: null == moderators - ? _value._moderators - : moderators // ignore: cast_nullable_to_non_nullable - as List, - crossPosts: null == crossPosts - ? _value._crossPosts - : crossPosts // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? postView = null, Object? communityView = null, Object? moderators = null, Object? crossPosts = null}) { + return _then( + _$GetPostResponseImpl( + postView: + null == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView, + communityView: + null == communityView + ? _value.communityView + : communityView // ignore: cast_nullable_to_non_nullable + as CommunityView, + moderators: + null == moderators + ? _value._moderators + : moderators // ignore: cast_nullable_to_non_nullable + as List, + crossPosts: + null == crossPosts + ? _value._crossPosts + : crossPosts // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -177,26 +160,21 @@ class __$$GetPostResponseImplCopyWithImpl<$Res> @modelSerde class _$GetPostResponseImpl extends _GetPostResponse { - const _$GetPostResponseImpl( - {required this.postView, - required this.communityView, - required final List moderators, - required final List crossPosts}) - : _moderators = moderators, - _crossPosts = crossPosts, - super._(); - - factory _$GetPostResponseImpl.fromJson(Map json) => - _$$GetPostResponseImplFromJson(json); + const _$GetPostResponseImpl({required this.postView, required this.communityView, required final List moderators, required final List crossPosts}) + : _moderators = moderators, + _crossPosts = crossPosts, + super._(); + + factory _$GetPostResponseImpl.fromJson(Map json) => _$$GetPostResponseImplFromJson(json); @override final PostView postView; -// v0.18.0 + // v0.18.0 @override final CommunityView communityView; -// v0.18.0 + // v0.18.0 final List _moderators; -// v0.18.0 + // v0.18.0 @override List get moderators { if (_moderators is EqualUnmodifiableListView) return _moderators; @@ -204,9 +182,9 @@ class _$GetPostResponseImpl extends _GetPostResponse { return EqualUnmodifiableListView(_moderators); } -// v0.18.0 + // v0.18.0 final List _crossPosts; -// v0.18.0 + // v0.18.0 @override List get crossPosts { if (_crossPosts is EqualUnmodifiableListView) return _crossPosts; @@ -224,52 +202,39 @@ class _$GetPostResponseImpl extends _GetPostResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetPostResponseImpl && - (identical(other.postView, postView) || - other.postView == postView) && - (identical(other.communityView, communityView) || - other.communityView == communityView) && - const DeepCollectionEquality() - .equals(other._moderators, _moderators) && - const DeepCollectionEquality() - .equals(other._crossPosts, _crossPosts)); + (identical(other.postView, postView) || other.postView == postView) && + (identical(other.communityView, communityView) || other.communityView == communityView) && + const DeepCollectionEquality().equals(other._moderators, _moderators) && + const DeepCollectionEquality().equals(other._crossPosts, _crossPosts)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - postView, - communityView, - const DeepCollectionEquality().hash(_moderators), - const DeepCollectionEquality().hash(_crossPosts)); + int get hashCode => Object.hash(runtimeType, postView, communityView, const DeepCollectionEquality().hash(_moderators), const DeepCollectionEquality().hash(_crossPosts)); /// Create a copy of GetPostResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPostResponseImplCopyWith<_$GetPostResponseImpl> get copyWith => - __$$GetPostResponseImplCopyWithImpl<_$GetPostResponseImpl>( - this, _$identity); + _$$GetPostResponseImplCopyWith<_$GetPostResponseImpl> get copyWith => __$$GetPostResponseImplCopyWithImpl<_$GetPostResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetPostResponseImplToJson( - this, - ); + return _$$GetPostResponseImplToJson(this); } } abstract class _GetPostResponse extends GetPostResponse { - const factory _GetPostResponse( - {required final PostView postView, - required final CommunityView communityView, - required final List moderators, - required final List crossPosts}) = _$GetPostResponseImpl; + const factory _GetPostResponse({ + required final PostView postView, + required final CommunityView communityView, + required final List moderators, + required final List crossPosts, + }) = _$GetPostResponseImpl; const _GetPostResponse._() : super._(); - factory _GetPostResponse.fromJson(Map json) = - _$GetPostResponseImpl.fromJson; + factory _GetPostResponse.fromJson(Map json) = _$GetPostResponseImpl.fromJson; @override PostView get postView; // v0.18.0 @@ -284,6 +249,5 @@ abstract class _GetPostResponse extends GetPostResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPostResponseImplCopyWith<_$GetPostResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPostResponseImplCopyWith<_$GetPostResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/get_post_response.g.dart b/lib/src/v3/models/post/get_post_response.g.dart index 069d169b..7dd93f78 100644 --- a/lib/src/v3/models/post/get_post_response.g.dart +++ b/lib/src/v3/models/post/get_post_response.g.dart @@ -6,26 +6,16 @@ part of 'get_post_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetPostResponseImpl _$$GetPostResponseImplFromJson( - Map json) => - _$GetPostResponseImpl( - postView: PostView.fromJson(json['post_view'] as Map), - communityView: CommunityView.fromJson( - json['community_view'] as Map), - moderators: (json['moderators'] as List) - .map( - (e) => CommunityModeratorView.fromJson(e as Map)) - .toList(), - crossPosts: (json['cross_posts'] as List) - .map((e) => PostView.fromJson(e as Map)) - .toList(), - ); +_$GetPostResponseImpl _$$GetPostResponseImplFromJson(Map json) => _$GetPostResponseImpl( + postView: PostView.fromJson(json['post_view'] as Map), + communityView: CommunityView.fromJson(json['community_view'] as Map), + moderators: (json['moderators'] as List).map((e) => CommunityModeratorView.fromJson(e as Map)).toList(), + crossPosts: (json['cross_posts'] as List).map((e) => PostView.fromJson(e as Map)).toList(), +); -Map _$$GetPostResponseImplToJson( - _$GetPostResponseImpl instance) => - { - 'post_view': instance.postView.toJson(), - 'community_view': instance.communityView.toJson(), - 'moderators': instance.moderators.map((e) => e.toJson()).toList(), - 'cross_posts': instance.crossPosts.map((e) => e.toJson()).toList(), - }; +Map _$$GetPostResponseImplToJson(_$GetPostResponseImpl instance) => { + 'post_view': instance.postView.toJson(), + 'community_view': instance.communityView.toJson(), + 'moderators': instance.moderators.map((e) => e.toJson()).toList(), + 'cross_posts': instance.crossPosts.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/post/get_posts_response.dart b/lib/src/v3/models/post/get_posts_response.dart index 5a01f217..41e02157 100644 --- a/lib/src/v3/models/post/get_posts_response.dart +++ b/lib/src/v3/models/post/get_posts_response.dart @@ -15,6 +15,5 @@ class GetPostsResponse with _$GetPostsResponse { }) = _GetPostsResponse; const GetPostsResponse._(); - factory GetPostsResponse.fromJson(Map json) => - _$GetPostsResponseFromJson(json); + factory GetPostsResponse.fromJson(Map json) => _$GetPostsResponseFromJson(json); } diff --git a/lib/src/v3/models/post/get_posts_response.freezed.dart b/lib/src/v3/models/post/get_posts_response.freezed.dart index e330f37a..900fcaa1 100644 --- a/lib/src/v3/models/post/get_posts_response.freezed.dart +++ b/lib/src/v3/models/post/get_posts_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_posts_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetPostsResponse _$GetPostsResponseFromJson(Map json) { return _GetPostsResponse.fromJson(json); @@ -29,22 +30,18 @@ mixin _$GetPostsResponse { /// Create a copy of GetPostsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPostsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPostsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPostsResponseCopyWith<$Res> { - factory $GetPostsResponseCopyWith( - GetPostsResponse value, $Res Function(GetPostsResponse) then) = - _$GetPostsResponseCopyWithImpl<$Res, GetPostsResponse>; + factory $GetPostsResponseCopyWith(GetPostsResponse value, $Res Function(GetPostsResponse) then) = _$GetPostsResponseCopyWithImpl<$Res, GetPostsResponse>; @useResult $Res call({List posts, String? nextPage}); } /// @nodoc -class _$GetPostsResponseCopyWithImpl<$Res, $Val extends GetPostsResponse> - implements $GetPostsResponseCopyWith<$Res> { +class _$GetPostsResponseCopyWithImpl<$Res, $Val extends GetPostsResponse> implements $GetPostsResponseCopyWith<$Res> { _$GetPostsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -56,60 +53,56 @@ class _$GetPostsResponseCopyWithImpl<$Res, $Val extends GetPostsResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? posts = null, - Object? nextPage = freezed, - }) { - return _then(_value.copyWith( - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - nextPage: freezed == nextPage - ? _value.nextPage - : nextPage // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? posts = null, Object? nextPage = freezed}) { + return _then( + _value.copyWith( + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + nextPage: + freezed == nextPage + ? _value.nextPage + : nextPage // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetPostsResponseImplCopyWith<$Res> - implements $GetPostsResponseCopyWith<$Res> { - factory _$$GetPostsResponseImplCopyWith(_$GetPostsResponseImpl value, - $Res Function(_$GetPostsResponseImpl) then) = - __$$GetPostsResponseImplCopyWithImpl<$Res>; +abstract class _$$GetPostsResponseImplCopyWith<$Res> implements $GetPostsResponseCopyWith<$Res> { + factory _$$GetPostsResponseImplCopyWith(_$GetPostsResponseImpl value, $Res Function(_$GetPostsResponseImpl) then) = __$$GetPostsResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List posts, String? nextPage}); } /// @nodoc -class __$$GetPostsResponseImplCopyWithImpl<$Res> - extends _$GetPostsResponseCopyWithImpl<$Res, _$GetPostsResponseImpl> - implements _$$GetPostsResponseImplCopyWith<$Res> { - __$$GetPostsResponseImplCopyWithImpl(_$GetPostsResponseImpl _value, - $Res Function(_$GetPostsResponseImpl) _then) - : super(_value, _then); +class __$$GetPostsResponseImplCopyWithImpl<$Res> extends _$GetPostsResponseCopyWithImpl<$Res, _$GetPostsResponseImpl> implements _$$GetPostsResponseImplCopyWith<$Res> { + __$$GetPostsResponseImplCopyWithImpl(_$GetPostsResponseImpl _value, $Res Function(_$GetPostsResponseImpl) _then) : super(_value, _then); /// Create a copy of GetPostsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? posts = null, - Object? nextPage = freezed, - }) { - return _then(_$GetPostsResponseImpl( - posts: null == posts - ? _value._posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - nextPage: freezed == nextPage - ? _value.nextPage - : nextPage // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? posts = null, Object? nextPage = freezed}) { + return _then( + _$GetPostsResponseImpl( + posts: + null == posts + ? _value._posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + nextPage: + freezed == nextPage + ? _value.nextPage + : nextPage // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -117,13 +110,9 @@ class __$$GetPostsResponseImplCopyWithImpl<$Res> @modelSerde class _$GetPostsResponseImpl extends _GetPostsResponse { - const _$GetPostsResponseImpl( - {required final List posts, this.nextPage}) - : _posts = posts, - super._(); + const _$GetPostsResponseImpl({required final List posts, this.nextPage}) : _posts = posts, super._(); - factory _$GetPostsResponseImpl.fromJson(Map json) => - _$$GetPostsResponseImplFromJson(json); + factory _$GetPostsResponseImpl.fromJson(Map json) => _$$GetPostsResponseImplFromJson(json); final List _posts; @override @@ -133,7 +122,7 @@ class _$GetPostsResponseImpl extends _GetPostsResponse { return EqualUnmodifiableListView(_posts); } -// v0.18.0 + // v0.18.0 @override final String? nextPage; @@ -148,40 +137,31 @@ class _$GetPostsResponseImpl extends _GetPostsResponse { (other.runtimeType == runtimeType && other is _$GetPostsResponseImpl && const DeepCollectionEquality().equals(other._posts, _posts) && - (identical(other.nextPage, nextPage) || - other.nextPage == nextPage)); + (identical(other.nextPage, nextPage) || other.nextPage == nextPage)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_posts), nextPage); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_posts), nextPage); /// Create a copy of GetPostsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPostsResponseImplCopyWith<_$GetPostsResponseImpl> get copyWith => - __$$GetPostsResponseImplCopyWithImpl<_$GetPostsResponseImpl>( - this, _$identity); + _$$GetPostsResponseImplCopyWith<_$GetPostsResponseImpl> get copyWith => __$$GetPostsResponseImplCopyWithImpl<_$GetPostsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetPostsResponseImplToJson( - this, - ); + return _$$GetPostsResponseImplToJson(this); } } abstract class _GetPostsResponse extends GetPostsResponse { - const factory _GetPostsResponse( - {required final List posts, - final String? nextPage}) = _$GetPostsResponseImpl; + const factory _GetPostsResponse({required final List posts, final String? nextPage}) = _$GetPostsResponseImpl; const _GetPostsResponse._() : super._(); - factory _GetPostsResponse.fromJson(Map json) = - _$GetPostsResponseImpl.fromJson; + factory _GetPostsResponse.fromJson(Map json) = _$GetPostsResponseImpl.fromJson; @override List get posts; // v0.18.0 @@ -192,6 +172,5 @@ abstract class _GetPostsResponse extends GetPostsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPostsResponseImplCopyWith<_$GetPostsResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetPostsResponseImplCopyWith<_$GetPostsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/get_posts_response.g.dart b/lib/src/v3/models/post/get_posts_response.g.dart index fcbb5219..96c9ef6f 100644 --- a/lib/src/v3/models/post/get_posts_response.g.dart +++ b/lib/src/v3/models/post/get_posts_response.g.dart @@ -6,18 +6,7 @@ part of 'get_posts_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetPostsResponseImpl _$$GetPostsResponseImplFromJson( - Map json) => - _$GetPostsResponseImpl( - posts: (json['posts'] as List) - .map((e) => PostView.fromJson(e as Map)) - .toList(), - nextPage: json['next_page'] as String?, - ); +_$GetPostsResponseImpl _$$GetPostsResponseImplFromJson(Map json) => + _$GetPostsResponseImpl(posts: (json['posts'] as List).map((e) => PostView.fromJson(e as Map)).toList(), nextPage: json['next_page'] as String?); -Map _$$GetPostsResponseImplToJson( - _$GetPostsResponseImpl instance) => - { - 'posts': instance.posts.map((e) => e.toJson()).toList(), - 'next_page': instance.nextPage, - }; +Map _$$GetPostsResponseImplToJson(_$GetPostsResponseImpl instance) => {'posts': instance.posts.map((e) => e.toJson()).toList(), 'next_page': instance.nextPage}; diff --git a/lib/src/v3/models/post/get_site_metadata_response.dart b/lib/src/v3/models/post/get_site_metadata_response.dart index f8f9cf74..f487fe9d 100644 --- a/lib/src/v3/models/post/get_site_metadata_response.dart +++ b/lib/src/v3/models/post/get_site_metadata_response.dart @@ -14,6 +14,5 @@ class GetSiteMetadataResponse with _$GetSiteMetadataResponse { }) = _GetSiteMetadataResponse; const GetSiteMetadataResponse._(); - factory GetSiteMetadataResponse.fromJson(Map json) => - _$GetSiteMetadataResponseFromJson(json); + factory GetSiteMetadataResponse.fromJson(Map json) => _$GetSiteMetadataResponseFromJson(json); } diff --git a/lib/src/v3/models/post/get_site_metadata_response.freezed.dart b/lib/src/v3/models/post/get_site_metadata_response.freezed.dart index a4d2c9eb..8e2818c4 100644 --- a/lib/src/v3/models/post/get_site_metadata_response.freezed.dart +++ b/lib/src/v3/models/post/get_site_metadata_response.freezed.dart @@ -12,10 +12,10 @@ part of 'get_site_metadata_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetSiteMetadataResponse _$GetSiteMetadataResponseFromJson( - Map json) { +GetSiteMetadataResponse _$GetSiteMetadataResponseFromJson(Map json) { return _GetSiteMetadataResponse.fromJson(json); } @@ -29,15 +29,12 @@ mixin _$GetSiteMetadataResponse { /// Create a copy of GetSiteMetadataResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetSiteMetadataResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetSiteMetadataResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetSiteMetadataResponseCopyWith<$Res> { - factory $GetSiteMetadataResponseCopyWith(GetSiteMetadataResponse value, - $Res Function(GetSiteMetadataResponse) then) = - _$GetSiteMetadataResponseCopyWithImpl<$Res, GetSiteMetadataResponse>; + factory $GetSiteMetadataResponseCopyWith(GetSiteMetadataResponse value, $Res Function(GetSiteMetadataResponse) then) = _$GetSiteMetadataResponseCopyWithImpl<$Res, GetSiteMetadataResponse>; @useResult $Res call({LinkMetadata metadata}); @@ -45,9 +42,7 @@ abstract class $GetSiteMetadataResponseCopyWith<$Res> { } /// @nodoc -class _$GetSiteMetadataResponseCopyWithImpl<$Res, - $Val extends GetSiteMetadataResponse> - implements $GetSiteMetadataResponseCopyWith<$Res> { +class _$GetSiteMetadataResponseCopyWithImpl<$Res, $Val extends GetSiteMetadataResponse> implements $GetSiteMetadataResponseCopyWith<$Res> { _$GetSiteMetadataResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,15 +54,17 @@ class _$GetSiteMetadataResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? metadata = null, - }) { - return _then(_value.copyWith( - metadata: null == metadata - ? _value.metadata - : metadata // ignore: cast_nullable_to_non_nullable - as LinkMetadata, - ) as $Val); + $Res call({Object? metadata = null}) { + return _then( + _value.copyWith( + metadata: + null == metadata + ? _value.metadata + : metadata // ignore: cast_nullable_to_non_nullable + as LinkMetadata, + ) + as $Val, + ); } /// Create a copy of GetSiteMetadataResponse @@ -82,12 +79,8 @@ class _$GetSiteMetadataResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$GetSiteMetadataResponseImplCopyWith<$Res> - implements $GetSiteMetadataResponseCopyWith<$Res> { - factory _$$GetSiteMetadataResponseImplCopyWith( - _$GetSiteMetadataResponseImpl value, - $Res Function(_$GetSiteMetadataResponseImpl) then) = - __$$GetSiteMetadataResponseImplCopyWithImpl<$Res>; +abstract class _$$GetSiteMetadataResponseImplCopyWith<$Res> implements $GetSiteMetadataResponseCopyWith<$Res> { + factory _$$GetSiteMetadataResponseImplCopyWith(_$GetSiteMetadataResponseImpl value, $Res Function(_$GetSiteMetadataResponseImpl) then) = __$$GetSiteMetadataResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({LinkMetadata metadata}); @@ -97,28 +90,23 @@ abstract class _$$GetSiteMetadataResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetSiteMetadataResponseImplCopyWithImpl<$Res> - extends _$GetSiteMetadataResponseCopyWithImpl<$Res, - _$GetSiteMetadataResponseImpl> - implements _$$GetSiteMetadataResponseImplCopyWith<$Res> { - __$$GetSiteMetadataResponseImplCopyWithImpl( - _$GetSiteMetadataResponseImpl _value, - $Res Function(_$GetSiteMetadataResponseImpl) _then) - : super(_value, _then); +class __$$GetSiteMetadataResponseImplCopyWithImpl<$Res> extends _$GetSiteMetadataResponseCopyWithImpl<$Res, _$GetSiteMetadataResponseImpl> implements _$$GetSiteMetadataResponseImplCopyWith<$Res> { + __$$GetSiteMetadataResponseImplCopyWithImpl(_$GetSiteMetadataResponseImpl _value, $Res Function(_$GetSiteMetadataResponseImpl) _then) : super(_value, _then); /// Create a copy of GetSiteMetadataResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? metadata = null, - }) { - return _then(_$GetSiteMetadataResponseImpl( - metadata: null == metadata - ? _value.metadata - : metadata // ignore: cast_nullable_to_non_nullable - as LinkMetadata, - )); + $Res call({Object? metadata = null}) { + return _then( + _$GetSiteMetadataResponseImpl( + metadata: + null == metadata + ? _value.metadata + : metadata // ignore: cast_nullable_to_non_nullable + as LinkMetadata, + ), + ); } } @@ -128,8 +116,7 @@ class __$$GetSiteMetadataResponseImplCopyWithImpl<$Res> class _$GetSiteMetadataResponseImpl extends _GetSiteMetadataResponse { const _$GetSiteMetadataResponseImpl({required this.metadata}) : super._(); - factory _$GetSiteMetadataResponseImpl.fromJson(Map json) => - _$$GetSiteMetadataResponseImplFromJson(json); + factory _$GetSiteMetadataResponseImpl.fromJson(Map json) => _$$GetSiteMetadataResponseImplFromJson(json); @override final LinkMetadata metadata; @@ -141,11 +128,7 @@ class _$GetSiteMetadataResponseImpl extends _GetSiteMetadataResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetSiteMetadataResponseImpl && - (identical(other.metadata, metadata) || - other.metadata == metadata)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetSiteMetadataResponseImpl && (identical(other.metadata, metadata) || other.metadata == metadata)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -157,25 +140,19 @@ class _$GetSiteMetadataResponseImpl extends _GetSiteMetadataResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetSiteMetadataResponseImplCopyWith<_$GetSiteMetadataResponseImpl> - get copyWith => __$$GetSiteMetadataResponseImplCopyWithImpl< - _$GetSiteMetadataResponseImpl>(this, _$identity); + _$$GetSiteMetadataResponseImplCopyWith<_$GetSiteMetadataResponseImpl> get copyWith => __$$GetSiteMetadataResponseImplCopyWithImpl<_$GetSiteMetadataResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetSiteMetadataResponseImplToJson( - this, - ); + return _$$GetSiteMetadataResponseImplToJson(this); } } abstract class _GetSiteMetadataResponse extends GetSiteMetadataResponse { - const factory _GetSiteMetadataResponse( - {required final LinkMetadata metadata}) = _$GetSiteMetadataResponseImpl; + const factory _GetSiteMetadataResponse({required final LinkMetadata metadata}) = _$GetSiteMetadataResponseImpl; const _GetSiteMetadataResponse._() : super._(); - factory _GetSiteMetadataResponse.fromJson(Map json) = - _$GetSiteMetadataResponseImpl.fromJson; + factory _GetSiteMetadataResponse.fromJson(Map json) = _$GetSiteMetadataResponseImpl.fromJson; @override LinkMetadata get metadata; @@ -184,6 +161,5 @@ abstract class _GetSiteMetadataResponse extends GetSiteMetadataResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetSiteMetadataResponseImplCopyWith<_$GetSiteMetadataResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetSiteMetadataResponseImplCopyWith<_$GetSiteMetadataResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/get_site_metadata_response.g.dart b/lib/src/v3/models/post/get_site_metadata_response.g.dart index e2b87edc..cd8b1e19 100644 --- a/lib/src/v3/models/post/get_site_metadata_response.g.dart +++ b/lib/src/v3/models/post/get_site_metadata_response.g.dart @@ -6,14 +6,7 @@ part of 'get_site_metadata_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetSiteMetadataResponseImpl _$$GetSiteMetadataResponseImplFromJson( - Map json) => - _$GetSiteMetadataResponseImpl( - metadata: LinkMetadata.fromJson(json['metadata'] as Map), - ); +_$GetSiteMetadataResponseImpl _$$GetSiteMetadataResponseImplFromJson(Map json) => + _$GetSiteMetadataResponseImpl(metadata: LinkMetadata.fromJson(json['metadata'] as Map)); -Map _$$GetSiteMetadataResponseImplToJson( - _$GetSiteMetadataResponseImpl instance) => - { - 'metadata': instance.metadata.toJson(), - }; +Map _$$GetSiteMetadataResponseImplToJson(_$GetSiteMetadataResponseImpl instance) => {'metadata': instance.metadata.toJson()}; diff --git a/lib/src/v3/models/post/list_post_likes_response.dart b/lib/src/v3/models/post/list_post_likes_response.dart index 91497a18..937d7191 100644 --- a/lib/src/v3/models/post/list_post_likes_response.dart +++ b/lib/src/v3/models/post/list_post_likes_response.dart @@ -14,6 +14,5 @@ class ListPostLikesResponse with _$ListPostLikesResponse { }) = _ListPostLikesResponse; const ListPostLikesResponse._(); - factory ListPostLikesResponse.fromJson(Map json) => - _$ListPostLikesResponseFromJson(json); + factory ListPostLikesResponse.fromJson(Map json) => _$ListPostLikesResponseFromJson(json); } diff --git a/lib/src/v3/models/post/list_post_likes_response.freezed.dart b/lib/src/v3/models/post/list_post_likes_response.freezed.dart index fdd7ddc0..18f8af9b 100644 --- a/lib/src/v3/models/post/list_post_likes_response.freezed.dart +++ b/lib/src/v3/models/post/list_post_likes_response.freezed.dart @@ -12,10 +12,10 @@ part of 'list_post_likes_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListPostLikesResponse _$ListPostLikesResponseFromJson( - Map json) { +ListPostLikesResponse _$ListPostLikesResponseFromJson(Map json) { return _ListPostLikesResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$ListPostLikesResponse { /// Create a copy of ListPostLikesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPostLikesResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListPostLikesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPostLikesResponseCopyWith<$Res> { - factory $ListPostLikesResponseCopyWith(ListPostLikesResponse value, - $Res Function(ListPostLikesResponse) then) = - _$ListPostLikesResponseCopyWithImpl<$Res, ListPostLikesResponse>; + factory $ListPostLikesResponseCopyWith(ListPostLikesResponse value, $Res Function(ListPostLikesResponse) then) = _$ListPostLikesResponseCopyWithImpl<$Res, ListPostLikesResponse>; @useResult $Res call({List postLikes}); } /// @nodoc -class _$ListPostLikesResponseCopyWithImpl<$Res, - $Val extends ListPostLikesResponse> - implements $ListPostLikesResponseCopyWith<$Res> { +class _$ListPostLikesResponseCopyWithImpl<$Res, $Val extends ListPostLikesResponse> implements $ListPostLikesResponseCopyWith<$Res> { _$ListPostLikesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$ListPostLikesResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postLikes = null, - }) { - return _then(_value.copyWith( - postLikes: null == postLikes - ? _value.postLikes - : postLikes // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? postLikes = null}) { + return _then( + _value.copyWith( + postLikes: + null == postLikes + ? _value.postLikes + : postLikes // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListPostLikesResponseImplCopyWith<$Res> - implements $ListPostLikesResponseCopyWith<$Res> { - factory _$$ListPostLikesResponseImplCopyWith( - _$ListPostLikesResponseImpl value, - $Res Function(_$ListPostLikesResponseImpl) then) = - __$$ListPostLikesResponseImplCopyWithImpl<$Res>; +abstract class _$$ListPostLikesResponseImplCopyWith<$Res> implements $ListPostLikesResponseCopyWith<$Res> { + factory _$$ListPostLikesResponseImplCopyWith(_$ListPostLikesResponseImpl value, $Res Function(_$ListPostLikesResponseImpl) then) = __$$ListPostLikesResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List postLikes}); } /// @nodoc -class __$$ListPostLikesResponseImplCopyWithImpl<$Res> - extends _$ListPostLikesResponseCopyWithImpl<$Res, - _$ListPostLikesResponseImpl> - implements _$$ListPostLikesResponseImplCopyWith<$Res> { - __$$ListPostLikesResponseImplCopyWithImpl(_$ListPostLikesResponseImpl _value, - $Res Function(_$ListPostLikesResponseImpl) _then) - : super(_value, _then); +class __$$ListPostLikesResponseImplCopyWithImpl<$Res> extends _$ListPostLikesResponseCopyWithImpl<$Res, _$ListPostLikesResponseImpl> implements _$$ListPostLikesResponseImplCopyWith<$Res> { + __$$ListPostLikesResponseImplCopyWithImpl(_$ListPostLikesResponseImpl _value, $Res Function(_$ListPostLikesResponseImpl) _then) : super(_value, _then); /// Create a copy of ListPostLikesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postLikes = null, - }) { - return _then(_$ListPostLikesResponseImpl( - postLikes: null == postLikes - ? _value._postLikes - : postLikes // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? postLikes = null}) { + return _then( + _$ListPostLikesResponseImpl( + postLikes: + null == postLikes + ? _value._postLikes + : postLikes // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -110,12 +99,9 @@ class __$$ListPostLikesResponseImplCopyWithImpl<$Res> @modelSerde class _$ListPostLikesResponseImpl extends _ListPostLikesResponse { - const _$ListPostLikesResponseImpl({required final List postLikes}) - : _postLikes = postLikes, - super._(); + const _$ListPostLikesResponseImpl({required final List postLikes}) : _postLikes = postLikes, super._(); - factory _$ListPostLikesResponseImpl.fromJson(Map json) => - _$$ListPostLikesResponseImplFromJson(json); + factory _$ListPostLikesResponseImpl.fromJson(Map json) => _$$ListPostLikesResponseImplFromJson(json); final List _postLikes; @override @@ -132,42 +118,31 @@ class _$ListPostLikesResponseImpl extends _ListPostLikesResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListPostLikesResponseImpl && - const DeepCollectionEquality() - .equals(other._postLikes, _postLikes)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListPostLikesResponseImpl && const DeepCollectionEquality().equals(other._postLikes, _postLikes)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_postLikes)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_postLikes)); /// Create a copy of ListPostLikesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPostLikesResponseImplCopyWith<_$ListPostLikesResponseImpl> - get copyWith => __$$ListPostLikesResponseImplCopyWithImpl< - _$ListPostLikesResponseImpl>(this, _$identity); + _$$ListPostLikesResponseImplCopyWith<_$ListPostLikesResponseImpl> get copyWith => __$$ListPostLikesResponseImplCopyWithImpl<_$ListPostLikesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListPostLikesResponseImplToJson( - this, - ); + return _$$ListPostLikesResponseImplToJson(this); } } abstract class _ListPostLikesResponse extends ListPostLikesResponse { - const factory _ListPostLikesResponse( - {required final List postLikes}) = _$ListPostLikesResponseImpl; + const factory _ListPostLikesResponse({required final List postLikes}) = _$ListPostLikesResponseImpl; const _ListPostLikesResponse._() : super._(); - factory _ListPostLikesResponse.fromJson(Map json) = - _$ListPostLikesResponseImpl.fromJson; + factory _ListPostLikesResponse.fromJson(Map json) = _$ListPostLikesResponseImpl.fromJson; @override List get postLikes; @@ -176,6 +151,5 @@ abstract class _ListPostLikesResponse extends ListPostLikesResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPostLikesResponseImplCopyWith<_$ListPostLikesResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListPostLikesResponseImplCopyWith<_$ListPostLikesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/list_post_likes_response.g.dart b/lib/src/v3/models/post/list_post_likes_response.g.dart index 55fc6d2a..b625e8ce 100644 --- a/lib/src/v3/models/post/list_post_likes_response.g.dart +++ b/lib/src/v3/models/post/list_post_likes_response.g.dart @@ -6,16 +6,7 @@ part of 'list_post_likes_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListPostLikesResponseImpl _$$ListPostLikesResponseImplFromJson( - Map json) => - _$ListPostLikesResponseImpl( - postLikes: (json['post_likes'] as List) - .map((e) => VoteView.fromJson(e as Map)) - .toList(), - ); +_$ListPostLikesResponseImpl _$$ListPostLikesResponseImplFromJson(Map json) => + _$ListPostLikesResponseImpl(postLikes: (json['post_likes'] as List).map((e) => VoteView.fromJson(e as Map)).toList()); -Map _$$ListPostLikesResponseImplToJson( - _$ListPostLikesResponseImpl instance) => - { - 'post_likes': instance.postLikes.map((e) => e.toJson()).toList(), - }; +Map _$$ListPostLikesResponseImplToJson(_$ListPostLikesResponseImpl instance) => {'post_likes': instance.postLikes.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/post/list_post_reports_response.dart b/lib/src/v3/models/post/list_post_reports_response.dart index b10bc9e9..dc67ba11 100644 --- a/lib/src/v3/models/post/list_post_reports_response.dart +++ b/lib/src/v3/models/post/list_post_reports_response.dart @@ -14,6 +14,5 @@ class ListPostReportsResponse with _$ListPostReportsResponse { }) = _ListPostReportsResponse; const ListPostReportsResponse._(); - factory ListPostReportsResponse.fromJson(Map json) => - _$ListPostReportsResponseFromJson(json); + factory ListPostReportsResponse.fromJson(Map json) => _$ListPostReportsResponseFromJson(json); } diff --git a/lib/src/v3/models/post/list_post_reports_response.freezed.dart b/lib/src/v3/models/post/list_post_reports_response.freezed.dart index 8d3cabca..0eb1980b 100644 --- a/lib/src/v3/models/post/list_post_reports_response.freezed.dart +++ b/lib/src/v3/models/post/list_post_reports_response.freezed.dart @@ -12,10 +12,10 @@ part of 'list_post_reports_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListPostReportsResponse _$ListPostReportsResponseFromJson( - Map json) { +ListPostReportsResponse _$ListPostReportsResponseFromJson(Map json) { return _ListPostReportsResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$ListPostReportsResponse { /// Create a copy of ListPostReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPostReportsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListPostReportsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPostReportsResponseCopyWith<$Res> { - factory $ListPostReportsResponseCopyWith(ListPostReportsResponse value, - $Res Function(ListPostReportsResponse) then) = - _$ListPostReportsResponseCopyWithImpl<$Res, ListPostReportsResponse>; + factory $ListPostReportsResponseCopyWith(ListPostReportsResponse value, $Res Function(ListPostReportsResponse) then) = _$ListPostReportsResponseCopyWithImpl<$Res, ListPostReportsResponse>; @useResult $Res call({List postReports}); } /// @nodoc -class _$ListPostReportsResponseCopyWithImpl<$Res, - $Val extends ListPostReportsResponse> - implements $ListPostReportsResponseCopyWith<$Res> { +class _$ListPostReportsResponseCopyWithImpl<$Res, $Val extends ListPostReportsResponse> implements $ListPostReportsResponseCopyWith<$Res> { _$ListPostReportsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,53 +52,46 @@ class _$ListPostReportsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postReports = null, - }) { - return _then(_value.copyWith( - postReports: null == postReports - ? _value.postReports - : postReports // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? postReports = null}) { + return _then( + _value.copyWith( + postReports: + null == postReports + ? _value.postReports + : postReports // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListPostReportsResponseImplCopyWith<$Res> - implements $ListPostReportsResponseCopyWith<$Res> { - factory _$$ListPostReportsResponseImplCopyWith( - _$ListPostReportsResponseImpl value, - $Res Function(_$ListPostReportsResponseImpl) then) = - __$$ListPostReportsResponseImplCopyWithImpl<$Res>; +abstract class _$$ListPostReportsResponseImplCopyWith<$Res> implements $ListPostReportsResponseCopyWith<$Res> { + factory _$$ListPostReportsResponseImplCopyWith(_$ListPostReportsResponseImpl value, $Res Function(_$ListPostReportsResponseImpl) then) = __$$ListPostReportsResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List postReports}); } /// @nodoc -class __$$ListPostReportsResponseImplCopyWithImpl<$Res> - extends _$ListPostReportsResponseCopyWithImpl<$Res, - _$ListPostReportsResponseImpl> - implements _$$ListPostReportsResponseImplCopyWith<$Res> { - __$$ListPostReportsResponseImplCopyWithImpl( - _$ListPostReportsResponseImpl _value, - $Res Function(_$ListPostReportsResponseImpl) _then) - : super(_value, _then); +class __$$ListPostReportsResponseImplCopyWithImpl<$Res> extends _$ListPostReportsResponseCopyWithImpl<$Res, _$ListPostReportsResponseImpl> implements _$$ListPostReportsResponseImplCopyWith<$Res> { + __$$ListPostReportsResponseImplCopyWithImpl(_$ListPostReportsResponseImpl _value, $Res Function(_$ListPostReportsResponseImpl) _then) : super(_value, _then); /// Create a copy of ListPostReportsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postReports = null, - }) { - return _then(_$ListPostReportsResponseImpl( - postReports: null == postReports - ? _value._postReports - : postReports // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? postReports = null}) { + return _then( + _$ListPostReportsResponseImpl( + postReports: + null == postReports + ? _value._postReports + : postReports // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -111,13 +99,9 @@ class __$$ListPostReportsResponseImplCopyWithImpl<$Res> @modelSerde class _$ListPostReportsResponseImpl extends _ListPostReportsResponse { - const _$ListPostReportsResponseImpl( - {required final List postReports}) - : _postReports = postReports, - super._(); + const _$ListPostReportsResponseImpl({required final List postReports}) : _postReports = postReports, super._(); - factory _$ListPostReportsResponseImpl.fromJson(Map json) => - _$$ListPostReportsResponseImplFromJson(json); + factory _$ListPostReportsResponseImpl.fromJson(Map json) => _$$ListPostReportsResponseImplFromJson(json); final List _postReports; @override @@ -134,43 +118,31 @@ class _$ListPostReportsResponseImpl extends _ListPostReportsResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListPostReportsResponseImpl && - const DeepCollectionEquality() - .equals(other._postReports, _postReports)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListPostReportsResponseImpl && const DeepCollectionEquality().equals(other._postReports, _postReports)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_postReports)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_postReports)); /// Create a copy of ListPostReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPostReportsResponseImplCopyWith<_$ListPostReportsResponseImpl> - get copyWith => __$$ListPostReportsResponseImplCopyWithImpl< - _$ListPostReportsResponseImpl>(this, _$identity); + _$$ListPostReportsResponseImplCopyWith<_$ListPostReportsResponseImpl> get copyWith => __$$ListPostReportsResponseImplCopyWithImpl<_$ListPostReportsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListPostReportsResponseImplToJson( - this, - ); + return _$$ListPostReportsResponseImplToJson(this); } } abstract class _ListPostReportsResponse extends ListPostReportsResponse { - const factory _ListPostReportsResponse( - {required final List postReports}) = - _$ListPostReportsResponseImpl; + const factory _ListPostReportsResponse({required final List postReports}) = _$ListPostReportsResponseImpl; const _ListPostReportsResponse._() : super._(); - factory _ListPostReportsResponse.fromJson(Map json) = - _$ListPostReportsResponseImpl.fromJson; + factory _ListPostReportsResponse.fromJson(Map json) = _$ListPostReportsResponseImpl.fromJson; @override List get postReports; @@ -179,6 +151,5 @@ abstract class _ListPostReportsResponse extends ListPostReportsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPostReportsResponseImplCopyWith<_$ListPostReportsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListPostReportsResponseImplCopyWith<_$ListPostReportsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/list_post_reports_response.g.dart b/lib/src/v3/models/post/list_post_reports_response.g.dart index 14e0aed5..de0ced5f 100644 --- a/lib/src/v3/models/post/list_post_reports_response.g.dart +++ b/lib/src/v3/models/post/list_post_reports_response.g.dart @@ -6,16 +6,7 @@ part of 'list_post_reports_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListPostReportsResponseImpl _$$ListPostReportsResponseImplFromJson( - Map json) => - _$ListPostReportsResponseImpl( - postReports: (json['post_reports'] as List) - .map((e) => PostReportView.fromJson(e as Map)) - .toList(), - ); +_$ListPostReportsResponseImpl _$$ListPostReportsResponseImplFromJson(Map json) => + _$ListPostReportsResponseImpl(postReports: (json['post_reports'] as List).map((e) => PostReportView.fromJson(e as Map)).toList()); -Map _$$ListPostReportsResponseImplToJson( - _$ListPostReportsResponseImpl instance) => - { - 'post_reports': instance.postReports.map((e) => e.toJson()).toList(), - }; +Map _$$ListPostReportsResponseImplToJson(_$ListPostReportsResponseImpl instance) => {'post_reports': instance.postReports.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/post/mark_post_as_read_response.dart b/lib/src/v3/models/post/mark_post_as_read_response.dart index 043ced1c..59752c15 100644 --- a/lib/src/v3/models/post/mark_post_as_read_response.dart +++ b/lib/src/v3/models/post/mark_post_as_read_response.dart @@ -15,6 +15,5 @@ class MarkPostAsReadResponse with _$MarkPostAsReadResponse { }) = _MarkPostAsReadResponse; const MarkPostAsReadResponse._(); - factory MarkPostAsReadResponse.fromJson(Map json) => - _$MarkPostAsReadResponseFromJson(json); + factory MarkPostAsReadResponse.fromJson(Map json) => _$MarkPostAsReadResponseFromJson(json); } diff --git a/lib/src/v3/models/post/mark_post_as_read_response.freezed.dart b/lib/src/v3/models/post/mark_post_as_read_response.freezed.dart index 2fddf069..0a4c8252 100644 --- a/lib/src/v3/models/post/mark_post_as_read_response.freezed.dart +++ b/lib/src/v3/models/post/mark_post_as_read_response.freezed.dart @@ -12,10 +12,10 @@ part of 'mark_post_as_read_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -MarkPostAsReadResponse _$MarkPostAsReadResponseFromJson( - Map json) { +MarkPostAsReadResponse _$MarkPostAsReadResponseFromJson(Map json) { return _MarkPostAsReadResponse.fromJson(json); } @@ -31,15 +31,12 @@ mixin _$MarkPostAsReadResponse { /// Create a copy of MarkPostAsReadResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $MarkPostAsReadResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $MarkPostAsReadResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $MarkPostAsReadResponseCopyWith<$Res> { - factory $MarkPostAsReadResponseCopyWith(MarkPostAsReadResponse value, - $Res Function(MarkPostAsReadResponse) then) = - _$MarkPostAsReadResponseCopyWithImpl<$Res, MarkPostAsReadResponse>; + factory $MarkPostAsReadResponseCopyWith(MarkPostAsReadResponse value, $Res Function(MarkPostAsReadResponse) then) = _$MarkPostAsReadResponseCopyWithImpl<$Res, MarkPostAsReadResponse>; @useResult $Res call({@deprecated PostView? postView, bool? success}); @@ -47,9 +44,7 @@ abstract class $MarkPostAsReadResponseCopyWith<$Res> { } /// @nodoc -class _$MarkPostAsReadResponseCopyWithImpl<$Res, - $Val extends MarkPostAsReadResponse> - implements $MarkPostAsReadResponseCopyWith<$Res> { +class _$MarkPostAsReadResponseCopyWithImpl<$Res, $Val extends MarkPostAsReadResponse> implements $MarkPostAsReadResponseCopyWith<$Res> { _$MarkPostAsReadResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,20 +56,22 @@ class _$MarkPostAsReadResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = freezed, - Object? success = freezed, - }) { - return _then(_value.copyWith( - postView: freezed == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? postView = freezed, Object? success = freezed}) { + return _then( + _value.copyWith( + postView: + freezed == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } /// Create a copy of MarkPostAsReadResponse @@ -93,12 +90,8 @@ class _$MarkPostAsReadResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$MarkPostAsReadResponseImplCopyWith<$Res> - implements $MarkPostAsReadResponseCopyWith<$Res> { - factory _$$MarkPostAsReadResponseImplCopyWith( - _$MarkPostAsReadResponseImpl value, - $Res Function(_$MarkPostAsReadResponseImpl) then) = - __$$MarkPostAsReadResponseImplCopyWithImpl<$Res>; +abstract class _$$MarkPostAsReadResponseImplCopyWith<$Res> implements $MarkPostAsReadResponseCopyWith<$Res> { + factory _$$MarkPostAsReadResponseImplCopyWith(_$MarkPostAsReadResponseImpl value, $Res Function(_$MarkPostAsReadResponseImpl) then) = __$$MarkPostAsReadResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({@deprecated PostView? postView, bool? success}); @@ -108,33 +101,28 @@ abstract class _$$MarkPostAsReadResponseImplCopyWith<$Res> } /// @nodoc -class __$$MarkPostAsReadResponseImplCopyWithImpl<$Res> - extends _$MarkPostAsReadResponseCopyWithImpl<$Res, - _$MarkPostAsReadResponseImpl> - implements _$$MarkPostAsReadResponseImplCopyWith<$Res> { - __$$MarkPostAsReadResponseImplCopyWithImpl( - _$MarkPostAsReadResponseImpl _value, - $Res Function(_$MarkPostAsReadResponseImpl) _then) - : super(_value, _then); +class __$$MarkPostAsReadResponseImplCopyWithImpl<$Res> extends _$MarkPostAsReadResponseCopyWithImpl<$Res, _$MarkPostAsReadResponseImpl> implements _$$MarkPostAsReadResponseImplCopyWith<$Res> { + __$$MarkPostAsReadResponseImplCopyWithImpl(_$MarkPostAsReadResponseImpl _value, $Res Function(_$MarkPostAsReadResponseImpl) _then) : super(_value, _then); /// Create a copy of MarkPostAsReadResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = freezed, - Object? success = freezed, - }) { - return _then(_$MarkPostAsReadResponseImpl( - postView: freezed == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? postView = freezed, Object? success = freezed}) { + return _then( + _$MarkPostAsReadResponseImpl( + postView: + freezed == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -142,11 +130,9 @@ class __$$MarkPostAsReadResponseImplCopyWithImpl<$Res> @modelSerde class _$MarkPostAsReadResponseImpl extends _MarkPostAsReadResponse { - const _$MarkPostAsReadResponseImpl({@deprecated this.postView, this.success}) - : super._(); + const _$MarkPostAsReadResponseImpl({@deprecated this.postView, this.success}) : super._(); - factory _$MarkPostAsReadResponseImpl.fromJson(Map json) => - _$$MarkPostAsReadResponseImplFromJson(json); + factory _$MarkPostAsReadResponseImpl.fromJson(Map json) => _$$MarkPostAsReadResponseImplFromJson(json); @override @deprecated @@ -164,8 +150,7 @@ class _$MarkPostAsReadResponseImpl extends _MarkPostAsReadResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MarkPostAsReadResponseImpl && - (identical(other.postView, postView) || - other.postView == postView) && + (identical(other.postView, postView) || other.postView == postView) && (identical(other.success, success) || other.success == success)); } @@ -178,26 +163,19 @@ class _$MarkPostAsReadResponseImpl extends _MarkPostAsReadResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$MarkPostAsReadResponseImplCopyWith<_$MarkPostAsReadResponseImpl> - get copyWith => __$$MarkPostAsReadResponseImplCopyWithImpl< - _$MarkPostAsReadResponseImpl>(this, _$identity); + _$$MarkPostAsReadResponseImplCopyWith<_$MarkPostAsReadResponseImpl> get copyWith => __$$MarkPostAsReadResponseImplCopyWithImpl<_$MarkPostAsReadResponseImpl>(this, _$identity); @override Map toJson() { - return _$$MarkPostAsReadResponseImplToJson( - this, - ); + return _$$MarkPostAsReadResponseImplToJson(this); } } abstract class _MarkPostAsReadResponse extends MarkPostAsReadResponse { - const factory _MarkPostAsReadResponse( - {@deprecated final PostView? postView, - final bool? success}) = _$MarkPostAsReadResponseImpl; + const factory _MarkPostAsReadResponse({@deprecated final PostView? postView, final bool? success}) = _$MarkPostAsReadResponseImpl; const _MarkPostAsReadResponse._() : super._(); - factory _MarkPostAsReadResponse.fromJson(Map json) = - _$MarkPostAsReadResponseImpl.fromJson; + factory _MarkPostAsReadResponse.fromJson(Map json) = _$MarkPostAsReadResponseImpl.fromJson; @override @deprecated @@ -209,6 +187,5 @@ abstract class _MarkPostAsReadResponse extends MarkPostAsReadResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$MarkPostAsReadResponseImplCopyWith<_$MarkPostAsReadResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$MarkPostAsReadResponseImplCopyWith<_$MarkPostAsReadResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/mark_post_as_read_response.g.dart b/lib/src/v3/models/post/mark_post_as_read_response.g.dart index 7ec15f8b..66d758f5 100644 --- a/lib/src/v3/models/post/mark_post_as_read_response.g.dart +++ b/lib/src/v3/models/post/mark_post_as_read_response.g.dart @@ -6,18 +6,7 @@ part of 'mark_post_as_read_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$MarkPostAsReadResponseImpl _$$MarkPostAsReadResponseImplFromJson( - Map json) => - _$MarkPostAsReadResponseImpl( - postView: json['post_view'] == null - ? null - : PostView.fromJson(json['post_view'] as Map), - success: json['success'] as bool?, - ); +_$MarkPostAsReadResponseImpl _$$MarkPostAsReadResponseImplFromJson(Map json) => + _$MarkPostAsReadResponseImpl(postView: json['post_view'] == null ? null : PostView.fromJson(json['post_view'] as Map), success: json['success'] as bool?); -Map _$$MarkPostAsReadResponseImplToJson( - _$MarkPostAsReadResponseImpl instance) => - { - 'post_view': instance.postView?.toJson(), - 'success': instance.success, - }; +Map _$$MarkPostAsReadResponseImplToJson(_$MarkPostAsReadResponseImpl instance) => {'post_view': instance.postView?.toJson(), 'success': instance.success}; diff --git a/lib/src/v3/models/post/post.freezed.dart b/lib/src/v3/models/post/post.freezed.dart index b5d0628b..fd663b9f 100644 --- a/lib/src/v3/models/post/post.freezed.dart +++ b/lib/src/v3/models/post/post.freezed.dart @@ -12,7 +12,8 @@ part of 'post.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Post _$PostFromJson(Map json) { return _Post.fromJson(json); @@ -41,8 +42,7 @@ mixin _$Post { int get languageId => throw _privateConstructorUsedError; // v0.18.0 bool get featuredCommunity => throw _privateConstructorUsedError; // v0.18.0 bool get featuredLocal => throw _privateConstructorUsedError; // v0.18.0 - String? get urlContentType => - throw _privateConstructorUsedError; // v0.19.4 (optional) + String? get urlContentType => throw _privateConstructorUsedError; // v0.19.4 (optional) String? get altText => throw _privateConstructorUsedError; /// Serializes this Post to a JSON map. @@ -56,38 +56,37 @@ mixin _$Post { /// @nodoc abstract class $PostCopyWith<$Res> { - factory $PostCopyWith(Post value, $Res Function(Post) then) = - _$PostCopyWithImpl<$Res, Post>; + factory $PostCopyWith(Post value, $Res Function(Post) then) = _$PostCopyWithImpl<$Res, Post>; @useResult - $Res call( - {int id, - String name, - String? url, - String? body, - int creatorId, - int communityId, - bool removed, - bool locked, - DateTime published, - DateTime? updated, - bool deleted, - bool nsfw, - String? embedTitle, - String? embedDescription, - String? thumbnailUrl, - String apId, - bool local, - String? embedVideoUrl, - int languageId, - bool featuredCommunity, - bool featuredLocal, - String? urlContentType, - String? altText}); + $Res call({ + int id, + String name, + String? url, + String? body, + int creatorId, + int communityId, + bool removed, + bool locked, + DateTime published, + DateTime? updated, + bool deleted, + bool nsfw, + String? embedTitle, + String? embedDescription, + String? thumbnailUrl, + String apId, + bool local, + String? embedVideoUrl, + int languageId, + bool featuredCommunity, + bool featuredLocal, + String? urlContentType, + String? altText, + }); } /// @nodoc -class _$PostCopyWithImpl<$Res, $Val extends Post> - implements $PostCopyWith<$Res> { +class _$PostCopyWithImpl<$Res, $Val extends Post> implements $PostCopyWith<$Res> { _$PostCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -124,142 +123,164 @@ class _$PostCopyWithImpl<$Res, $Val extends Post> Object? urlContentType = freezed, Object? altText = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - nsfw: null == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool, - embedTitle: freezed == embedTitle - ? _value.embedTitle - : embedTitle // ignore: cast_nullable_to_non_nullable - as String?, - embedDescription: freezed == embedDescription - ? _value.embedDescription - : embedDescription // ignore: cast_nullable_to_non_nullable - as String?, - thumbnailUrl: freezed == thumbnailUrl - ? _value.thumbnailUrl - : thumbnailUrl // ignore: cast_nullable_to_non_nullable - as String?, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - embedVideoUrl: freezed == embedVideoUrl - ? _value.embedVideoUrl - : embedVideoUrl // ignore: cast_nullable_to_non_nullable - as String?, - languageId: null == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int, - featuredCommunity: null == featuredCommunity - ? _value.featuredCommunity - : featuredCommunity // ignore: cast_nullable_to_non_nullable - as bool, - featuredLocal: null == featuredLocal - ? _value.featuredLocal - : featuredLocal // ignore: cast_nullable_to_non_nullable - as bool, - urlContentType: freezed == urlContentType - ? _value.urlContentType - : urlContentType // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + nsfw: + null == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool, + embedTitle: + freezed == embedTitle + ? _value.embedTitle + : embedTitle // ignore: cast_nullable_to_non_nullable + as String?, + embedDescription: + freezed == embedDescription + ? _value.embedDescription + : embedDescription // ignore: cast_nullable_to_non_nullable + as String?, + thumbnailUrl: + freezed == thumbnailUrl + ? _value.thumbnailUrl + : thumbnailUrl // ignore: cast_nullable_to_non_nullable + as String?, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + embedVideoUrl: + freezed == embedVideoUrl + ? _value.embedVideoUrl + : embedVideoUrl // ignore: cast_nullable_to_non_nullable + as String?, + languageId: + null == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int, + featuredCommunity: + null == featuredCommunity + ? _value.featuredCommunity + : featuredCommunity // ignore: cast_nullable_to_non_nullable + as bool, + featuredLocal: + null == featuredLocal + ? _value.featuredLocal + : featuredLocal // ignore: cast_nullable_to_non_nullable + as bool, + urlContentType: + freezed == urlContentType + ? _value.urlContentType + : urlContentType // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$PostImplCopyWith<$Res> implements $PostCopyWith<$Res> { - factory _$$PostImplCopyWith( - _$PostImpl value, $Res Function(_$PostImpl) then) = - __$$PostImplCopyWithImpl<$Res>; + factory _$$PostImplCopyWith(_$PostImpl value, $Res Function(_$PostImpl) then) = __$$PostImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - String? url, - String? body, - int creatorId, - int communityId, - bool removed, - bool locked, - DateTime published, - DateTime? updated, - bool deleted, - bool nsfw, - String? embedTitle, - String? embedDescription, - String? thumbnailUrl, - String apId, - bool local, - String? embedVideoUrl, - int languageId, - bool featuredCommunity, - bool featuredLocal, - String? urlContentType, - String? altText}); + $Res call({ + int id, + String name, + String? url, + String? body, + int creatorId, + int communityId, + bool removed, + bool locked, + DateTime published, + DateTime? updated, + bool deleted, + bool nsfw, + String? embedTitle, + String? embedDescription, + String? thumbnailUrl, + String apId, + bool local, + String? embedVideoUrl, + int languageId, + bool featuredCommunity, + bool featuredLocal, + String? urlContentType, + String? altText, + }); } /// @nodoc -class __$$PostImplCopyWithImpl<$Res> - extends _$PostCopyWithImpl<$Res, _$PostImpl> - implements _$$PostImplCopyWith<$Res> { - __$$PostImplCopyWithImpl(_$PostImpl _value, $Res Function(_$PostImpl) _then) - : super(_value, _then); +class __$$PostImplCopyWithImpl<$Res> extends _$PostCopyWithImpl<$Res, _$PostImpl> implements _$$PostImplCopyWith<$Res> { + __$$PostImplCopyWithImpl(_$PostImpl _value, $Res Function(_$PostImpl) _then) : super(_value, _then); /// Create a copy of Post /// with the given fields replaced by the non-null parameter values. @@ -290,100 +311,125 @@ class __$$PostImplCopyWithImpl<$Res> Object? urlContentType = freezed, Object? altText = freezed, }) { - return _then(_$PostImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - body: freezed == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String?, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - communityId: null == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int, - removed: null == removed - ? _value.removed - : removed // ignore: cast_nullable_to_non_nullable - as bool, - locked: null == locked - ? _value.locked - : locked // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - nsfw: null == nsfw - ? _value.nsfw - : nsfw // ignore: cast_nullable_to_non_nullable - as bool, - embedTitle: freezed == embedTitle - ? _value.embedTitle - : embedTitle // ignore: cast_nullable_to_non_nullable - as String?, - embedDescription: freezed == embedDescription - ? _value.embedDescription - : embedDescription // ignore: cast_nullable_to_non_nullable - as String?, - thumbnailUrl: freezed == thumbnailUrl - ? _value.thumbnailUrl - : thumbnailUrl // ignore: cast_nullable_to_non_nullable - as String?, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - embedVideoUrl: freezed == embedVideoUrl - ? _value.embedVideoUrl - : embedVideoUrl // ignore: cast_nullable_to_non_nullable - as String?, - languageId: null == languageId - ? _value.languageId - : languageId // ignore: cast_nullable_to_non_nullable - as int, - featuredCommunity: null == featuredCommunity - ? _value.featuredCommunity - : featuredCommunity // ignore: cast_nullable_to_non_nullable - as bool, - featuredLocal: null == featuredLocal - ? _value.featuredLocal - : featuredLocal // ignore: cast_nullable_to_non_nullable - as bool, - urlContentType: freezed == urlContentType - ? _value.urlContentType - : urlContentType // ignore: cast_nullable_to_non_nullable - as String?, - altText: freezed == altText - ? _value.altText - : altText // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$PostImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + body: + freezed == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String?, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + communityId: + null == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int, + removed: + null == removed + ? _value.removed + : removed // ignore: cast_nullable_to_non_nullable + as bool, + locked: + null == locked + ? _value.locked + : locked // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + nsfw: + null == nsfw + ? _value.nsfw + : nsfw // ignore: cast_nullable_to_non_nullable + as bool, + embedTitle: + freezed == embedTitle + ? _value.embedTitle + : embedTitle // ignore: cast_nullable_to_non_nullable + as String?, + embedDescription: + freezed == embedDescription + ? _value.embedDescription + : embedDescription // ignore: cast_nullable_to_non_nullable + as String?, + thumbnailUrl: + freezed == thumbnailUrl + ? _value.thumbnailUrl + : thumbnailUrl // ignore: cast_nullable_to_non_nullable + as String?, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + embedVideoUrl: + freezed == embedVideoUrl + ? _value.embedVideoUrl + : embedVideoUrl // ignore: cast_nullable_to_non_nullable + as String?, + languageId: + null == languageId + ? _value.languageId + : languageId // ignore: cast_nullable_to_non_nullable + as int, + featuredCommunity: + null == featuredCommunity + ? _value.featuredCommunity + : featuredCommunity // ignore: cast_nullable_to_non_nullable + as bool, + featuredLocal: + null == featuredLocal + ? _value.featuredLocal + : featuredLocal // ignore: cast_nullable_to_non_nullable + as bool, + urlContentType: + freezed == urlContentType + ? _value.urlContentType + : urlContentType // ignore: cast_nullable_to_non_nullable + as String?, + altText: + freezed == altText + ? _value.altText + : altText // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -391,101 +437,100 @@ class __$$PostImplCopyWithImpl<$Res> @modelSerde class _$PostImpl extends _Post { - const _$PostImpl( - {required this.id, - required this.name, - this.url, - this.body, - required this.creatorId, - required this.communityId, - required this.removed, - required this.locked, - required this.published, - this.updated, - required this.deleted, - required this.nsfw, - this.embedTitle, - this.embedDescription, - this.thumbnailUrl, - required this.apId, - required this.local, - this.embedVideoUrl, - required this.languageId, - required this.featuredCommunity, - required this.featuredLocal, - this.urlContentType, - this.altText}) - : super._(); + const _$PostImpl({ + required this.id, + required this.name, + this.url, + this.body, + required this.creatorId, + required this.communityId, + required this.removed, + required this.locked, + required this.published, + this.updated, + required this.deleted, + required this.nsfw, + this.embedTitle, + this.embedDescription, + this.thumbnailUrl, + required this.apId, + required this.local, + this.embedVideoUrl, + required this.languageId, + required this.featuredCommunity, + required this.featuredLocal, + this.urlContentType, + this.altText, + }) : super._(); - factory _$PostImpl.fromJson(Map json) => - _$$PostImplFromJson(json); + factory _$PostImpl.fromJson(Map json) => _$$PostImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String name; -// v0.18.0 + // v0.18.0 @override final String? url; -// v0.18.0 + // v0.18.0 @override final String? body; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int communityId; -// v0.18.0 + // v0.18.0 @override final bool removed; -// v0.18.0 + // v0.18.0 @override final bool locked; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final bool nsfw; -// v0.18.0 + // v0.18.0 @override final String? embedTitle; -// v0.18.0 + // v0.18.0 @override final String? embedDescription; -// v0.18.0 + // v0.18.0 @override final String? thumbnailUrl; -// v0.18.0 + // v0.18.0 @override final String apId; -// v0.18.0 + // v0.18.0 @override final bool local; -// v0.18.0 + // v0.18.0 @override final String? embedVideoUrl; -// v0.18.0 + // v0.18.0 @override final int languageId; -// v0.18.0 + // v0.18.0 @override final bool featuredCommunity; -// v0.18.0 + // v0.18.0 @override final bool featuredLocal; -// v0.18.0 + // v0.18.0 @override final String? urlContentType; -// v0.19.4 (optional) + // v0.19.4 (optional) @override final String? altText; @@ -503,108 +548,95 @@ class _$PostImpl extends _Post { (identical(other.name, name) || other.name == name) && (identical(other.url, url) || other.url == url) && (identical(other.body, body) || other.body == body) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && - (identical(other.communityId, communityId) || - other.communityId == communityId) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && + (identical(other.communityId, communityId) || other.communityId == communityId) && (identical(other.removed, removed) || other.removed == removed) && (identical(other.locked, locked) || other.locked == locked) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.nsfw, nsfw) || other.nsfw == nsfw) && - (identical(other.embedTitle, embedTitle) || - other.embedTitle == embedTitle) && - (identical(other.embedDescription, embedDescription) || - other.embedDescription == embedDescription) && - (identical(other.thumbnailUrl, thumbnailUrl) || - other.thumbnailUrl == thumbnailUrl) && + (identical(other.embedTitle, embedTitle) || other.embedTitle == embedTitle) && + (identical(other.embedDescription, embedDescription) || other.embedDescription == embedDescription) && + (identical(other.thumbnailUrl, thumbnailUrl) || other.thumbnailUrl == thumbnailUrl) && (identical(other.apId, apId) || other.apId == apId) && (identical(other.local, local) || other.local == local) && - (identical(other.embedVideoUrl, embedVideoUrl) || - other.embedVideoUrl == embedVideoUrl) && - (identical(other.languageId, languageId) || - other.languageId == languageId) && - (identical(other.featuredCommunity, featuredCommunity) || - other.featuredCommunity == featuredCommunity) && - (identical(other.featuredLocal, featuredLocal) || - other.featuredLocal == featuredLocal) && - (identical(other.urlContentType, urlContentType) || - other.urlContentType == urlContentType) && + (identical(other.embedVideoUrl, embedVideoUrl) || other.embedVideoUrl == embedVideoUrl) && + (identical(other.languageId, languageId) || other.languageId == languageId) && + (identical(other.featuredCommunity, featuredCommunity) || other.featuredCommunity == featuredCommunity) && + (identical(other.featuredLocal, featuredLocal) || other.featuredLocal == featuredLocal) && + (identical(other.urlContentType, urlContentType) || other.urlContentType == urlContentType) && (identical(other.altText, altText) || other.altText == altText)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - name, - url, - body, - creatorId, - communityId, - removed, - locked, - published, - updated, - deleted, - nsfw, - embedTitle, - embedDescription, - thumbnailUrl, - apId, - local, - embedVideoUrl, - languageId, - featuredCommunity, - featuredLocal, - urlContentType, - altText - ]); + runtimeType, + id, + name, + url, + body, + creatorId, + communityId, + removed, + locked, + published, + updated, + deleted, + nsfw, + embedTitle, + embedDescription, + thumbnailUrl, + apId, + local, + embedVideoUrl, + languageId, + featuredCommunity, + featuredLocal, + urlContentType, + altText, + ]); /// Create a copy of Post /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostImplCopyWith<_$PostImpl> get copyWith => - __$$PostImplCopyWithImpl<_$PostImpl>(this, _$identity); + _$$PostImplCopyWith<_$PostImpl> get copyWith => __$$PostImplCopyWithImpl<_$PostImpl>(this, _$identity); @override Map toJson() { - return _$$PostImplToJson( - this, - ); + return _$$PostImplToJson(this); } } abstract class _Post extends Post { - const factory _Post( - {required final int id, - required final String name, - final String? url, - final String? body, - required final int creatorId, - required final int communityId, - required final bool removed, - required final bool locked, - required final DateTime published, - final DateTime? updated, - required final bool deleted, - required final bool nsfw, - final String? embedTitle, - final String? embedDescription, - final String? thumbnailUrl, - required final String apId, - required final bool local, - final String? embedVideoUrl, - required final int languageId, - required final bool featuredCommunity, - required final bool featuredLocal, - final String? urlContentType, - final String? altText}) = _$PostImpl; + const factory _Post({ + required final int id, + required final String name, + final String? url, + final String? body, + required final int creatorId, + required final int communityId, + required final bool removed, + required final bool locked, + required final DateTime published, + final DateTime? updated, + required final bool deleted, + required final bool nsfw, + final String? embedTitle, + final String? embedDescription, + final String? thumbnailUrl, + required final String apId, + required final bool local, + final String? embedVideoUrl, + required final int languageId, + required final bool featuredCommunity, + required final bool featuredLocal, + final String? urlContentType, + final String? altText, + }) = _$PostImpl; const _Post._() : super._(); factory _Post.fromJson(Map json) = _$PostImpl.fromJson; @@ -660,6 +692,5 @@ abstract class _Post extends Post { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostImplCopyWith<_$PostImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostImplCopyWith<_$PostImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/post.g.dart b/lib/src/v3/models/post/post.g.dart index 5db9d47c..f6906c80 100644 --- a/lib/src/v3/models/post/post.g.dart +++ b/lib/src/v3/models/post/post.g.dart @@ -7,68 +7,57 @@ part of 'post.dart'; // ************************************************************************** _$PostImpl _$$PostImplFromJson(Map json) => _$PostImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - url: json['url'] as String?, - body: json['body'] as String?, - creatorId: (json['creator_id'] as num).toInt(), - communityId: (json['community_id'] as num).toInt(), - removed: json['removed'] as bool, - locked: json['locked'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - deleted: json['deleted'] as bool, - nsfw: json['nsfw'] as bool, - embedTitle: json['embed_title'] as String?, - embedDescription: json['embed_description'] as String?, - thumbnailUrl: json['thumbnail_url'] as String?, - apId: json['ap_id'] as String, - local: json['local'] as bool, - embedVideoUrl: json['embed_video_url'] as String?, - languageId: (json['language_id'] as num).toInt(), - featuredCommunity: json['featured_community'] as bool, - featuredLocal: json['featured_local'] as bool, - urlContentType: json['url_content_type'] as String?, - altText: json['alt_text'] as String?, - ); + id: (json['id'] as num).toInt(), + name: json['name'] as String, + url: json['url'] as String?, + body: json['body'] as String?, + creatorId: (json['creator_id'] as num).toInt(), + communityId: (json['community_id'] as num).toInt(), + removed: json['removed'] as bool, + locked: json['locked'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + deleted: json['deleted'] as bool, + nsfw: json['nsfw'] as bool, + embedTitle: json['embed_title'] as String?, + embedDescription: json['embed_description'] as String?, + thumbnailUrl: json['thumbnail_url'] as String?, + apId: json['ap_id'] as String, + local: json['local'] as bool, + embedVideoUrl: json['embed_video_url'] as String?, + languageId: (json['language_id'] as num).toInt(), + featuredCommunity: json['featured_community'] as bool, + featuredLocal: json['featured_local'] as bool, + urlContentType: json['url_content_type'] as String?, + altText: json['alt_text'] as String?, +); -Map _$$PostImplToJson(_$PostImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'url': instance.url, - 'body': instance.body, - 'creator_id': instance.creatorId, - 'community_id': instance.communityId, - 'removed': instance.removed, - 'locked': instance.locked, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'deleted': instance.deleted, - 'nsfw': instance.nsfw, - 'embed_title': instance.embedTitle, - 'embed_description': instance.embedDescription, - 'thumbnail_url': instance.thumbnailUrl, - 'ap_id': instance.apId, - 'local': instance.local, - 'embed_video_url': instance.embedVideoUrl, - 'language_id': instance.languageId, - 'featured_community': instance.featuredCommunity, - 'featured_local': instance.featuredLocal, - 'url_content_type': instance.urlContentType, - 'alt_text': instance.altText, - }; +Map _$$PostImplToJson(_$PostImpl instance) => { + 'id': instance.id, + 'name': instance.name, + 'url': instance.url, + 'body': instance.body, + 'creator_id': instance.creatorId, + 'community_id': instance.communityId, + 'removed': instance.removed, + 'locked': instance.locked, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'deleted': instance.deleted, + 'nsfw': instance.nsfw, + 'embed_title': instance.embedTitle, + 'embed_description': instance.embedDescription, + 'thumbnail_url': instance.thumbnailUrl, + 'ap_id': instance.apId, + 'local': instance.local, + 'embed_video_url': instance.embedVideoUrl, + 'language_id': instance.languageId, + 'featured_community': instance.featuredCommunity, + 'featured_local': instance.featuredLocal, + 'url_content_type': instance.urlContentType, + 'alt_text': instance.altText, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/post/post_aggregates.dart b/lib/src/v3/models/post/post_aggregates.dart index e9cc61da..ae404059 100644 --- a/lib/src/v3/models/post/post_aggregates.dart +++ b/lib/src/v3/models/post/post_aggregates.dart @@ -17,10 +17,8 @@ class PostAggregates with _$PostAggregates { required int upvotes, // v0.18.0 required int downvotes, // v0.18.0 required DateTime published, // v0.18.0 - @deprecated - String? newestCommentTimeNecro, // v0.18.0 [deprecated in v0.19.0] - String? - newestCommentTime, // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) + @deprecated String? newestCommentTimeNecro, // v0.18.0 [deprecated in v0.19.0] + String? newestCommentTime, // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) @deprecated bool? featuredCommunity, // v0.18.0 [deprecated in v0.19.0] @deprecated bool? featuredLocal, // v0.18.0 [deprecated in v0.19.0] @deprecated int? hotRank, // v0.18.0 [deprecated in v0.19.0] @@ -28,6 +26,5 @@ class PostAggregates with _$PostAggregates { }) = _PostAggregates; const PostAggregates._(); - factory PostAggregates.fromJson(Map json) => - _$PostAggregatesFromJson(json); + factory PostAggregates.fromJson(Map json) => _$PostAggregatesFromJson(json); } diff --git a/lib/src/v3/models/post/post_aggregates.freezed.dart b/lib/src/v3/models/post/post_aggregates.freezed.dart index 0a3e0520..4e56bff6 100644 --- a/lib/src/v3/models/post/post_aggregates.freezed.dart +++ b/lib/src/v3/models/post/post_aggregates.freezed.dart @@ -12,7 +12,8 @@ part of 'post_aggregates.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostAggregates _$PostAggregatesFromJson(Map json) { return _PostAggregates.fromJson(json); @@ -21,8 +22,7 @@ PostAggregates _$PostAggregatesFromJson(Map json) { /// @nodoc mixin _$PostAggregates { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get postId => throw _privateConstructorUsedError; // v0.18.0 int get comments => throw _privateConstructorUsedError; // v0.18.0 int get score => throw _privateConstructorUsedError; // v0.18.0 @@ -30,19 +30,14 @@ mixin _$PostAggregates { int get downvotes => throw _privateConstructorUsedError; // v0.18.0 DateTime get published => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get newestCommentTimeNecro => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] - String? get newestCommentTime => - throw _privateConstructorUsedError; // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) + String? get newestCommentTimeNecro => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + String? get newestCommentTime => throw _privateConstructorUsedError; // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) @deprecated - bool? get featuredCommunity => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + bool? get featuredCommunity => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] @deprecated - bool? get featuredLocal => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + bool? get featuredLocal => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] @deprecated - int? get hotRank => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get hotRank => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] @deprecated int? get hotRankActive => throw _privateConstructorUsedError; @@ -52,35 +47,32 @@ mixin _$PostAggregates { /// Create a copy of PostAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostAggregatesCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostAggregatesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostAggregatesCopyWith<$Res> { - factory $PostAggregatesCopyWith( - PostAggregates value, $Res Function(PostAggregates) then) = - _$PostAggregatesCopyWithImpl<$Res, PostAggregates>; + factory $PostAggregatesCopyWith(PostAggregates value, $Res Function(PostAggregates) then) = _$PostAggregatesCopyWithImpl<$Res, PostAggregates>; @useResult - $Res call( - {@deprecated int? id, - int postId, - int comments, - int score, - int upvotes, - int downvotes, - DateTime published, - @deprecated String? newestCommentTimeNecro, - String? newestCommentTime, - @deprecated bool? featuredCommunity, - @deprecated bool? featuredLocal, - @deprecated int? hotRank, - @deprecated int? hotRankActive}); + $Res call({ + @deprecated int? id, + int postId, + int comments, + int score, + int upvotes, + int downvotes, + DateTime published, + @deprecated String? newestCommentTimeNecro, + String? newestCommentTime, + @deprecated bool? featuredCommunity, + @deprecated bool? featuredLocal, + @deprecated int? hotRank, + @deprecated int? hotRankActive, + }); } /// @nodoc -class _$PostAggregatesCopyWithImpl<$Res, $Val extends PostAggregates> - implements $PostAggregatesCopyWith<$Res> { +class _$PostAggregatesCopyWithImpl<$Res, $Val extends PostAggregates> implements $PostAggregatesCopyWith<$Res> { _$PostAggregatesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -107,94 +99,104 @@ class _$PostAggregatesCopyWithImpl<$Res, $Val extends PostAggregates> Object? hotRank = freezed, Object? hotRankActive = freezed, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - upvotes: null == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as int, - downvotes: null == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - newestCommentTimeNecro: freezed == newestCommentTimeNecro - ? _value.newestCommentTimeNecro - : newestCommentTimeNecro // ignore: cast_nullable_to_non_nullable - as String?, - newestCommentTime: freezed == newestCommentTime - ? _value.newestCommentTime - : newestCommentTime // ignore: cast_nullable_to_non_nullable - as String?, - featuredCommunity: freezed == featuredCommunity - ? _value.featuredCommunity - : featuredCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - featuredLocal: freezed == featuredLocal - ? _value.featuredLocal - : featuredLocal // ignore: cast_nullable_to_non_nullable - as bool?, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - hotRankActive: freezed == hotRankActive - ? _value.hotRankActive - : hotRankActive // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + upvotes: + null == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as int, + downvotes: + null == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + newestCommentTimeNecro: + freezed == newestCommentTimeNecro + ? _value.newestCommentTimeNecro + : newestCommentTimeNecro // ignore: cast_nullable_to_non_nullable + as String?, + newestCommentTime: + freezed == newestCommentTime + ? _value.newestCommentTime + : newestCommentTime // ignore: cast_nullable_to_non_nullable + as String?, + featuredCommunity: + freezed == featuredCommunity + ? _value.featuredCommunity + : featuredCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + featuredLocal: + freezed == featuredLocal + ? _value.featuredLocal + : featuredLocal // ignore: cast_nullable_to_non_nullable + as bool?, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + hotRankActive: + freezed == hotRankActive + ? _value.hotRankActive + : hotRankActive // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PostAggregatesImplCopyWith<$Res> - implements $PostAggregatesCopyWith<$Res> { - factory _$$PostAggregatesImplCopyWith(_$PostAggregatesImpl value, - $Res Function(_$PostAggregatesImpl) then) = - __$$PostAggregatesImplCopyWithImpl<$Res>; +abstract class _$$PostAggregatesImplCopyWith<$Res> implements $PostAggregatesCopyWith<$Res> { + factory _$$PostAggregatesImplCopyWith(_$PostAggregatesImpl value, $Res Function(_$PostAggregatesImpl) then) = __$$PostAggregatesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int postId, - int comments, - int score, - int upvotes, - int downvotes, - DateTime published, - @deprecated String? newestCommentTimeNecro, - String? newestCommentTime, - @deprecated bool? featuredCommunity, - @deprecated bool? featuredLocal, - @deprecated int? hotRank, - @deprecated int? hotRankActive}); + $Res call({ + @deprecated int? id, + int postId, + int comments, + int score, + int upvotes, + int downvotes, + DateTime published, + @deprecated String? newestCommentTimeNecro, + String? newestCommentTime, + @deprecated bool? featuredCommunity, + @deprecated bool? featuredLocal, + @deprecated int? hotRank, + @deprecated int? hotRankActive, + }); } /// @nodoc -class __$$PostAggregatesImplCopyWithImpl<$Res> - extends _$PostAggregatesCopyWithImpl<$Res, _$PostAggregatesImpl> - implements _$$PostAggregatesImplCopyWith<$Res> { - __$$PostAggregatesImplCopyWithImpl( - _$PostAggregatesImpl _value, $Res Function(_$PostAggregatesImpl) _then) - : super(_value, _then); +class __$$PostAggregatesImplCopyWithImpl<$Res> extends _$PostAggregatesCopyWithImpl<$Res, _$PostAggregatesImpl> implements _$$PostAggregatesImplCopyWith<$Res> { + __$$PostAggregatesImplCopyWithImpl(_$PostAggregatesImpl _value, $Res Function(_$PostAggregatesImpl) _then) : super(_value, _then); /// Create a copy of PostAggregates /// with the given fields replaced by the non-null parameter values. @@ -215,60 +217,75 @@ class __$$PostAggregatesImplCopyWithImpl<$Res> Object? hotRank = freezed, Object? hotRankActive = freezed, }) { - return _then(_$PostAggregatesImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - upvotes: null == upvotes - ? _value.upvotes - : upvotes // ignore: cast_nullable_to_non_nullable - as int, - downvotes: null == downvotes - ? _value.downvotes - : downvotes // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - newestCommentTimeNecro: freezed == newestCommentTimeNecro - ? _value.newestCommentTimeNecro - : newestCommentTimeNecro // ignore: cast_nullable_to_non_nullable - as String?, - newestCommentTime: freezed == newestCommentTime - ? _value.newestCommentTime - : newestCommentTime // ignore: cast_nullable_to_non_nullable - as String?, - featuredCommunity: freezed == featuredCommunity - ? _value.featuredCommunity - : featuredCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - featuredLocal: freezed == featuredLocal - ? _value.featuredLocal - : featuredLocal // ignore: cast_nullable_to_non_nullable - as bool?, - hotRank: freezed == hotRank - ? _value.hotRank - : hotRank // ignore: cast_nullable_to_non_nullable - as int?, - hotRankActive: freezed == hotRankActive - ? _value.hotRankActive - : hotRankActive // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$PostAggregatesImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + upvotes: + null == upvotes + ? _value.upvotes + : upvotes // ignore: cast_nullable_to_non_nullable + as int, + downvotes: + null == downvotes + ? _value.downvotes + : downvotes // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + newestCommentTimeNecro: + freezed == newestCommentTimeNecro + ? _value.newestCommentTimeNecro + : newestCommentTimeNecro // ignore: cast_nullable_to_non_nullable + as String?, + newestCommentTime: + freezed == newestCommentTime + ? _value.newestCommentTime + : newestCommentTime // ignore: cast_nullable_to_non_nullable + as String?, + featuredCommunity: + freezed == featuredCommunity + ? _value.featuredCommunity + : featuredCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + featuredLocal: + freezed == featuredLocal + ? _value.featuredLocal + : featuredLocal // ignore: cast_nullable_to_non_nullable + as bool?, + hotRank: + freezed == hotRank + ? _value.hotRank + : hotRank // ignore: cast_nullable_to_non_nullable + as int?, + hotRankActive: + freezed == hotRankActive + ? _value.hotRankActive + : hotRankActive // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -276,66 +293,65 @@ class __$$PostAggregatesImplCopyWithImpl<$Res> @modelSerde class _$PostAggregatesImpl extends _PostAggregates { - const _$PostAggregatesImpl( - {@deprecated this.id, - required this.postId, - required this.comments, - required this.score, - required this.upvotes, - required this.downvotes, - required this.published, - @deprecated this.newestCommentTimeNecro, - this.newestCommentTime, - @deprecated this.featuredCommunity, - @deprecated this.featuredLocal, - @deprecated this.hotRank, - @deprecated this.hotRankActive}) - : super._(); + const _$PostAggregatesImpl({ + @deprecated this.id, + required this.postId, + required this.comments, + required this.score, + required this.upvotes, + required this.downvotes, + required this.published, + @deprecated this.newestCommentTimeNecro, + this.newestCommentTime, + @deprecated this.featuredCommunity, + @deprecated this.featuredLocal, + @deprecated this.hotRank, + @deprecated this.hotRankActive, + }) : super._(); - factory _$PostAggregatesImpl.fromJson(Map json) => - _$$PostAggregatesImplFromJson(json); + factory _$PostAggregatesImpl.fromJson(Map json) => _$$PostAggregatesImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int postId; -// v0.18.0 + // v0.18.0 @override final int comments; -// v0.18.0 + // v0.18.0 @override final int score; -// v0.18.0 + // v0.18.0 @override final int upvotes; -// v0.18.0 + // v0.18.0 @override final int downvotes; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override @deprecated final String? newestCommentTimeNecro; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final String? newestCommentTime; -// v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) + // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) @override @deprecated final bool? featuredCommunity; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override @deprecated final bool? featuredLocal; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override @deprecated final int? hotRank; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override @deprecated final int? hotRankActive; @@ -352,81 +368,56 @@ class _$PostAggregatesImpl extends _PostAggregates { other is _$PostAggregatesImpl && (identical(other.id, id) || other.id == id) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.comments, comments) || - other.comments == comments) && + (identical(other.comments, comments) || other.comments == comments) && (identical(other.score, score) || other.score == score) && (identical(other.upvotes, upvotes) || other.upvotes == upvotes) && - (identical(other.downvotes, downvotes) || - other.downvotes == downvotes) && - (identical(other.published, published) || - other.published == published) && - (identical(other.newestCommentTimeNecro, newestCommentTimeNecro) || - other.newestCommentTimeNecro == newestCommentTimeNecro) && - (identical(other.newestCommentTime, newestCommentTime) || - other.newestCommentTime == newestCommentTime) && - (identical(other.featuredCommunity, featuredCommunity) || - other.featuredCommunity == featuredCommunity) && - (identical(other.featuredLocal, featuredLocal) || - other.featuredLocal == featuredLocal) && + (identical(other.downvotes, downvotes) || other.downvotes == downvotes) && + (identical(other.published, published) || other.published == published) && + (identical(other.newestCommentTimeNecro, newestCommentTimeNecro) || other.newestCommentTimeNecro == newestCommentTimeNecro) && + (identical(other.newestCommentTime, newestCommentTime) || other.newestCommentTime == newestCommentTime) && + (identical(other.featuredCommunity, featuredCommunity) || other.featuredCommunity == featuredCommunity) && + (identical(other.featuredLocal, featuredLocal) || other.featuredLocal == featuredLocal) && (identical(other.hotRank, hotRank) || other.hotRank == hotRank) && - (identical(other.hotRankActive, hotRankActive) || - other.hotRankActive == hotRankActive)); + (identical(other.hotRankActive, hotRankActive) || other.hotRankActive == hotRankActive)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - postId, - comments, - score, - upvotes, - downvotes, - published, - newestCommentTimeNecro, - newestCommentTime, - featuredCommunity, - featuredLocal, - hotRank, - hotRankActive); + int get hashCode => + Object.hash(runtimeType, id, postId, comments, score, upvotes, downvotes, published, newestCommentTimeNecro, newestCommentTime, featuredCommunity, featuredLocal, hotRank, hotRankActive); /// Create a copy of PostAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostAggregatesImplCopyWith<_$PostAggregatesImpl> get copyWith => - __$$PostAggregatesImplCopyWithImpl<_$PostAggregatesImpl>( - this, _$identity); + _$$PostAggregatesImplCopyWith<_$PostAggregatesImpl> get copyWith => __$$PostAggregatesImplCopyWithImpl<_$PostAggregatesImpl>(this, _$identity); @override Map toJson() { - return _$$PostAggregatesImplToJson( - this, - ); + return _$$PostAggregatesImplToJson(this); } } abstract class _PostAggregates extends PostAggregates { - const factory _PostAggregates( - {@deprecated final int? id, - required final int postId, - required final int comments, - required final int score, - required final int upvotes, - required final int downvotes, - required final DateTime published, - @deprecated final String? newestCommentTimeNecro, - final String? newestCommentTime, - @deprecated final bool? featuredCommunity, - @deprecated final bool? featuredLocal, - @deprecated final int? hotRank, - @deprecated final int? hotRankActive}) = _$PostAggregatesImpl; + const factory _PostAggregates({ + @deprecated final int? id, + required final int postId, + required final int comments, + required final int score, + required final int upvotes, + required final int downvotes, + required final DateTime published, + @deprecated final String? newestCommentTimeNecro, + final String? newestCommentTime, + @deprecated final bool? featuredCommunity, + @deprecated final bool? featuredLocal, + @deprecated final int? hotRank, + @deprecated final int? hotRankActive, + }) = _$PostAggregatesImpl; const _PostAggregates._() : super._(); - factory _PostAggregates.fromJson(Map json) = - _$PostAggregatesImpl.fromJson; + factory _PostAggregates.fromJson(Map json) = _$PostAggregatesImpl.fromJson; @override @deprecated @@ -447,8 +438,7 @@ abstract class _PostAggregates extends PostAggregates { @deprecated String? get newestCommentTimeNecro; // v0.18.0 [deprecated in v0.19.0] @override - String? - get newestCommentTime; // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) + String? get newestCommentTime; // v0.18.0, deprecated in v0.19.0, reintroduced in v0.19.2 (required) @override @deprecated bool? get featuredCommunity; // v0.18.0 [deprecated in v0.19.0] @@ -466,6 +456,5 @@ abstract class _PostAggregates extends PostAggregates { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostAggregatesImplCopyWith<_$PostAggregatesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostAggregatesImplCopyWith<_$PostAggregatesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/post_aggregates.g.dart b/lib/src/v3/models/post/post_aggregates.g.dart index e505584d..2a51f1ea 100644 --- a/lib/src/v3/models/post/post_aggregates.g.dart +++ b/lib/src/v3/models/post/post_aggregates.g.dart @@ -6,37 +6,34 @@ part of 'post_aggregates.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostAggregatesImpl _$$PostAggregatesImplFromJson(Map json) => - _$PostAggregatesImpl( - id: (json['id'] as num?)?.toInt(), - postId: (json['post_id'] as num).toInt(), - comments: (json['comments'] as num).toInt(), - score: (json['score'] as num).toInt(), - upvotes: (json['upvotes'] as num).toInt(), - downvotes: (json['downvotes'] as num).toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - newestCommentTimeNecro: json['newest_comment_time_necro'] as String?, - newestCommentTime: json['newest_comment_time'] as String?, - featuredCommunity: json['featured_community'] as bool?, - featuredLocal: json['featured_local'] as bool?, - hotRank: (json['hot_rank'] as num?)?.toInt(), - hotRankActive: (json['hot_rank_active'] as num?)?.toInt(), - ); +_$PostAggregatesImpl _$$PostAggregatesImplFromJson(Map json) => _$PostAggregatesImpl( + id: (json['id'] as num?)?.toInt(), + postId: (json['post_id'] as num).toInt(), + comments: (json['comments'] as num).toInt(), + score: (json['score'] as num).toInt(), + upvotes: (json['upvotes'] as num).toInt(), + downvotes: (json['downvotes'] as num).toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + newestCommentTimeNecro: json['newest_comment_time_necro'] as String?, + newestCommentTime: json['newest_comment_time'] as String?, + featuredCommunity: json['featured_community'] as bool?, + featuredLocal: json['featured_local'] as bool?, + hotRank: (json['hot_rank'] as num?)?.toInt(), + hotRankActive: (json['hot_rank_active'] as num?)?.toInt(), +); -Map _$$PostAggregatesImplToJson( - _$PostAggregatesImpl instance) => - { - 'id': instance.id, - 'post_id': instance.postId, - 'comments': instance.comments, - 'score': instance.score, - 'upvotes': instance.upvotes, - 'downvotes': instance.downvotes, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'newest_comment_time_necro': instance.newestCommentTimeNecro, - 'newest_comment_time': instance.newestCommentTime, - 'featured_community': instance.featuredCommunity, - 'featured_local': instance.featuredLocal, - 'hot_rank': instance.hotRank, - 'hot_rank_active': instance.hotRankActive, - }; +Map _$$PostAggregatesImplToJson(_$PostAggregatesImpl instance) => { + 'id': instance.id, + 'post_id': instance.postId, + 'comments': instance.comments, + 'score': instance.score, + 'upvotes': instance.upvotes, + 'downvotes': instance.downvotes, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'newest_comment_time_necro': instance.newestCommentTimeNecro, + 'newest_comment_time': instance.newestCommentTime, + 'featured_community': instance.featuredCommunity, + 'featured_local': instance.featuredLocal, + 'hot_rank': instance.hotRank, + 'hot_rank_active': instance.hotRankActive, +}; diff --git a/lib/src/v3/models/post/post_report.dart b/lib/src/v3/models/post/post_report.dart index 793cbaaf..7a05d417 100644 --- a/lib/src/v3/models/post/post_report.dart +++ b/lib/src/v3/models/post/post_report.dart @@ -24,6 +24,5 @@ class PostReport with _$PostReport { }) = _PostReport; const PostReport._(); - factory PostReport.fromJson(Map json) => - _$PostReportFromJson(json); + factory PostReport.fromJson(Map json) => _$PostReportFromJson(json); } diff --git a/lib/src/v3/models/post/post_report.freezed.dart b/lib/src/v3/models/post/post_report.freezed.dart index 0e7f9c15..5cca4a08 100644 --- a/lib/src/v3/models/post/post_report.freezed.dart +++ b/lib/src/v3/models/post/post_report.freezed.dart @@ -12,7 +12,8 @@ part of 'post_report.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostReport _$PostReportFromJson(Map json) { return _PostReport.fromJson(json); @@ -38,33 +39,30 @@ mixin _$PostReport { /// Create a copy of PostReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostReportCopyWith<$Res> { - factory $PostReportCopyWith( - PostReport value, $Res Function(PostReport) then) = - _$PostReportCopyWithImpl<$Res, PostReport>; + factory $PostReportCopyWith(PostReport value, $Res Function(PostReport) then) = _$PostReportCopyWithImpl<$Res, PostReport>; @useResult - $Res call( - {int id, - int creatorId, - int postId, - String originalPostName, - String? originalPostUrl, - String? originalPostBody, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({ + int id, + int creatorId, + int postId, + String originalPostName, + String? originalPostUrl, + String? originalPostBody, + String reason, + bool resolved, + int? resolverId, + DateTime published, + DateTime? updated, + }); } /// @nodoc -class _$PostReportCopyWithImpl<$Res, $Val extends PostReport> - implements $PostReportCopyWith<$Res> { +class _$PostReportCopyWithImpl<$Res, $Val extends PostReport> implements $PostReportCopyWith<$Res> { _$PostReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -89,84 +87,92 @@ class _$PostReportCopyWithImpl<$Res, $Val extends PostReport> Object? published = null, Object? updated = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - originalPostName: null == originalPostName - ? _value.originalPostName - : originalPostName // ignore: cast_nullable_to_non_nullable - as String, - originalPostUrl: freezed == originalPostUrl - ? _value.originalPostUrl - : originalPostUrl // ignore: cast_nullable_to_non_nullable - as String?, - originalPostBody: freezed == originalPostBody - ? _value.originalPostBody - : originalPostBody // ignore: cast_nullable_to_non_nullable - as String?, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + originalPostName: + null == originalPostName + ? _value.originalPostName + : originalPostName // ignore: cast_nullable_to_non_nullable + as String, + originalPostUrl: + freezed == originalPostUrl + ? _value.originalPostUrl + : originalPostUrl // ignore: cast_nullable_to_non_nullable + as String?, + originalPostBody: + freezed == originalPostBody + ? _value.originalPostBody + : originalPostBody // ignore: cast_nullable_to_non_nullable + as String?, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PostReportImplCopyWith<$Res> - implements $PostReportCopyWith<$Res> { - factory _$$PostReportImplCopyWith( - _$PostReportImpl value, $Res Function(_$PostReportImpl) then) = - __$$PostReportImplCopyWithImpl<$Res>; +abstract class _$$PostReportImplCopyWith<$Res> implements $PostReportCopyWith<$Res> { + factory _$$PostReportImplCopyWith(_$PostReportImpl value, $Res Function(_$PostReportImpl) then) = __$$PostReportImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int creatorId, - int postId, - String originalPostName, - String? originalPostUrl, - String? originalPostBody, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({ + int id, + int creatorId, + int postId, + String originalPostName, + String? originalPostUrl, + String? originalPostBody, + String reason, + bool resolved, + int? resolverId, + DateTime published, + DateTime? updated, + }); } /// @nodoc -class __$$PostReportImplCopyWithImpl<$Res> - extends _$PostReportCopyWithImpl<$Res, _$PostReportImpl> - implements _$$PostReportImplCopyWith<$Res> { - __$$PostReportImplCopyWithImpl( - _$PostReportImpl _value, $Res Function(_$PostReportImpl) _then) - : super(_value, _then); +class __$$PostReportImplCopyWithImpl<$Res> extends _$PostReportCopyWithImpl<$Res, _$PostReportImpl> implements _$$PostReportImplCopyWith<$Res> { + __$$PostReportImplCopyWithImpl(_$PostReportImpl _value, $Res Function(_$PostReportImpl) _then) : super(_value, _then); /// Create a copy of PostReport /// with the given fields replaced by the non-null parameter values. @@ -185,52 +191,65 @@ class __$$PostReportImplCopyWithImpl<$Res> Object? published = null, Object? updated = freezed, }) { - return _then(_$PostReportImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - postId: null == postId - ? _value.postId - : postId // ignore: cast_nullable_to_non_nullable - as int, - originalPostName: null == originalPostName - ? _value.originalPostName - : originalPostName // ignore: cast_nullable_to_non_nullable - as String, - originalPostUrl: freezed == originalPostUrl - ? _value.originalPostUrl - : originalPostUrl // ignore: cast_nullable_to_non_nullable - as String?, - originalPostBody: freezed == originalPostBody - ? _value.originalPostBody - : originalPostBody // ignore: cast_nullable_to_non_nullable - as String?, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + return _then( + _$PostReportImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + postId: + null == postId + ? _value.postId + : postId // ignore: cast_nullable_to_non_nullable + as int, + originalPostName: + null == originalPostName + ? _value.originalPostName + : originalPostName // ignore: cast_nullable_to_non_nullable + as String, + originalPostUrl: + freezed == originalPostUrl + ? _value.originalPostUrl + : originalPostUrl // ignore: cast_nullable_to_non_nullable + as String?, + originalPostBody: + freezed == originalPostBody + ? _value.originalPostBody + : originalPostBody // ignore: cast_nullable_to_non_nullable + as String?, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -238,53 +257,52 @@ class __$$PostReportImplCopyWithImpl<$Res> @modelSerde class _$PostReportImpl extends _PostReport { - const _$PostReportImpl( - {required this.id, - required this.creatorId, - required this.postId, - required this.originalPostName, - this.originalPostUrl, - this.originalPostBody, - required this.reason, - required this.resolved, - this.resolverId, - required this.published, - this.updated}) - : super._(); + const _$PostReportImpl({ + required this.id, + required this.creatorId, + required this.postId, + required this.originalPostName, + this.originalPostUrl, + this.originalPostBody, + required this.reason, + required this.resolved, + this.resolverId, + required this.published, + this.updated, + }) : super._(); - factory _$PostReportImpl.fromJson(Map json) => - _$$PostReportImplFromJson(json); + factory _$PostReportImpl.fromJson(Map json) => _$$PostReportImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int postId; -// v0.18.0 + // v0.18.0 @override final String originalPostName; -// v0.18.0 + // v0.18.0 @override final String? originalPostUrl; -// v0.18.0 + // v0.18.0 @override final String? originalPostBody; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final int? resolverId; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; @@ -299,74 +317,52 @@ class _$PostReportImpl extends _PostReport { (other.runtimeType == runtimeType && other is _$PostReportImpl && (identical(other.id, id) || other.id == id) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && (identical(other.postId, postId) || other.postId == postId) && - (identical(other.originalPostName, originalPostName) || - other.originalPostName == originalPostName) && - (identical(other.originalPostUrl, originalPostUrl) || - other.originalPostUrl == originalPostUrl) && - (identical(other.originalPostBody, originalPostBody) || - other.originalPostBody == originalPostBody) && + (identical(other.originalPostName, originalPostName) || other.originalPostName == originalPostName) && + (identical(other.originalPostUrl, originalPostUrl) || other.originalPostUrl == originalPostUrl) && + (identical(other.originalPostBody, originalPostBody) || other.originalPostBody == originalPostBody) && (identical(other.reason, reason) || other.reason == reason) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && - (identical(other.resolverId, resolverId) || - other.resolverId == resolverId) && - (identical(other.published, published) || - other.published == published) && + (identical(other.resolved, resolved) || other.resolved == resolved) && + (identical(other.resolverId, resolverId) || other.resolverId == resolverId) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - creatorId, - postId, - originalPostName, - originalPostUrl, - originalPostBody, - reason, - resolved, - resolverId, - published, - updated); + int get hashCode => Object.hash(runtimeType, id, creatorId, postId, originalPostName, originalPostUrl, originalPostBody, reason, resolved, resolverId, published, updated); /// Create a copy of PostReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostReportImplCopyWith<_$PostReportImpl> get copyWith => - __$$PostReportImplCopyWithImpl<_$PostReportImpl>(this, _$identity); + _$$PostReportImplCopyWith<_$PostReportImpl> get copyWith => __$$PostReportImplCopyWithImpl<_$PostReportImpl>(this, _$identity); @override Map toJson() { - return _$$PostReportImplToJson( - this, - ); + return _$$PostReportImplToJson(this); } } abstract class _PostReport extends PostReport { - const factory _PostReport( - {required final int id, - required final int creatorId, - required final int postId, - required final String originalPostName, - final String? originalPostUrl, - final String? originalPostBody, - required final String reason, - required final bool resolved, - final int? resolverId, - required final DateTime published, - final DateTime? updated}) = _$PostReportImpl; + const factory _PostReport({ + required final int id, + required final int creatorId, + required final int postId, + required final String originalPostName, + final String? originalPostUrl, + final String? originalPostBody, + required final String reason, + required final bool resolved, + final int? resolverId, + required final DateTime published, + final DateTime? updated, + }) = _$PostReportImpl; const _PostReport._() : super._(); - factory _PostReport.fromJson(Map json) = - _$PostReportImpl.fromJson; + factory _PostReport.fromJson(Map json) = _$PostReportImpl.fromJson; @override int get id; // v0.18.0 @@ -395,6 +391,5 @@ abstract class _PostReport extends PostReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostReportImplCopyWith<_$PostReportImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostReportImplCopyWith<_$PostReportImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/post_report.g.dart b/lib/src/v3/models/post/post_report.g.dart index 922b46c5..c0b0cec0 100644 --- a/lib/src/v3/models/post/post_report.g.dart +++ b/lib/src/v3/models/post/post_report.g.dart @@ -6,46 +6,34 @@ part of 'post_report.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostReportImpl _$$PostReportImplFromJson(Map json) => - _$PostReportImpl( - id: (json['id'] as num).toInt(), - creatorId: (json['creator_id'] as num).toInt(), - postId: (json['post_id'] as num).toInt(), - originalPostName: json['original_post_name'] as String, - originalPostUrl: json['original_post_url'] as String?, - originalPostBody: json['original_post_body'] as String?, - reason: json['reason'] as String, - resolved: json['resolved'] as bool, - resolverId: (json['resolver_id'] as num?)?.toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$PostReportImpl _$$PostReportImplFromJson(Map json) => _$PostReportImpl( + id: (json['id'] as num).toInt(), + creatorId: (json['creator_id'] as num).toInt(), + postId: (json['post_id'] as num).toInt(), + originalPostName: json['original_post_name'] as String, + originalPostUrl: json['original_post_url'] as String?, + originalPostBody: json['original_post_body'] as String?, + reason: json['reason'] as String, + resolved: json['resolved'] as bool, + resolverId: (json['resolver_id'] as num?)?.toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$PostReportImplToJson(_$PostReportImpl instance) => - { - 'id': instance.id, - 'creator_id': instance.creatorId, - 'post_id': instance.postId, - 'original_post_name': instance.originalPostName, - 'original_post_url': instance.originalPostUrl, - 'original_post_body': instance.originalPostBody, - 'reason': instance.reason, - 'resolved': instance.resolved, - 'resolver_id': instance.resolverId, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$PostReportImplToJson(_$PostReportImpl instance) => { + 'id': instance.id, + 'creator_id': instance.creatorId, + 'post_id': instance.postId, + 'original_post_name': instance.originalPostName, + 'original_post_url': instance.originalPostUrl, + 'original_post_body': instance.originalPostBody, + 'reason': instance.reason, + 'resolved': instance.resolved, + 'resolver_id': instance.resolverId, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/post/post_report_response.dart b/lib/src/v3/models/post/post_report_response.dart index 1b1fe9f3..8684bb86 100644 --- a/lib/src/v3/models/post/post_report_response.dart +++ b/lib/src/v3/models/post/post_report_response.dart @@ -14,6 +14,5 @@ class PostReportResponse with _$PostReportResponse { }) = _PostReportResponse; const PostReportResponse._(); - factory PostReportResponse.fromJson(Map json) => - _$PostReportResponseFromJson(json); + factory PostReportResponse.fromJson(Map json) => _$PostReportResponseFromJson(json); } diff --git a/lib/src/v3/models/post/post_report_response.freezed.dart b/lib/src/v3/models/post/post_report_response.freezed.dart index e10a0956..13106432 100644 --- a/lib/src/v3/models/post/post_report_response.freezed.dart +++ b/lib/src/v3/models/post/post_report_response.freezed.dart @@ -12,7 +12,8 @@ part of 'post_report_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostReportResponse _$PostReportResponseFromJson(Map json) { return _PostReportResponse.fromJson(json); @@ -28,15 +29,12 @@ mixin _$PostReportResponse { /// Create a copy of PostReportResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostReportResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostReportResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostReportResponseCopyWith<$Res> { - factory $PostReportResponseCopyWith( - PostReportResponse value, $Res Function(PostReportResponse) then) = - _$PostReportResponseCopyWithImpl<$Res, PostReportResponse>; + factory $PostReportResponseCopyWith(PostReportResponse value, $Res Function(PostReportResponse) then) = _$PostReportResponseCopyWithImpl<$Res, PostReportResponse>; @useResult $Res call({PostReportView postReportView}); @@ -44,8 +42,7 @@ abstract class $PostReportResponseCopyWith<$Res> { } /// @nodoc -class _$PostReportResponseCopyWithImpl<$Res, $Val extends PostReportResponse> - implements $PostReportResponseCopyWith<$Res> { +class _$PostReportResponseCopyWithImpl<$Res, $Val extends PostReportResponse> implements $PostReportResponseCopyWith<$Res> { _$PostReportResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,15 +54,17 @@ class _$PostReportResponseCopyWithImpl<$Res, $Val extends PostReportResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postReportView = null, - }) { - return _then(_value.copyWith( - postReportView: null == postReportView - ? _value.postReportView - : postReportView // ignore: cast_nullable_to_non_nullable - as PostReportView, - ) as $Val); + $Res call({Object? postReportView = null}) { + return _then( + _value.copyWith( + postReportView: + null == postReportView + ? _value.postReportView + : postReportView // ignore: cast_nullable_to_non_nullable + as PostReportView, + ) + as $Val, + ); } /// Create a copy of PostReportResponse @@ -80,11 +79,8 @@ class _$PostReportResponseCopyWithImpl<$Res, $Val extends PostReportResponse> } /// @nodoc -abstract class _$$PostReportResponseImplCopyWith<$Res> - implements $PostReportResponseCopyWith<$Res> { - factory _$$PostReportResponseImplCopyWith(_$PostReportResponseImpl value, - $Res Function(_$PostReportResponseImpl) then) = - __$$PostReportResponseImplCopyWithImpl<$Res>; +abstract class _$$PostReportResponseImplCopyWith<$Res> implements $PostReportResponseCopyWith<$Res> { + factory _$$PostReportResponseImplCopyWith(_$PostReportResponseImpl value, $Res Function(_$PostReportResponseImpl) then) = __$$PostReportResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PostReportView postReportView}); @@ -94,26 +90,23 @@ abstract class _$$PostReportResponseImplCopyWith<$Res> } /// @nodoc -class __$$PostReportResponseImplCopyWithImpl<$Res> - extends _$PostReportResponseCopyWithImpl<$Res, _$PostReportResponseImpl> - implements _$$PostReportResponseImplCopyWith<$Res> { - __$$PostReportResponseImplCopyWithImpl(_$PostReportResponseImpl _value, - $Res Function(_$PostReportResponseImpl) _then) - : super(_value, _then); +class __$$PostReportResponseImplCopyWithImpl<$Res> extends _$PostReportResponseCopyWithImpl<$Res, _$PostReportResponseImpl> implements _$$PostReportResponseImplCopyWith<$Res> { + __$$PostReportResponseImplCopyWithImpl(_$PostReportResponseImpl _value, $Res Function(_$PostReportResponseImpl) _then) : super(_value, _then); /// Create a copy of PostReportResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postReportView = null, - }) { - return _then(_$PostReportResponseImpl( - postReportView: null == postReportView - ? _value.postReportView - : postReportView // ignore: cast_nullable_to_non_nullable - as PostReportView, - )); + $Res call({Object? postReportView = null}) { + return _then( + _$PostReportResponseImpl( + postReportView: + null == postReportView + ? _value.postReportView + : postReportView // ignore: cast_nullable_to_non_nullable + as PostReportView, + ), + ); } } @@ -123,8 +116,7 @@ class __$$PostReportResponseImplCopyWithImpl<$Res> class _$PostReportResponseImpl extends _PostReportResponse { const _$PostReportResponseImpl({required this.postReportView}) : super._(); - factory _$PostReportResponseImpl.fromJson(Map json) => - _$$PostReportResponseImplFromJson(json); + factory _$PostReportResponseImpl.fromJson(Map json) => _$$PostReportResponseImplFromJson(json); @override final PostReportView postReportView; @@ -137,10 +129,7 @@ class _$PostReportResponseImpl extends _PostReportResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PostReportResponseImpl && - (identical(other.postReportView, postReportView) || - other.postReportView == postReportView)); + (other.runtimeType == runtimeType && other is _$PostReportResponseImpl && (identical(other.postReportView, postReportView) || other.postReportView == postReportView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -152,26 +141,19 @@ class _$PostReportResponseImpl extends _PostReportResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostReportResponseImplCopyWith<_$PostReportResponseImpl> get copyWith => - __$$PostReportResponseImplCopyWithImpl<_$PostReportResponseImpl>( - this, _$identity); + _$$PostReportResponseImplCopyWith<_$PostReportResponseImpl> get copyWith => __$$PostReportResponseImplCopyWithImpl<_$PostReportResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PostReportResponseImplToJson( - this, - ); + return _$$PostReportResponseImplToJson(this); } } abstract class _PostReportResponse extends PostReportResponse { - const factory _PostReportResponse( - {required final PostReportView postReportView}) = - _$PostReportResponseImpl; + const factory _PostReportResponse({required final PostReportView postReportView}) = _$PostReportResponseImpl; const _PostReportResponse._() : super._(); - factory _PostReportResponse.fromJson(Map json) = - _$PostReportResponseImpl.fromJson; + factory _PostReportResponse.fromJson(Map json) = _$PostReportResponseImpl.fromJson; @override PostReportView get postReportView; @@ -180,6 +162,5 @@ abstract class _PostReportResponse extends PostReportResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostReportResponseImplCopyWith<_$PostReportResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostReportResponseImplCopyWith<_$PostReportResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/post_report_response.g.dart b/lib/src/v3/models/post/post_report_response.g.dart index 41471571..6b680a2a 100644 --- a/lib/src/v3/models/post/post_report_response.g.dart +++ b/lib/src/v3/models/post/post_report_response.g.dart @@ -6,15 +6,7 @@ part of 'post_report_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostReportResponseImpl _$$PostReportResponseImplFromJson( - Map json) => - _$PostReportResponseImpl( - postReportView: PostReportView.fromJson( - json['post_report_view'] as Map), - ); +_$PostReportResponseImpl _$$PostReportResponseImplFromJson(Map json) => + _$PostReportResponseImpl(postReportView: PostReportView.fromJson(json['post_report_view'] as Map)); -Map _$$PostReportResponseImplToJson( - _$PostReportResponseImpl instance) => - { - 'post_report_view': instance.postReportView.toJson(), - }; +Map _$$PostReportResponseImplToJson(_$PostReportResponseImpl instance) => {'post_report_view': instance.postReportView.toJson()}; diff --git a/lib/src/v3/models/post/post_response.dart b/lib/src/v3/models/post/post_response.dart index f2e71678..9db08f0d 100644 --- a/lib/src/v3/models/post/post_response.dart +++ b/lib/src/v3/models/post/post_response.dart @@ -14,6 +14,5 @@ class PostResponse with _$PostResponse { }) = _PostResponse; const PostResponse._(); - factory PostResponse.fromJson(Map json) => - _$PostResponseFromJson(json); + factory PostResponse.fromJson(Map json) => _$PostResponseFromJson(json); } diff --git a/lib/src/v3/models/post/post_response.freezed.dart b/lib/src/v3/models/post/post_response.freezed.dart index 8032cacb..26cccbc5 100644 --- a/lib/src/v3/models/post/post_response.freezed.dart +++ b/lib/src/v3/models/post/post_response.freezed.dart @@ -12,7 +12,8 @@ part of 'post_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostResponse _$PostResponseFromJson(Map json) { return _PostResponse.fromJson(json); @@ -28,15 +29,12 @@ mixin _$PostResponse { /// Create a copy of PostResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostResponseCopyWith<$Res> { - factory $PostResponseCopyWith( - PostResponse value, $Res Function(PostResponse) then) = - _$PostResponseCopyWithImpl<$Res, PostResponse>; + factory $PostResponseCopyWith(PostResponse value, $Res Function(PostResponse) then) = _$PostResponseCopyWithImpl<$Res, PostResponse>; @useResult $Res call({PostView postView}); @@ -44,8 +42,7 @@ abstract class $PostResponseCopyWith<$Res> { } /// @nodoc -class _$PostResponseCopyWithImpl<$Res, $Val extends PostResponse> - implements $PostResponseCopyWith<$Res> { +class _$PostResponseCopyWithImpl<$Res, $Val extends PostResponse> implements $PostResponseCopyWith<$Res> { _$PostResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,15 +54,17 @@ class _$PostResponseCopyWithImpl<$Res, $Val extends PostResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = null, - }) { - return _then(_value.copyWith( - postView: null == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView, - ) as $Val); + $Res call({Object? postView = null}) { + return _then( + _value.copyWith( + postView: + null == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView, + ) + as $Val, + ); } /// Create a copy of PostResponse @@ -80,11 +79,8 @@ class _$PostResponseCopyWithImpl<$Res, $Val extends PostResponse> } /// @nodoc -abstract class _$$PostResponseImplCopyWith<$Res> - implements $PostResponseCopyWith<$Res> { - factory _$$PostResponseImplCopyWith( - _$PostResponseImpl value, $Res Function(_$PostResponseImpl) then) = - __$$PostResponseImplCopyWithImpl<$Res>; +abstract class _$$PostResponseImplCopyWith<$Res> implements $PostResponseCopyWith<$Res> { + factory _$$PostResponseImplCopyWith(_$PostResponseImpl value, $Res Function(_$PostResponseImpl) then) = __$$PostResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PostView postView}); @@ -94,26 +90,23 @@ abstract class _$$PostResponseImplCopyWith<$Res> } /// @nodoc -class __$$PostResponseImplCopyWithImpl<$Res> - extends _$PostResponseCopyWithImpl<$Res, _$PostResponseImpl> - implements _$$PostResponseImplCopyWith<$Res> { - __$$PostResponseImplCopyWithImpl( - _$PostResponseImpl _value, $Res Function(_$PostResponseImpl) _then) - : super(_value, _then); +class __$$PostResponseImplCopyWithImpl<$Res> extends _$PostResponseCopyWithImpl<$Res, _$PostResponseImpl> implements _$$PostResponseImplCopyWith<$Res> { + __$$PostResponseImplCopyWithImpl(_$PostResponseImpl _value, $Res Function(_$PostResponseImpl) _then) : super(_value, _then); /// Create a copy of PostResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? postView = null, - }) { - return _then(_$PostResponseImpl( - postView: null == postView - ? _value.postView - : postView // ignore: cast_nullable_to_non_nullable - as PostView, - )); + $Res call({Object? postView = null}) { + return _then( + _$PostResponseImpl( + postView: + null == postView + ? _value.postView + : postView // ignore: cast_nullable_to_non_nullable + as PostView, + ), + ); } } @@ -123,8 +116,7 @@ class __$$PostResponseImplCopyWithImpl<$Res> class _$PostResponseImpl extends _PostResponse { const _$PostResponseImpl({required this.postView}) : super._(); - factory _$PostResponseImpl.fromJson(Map json) => - _$$PostResponseImplFromJson(json); + factory _$PostResponseImpl.fromJson(Map json) => _$$PostResponseImplFromJson(json); @override final PostView postView; @@ -136,11 +128,7 @@ class _$PostResponseImpl extends _PostResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PostResponseImpl && - (identical(other.postView, postView) || - other.postView == postView)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$PostResponseImpl && (identical(other.postView, postView) || other.postView == postView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -152,24 +140,19 @@ class _$PostResponseImpl extends _PostResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostResponseImplCopyWith<_$PostResponseImpl> get copyWith => - __$$PostResponseImplCopyWithImpl<_$PostResponseImpl>(this, _$identity); + _$$PostResponseImplCopyWith<_$PostResponseImpl> get copyWith => __$$PostResponseImplCopyWithImpl<_$PostResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PostResponseImplToJson( - this, - ); + return _$$PostResponseImplToJson(this); } } abstract class _PostResponse extends PostResponse { - const factory _PostResponse({required final PostView postView}) = - _$PostResponseImpl; + const factory _PostResponse({required final PostView postView}) = _$PostResponseImpl; const _PostResponse._() : super._(); - factory _PostResponse.fromJson(Map json) = - _$PostResponseImpl.fromJson; + factory _PostResponse.fromJson(Map json) = _$PostResponseImpl.fromJson; @override PostView get postView; @@ -178,6 +161,5 @@ abstract class _PostResponse extends PostResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostResponseImplCopyWith<_$PostResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostResponseImplCopyWith<_$PostResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/post/post_response.g.dart b/lib/src/v3/models/post/post_response.g.dart index c782ccfd..f45cc201 100644 --- a/lib/src/v3/models/post/post_response.g.dart +++ b/lib/src/v3/models/post/post_response.g.dart @@ -6,12 +6,6 @@ part of 'post_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostResponseImpl _$$PostResponseImplFromJson(Map json) => - _$PostResponseImpl( - postView: PostView.fromJson(json['post_view'] as Map), - ); +_$PostResponseImpl _$$PostResponseImplFromJson(Map json) => _$PostResponseImpl(postView: PostView.fromJson(json['post_view'] as Map)); -Map _$$PostResponseImplToJson(_$PostResponseImpl instance) => - { - 'post_view': instance.postView.toJson(), - }; +Map _$$PostResponseImplToJson(_$PostResponseImpl instance) => {'post_view': instance.postView.toJson()}; diff --git a/lib/src/v3/models/private_message/list_private_message_reports_response.dart b/lib/src/v3/models/private_message/list_private_message_reports_response.dart index 4ece4bbd..e96793c7 100644 --- a/lib/src/v3/models/private_message/list_private_message_reports_response.dart +++ b/lib/src/v3/models/private_message/list_private_message_reports_response.dart @@ -7,16 +7,12 @@ part 'list_private_message_reports_response.freezed.dart'; part 'list_private_message_reports_response.g.dart'; @freezed -class ListPrivateMessageReportsResponse - with _$ListPrivateMessageReportsResponse { +class ListPrivateMessageReportsResponse with _$ListPrivateMessageReportsResponse { @modelSerde const factory ListPrivateMessageReportsResponse({ required List privateMessageReports, // v0.18.0 }) = _ListPrivateMessageReportsResponse; const ListPrivateMessageReportsResponse._(); - factory ListPrivateMessageReportsResponse.fromJson( - Map json, - ) => - _$ListPrivateMessageReportsResponseFromJson(json); + factory ListPrivateMessageReportsResponse.fromJson(Map json) => _$ListPrivateMessageReportsResponseFromJson(json); } diff --git a/lib/src/v3/models/private_message/list_private_message_reports_response.freezed.dart b/lib/src/v3/models/private_message/list_private_message_reports_response.freezed.dart index 69787f32..a66c0c9e 100644 --- a/lib/src/v3/models/private_message/list_private_message_reports_response.freezed.dart +++ b/lib/src/v3/models/private_message/list_private_message_reports_response.freezed.dart @@ -12,17 +12,16 @@ part of 'list_private_message_reports_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ListPrivateMessageReportsResponse _$ListPrivateMessageReportsResponseFromJson( - Map json) { +ListPrivateMessageReportsResponse _$ListPrivateMessageReportsResponseFromJson(Map json) { return _ListPrivateMessageReportsResponse.fromJson(json); } /// @nodoc mixin _$ListPrivateMessageReportsResponse { - List get privateMessageReports => - throw _privateConstructorUsedError; + List get privateMessageReports => throw _privateConstructorUsedError; /// Serializes this ListPrivateMessageReportsResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,25 +29,19 @@ mixin _$ListPrivateMessageReportsResponse { /// Create a copy of ListPrivateMessageReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListPrivateMessageReportsResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $ListPrivateMessageReportsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListPrivateMessageReportsResponseCopyWith<$Res> { - factory $ListPrivateMessageReportsResponseCopyWith( - ListPrivateMessageReportsResponse value, - $Res Function(ListPrivateMessageReportsResponse) then) = - _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, - ListPrivateMessageReportsResponse>; + factory $ListPrivateMessageReportsResponseCopyWith(ListPrivateMessageReportsResponse value, $Res Function(ListPrivateMessageReportsResponse) then) = + _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, ListPrivateMessageReportsResponse>; @useResult $Res call({List privateMessageReports}); } /// @nodoc -class _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, - $Val extends ListPrivateMessageReportsResponse> - implements $ListPrivateMessageReportsResponseCopyWith<$Res> { +class _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, $Val extends ListPrivateMessageReportsResponse> implements $ListPrivateMessageReportsResponseCopyWith<$Res> { _$ListPrivateMessageReportsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,24 +53,23 @@ class _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReports = null, - }) { - return _then(_value.copyWith( - privateMessageReports: null == privateMessageReports - ? _value.privateMessageReports - : privateMessageReports // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? privateMessageReports = null}) { + return _then( + _value.copyWith( + privateMessageReports: + null == privateMessageReports + ? _value.privateMessageReports + : privateMessageReports // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListPrivateMessageReportsResponseImplCopyWith<$Res> - implements $ListPrivateMessageReportsResponseCopyWith<$Res> { - factory _$$ListPrivateMessageReportsResponseImplCopyWith( - _$ListPrivateMessageReportsResponseImpl value, - $Res Function(_$ListPrivateMessageReportsResponseImpl) then) = +abstract class _$$ListPrivateMessageReportsResponseImplCopyWith<$Res> implements $ListPrivateMessageReportsResponseCopyWith<$Res> { + factory _$$ListPrivateMessageReportsResponseImplCopyWith(_$ListPrivateMessageReportsResponseImpl value, $Res Function(_$ListPrivateMessageReportsResponseImpl) then) = __$$ListPrivateMessageReportsResponseImplCopyWithImpl<$Res>; @override @useResult @@ -85,50 +77,39 @@ abstract class _$$ListPrivateMessageReportsResponseImplCopyWith<$Res> } /// @nodoc -class __$$ListPrivateMessageReportsResponseImplCopyWithImpl<$Res> - extends _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, - _$ListPrivateMessageReportsResponseImpl> +class __$$ListPrivateMessageReportsResponseImplCopyWithImpl<$Res> extends _$ListPrivateMessageReportsResponseCopyWithImpl<$Res, _$ListPrivateMessageReportsResponseImpl> implements _$$ListPrivateMessageReportsResponseImplCopyWith<$Res> { - __$$ListPrivateMessageReportsResponseImplCopyWithImpl( - _$ListPrivateMessageReportsResponseImpl _value, - $Res Function(_$ListPrivateMessageReportsResponseImpl) _then) - : super(_value, _then); + __$$ListPrivateMessageReportsResponseImplCopyWithImpl(_$ListPrivateMessageReportsResponseImpl _value, $Res Function(_$ListPrivateMessageReportsResponseImpl) _then) : super(_value, _then); /// Create a copy of ListPrivateMessageReportsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReports = null, - }) { - return _then(_$ListPrivateMessageReportsResponseImpl( - privateMessageReports: null == privateMessageReports - ? _value._privateMessageReports - : privateMessageReports // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? privateMessageReports = null}) { + return _then( + _$ListPrivateMessageReportsResponseImpl( + privateMessageReports: + null == privateMessageReports + ? _value._privateMessageReports + : privateMessageReports // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @modelSerde -class _$ListPrivateMessageReportsResponseImpl - extends _ListPrivateMessageReportsResponse { - const _$ListPrivateMessageReportsResponseImpl( - {required final List privateMessageReports}) - : _privateMessageReports = privateMessageReports, - super._(); +class _$ListPrivateMessageReportsResponseImpl extends _ListPrivateMessageReportsResponse { + const _$ListPrivateMessageReportsResponseImpl({required final List privateMessageReports}) : _privateMessageReports = privateMessageReports, super._(); - factory _$ListPrivateMessageReportsResponseImpl.fromJson( - Map json) => - _$$ListPrivateMessageReportsResponseImplFromJson(json); + factory _$ListPrivateMessageReportsResponseImpl.fromJson(Map json) => _$$ListPrivateMessageReportsResponseImplFromJson(json); final List _privateMessageReports; @override List get privateMessageReports { - if (_privateMessageReports is EqualUnmodifiableListView) - return _privateMessageReports; + if (_privateMessageReports is EqualUnmodifiableListView) return _privateMessageReports; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_privateMessageReports); } @@ -141,45 +122,32 @@ class _$ListPrivateMessageReportsResponseImpl @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListPrivateMessageReportsResponseImpl && - const DeepCollectionEquality() - .equals(other._privateMessageReports, _privateMessageReports)); + (other.runtimeType == runtimeType && other is _$ListPrivateMessageReportsResponseImpl && const DeepCollectionEquality().equals(other._privateMessageReports, _privateMessageReports)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_privateMessageReports)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_privateMessageReports)); /// Create a copy of ListPrivateMessageReportsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListPrivateMessageReportsResponseImplCopyWith< - _$ListPrivateMessageReportsResponseImpl> - get copyWith => __$$ListPrivateMessageReportsResponseImplCopyWithImpl< - _$ListPrivateMessageReportsResponseImpl>(this, _$identity); + _$$ListPrivateMessageReportsResponseImplCopyWith<_$ListPrivateMessageReportsResponseImpl> get copyWith => + __$$ListPrivateMessageReportsResponseImplCopyWithImpl<_$ListPrivateMessageReportsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListPrivateMessageReportsResponseImplToJson( - this, - ); + return _$$ListPrivateMessageReportsResponseImplToJson(this); } } -abstract class _ListPrivateMessageReportsResponse - extends ListPrivateMessageReportsResponse { - const factory _ListPrivateMessageReportsResponse( - {required final List - privateMessageReports}) = _$ListPrivateMessageReportsResponseImpl; +abstract class _ListPrivateMessageReportsResponse extends ListPrivateMessageReportsResponse { + const factory _ListPrivateMessageReportsResponse({required final List privateMessageReports}) = _$ListPrivateMessageReportsResponseImpl; const _ListPrivateMessageReportsResponse._() : super._(); - factory _ListPrivateMessageReportsResponse.fromJson( - Map json) = - _$ListPrivateMessageReportsResponseImpl.fromJson; + factory _ListPrivateMessageReportsResponse.fromJson(Map json) = _$ListPrivateMessageReportsResponseImpl.fromJson; @override List get privateMessageReports; @@ -188,7 +156,5 @@ abstract class _ListPrivateMessageReportsResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListPrivateMessageReportsResponseImplCopyWith< - _$ListPrivateMessageReportsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ListPrivateMessageReportsResponseImplCopyWith<_$ListPrivateMessageReportsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/list_private_message_reports_response.g.dart b/lib/src/v3/models/private_message/list_private_message_reports_response.g.dart index 444afd4b..e3ea770b 100644 --- a/lib/src/v3/models/private_message/list_private_message_reports_response.g.dart +++ b/lib/src/v3/models/private_message/list_private_message_reports_response.g.dart @@ -6,20 +6,10 @@ part of 'list_private_message_reports_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListPrivateMessageReportsResponseImpl - _$$ListPrivateMessageReportsResponseImplFromJson( - Map json) => - _$ListPrivateMessageReportsResponseImpl( - privateMessageReports: (json['private_message_reports'] - as List) - .map((e) => - PrivateMessageReportView.fromJson(e as Map)) - .toList(), - ); +_$ListPrivateMessageReportsResponseImpl _$$ListPrivateMessageReportsResponseImplFromJson(Map json) => _$ListPrivateMessageReportsResponseImpl( + privateMessageReports: (json['private_message_reports'] as List).map((e) => PrivateMessageReportView.fromJson(e as Map)).toList(), +); -Map _$$ListPrivateMessageReportsResponseImplToJson( - _$ListPrivateMessageReportsResponseImpl instance) => - { - 'private_message_reports': - instance.privateMessageReports.map((e) => e.toJson()).toList(), - }; +Map _$$ListPrivateMessageReportsResponseImplToJson(_$ListPrivateMessageReportsResponseImpl instance) => { + 'private_message_reports': instance.privateMessageReports.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/private_message/private_message.dart b/lib/src/v3/models/private_message/private_message.dart index e46cb53b..6f7c31e0 100644 --- a/lib/src/v3/models/private_message/private_message.dart +++ b/lib/src/v3/models/private_message/private_message.dart @@ -23,6 +23,5 @@ class PrivateMessage with _$PrivateMessage { }) = _PrivateMessage; const PrivateMessage._(); - factory PrivateMessage.fromJson(Map json) => - _$PrivateMessageFromJson(json); + factory PrivateMessage.fromJson(Map json) => _$PrivateMessageFromJson(json); } diff --git a/lib/src/v3/models/private_message/private_message.freezed.dart b/lib/src/v3/models/private_message/private_message.freezed.dart index 47f3a7ef..a0ade439 100644 --- a/lib/src/v3/models/private_message/private_message.freezed.dart +++ b/lib/src/v3/models/private_message/private_message.freezed.dart @@ -12,7 +12,8 @@ part of 'private_message.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PrivateMessage _$PrivateMessageFromJson(Map json) { return _PrivateMessage.fromJson(json); @@ -37,32 +38,18 @@ mixin _$PrivateMessage { /// Create a copy of PrivateMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessageCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageCopyWith<$Res> { - factory $PrivateMessageCopyWith( - PrivateMessage value, $Res Function(PrivateMessage) then) = - _$PrivateMessageCopyWithImpl<$Res, PrivateMessage>; + factory $PrivateMessageCopyWith(PrivateMessage value, $Res Function(PrivateMessage) then) = _$PrivateMessageCopyWithImpl<$Res, PrivateMessage>; @useResult - $Res call( - {int id, - int creatorId, - int recipientId, - String content, - bool deleted, - bool read, - DateTime published, - DateTime? updated, - String apId, - bool local}); + $Res call({int id, int creatorId, int recipientId, String content, bool deleted, bool read, DateTime published, DateTime? updated, String apId, bool local}); } /// @nodoc -class _$PrivateMessageCopyWithImpl<$Res, $Val extends PrivateMessage> - implements $PrivateMessageCopyWith<$Res> { +class _$PrivateMessageCopyWithImpl<$Res, $Val extends PrivateMessage> implements $PrivateMessageCopyWith<$Res> { _$PrivateMessageCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -86,79 +73,75 @@ class _$PrivateMessageCopyWithImpl<$Res, $Val extends PrivateMessage> Object? apId = null, Object? local = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PrivateMessageImplCopyWith<$Res> - implements $PrivateMessageCopyWith<$Res> { - factory _$$PrivateMessageImplCopyWith(_$PrivateMessageImpl value, - $Res Function(_$PrivateMessageImpl) then) = - __$$PrivateMessageImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessageImplCopyWith<$Res> implements $PrivateMessageCopyWith<$Res> { + factory _$$PrivateMessageImplCopyWith(_$PrivateMessageImpl value, $Res Function(_$PrivateMessageImpl) then) = __$$PrivateMessageImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int creatorId, - int recipientId, - String content, - bool deleted, - bool read, - DateTime published, - DateTime? updated, - String apId, - bool local}); + $Res call({int id, int creatorId, int recipientId, String content, bool deleted, bool read, DateTime published, DateTime? updated, String apId, bool local}); } /// @nodoc -class __$$PrivateMessageImplCopyWithImpl<$Res> - extends _$PrivateMessageCopyWithImpl<$Res, _$PrivateMessageImpl> - implements _$$PrivateMessageImplCopyWith<$Res> { - __$$PrivateMessageImplCopyWithImpl( - _$PrivateMessageImpl _value, $Res Function(_$PrivateMessageImpl) _then) - : super(_value, _then); +class __$$PrivateMessageImplCopyWithImpl<$Res> extends _$PrivateMessageCopyWithImpl<$Res, _$PrivateMessageImpl> implements _$$PrivateMessageImplCopyWith<$Res> { + __$$PrivateMessageImplCopyWithImpl(_$PrivateMessageImpl _value, $Res Function(_$PrivateMessageImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessage /// with the given fields replaced by the non-null parameter values. @@ -176,48 +159,60 @@ class __$$PrivateMessageImplCopyWithImpl<$Res> Object? apId = null, Object? local = null, }) { - return _then(_$PrivateMessageImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - recipientId: null == recipientId - ? _value.recipientId - : recipientId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - deleted: null == deleted - ? _value.deleted - : deleted // ignore: cast_nullable_to_non_nullable - as bool, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - apId: null == apId - ? _value.apId - : apId // ignore: cast_nullable_to_non_nullable - as String, - local: null == local - ? _value.local - : local // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$PrivateMessageImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + recipientId: + null == recipientId + ? _value.recipientId + : recipientId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + deleted: + null == deleted + ? _value.deleted + : deleted // ignore: cast_nullable_to_non_nullable + as bool, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + apId: + null == apId + ? _value.apId + : apId // ignore: cast_nullable_to_non_nullable + as String, + local: + null == local + ? _value.local + : local // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -225,49 +220,48 @@ class __$$PrivateMessageImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageImpl extends _PrivateMessage { - const _$PrivateMessageImpl( - {required this.id, - required this.creatorId, - required this.recipientId, - required this.content, - required this.deleted, - required this.read, - required this.published, - this.updated, - required this.apId, - required this.local}) - : super._(); + const _$PrivateMessageImpl({ + required this.id, + required this.creatorId, + required this.recipientId, + required this.content, + required this.deleted, + required this.read, + required this.published, + this.updated, + required this.apId, + required this.local, + }) : super._(); - factory _$PrivateMessageImpl.fromJson(Map json) => - _$$PrivateMessageImplFromJson(json); + factory _$PrivateMessageImpl.fromJson(Map json) => _$$PrivateMessageImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int recipientId; -// v0.18.0 + // v0.18.0 @override final String content; -// v0.18.0 + // v0.18.0 @override final bool deleted; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final String apId; -// v0.18.0 + // v0.18.0 @override final bool local; @@ -282,15 +276,12 @@ class _$PrivateMessageImpl extends _PrivateMessage { (other.runtimeType == runtimeType && other is _$PrivateMessageImpl && (identical(other.id, id) || other.id == id) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && - (identical(other.recipientId, recipientId) || - other.recipientId == recipientId) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && + (identical(other.recipientId, recipientId) || other.recipientId == recipientId) && (identical(other.content, content) || other.content == content) && (identical(other.deleted, deleted) || other.deleted == deleted) && (identical(other.read, read) || other.read == read) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.apId, apId) || other.apId == apId) && (identical(other.local, local) || other.local == local)); @@ -298,42 +289,37 @@ class _$PrivateMessageImpl extends _PrivateMessage { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, creatorId, recipientId, - content, deleted, read, published, updated, apId, local); + int get hashCode => Object.hash(runtimeType, id, creatorId, recipientId, content, deleted, read, published, updated, apId, local); /// Create a copy of PrivateMessage /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageImplCopyWith<_$PrivateMessageImpl> get copyWith => - __$$PrivateMessageImplCopyWithImpl<_$PrivateMessageImpl>( - this, _$identity); + _$$PrivateMessageImplCopyWith<_$PrivateMessageImpl> get copyWith => __$$PrivateMessageImplCopyWithImpl<_$PrivateMessageImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageImplToJson( - this, - ); + return _$$PrivateMessageImplToJson(this); } } abstract class _PrivateMessage extends PrivateMessage { - const factory _PrivateMessage( - {required final int id, - required final int creatorId, - required final int recipientId, - required final String content, - required final bool deleted, - required final bool read, - required final DateTime published, - final DateTime? updated, - required final String apId, - required final bool local}) = _$PrivateMessageImpl; + const factory _PrivateMessage({ + required final int id, + required final int creatorId, + required final int recipientId, + required final String content, + required final bool deleted, + required final bool read, + required final DateTime published, + final DateTime? updated, + required final String apId, + required final bool local, + }) = _$PrivateMessageImpl; const _PrivateMessage._() : super._(); - factory _PrivateMessage.fromJson(Map json) = - _$PrivateMessageImpl.fromJson; + factory _PrivateMessage.fromJson(Map json) = _$PrivateMessageImpl.fromJson; @override int get id; // v0.18.0 @@ -360,6 +346,5 @@ abstract class _PrivateMessage extends PrivateMessage { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageImplCopyWith<_$PrivateMessageImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PrivateMessageImplCopyWith<_$PrivateMessageImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/private_message.g.dart b/lib/src/v3/models/private_message/private_message.g.dart index 8f25dae4..d77de66c 100644 --- a/lib/src/v3/models/private_message/private_message.g.dart +++ b/lib/src/v3/models/private_message/private_message.g.dart @@ -6,45 +6,32 @@ part of 'private_message.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageImpl _$$PrivateMessageImplFromJson(Map json) => - _$PrivateMessageImpl( - id: (json['id'] as num).toInt(), - creatorId: (json['creator_id'] as num).toInt(), - recipientId: (json['recipient_id'] as num).toInt(), - content: json['content'] as String, - deleted: json['deleted'] as bool, - read: json['read'] as bool, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - apId: json['ap_id'] as String, - local: json['local'] as bool, - ); +_$PrivateMessageImpl _$$PrivateMessageImplFromJson(Map json) => _$PrivateMessageImpl( + id: (json['id'] as num).toInt(), + creatorId: (json['creator_id'] as num).toInt(), + recipientId: (json['recipient_id'] as num).toInt(), + content: json['content'] as String, + deleted: json['deleted'] as bool, + read: json['read'] as bool, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + apId: json['ap_id'] as String, + local: json['local'] as bool, +); -Map _$$PrivateMessageImplToJson( - _$PrivateMessageImpl instance) => - { - 'id': instance.id, - 'creator_id': instance.creatorId, - 'recipient_id': instance.recipientId, - 'content': instance.content, - 'deleted': instance.deleted, - 'read': instance.read, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'ap_id': instance.apId, - 'local': instance.local, - }; +Map _$$PrivateMessageImplToJson(_$PrivateMessageImpl instance) => { + 'id': instance.id, + 'creator_id': instance.creatorId, + 'recipient_id': instance.recipientId, + 'content': instance.content, + 'deleted': instance.deleted, + 'read': instance.read, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'ap_id': instance.apId, + 'local': instance.local, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/private_message/private_message_report.dart b/lib/src/v3/models/private_message/private_message_report.dart index cb06945d..afd1daf8 100644 --- a/lib/src/v3/models/private_message/private_message_report.dart +++ b/lib/src/v3/models/private_message/private_message_report.dart @@ -22,6 +22,5 @@ class PrivateMessageReport with _$PrivateMessageReport { }) = _PrivateMessageReport; const PrivateMessageReport._(); - factory PrivateMessageReport.fromJson(Map json) => - _$PrivateMessageReportFromJson(json); + factory PrivateMessageReport.fromJson(Map json) => _$PrivateMessageReportFromJson(json); } diff --git a/lib/src/v3/models/private_message/private_message_report.freezed.dart b/lib/src/v3/models/private_message/private_message_report.freezed.dart index 864c461a..8bb707a2 100644 --- a/lib/src/v3/models/private_message/private_message_report.freezed.dart +++ b/lib/src/v3/models/private_message/private_message_report.freezed.dart @@ -12,7 +12,8 @@ part of 'private_message_report.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PrivateMessageReport _$PrivateMessageReportFromJson(Map json) { return _PrivateMessageReport.fromJson(json); @@ -36,32 +37,18 @@ mixin _$PrivateMessageReport { /// Create a copy of PrivateMessageReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageReportCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessageReportCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageReportCopyWith<$Res> { - factory $PrivateMessageReportCopyWith(PrivateMessageReport value, - $Res Function(PrivateMessageReport) then) = - _$PrivateMessageReportCopyWithImpl<$Res, PrivateMessageReport>; + factory $PrivateMessageReportCopyWith(PrivateMessageReport value, $Res Function(PrivateMessageReport) then) = _$PrivateMessageReportCopyWithImpl<$Res, PrivateMessageReport>; @useResult - $Res call( - {int id, - int creatorId, - int privateMessageId, - String originalPmText, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({int id, int creatorId, int privateMessageId, String originalPmText, String reason, bool resolved, int? resolverId, DateTime published, DateTime? updated}); } /// @nodoc -class _$PrivateMessageReportCopyWithImpl<$Res, - $Val extends PrivateMessageReport> - implements $PrivateMessageReportCopyWith<$Res> { +class _$PrivateMessageReportCopyWithImpl<$Res, $Val extends PrivateMessageReport> implements $PrivateMessageReportCopyWith<$Res> { _$PrivateMessageReportCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -84,74 +71,70 @@ class _$PrivateMessageReportCopyWithImpl<$Res, Object? published = null, Object? updated = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - originalPmText: null == originalPmText - ? _value.originalPmText - : originalPmText // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + originalPmText: + null == originalPmText + ? _value.originalPmText + : originalPmText // ignore: cast_nullable_to_non_nullable + as String, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PrivateMessageReportImplCopyWith<$Res> - implements $PrivateMessageReportCopyWith<$Res> { - factory _$$PrivateMessageReportImplCopyWith(_$PrivateMessageReportImpl value, - $Res Function(_$PrivateMessageReportImpl) then) = - __$$PrivateMessageReportImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessageReportImplCopyWith<$Res> implements $PrivateMessageReportCopyWith<$Res> { + factory _$$PrivateMessageReportImplCopyWith(_$PrivateMessageReportImpl value, $Res Function(_$PrivateMessageReportImpl) then) = __$$PrivateMessageReportImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int creatorId, - int privateMessageId, - String originalPmText, - String reason, - bool resolved, - int? resolverId, - DateTime published, - DateTime? updated}); + $Res call({int id, int creatorId, int privateMessageId, String originalPmText, String reason, bool resolved, int? resolverId, DateTime published, DateTime? updated}); } /// @nodoc -class __$$PrivateMessageReportImplCopyWithImpl<$Res> - extends _$PrivateMessageReportCopyWithImpl<$Res, _$PrivateMessageReportImpl> - implements _$$PrivateMessageReportImplCopyWith<$Res> { - __$$PrivateMessageReportImplCopyWithImpl(_$PrivateMessageReportImpl _value, - $Res Function(_$PrivateMessageReportImpl) _then) - : super(_value, _then); +class __$$PrivateMessageReportImplCopyWithImpl<$Res> extends _$PrivateMessageReportCopyWithImpl<$Res, _$PrivateMessageReportImpl> implements _$$PrivateMessageReportImplCopyWith<$Res> { + __$$PrivateMessageReportImplCopyWithImpl(_$PrivateMessageReportImpl _value, $Res Function(_$PrivateMessageReportImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessageReport /// with the given fields replaced by the non-null parameter values. @@ -168,44 +151,55 @@ class __$$PrivateMessageReportImplCopyWithImpl<$Res> Object? published = null, Object? updated = freezed, }) { - return _then(_$PrivateMessageReportImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - creatorId: null == creatorId - ? _value.creatorId - : creatorId // ignore: cast_nullable_to_non_nullable - as int, - privateMessageId: null == privateMessageId - ? _value.privateMessageId - : privateMessageId // ignore: cast_nullable_to_non_nullable - as int, - originalPmText: null == originalPmText - ? _value.originalPmText - : originalPmText // ignore: cast_nullable_to_non_nullable - as String, - reason: null == reason - ? _value.reason - : reason // ignore: cast_nullable_to_non_nullable - as String, - resolved: null == resolved - ? _value.resolved - : resolved // ignore: cast_nullable_to_non_nullable - as bool, - resolverId: freezed == resolverId - ? _value.resolverId - : resolverId // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + return _then( + _$PrivateMessageReportImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + creatorId: + null == creatorId + ? _value.creatorId + : creatorId // ignore: cast_nullable_to_non_nullable + as int, + privateMessageId: + null == privateMessageId + ? _value.privateMessageId + : privateMessageId // ignore: cast_nullable_to_non_nullable + as int, + originalPmText: + null == originalPmText + ? _value.originalPmText + : originalPmText // ignore: cast_nullable_to_non_nullable + as String, + reason: + null == reason + ? _value.reason + : reason // ignore: cast_nullable_to_non_nullable + as String, + resolved: + null == resolved + ? _value.resolved + : resolved // ignore: cast_nullable_to_non_nullable + as bool, + resolverId: + freezed == resolverId + ? _value.resolverId + : resolverId // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -213,45 +207,44 @@ class __$$PrivateMessageReportImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageReportImpl extends _PrivateMessageReport { - const _$PrivateMessageReportImpl( - {required this.id, - required this.creatorId, - required this.privateMessageId, - required this.originalPmText, - required this.reason, - required this.resolved, - this.resolverId, - required this.published, - this.updated}) - : super._(); + const _$PrivateMessageReportImpl({ + required this.id, + required this.creatorId, + required this.privateMessageId, + required this.originalPmText, + required this.reason, + required this.resolved, + this.resolverId, + required this.published, + this.updated, + }) : super._(); - factory _$PrivateMessageReportImpl.fromJson(Map json) => - _$$PrivateMessageReportImplFromJson(json); + factory _$PrivateMessageReportImpl.fromJson(Map json) => _$$PrivateMessageReportImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int creatorId; -// v0.18.0 + // v0.18.0 @override final int privateMessageId; -// v0.18.0 + // v0.18.0 @override final String originalPmText; -// v0.18.0 + // v0.18.0 @override final String reason; -// v0.18.0 + // v0.18.0 @override final bool resolved; -// v0.18.0 + // v0.18.0 @override final int? resolverId; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; @@ -266,60 +259,48 @@ class _$PrivateMessageReportImpl extends _PrivateMessageReport { (other.runtimeType == runtimeType && other is _$PrivateMessageReportImpl && (identical(other.id, id) || other.id == id) && - (identical(other.creatorId, creatorId) || - other.creatorId == creatorId) && - (identical(other.privateMessageId, privateMessageId) || - other.privateMessageId == privateMessageId) && - (identical(other.originalPmText, originalPmText) || - other.originalPmText == originalPmText) && + (identical(other.creatorId, creatorId) || other.creatorId == creatorId) && + (identical(other.privateMessageId, privateMessageId) || other.privateMessageId == privateMessageId) && + (identical(other.originalPmText, originalPmText) || other.originalPmText == originalPmText) && (identical(other.reason, reason) || other.reason == reason) && - (identical(other.resolved, resolved) || - other.resolved == resolved) && - (identical(other.resolverId, resolverId) || - other.resolverId == resolverId) && - (identical(other.published, published) || - other.published == published) && + (identical(other.resolved, resolved) || other.resolved == resolved) && + (identical(other.resolverId, resolverId) || other.resolverId == resolverId) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, creatorId, privateMessageId, - originalPmText, reason, resolved, resolverId, published, updated); + int get hashCode => Object.hash(runtimeType, id, creatorId, privateMessageId, originalPmText, reason, resolved, resolverId, published, updated); /// Create a copy of PrivateMessageReport /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageReportImplCopyWith<_$PrivateMessageReportImpl> - get copyWith => - __$$PrivateMessageReportImplCopyWithImpl<_$PrivateMessageReportImpl>( - this, _$identity); + _$$PrivateMessageReportImplCopyWith<_$PrivateMessageReportImpl> get copyWith => __$$PrivateMessageReportImplCopyWithImpl<_$PrivateMessageReportImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageReportImplToJson( - this, - ); + return _$$PrivateMessageReportImplToJson(this); } } abstract class _PrivateMessageReport extends PrivateMessageReport { - const factory _PrivateMessageReport( - {required final int id, - required final int creatorId, - required final int privateMessageId, - required final String originalPmText, - required final String reason, - required final bool resolved, - final int? resolverId, - required final DateTime published, - final DateTime? updated}) = _$PrivateMessageReportImpl; + const factory _PrivateMessageReport({ + required final int id, + required final int creatorId, + required final int privateMessageId, + required final String originalPmText, + required final String reason, + required final bool resolved, + final int? resolverId, + required final DateTime published, + final DateTime? updated, + }) = _$PrivateMessageReportImpl; const _PrivateMessageReport._() : super._(); - factory _PrivateMessageReport.fromJson(Map json) = - _$PrivateMessageReportImpl.fromJson; + factory _PrivateMessageReport.fromJson(Map json) = _$PrivateMessageReportImpl.fromJson; @override int get id; // v0.18.0 @@ -344,6 +325,5 @@ abstract class _PrivateMessageReport extends PrivateMessageReport { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageReportImplCopyWith<_$PrivateMessageReportImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PrivateMessageReportImplCopyWith<_$PrivateMessageReportImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/private_message_report.g.dart b/lib/src/v3/models/private_message/private_message_report.g.dart index bdd5ecb6..f462a567 100644 --- a/lib/src/v3/models/private_message/private_message_report.g.dart +++ b/lib/src/v3/models/private_message/private_message_report.g.dart @@ -6,44 +6,30 @@ part of 'private_message_report.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageReportImpl _$$PrivateMessageReportImplFromJson( - Map json) => - _$PrivateMessageReportImpl( - id: (json['id'] as num).toInt(), - creatorId: (json['creator_id'] as num).toInt(), - privateMessageId: (json['private_message_id'] as num).toInt(), - originalPmText: json['original_pm_text'] as String, - reason: json['reason'] as String, - resolved: json['resolved'] as bool, - resolverId: (json['resolver_id'] as num?)?.toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$PrivateMessageReportImpl _$$PrivateMessageReportImplFromJson(Map json) => _$PrivateMessageReportImpl( + id: (json['id'] as num).toInt(), + creatorId: (json['creator_id'] as num).toInt(), + privateMessageId: (json['private_message_id'] as num).toInt(), + originalPmText: json['original_pm_text'] as String, + reason: json['reason'] as String, + resolved: json['resolved'] as bool, + resolverId: (json['resolver_id'] as num?)?.toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$PrivateMessageReportImplToJson( - _$PrivateMessageReportImpl instance) => - { - 'id': instance.id, - 'creator_id': instance.creatorId, - 'private_message_id': instance.privateMessageId, - 'original_pm_text': instance.originalPmText, - 'reason': instance.reason, - 'resolved': instance.resolved, - 'resolver_id': instance.resolverId, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$PrivateMessageReportImplToJson(_$PrivateMessageReportImpl instance) => { + 'id': instance.id, + 'creator_id': instance.creatorId, + 'private_message_id': instance.privateMessageId, + 'original_pm_text': instance.originalPmText, + 'reason': instance.reason, + 'resolved': instance.resolved, + 'resolver_id': instance.resolverId, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/private_message/private_message_report_response.dart b/lib/src/v3/models/private_message/private_message_report_response.dart index 20c9a6df..c84f97f1 100644 --- a/lib/src/v3/models/private_message/private_message_report_response.dart +++ b/lib/src/v3/models/private_message/private_message_report_response.dart @@ -14,6 +14,5 @@ class PrivateMessageReportResponse with _$PrivateMessageReportResponse { }) = _PrivateMessageReportResponse; const PrivateMessageReportResponse._(); - factory PrivateMessageReportResponse.fromJson(Map json) => - _$PrivateMessageReportResponseFromJson(json); + factory PrivateMessageReportResponse.fromJson(Map json) => _$PrivateMessageReportResponseFromJson(json); } diff --git a/lib/src/v3/models/private_message/private_message_report_response.freezed.dart b/lib/src/v3/models/private_message/private_message_report_response.freezed.dart index 189b6373..043a2fbe 100644 --- a/lib/src/v3/models/private_message/private_message_report_response.freezed.dart +++ b/lib/src/v3/models/private_message/private_message_report_response.freezed.dart @@ -12,17 +12,16 @@ part of 'private_message_report_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PrivateMessageReportResponse _$PrivateMessageReportResponseFromJson( - Map json) { +PrivateMessageReportResponse _$PrivateMessageReportResponseFromJson(Map json) { return _PrivateMessageReportResponse.fromJson(json); } /// @nodoc mixin _$PrivateMessageReportResponse { - PrivateMessageReportView get privateMessageReportView => - throw _privateConstructorUsedError; + PrivateMessageReportView get privateMessageReportView => throw _privateConstructorUsedError; /// Serializes this PrivateMessageReportResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,17 +29,13 @@ mixin _$PrivateMessageReportResponse { /// Create a copy of PrivateMessageReportResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageReportResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $PrivateMessageReportResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageReportResponseCopyWith<$Res> { - factory $PrivateMessageReportResponseCopyWith( - PrivateMessageReportResponse value, - $Res Function(PrivateMessageReportResponse) then) = - _$PrivateMessageReportResponseCopyWithImpl<$Res, - PrivateMessageReportResponse>; + factory $PrivateMessageReportResponseCopyWith(PrivateMessageReportResponse value, $Res Function(PrivateMessageReportResponse) then) = + _$PrivateMessageReportResponseCopyWithImpl<$Res, PrivateMessageReportResponse>; @useResult $Res call({PrivateMessageReportView privateMessageReportView}); @@ -48,9 +43,7 @@ abstract class $PrivateMessageReportResponseCopyWith<$Res> { } /// @nodoc -class _$PrivateMessageReportResponseCopyWithImpl<$Res, - $Val extends PrivateMessageReportResponse> - implements $PrivateMessageReportResponseCopyWith<$Res> { +class _$PrivateMessageReportResponseCopyWithImpl<$Res, $Val extends PrivateMessageReportResponse> implements $PrivateMessageReportResponseCopyWith<$Res> { _$PrivateMessageReportResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,15 +55,17 @@ class _$PrivateMessageReportResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReportView = null, - }) { - return _then(_value.copyWith( - privateMessageReportView: null == privateMessageReportView - ? _value.privateMessageReportView - : privateMessageReportView // ignore: cast_nullable_to_non_nullable - as PrivateMessageReportView, - ) as $Val); + $Res call({Object? privateMessageReportView = null}) { + return _then( + _value.copyWith( + privateMessageReportView: + null == privateMessageReportView + ? _value.privateMessageReportView + : privateMessageReportView // ignore: cast_nullable_to_non_nullable + as PrivateMessageReportView, + ) + as $Val, + ); } /// Create a copy of PrivateMessageReportResponse @@ -78,19 +73,15 @@ class _$PrivateMessageReportResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $PrivateMessageReportViewCopyWith<$Res> get privateMessageReportView { - return $PrivateMessageReportViewCopyWith<$Res>( - _value.privateMessageReportView, (value) { + return $PrivateMessageReportViewCopyWith<$Res>(_value.privateMessageReportView, (value) { return _then(_value.copyWith(privateMessageReportView: value) as $Val); }); } } /// @nodoc -abstract class _$$PrivateMessageReportResponseImplCopyWith<$Res> - implements $PrivateMessageReportResponseCopyWith<$Res> { - factory _$$PrivateMessageReportResponseImplCopyWith( - _$PrivateMessageReportResponseImpl value, - $Res Function(_$PrivateMessageReportResponseImpl) then) = +abstract class _$$PrivateMessageReportResponseImplCopyWith<$Res> implements $PrivateMessageReportResponseCopyWith<$Res> { + factory _$$PrivateMessageReportResponseImplCopyWith(_$PrivateMessageReportResponseImpl value, $Res Function(_$PrivateMessageReportResponseImpl) then) = __$$PrivateMessageReportResponseImplCopyWithImpl<$Res>; @override @useResult @@ -101,28 +92,24 @@ abstract class _$$PrivateMessageReportResponseImplCopyWith<$Res> } /// @nodoc -class __$$PrivateMessageReportResponseImplCopyWithImpl<$Res> - extends _$PrivateMessageReportResponseCopyWithImpl<$Res, - _$PrivateMessageReportResponseImpl> +class __$$PrivateMessageReportResponseImplCopyWithImpl<$Res> extends _$PrivateMessageReportResponseCopyWithImpl<$Res, _$PrivateMessageReportResponseImpl> implements _$$PrivateMessageReportResponseImplCopyWith<$Res> { - __$$PrivateMessageReportResponseImplCopyWithImpl( - _$PrivateMessageReportResponseImpl _value, - $Res Function(_$PrivateMessageReportResponseImpl) _then) - : super(_value, _then); + __$$PrivateMessageReportResponseImplCopyWithImpl(_$PrivateMessageReportResponseImpl _value, $Res Function(_$PrivateMessageReportResponseImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessageReportResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReportView = null, - }) { - return _then(_$PrivateMessageReportResponseImpl( - privateMessageReportView: null == privateMessageReportView - ? _value.privateMessageReportView - : privateMessageReportView // ignore: cast_nullable_to_non_nullable - as PrivateMessageReportView, - )); + $Res call({Object? privateMessageReportView = null}) { + return _then( + _$PrivateMessageReportResponseImpl( + privateMessageReportView: + null == privateMessageReportView + ? _value.privateMessageReportView + : privateMessageReportView // ignore: cast_nullable_to_non_nullable + as PrivateMessageReportView, + ), + ); } } @@ -130,13 +117,9 @@ class __$$PrivateMessageReportResponseImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageReportResponseImpl extends _PrivateMessageReportResponse { - const _$PrivateMessageReportResponseImpl( - {required this.privateMessageReportView}) - : super._(); + const _$PrivateMessageReportResponseImpl({required this.privateMessageReportView}) : super._(); - factory _$PrivateMessageReportResponseImpl.fromJson( - Map json) => - _$$PrivateMessageReportResponseImplFromJson(json); + factory _$PrivateMessageReportResponseImpl.fromJson(Map json) => _$$PrivateMessageReportResponseImplFromJson(json); @override final PrivateMessageReportView privateMessageReportView; @@ -151,9 +134,7 @@ class _$PrivateMessageReportResponseImpl extends _PrivateMessageReportResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PrivateMessageReportResponseImpl && - (identical( - other.privateMessageReportView, privateMessageReportView) || - other.privateMessageReportView == privateMessageReportView)); + (identical(other.privateMessageReportView, privateMessageReportView) || other.privateMessageReportView == privateMessageReportView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -165,28 +146,20 @@ class _$PrivateMessageReportResponseImpl extends _PrivateMessageReportResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageReportResponseImplCopyWith< - _$PrivateMessageReportResponseImpl> - get copyWith => __$$PrivateMessageReportResponseImplCopyWithImpl< - _$PrivateMessageReportResponseImpl>(this, _$identity); + _$$PrivateMessageReportResponseImplCopyWith<_$PrivateMessageReportResponseImpl> get copyWith => + __$$PrivateMessageReportResponseImplCopyWithImpl<_$PrivateMessageReportResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageReportResponseImplToJson( - this, - ); + return _$$PrivateMessageReportResponseImplToJson(this); } } -abstract class _PrivateMessageReportResponse - extends PrivateMessageReportResponse { - const factory _PrivateMessageReportResponse( - {required final PrivateMessageReportView privateMessageReportView}) = - _$PrivateMessageReportResponseImpl; +abstract class _PrivateMessageReportResponse extends PrivateMessageReportResponse { + const factory _PrivateMessageReportResponse({required final PrivateMessageReportView privateMessageReportView}) = _$PrivateMessageReportResponseImpl; const _PrivateMessageReportResponse._() : super._(); - factory _PrivateMessageReportResponse.fromJson(Map json) = - _$PrivateMessageReportResponseImpl.fromJson; + factory _PrivateMessageReportResponse.fromJson(Map json) = _$PrivateMessageReportResponseImpl.fromJson; @override PrivateMessageReportView get privateMessageReportView; @@ -195,7 +168,5 @@ abstract class _PrivateMessageReportResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageReportResponseImplCopyWith< - _$PrivateMessageReportResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PrivateMessageReportResponseImplCopyWith<_$PrivateMessageReportResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/private_message_report_response.g.dart b/lib/src/v3/models/private_message/private_message_report_response.g.dart index 551b60fc..e97b7733 100644 --- a/lib/src/v3/models/private_message/private_message_report_response.g.dart +++ b/lib/src/v3/models/private_message/private_message_report_response.g.dart @@ -6,15 +6,9 @@ part of 'private_message_report_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageReportResponseImpl _$$PrivateMessageReportResponseImplFromJson( - Map json) => - _$PrivateMessageReportResponseImpl( - privateMessageReportView: PrivateMessageReportView.fromJson( - json['private_message_report_view'] as Map), - ); +_$PrivateMessageReportResponseImpl _$$PrivateMessageReportResponseImplFromJson(Map json) => + _$PrivateMessageReportResponseImpl(privateMessageReportView: PrivateMessageReportView.fromJson(json['private_message_report_view'] as Map)); -Map _$$PrivateMessageReportResponseImplToJson( - _$PrivateMessageReportResponseImpl instance) => - { - 'private_message_report_view': instance.privateMessageReportView.toJson(), - }; +Map _$$PrivateMessageReportResponseImplToJson(_$PrivateMessageReportResponseImpl instance) => { + 'private_message_report_view': instance.privateMessageReportView.toJson(), +}; diff --git a/lib/src/v3/models/private_message/private_message_response.dart b/lib/src/v3/models/private_message/private_message_response.dart index 352df640..fa3fb3f8 100644 --- a/lib/src/v3/models/private_message/private_message_response.dart +++ b/lib/src/v3/models/private_message/private_message_response.dart @@ -14,6 +14,5 @@ class PrivateMessageResponse with _$PrivateMessageResponse { }) = _PrivateMessageResponse; const PrivateMessageResponse._(); - factory PrivateMessageResponse.fromJson(Map json) => - _$PrivateMessageResponseFromJson(json); + factory PrivateMessageResponse.fromJson(Map json) => _$PrivateMessageResponseFromJson(json); } diff --git a/lib/src/v3/models/private_message/private_message_response.freezed.dart b/lib/src/v3/models/private_message/private_message_response.freezed.dart index 8de7dc43..4ffe0776 100644 --- a/lib/src/v3/models/private_message/private_message_response.freezed.dart +++ b/lib/src/v3/models/private_message/private_message_response.freezed.dart @@ -12,17 +12,16 @@ part of 'private_message_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PrivateMessageResponse _$PrivateMessageResponseFromJson( - Map json) { +PrivateMessageResponse _$PrivateMessageResponseFromJson(Map json) { return _PrivateMessageResponse.fromJson(json); } /// @nodoc mixin _$PrivateMessageResponse { - PrivateMessageView get privateMessageView => - throw _privateConstructorUsedError; + PrivateMessageView get privateMessageView => throw _privateConstructorUsedError; /// Serializes this PrivateMessageResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,15 +29,12 @@ mixin _$PrivateMessageResponse { /// Create a copy of PrivateMessageResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessageResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageResponseCopyWith<$Res> { - factory $PrivateMessageResponseCopyWith(PrivateMessageResponse value, - $Res Function(PrivateMessageResponse) then) = - _$PrivateMessageResponseCopyWithImpl<$Res, PrivateMessageResponse>; + factory $PrivateMessageResponseCopyWith(PrivateMessageResponse value, $Res Function(PrivateMessageResponse) then) = _$PrivateMessageResponseCopyWithImpl<$Res, PrivateMessageResponse>; @useResult $Res call({PrivateMessageView privateMessageView}); @@ -46,9 +42,7 @@ abstract class $PrivateMessageResponseCopyWith<$Res> { } /// @nodoc -class _$PrivateMessageResponseCopyWithImpl<$Res, - $Val extends PrivateMessageResponse> - implements $PrivateMessageResponseCopyWith<$Res> { +class _$PrivateMessageResponseCopyWithImpl<$Res, $Val extends PrivateMessageResponse> implements $PrivateMessageResponseCopyWith<$Res> { _$PrivateMessageResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,15 +54,17 @@ class _$PrivateMessageResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageView = null, - }) { - return _then(_value.copyWith( - privateMessageView: null == privateMessageView - ? _value.privateMessageView - : privateMessageView // ignore: cast_nullable_to_non_nullable - as PrivateMessageView, - ) as $Val); + $Res call({Object? privateMessageView = null}) { + return _then( + _value.copyWith( + privateMessageView: + null == privateMessageView + ? _value.privateMessageView + : privateMessageView // ignore: cast_nullable_to_non_nullable + as PrivateMessageView, + ) + as $Val, + ); } /// Create a copy of PrivateMessageResponse @@ -76,20 +72,15 @@ class _$PrivateMessageResponseCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $PrivateMessageViewCopyWith<$Res> get privateMessageView { - return $PrivateMessageViewCopyWith<$Res>(_value.privateMessageView, - (value) { + return $PrivateMessageViewCopyWith<$Res>(_value.privateMessageView, (value) { return _then(_value.copyWith(privateMessageView: value) as $Val); }); } } /// @nodoc -abstract class _$$PrivateMessageResponseImplCopyWith<$Res> - implements $PrivateMessageResponseCopyWith<$Res> { - factory _$$PrivateMessageResponseImplCopyWith( - _$PrivateMessageResponseImpl value, - $Res Function(_$PrivateMessageResponseImpl) then) = - __$$PrivateMessageResponseImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessageResponseImplCopyWith<$Res> implements $PrivateMessageResponseCopyWith<$Res> { + factory _$$PrivateMessageResponseImplCopyWith(_$PrivateMessageResponseImpl value, $Res Function(_$PrivateMessageResponseImpl) then) = __$$PrivateMessageResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PrivateMessageView privateMessageView}); @@ -99,28 +90,23 @@ abstract class _$$PrivateMessageResponseImplCopyWith<$Res> } /// @nodoc -class __$$PrivateMessageResponseImplCopyWithImpl<$Res> - extends _$PrivateMessageResponseCopyWithImpl<$Res, - _$PrivateMessageResponseImpl> - implements _$$PrivateMessageResponseImplCopyWith<$Res> { - __$$PrivateMessageResponseImplCopyWithImpl( - _$PrivateMessageResponseImpl _value, - $Res Function(_$PrivateMessageResponseImpl) _then) - : super(_value, _then); +class __$$PrivateMessageResponseImplCopyWithImpl<$Res> extends _$PrivateMessageResponseCopyWithImpl<$Res, _$PrivateMessageResponseImpl> implements _$$PrivateMessageResponseImplCopyWith<$Res> { + __$$PrivateMessageResponseImplCopyWithImpl(_$PrivateMessageResponseImpl _value, $Res Function(_$PrivateMessageResponseImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessageResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageView = null, - }) { - return _then(_$PrivateMessageResponseImpl( - privateMessageView: null == privateMessageView - ? _value.privateMessageView - : privateMessageView // ignore: cast_nullable_to_non_nullable - as PrivateMessageView, - )); + $Res call({Object? privateMessageView = null}) { + return _then( + _$PrivateMessageResponseImpl( + privateMessageView: + null == privateMessageView + ? _value.privateMessageView + : privateMessageView // ignore: cast_nullable_to_non_nullable + as PrivateMessageView, + ), + ); } } @@ -128,11 +114,9 @@ class __$$PrivateMessageResponseImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageResponseImpl extends _PrivateMessageResponse { - const _$PrivateMessageResponseImpl({required this.privateMessageView}) - : super._(); + const _$PrivateMessageResponseImpl({required this.privateMessageView}) : super._(); - factory _$PrivateMessageResponseImpl.fromJson(Map json) => - _$$PrivateMessageResponseImplFromJson(json); + factory _$PrivateMessageResponseImpl.fromJson(Map json) => _$$PrivateMessageResponseImplFromJson(json); @override final PrivateMessageView privateMessageView; @@ -145,10 +129,7 @@ class _$PrivateMessageResponseImpl extends _PrivateMessageResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PrivateMessageResponseImpl && - (identical(other.privateMessageView, privateMessageView) || - other.privateMessageView == privateMessageView)); + (other.runtimeType == runtimeType && other is _$PrivateMessageResponseImpl && (identical(other.privateMessageView, privateMessageView) || other.privateMessageView == privateMessageView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -160,26 +141,19 @@ class _$PrivateMessageResponseImpl extends _PrivateMessageResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageResponseImplCopyWith<_$PrivateMessageResponseImpl> - get copyWith => __$$PrivateMessageResponseImplCopyWithImpl< - _$PrivateMessageResponseImpl>(this, _$identity); + _$$PrivateMessageResponseImplCopyWith<_$PrivateMessageResponseImpl> get copyWith => __$$PrivateMessageResponseImplCopyWithImpl<_$PrivateMessageResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageResponseImplToJson( - this, - ); + return _$$PrivateMessageResponseImplToJson(this); } } abstract class _PrivateMessageResponse extends PrivateMessageResponse { - const factory _PrivateMessageResponse( - {required final PrivateMessageView privateMessageView}) = - _$PrivateMessageResponseImpl; + const factory _PrivateMessageResponse({required final PrivateMessageView privateMessageView}) = _$PrivateMessageResponseImpl; const _PrivateMessageResponse._() : super._(); - factory _PrivateMessageResponse.fromJson(Map json) = - _$PrivateMessageResponseImpl.fromJson; + factory _PrivateMessageResponse.fromJson(Map json) = _$PrivateMessageResponseImpl.fromJson; @override PrivateMessageView get privateMessageView; @@ -188,6 +162,5 @@ abstract class _PrivateMessageResponse extends PrivateMessageResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageResponseImplCopyWith<_$PrivateMessageResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PrivateMessageResponseImplCopyWith<_$PrivateMessageResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/private_message_response.g.dart b/lib/src/v3/models/private_message/private_message_response.g.dart index 8ca21de0..d6f72a6a 100644 --- a/lib/src/v3/models/private_message/private_message_response.g.dart +++ b/lib/src/v3/models/private_message/private_message_response.g.dart @@ -6,15 +6,7 @@ part of 'private_message_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageResponseImpl _$$PrivateMessageResponseImplFromJson( - Map json) => - _$PrivateMessageResponseImpl( - privateMessageView: PrivateMessageView.fromJson( - json['private_message_view'] as Map), - ); +_$PrivateMessageResponseImpl _$$PrivateMessageResponseImplFromJson(Map json) => + _$PrivateMessageResponseImpl(privateMessageView: PrivateMessageView.fromJson(json['private_message_view'] as Map)); -Map _$$PrivateMessageResponseImplToJson( - _$PrivateMessageResponseImpl instance) => - { - 'private_message_view': instance.privateMessageView.toJson(), - }; +Map _$$PrivateMessageResponseImplToJson(_$PrivateMessageResponseImpl instance) => {'private_message_view': instance.privateMessageView.toJson()}; diff --git a/lib/src/v3/models/private_message/private_messages_response.dart b/lib/src/v3/models/private_message/private_messages_response.dart index 1e371c16..49f02946 100644 --- a/lib/src/v3/models/private_message/private_messages_response.dart +++ b/lib/src/v3/models/private_message/private_messages_response.dart @@ -14,6 +14,5 @@ class PrivateMessagesResponse with _$PrivateMessagesResponse { }) = _PrivateMessagesResponse; const PrivateMessagesResponse._(); - factory PrivateMessagesResponse.fromJson(Map json) => - _$PrivateMessagesResponseFromJson(json); + factory PrivateMessagesResponse.fromJson(Map json) => _$PrivateMessagesResponseFromJson(json); } diff --git a/lib/src/v3/models/private_message/private_messages_response.freezed.dart b/lib/src/v3/models/private_message/private_messages_response.freezed.dart index cef78bcb..e8b2a120 100644 --- a/lib/src/v3/models/private_message/private_messages_response.freezed.dart +++ b/lib/src/v3/models/private_message/private_messages_response.freezed.dart @@ -12,17 +12,16 @@ part of 'private_messages_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PrivateMessagesResponse _$PrivateMessagesResponseFromJson( - Map json) { +PrivateMessagesResponse _$PrivateMessagesResponseFromJson(Map json) { return _PrivateMessagesResponse.fromJson(json); } /// @nodoc mixin _$PrivateMessagesResponse { - List get privateMessages => - throw _privateConstructorUsedError; + List get privateMessages => throw _privateConstructorUsedError; /// Serializes this PrivateMessagesResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -30,23 +29,18 @@ mixin _$PrivateMessagesResponse { /// Create a copy of PrivateMessagesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessagesResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessagesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessagesResponseCopyWith<$Res> { - factory $PrivateMessagesResponseCopyWith(PrivateMessagesResponse value, - $Res Function(PrivateMessagesResponse) then) = - _$PrivateMessagesResponseCopyWithImpl<$Res, PrivateMessagesResponse>; + factory $PrivateMessagesResponseCopyWith(PrivateMessagesResponse value, $Res Function(PrivateMessagesResponse) then) = _$PrivateMessagesResponseCopyWithImpl<$Res, PrivateMessagesResponse>; @useResult $Res call({List privateMessages}); } /// @nodoc -class _$PrivateMessagesResponseCopyWithImpl<$Res, - $Val extends PrivateMessagesResponse> - implements $PrivateMessagesResponseCopyWith<$Res> { +class _$PrivateMessagesResponseCopyWithImpl<$Res, $Val extends PrivateMessagesResponse> implements $PrivateMessagesResponseCopyWith<$Res> { _$PrivateMessagesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,53 +52,46 @@ class _$PrivateMessagesResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessages = null, - }) { - return _then(_value.copyWith( - privateMessages: null == privateMessages - ? _value.privateMessages - : privateMessages // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? privateMessages = null}) { + return _then( + _value.copyWith( + privateMessages: + null == privateMessages + ? _value.privateMessages + : privateMessages // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PrivateMessagesResponseImplCopyWith<$Res> - implements $PrivateMessagesResponseCopyWith<$Res> { - factory _$$PrivateMessagesResponseImplCopyWith( - _$PrivateMessagesResponseImpl value, - $Res Function(_$PrivateMessagesResponseImpl) then) = - __$$PrivateMessagesResponseImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessagesResponseImplCopyWith<$Res> implements $PrivateMessagesResponseCopyWith<$Res> { + factory _$$PrivateMessagesResponseImplCopyWith(_$PrivateMessagesResponseImpl value, $Res Function(_$PrivateMessagesResponseImpl) then) = __$$PrivateMessagesResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List privateMessages}); } /// @nodoc -class __$$PrivateMessagesResponseImplCopyWithImpl<$Res> - extends _$PrivateMessagesResponseCopyWithImpl<$Res, - _$PrivateMessagesResponseImpl> - implements _$$PrivateMessagesResponseImplCopyWith<$Res> { - __$$PrivateMessagesResponseImplCopyWithImpl( - _$PrivateMessagesResponseImpl _value, - $Res Function(_$PrivateMessagesResponseImpl) _then) - : super(_value, _then); +class __$$PrivateMessagesResponseImplCopyWithImpl<$Res> extends _$PrivateMessagesResponseCopyWithImpl<$Res, _$PrivateMessagesResponseImpl> implements _$$PrivateMessagesResponseImplCopyWith<$Res> { + __$$PrivateMessagesResponseImplCopyWithImpl(_$PrivateMessagesResponseImpl _value, $Res Function(_$PrivateMessagesResponseImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessagesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessages = null, - }) { - return _then(_$PrivateMessagesResponseImpl( - privateMessages: null == privateMessages - ? _value._privateMessages - : privateMessages // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? privateMessages = null}) { + return _then( + _$PrivateMessagesResponseImpl( + privateMessages: + null == privateMessages + ? _value._privateMessages + : privateMessages // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -112,13 +99,9 @@ class __$$PrivateMessagesResponseImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessagesResponseImpl extends _PrivateMessagesResponse { - const _$PrivateMessagesResponseImpl( - {required final List privateMessages}) - : _privateMessages = privateMessages, - super._(); + const _$PrivateMessagesResponseImpl({required final List privateMessages}) : _privateMessages = privateMessages, super._(); - factory _$PrivateMessagesResponseImpl.fromJson(Map json) => - _$$PrivateMessagesResponseImplFromJson(json); + factory _$PrivateMessagesResponseImpl.fromJson(Map json) => _$$PrivateMessagesResponseImplFromJson(json); final List _privateMessages; @override @@ -135,43 +118,31 @@ class _$PrivateMessagesResponseImpl extends _PrivateMessagesResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PrivateMessagesResponseImpl && - const DeepCollectionEquality() - .equals(other._privateMessages, _privateMessages)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$PrivateMessagesResponseImpl && const DeepCollectionEquality().equals(other._privateMessages, _privateMessages)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_privateMessages)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_privateMessages)); /// Create a copy of PrivateMessagesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessagesResponseImplCopyWith<_$PrivateMessagesResponseImpl> - get copyWith => __$$PrivateMessagesResponseImplCopyWithImpl< - _$PrivateMessagesResponseImpl>(this, _$identity); + _$$PrivateMessagesResponseImplCopyWith<_$PrivateMessagesResponseImpl> get copyWith => __$$PrivateMessagesResponseImplCopyWithImpl<_$PrivateMessagesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessagesResponseImplToJson( - this, - ); + return _$$PrivateMessagesResponseImplToJson(this); } } abstract class _PrivateMessagesResponse extends PrivateMessagesResponse { - const factory _PrivateMessagesResponse( - {required final List privateMessages}) = - _$PrivateMessagesResponseImpl; + const factory _PrivateMessagesResponse({required final List privateMessages}) = _$PrivateMessagesResponseImpl; const _PrivateMessagesResponse._() : super._(); - factory _PrivateMessagesResponse.fromJson(Map json) = - _$PrivateMessagesResponseImpl.fromJson; + factory _PrivateMessagesResponse.fromJson(Map json) = _$PrivateMessagesResponseImpl.fromJson; @override List get privateMessages; @@ -180,6 +151,5 @@ abstract class _PrivateMessagesResponse extends PrivateMessagesResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessagesResponseImplCopyWith<_$PrivateMessagesResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PrivateMessagesResponseImplCopyWith<_$PrivateMessagesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/private_message/private_messages_response.g.dart b/lib/src/v3/models/private_message/private_messages_response.g.dart index 13ffd6eb..14c46548 100644 --- a/lib/src/v3/models/private_message/private_messages_response.g.dart +++ b/lib/src/v3/models/private_message/private_messages_response.g.dart @@ -6,17 +6,7 @@ part of 'private_messages_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessagesResponseImpl _$$PrivateMessagesResponseImplFromJson( - Map json) => - _$PrivateMessagesResponseImpl( - privateMessages: (json['private_messages'] as List) - .map((e) => PrivateMessageView.fromJson(e as Map)) - .toList(), - ); +_$PrivateMessagesResponseImpl _$$PrivateMessagesResponseImplFromJson(Map json) => + _$PrivateMessagesResponseImpl(privateMessages: (json['private_messages'] as List).map((e) => PrivateMessageView.fromJson(e as Map)).toList()); -Map _$$PrivateMessagesResponseImplToJson( - _$PrivateMessagesResponseImpl instance) => - { - 'private_messages': - instance.privateMessages.map((e) => e.toJson()).toList(), - }; +Map _$$PrivateMessagesResponseImplToJson(_$PrivateMessagesResponseImpl instance) => {'private_messages': instance.privateMessages.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/resolve_object/resolve_object_response.dart b/lib/src/v3/models/resolve_object/resolve_object_response.dart index f76a0d55..7fd74d86 100644 --- a/lib/src/v3/models/resolve_object/resolve_object_response.dart +++ b/lib/src/v3/models/resolve_object/resolve_object_response.dart @@ -17,6 +17,5 @@ class ResolveObjectResponse with _$ResolveObjectResponse { }) = _ResolveObjectResponse; const ResolveObjectResponse._(); - factory ResolveObjectResponse.fromJson(Map json) => - _$ResolveObjectResponseFromJson(json); + factory ResolveObjectResponse.fromJson(Map json) => _$ResolveObjectResponseFromJson(json); } diff --git a/lib/src/v3/models/resolve_object/resolve_object_response.freezed.dart b/lib/src/v3/models/resolve_object/resolve_object_response.freezed.dart index d7aa70a3..7bc2c79e 100644 --- a/lib/src/v3/models/resolve_object/resolve_object_response.freezed.dart +++ b/lib/src/v3/models/resolve_object/resolve_object_response.freezed.dart @@ -12,10 +12,10 @@ part of 'resolve_object_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ResolveObjectResponse _$ResolveObjectResponseFromJson( - Map json) { +ResolveObjectResponse _$ResolveObjectResponseFromJson(Map json) { return _ResolveObjectResponse.fromJson(json); } @@ -32,21 +32,14 @@ mixin _$ResolveObjectResponse { /// Create a copy of ResolveObjectResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ResolveObjectResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ResolveObjectResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ResolveObjectResponseCopyWith<$Res> { - factory $ResolveObjectResponseCopyWith(ResolveObjectResponse value, - $Res Function(ResolveObjectResponse) then) = - _$ResolveObjectResponseCopyWithImpl<$Res, ResolveObjectResponse>; + factory $ResolveObjectResponseCopyWith(ResolveObjectResponse value, $Res Function(ResolveObjectResponse) then) = _$ResolveObjectResponseCopyWithImpl<$Res, ResolveObjectResponse>; @useResult - $Res call( - {CommentView? comment, - PostView? post, - CommunityView? community, - PersonView? person}); + $Res call({CommentView? comment, PostView? post, CommunityView? community, PersonView? person}); $CommentViewCopyWith<$Res>? get comment; $PostViewCopyWith<$Res>? get post; @@ -55,9 +48,7 @@ abstract class $ResolveObjectResponseCopyWith<$Res> { } /// @nodoc -class _$ResolveObjectResponseCopyWithImpl<$Res, - $Val extends ResolveObjectResponse> - implements $ResolveObjectResponseCopyWith<$Res> { +class _$ResolveObjectResponseCopyWithImpl<$Res, $Val extends ResolveObjectResponse> implements $ResolveObjectResponseCopyWith<$Res> { _$ResolveObjectResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -69,30 +60,32 @@ class _$ResolveObjectResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? comment = freezed, - Object? post = freezed, - Object? community = freezed, - Object? person = freezed, - }) { - return _then(_value.copyWith( - comment: freezed == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as CommentView?, - post: freezed == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as PostView?, - community: freezed == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as CommunityView?, - person: freezed == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as PersonView?, - ) as $Val); + $Res call({Object? comment = freezed, Object? post = freezed, Object? community = freezed, Object? person = freezed}) { + return _then( + _value.copyWith( + comment: + freezed == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as CommentView?, + post: + freezed == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as PostView?, + community: + freezed == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as CommunityView?, + person: + freezed == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as PersonView?, + ) + as $Val, + ); } /// Create a copy of ResolveObjectResponse @@ -153,19 +146,11 @@ class _$ResolveObjectResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ResolveObjectResponseImplCopyWith<$Res> - implements $ResolveObjectResponseCopyWith<$Res> { - factory _$$ResolveObjectResponseImplCopyWith( - _$ResolveObjectResponseImpl value, - $Res Function(_$ResolveObjectResponseImpl) then) = - __$$ResolveObjectResponseImplCopyWithImpl<$Res>; +abstract class _$$ResolveObjectResponseImplCopyWith<$Res> implements $ResolveObjectResponseCopyWith<$Res> { + factory _$$ResolveObjectResponseImplCopyWith(_$ResolveObjectResponseImpl value, $Res Function(_$ResolveObjectResponseImpl) then) = __$$ResolveObjectResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentView? comment, - PostView? post, - CommunityView? community, - PersonView? person}); + $Res call({CommentView? comment, PostView? post, CommunityView? community, PersonView? person}); @override $CommentViewCopyWith<$Res>? get comment; @@ -178,42 +163,38 @@ abstract class _$$ResolveObjectResponseImplCopyWith<$Res> } /// @nodoc -class __$$ResolveObjectResponseImplCopyWithImpl<$Res> - extends _$ResolveObjectResponseCopyWithImpl<$Res, - _$ResolveObjectResponseImpl> - implements _$$ResolveObjectResponseImplCopyWith<$Res> { - __$$ResolveObjectResponseImplCopyWithImpl(_$ResolveObjectResponseImpl _value, - $Res Function(_$ResolveObjectResponseImpl) _then) - : super(_value, _then); +class __$$ResolveObjectResponseImplCopyWithImpl<$Res> extends _$ResolveObjectResponseCopyWithImpl<$Res, _$ResolveObjectResponseImpl> implements _$$ResolveObjectResponseImplCopyWith<$Res> { + __$$ResolveObjectResponseImplCopyWithImpl(_$ResolveObjectResponseImpl _value, $Res Function(_$ResolveObjectResponseImpl) _then) : super(_value, _then); /// Create a copy of ResolveObjectResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? comment = freezed, - Object? post = freezed, - Object? community = freezed, - Object? person = freezed, - }) { - return _then(_$ResolveObjectResponseImpl( - comment: freezed == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as CommentView?, - post: freezed == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as PostView?, - community: freezed == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as CommunityView?, - person: freezed == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as PersonView?, - )); + $Res call({Object? comment = freezed, Object? post = freezed, Object? community = freezed, Object? person = freezed}) { + return _then( + _$ResolveObjectResponseImpl( + comment: + freezed == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as CommentView?, + post: + freezed == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as PostView?, + community: + freezed == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as CommunityView?, + person: + freezed == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as PersonView?, + ), + ); } } @@ -221,22 +202,19 @@ class __$$ResolveObjectResponseImplCopyWithImpl<$Res> @modelSerde class _$ResolveObjectResponseImpl extends _ResolveObjectResponse { - const _$ResolveObjectResponseImpl( - {this.comment, this.post, this.community, this.person}) - : super._(); + const _$ResolveObjectResponseImpl({this.comment, this.post, this.community, this.person}) : super._(); - factory _$ResolveObjectResponseImpl.fromJson(Map json) => - _$$ResolveObjectResponseImplFromJson(json); + factory _$ResolveObjectResponseImpl.fromJson(Map json) => _$$ResolveObjectResponseImplFromJson(json); @override final CommentView? comment; -// v0.18.0 + // v0.18.0 @override final PostView? post; -// v0.18.0 + // v0.18.0 @override final CommunityView? community; -// v0.18.0 + // v0.18.0 @override final PersonView? person; @@ -252,43 +230,32 @@ class _$ResolveObjectResponseImpl extends _ResolveObjectResponse { other is _$ResolveObjectResponseImpl && (identical(other.comment, comment) || other.comment == comment) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && + (identical(other.community, community) || other.community == community) && (identical(other.person, person) || other.person == person)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, comment, post, community, person); + int get hashCode => Object.hash(runtimeType, comment, post, community, person); /// Create a copy of ResolveObjectResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ResolveObjectResponseImplCopyWith<_$ResolveObjectResponseImpl> - get copyWith => __$$ResolveObjectResponseImplCopyWithImpl< - _$ResolveObjectResponseImpl>(this, _$identity); + _$$ResolveObjectResponseImplCopyWith<_$ResolveObjectResponseImpl> get copyWith => __$$ResolveObjectResponseImplCopyWithImpl<_$ResolveObjectResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ResolveObjectResponseImplToJson( - this, - ); + return _$$ResolveObjectResponseImplToJson(this); } } abstract class _ResolveObjectResponse extends ResolveObjectResponse { - const factory _ResolveObjectResponse( - {final CommentView? comment, - final PostView? post, - final CommunityView? community, - final PersonView? person}) = _$ResolveObjectResponseImpl; + const factory _ResolveObjectResponse({final CommentView? comment, final PostView? post, final CommunityView? community, final PersonView? person}) = _$ResolveObjectResponseImpl; const _ResolveObjectResponse._() : super._(); - factory _ResolveObjectResponse.fromJson(Map json) = - _$ResolveObjectResponseImpl.fromJson; + factory _ResolveObjectResponse.fromJson(Map json) = _$ResolveObjectResponseImpl.fromJson; @override CommentView? get comment; // v0.18.0 @@ -303,6 +270,5 @@ abstract class _ResolveObjectResponse extends ResolveObjectResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ResolveObjectResponseImplCopyWith<_$ResolveObjectResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ResolveObjectResponseImplCopyWith<_$ResolveObjectResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/resolve_object/resolve_object_response.g.dart b/lib/src/v3/models/resolve_object/resolve_object_response.g.dart index 71ecab31..089ea3d8 100644 --- a/lib/src/v3/models/resolve_object/resolve_object_response.g.dart +++ b/lib/src/v3/models/resolve_object/resolve_object_response.g.dart @@ -6,28 +6,16 @@ part of 'resolve_object_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ResolveObjectResponseImpl _$$ResolveObjectResponseImplFromJson( - Map json) => - _$ResolveObjectResponseImpl( - comment: json['comment'] == null - ? null - : CommentView.fromJson(json['comment'] as Map), - post: json['post'] == null - ? null - : PostView.fromJson(json['post'] as Map), - community: json['community'] == null - ? null - : CommunityView.fromJson(json['community'] as Map), - person: json['person'] == null - ? null - : PersonView.fromJson(json['person'] as Map), - ); +_$ResolveObjectResponseImpl _$$ResolveObjectResponseImplFromJson(Map json) => _$ResolveObjectResponseImpl( + comment: json['comment'] == null ? null : CommentView.fromJson(json['comment'] as Map), + post: json['post'] == null ? null : PostView.fromJson(json['post'] as Map), + community: json['community'] == null ? null : CommunityView.fromJson(json['community'] as Map), + person: json['person'] == null ? null : PersonView.fromJson(json['person'] as Map), +); -Map _$$ResolveObjectResponseImplToJson( - _$ResolveObjectResponseImpl instance) => - { - 'comment': instance.comment?.toJson(), - 'post': instance.post?.toJson(), - 'community': instance.community?.toJson(), - 'person': instance.person?.toJson(), - }; +Map _$$ResolveObjectResponseImplToJson(_$ResolveObjectResponseImpl instance) => { + 'comment': instance.comment?.toJson(), + 'post': instance.post?.toJson(), + 'community': instance.community?.toJson(), + 'person': instance.person?.toJson(), +}; diff --git a/lib/src/v3/models/search/search_response.dart b/lib/src/v3/models/search/search_response.dart index ff082bab..fc810a51 100644 --- a/lib/src/v3/models/search/search_response.dart +++ b/lib/src/v3/models/search/search_response.dart @@ -19,6 +19,5 @@ class SearchResponse with _$SearchResponse { }) = _SearchResponse; const SearchResponse._(); - factory SearchResponse.fromJson(Map json) => - _$SearchResponseFromJson(json); + factory SearchResponse.fromJson(Map json) => _$SearchResponseFromJson(json); } diff --git a/lib/src/v3/models/search/search_response.freezed.dart b/lib/src/v3/models/search/search_response.freezed.dart index f488f33f..db528375 100644 --- a/lib/src/v3/models/search/search_response.freezed.dart +++ b/lib/src/v3/models/search/search_response.freezed.dart @@ -12,7 +12,8 @@ part of 'search_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); SearchResponse _$SearchResponseFromJson(Map json) { return _SearchResponse.fromJson(json); @@ -22,11 +23,9 @@ SearchResponse _$SearchResponseFromJson(Map json) { mixin _$SearchResponse { @JsonKey(name: 'type_') SearchType get type => throw _privateConstructorUsedError; // v0.18.0 - List get comments => - throw _privateConstructorUsedError; // v0.18.0 + List get comments => throw _privateConstructorUsedError; // v0.18.0 List get posts => throw _privateConstructorUsedError; // v0.18.0 - List get communities => - throw _privateConstructorUsedError; // v0.18.0 + List get communities => throw _privateConstructorUsedError; // v0.18.0 List get users => throw _privateConstructorUsedError; /// Serializes this SearchResponse to a JSON map. @@ -35,27 +34,18 @@ mixin _$SearchResponse { /// Create a copy of SearchResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SearchResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $SearchResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SearchResponseCopyWith<$Res> { - factory $SearchResponseCopyWith( - SearchResponse value, $Res Function(SearchResponse) then) = - _$SearchResponseCopyWithImpl<$Res, SearchResponse>; + factory $SearchResponseCopyWith(SearchResponse value, $Res Function(SearchResponse) then) = _$SearchResponseCopyWithImpl<$Res, SearchResponse>; @useResult - $Res call( - {@JsonKey(name: 'type_') SearchType type, - List comments, - List posts, - List communities, - List users}); + $Res call({@JsonKey(name: 'type_') SearchType type, List comments, List posts, List communities, List users}); } /// @nodoc -class _$SearchResponseCopyWithImpl<$Res, $Val extends SearchResponse> - implements $SearchResponseCopyWith<$Res> { +class _$SearchResponseCopyWithImpl<$Res, $Val extends SearchResponse> implements $SearchResponseCopyWith<$Res> { _$SearchResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,95 +57,86 @@ class _$SearchResponseCopyWithImpl<$Res, $Val extends SearchResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = null, - Object? comments = null, - Object? posts = null, - Object? communities = null, - Object? users = null, - }) { - return _then(_value.copyWith( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SearchType, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - communities: null == communities - ? _value.communities - : communities // ignore: cast_nullable_to_non_nullable - as List, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? type = null, Object? comments = null, Object? posts = null, Object? communities = null, Object? users = null}) { + return _then( + _value.copyWith( + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as SearchType, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + communities: + null == communities + ? _value.communities + : communities // ignore: cast_nullable_to_non_nullable + as List, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$SearchResponseImplCopyWith<$Res> - implements $SearchResponseCopyWith<$Res> { - factory _$$SearchResponseImplCopyWith(_$SearchResponseImpl value, - $Res Function(_$SearchResponseImpl) then) = - __$$SearchResponseImplCopyWithImpl<$Res>; +abstract class _$$SearchResponseImplCopyWith<$Res> implements $SearchResponseCopyWith<$Res> { + factory _$$SearchResponseImplCopyWith(_$SearchResponseImpl value, $Res Function(_$SearchResponseImpl) then) = __$$SearchResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'type_') SearchType type, - List comments, - List posts, - List communities, - List users}); + $Res call({@JsonKey(name: 'type_') SearchType type, List comments, List posts, List communities, List users}); } /// @nodoc -class __$$SearchResponseImplCopyWithImpl<$Res> - extends _$SearchResponseCopyWithImpl<$Res, _$SearchResponseImpl> - implements _$$SearchResponseImplCopyWith<$Res> { - __$$SearchResponseImplCopyWithImpl( - _$SearchResponseImpl _value, $Res Function(_$SearchResponseImpl) _then) - : super(_value, _then); +class __$$SearchResponseImplCopyWithImpl<$Res> extends _$SearchResponseCopyWithImpl<$Res, _$SearchResponseImpl> implements _$$SearchResponseImplCopyWith<$Res> { + __$$SearchResponseImplCopyWithImpl(_$SearchResponseImpl _value, $Res Function(_$SearchResponseImpl) _then) : super(_value, _then); /// Create a copy of SearchResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? type = null, - Object? comments = null, - Object? posts = null, - Object? communities = null, - Object? users = null, - }) { - return _then(_$SearchResponseImpl( - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as SearchType, - comments: null == comments - ? _value._comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - posts: null == posts - ? _value._posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - communities: null == communities - ? _value._communities - : communities // ignore: cast_nullable_to_non_nullable - as List, - users: null == users - ? _value._users - : users // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? type = null, Object? comments = null, Object? posts = null, Object? communities = null, Object? users = null}) { + return _then( + _$SearchResponseImpl( + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as SearchType, + comments: + null == comments + ? _value._comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + posts: + null == posts + ? _value._posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + communities: + null == communities + ? _value._communities + : communities // ignore: cast_nullable_to_non_nullable + as List, + users: + null == users + ? _value._users + : users // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -163,27 +144,26 @@ class __$$SearchResponseImplCopyWithImpl<$Res> @modelSerde class _$SearchResponseImpl extends _SearchResponse { - const _$SearchResponseImpl( - {@JsonKey(name: 'type_') required this.type, - required final List comments, - required final List posts, - required final List communities, - required final List users}) - : _comments = comments, - _posts = posts, - _communities = communities, - _users = users, - super._(); + const _$SearchResponseImpl({ + @JsonKey(name: 'type_') required this.type, + required final List comments, + required final List posts, + required final List communities, + required final List users, + }) : _comments = comments, + _posts = posts, + _communities = communities, + _users = users, + super._(); - factory _$SearchResponseImpl.fromJson(Map json) => - _$$SearchResponseImplFromJson(json); + factory _$SearchResponseImpl.fromJson(Map json) => _$$SearchResponseImplFromJson(json); @override @JsonKey(name: 'type_') final SearchType type; -// v0.18.0 + // v0.18.0 final List _comments; -// v0.18.0 + // v0.18.0 @override List get comments { if (_comments is EqualUnmodifiableListView) return _comments; @@ -191,9 +171,9 @@ class _$SearchResponseImpl extends _SearchResponse { return EqualUnmodifiableListView(_comments); } -// v0.18.0 + // v0.18.0 final List _posts; -// v0.18.0 + // v0.18.0 @override List get posts { if (_posts is EqualUnmodifiableListView) return _posts; @@ -201,9 +181,9 @@ class _$SearchResponseImpl extends _SearchResponse { return EqualUnmodifiableListView(_posts); } -// v0.18.0 + // v0.18.0 final List _communities; -// v0.18.0 + // v0.18.0 @override List get communities { if (_communities is EqualUnmodifiableListView) return _communities; @@ -211,9 +191,9 @@ class _$SearchResponseImpl extends _SearchResponse { return EqualUnmodifiableListView(_communities); } -// v0.18.0 + // v0.18.0 final List _users; -// v0.18.0 + // v0.18.0 @override List get users { if (_users is EqualUnmodifiableListView) return _users; @@ -234,49 +214,45 @@ class _$SearchResponseImpl extends _SearchResponse { (identical(other.type, type) || other.type == type) && const DeepCollectionEquality().equals(other._comments, _comments) && const DeepCollectionEquality().equals(other._posts, _posts) && - const DeepCollectionEquality() - .equals(other._communities, _communities) && + const DeepCollectionEquality().equals(other._communities, _communities) && const DeepCollectionEquality().equals(other._users, _users)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - type, - const DeepCollectionEquality().hash(_comments), - const DeepCollectionEquality().hash(_posts), - const DeepCollectionEquality().hash(_communities), - const DeepCollectionEquality().hash(_users)); + runtimeType, + type, + const DeepCollectionEquality().hash(_comments), + const DeepCollectionEquality().hash(_posts), + const DeepCollectionEquality().hash(_communities), + const DeepCollectionEquality().hash(_users), + ); /// Create a copy of SearchResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SearchResponseImplCopyWith<_$SearchResponseImpl> get copyWith => - __$$SearchResponseImplCopyWithImpl<_$SearchResponseImpl>( - this, _$identity); + _$$SearchResponseImplCopyWith<_$SearchResponseImpl> get copyWith => __$$SearchResponseImplCopyWithImpl<_$SearchResponseImpl>(this, _$identity); @override Map toJson() { - return _$$SearchResponseImplToJson( - this, - ); + return _$$SearchResponseImplToJson(this); } } abstract class _SearchResponse extends SearchResponse { - const factory _SearchResponse( - {@JsonKey(name: 'type_') required final SearchType type, - required final List comments, - required final List posts, - required final List communities, - required final List users}) = _$SearchResponseImpl; + const factory _SearchResponse({ + @JsonKey(name: 'type_') required final SearchType type, + required final List comments, + required final List posts, + required final List communities, + required final List users, + }) = _$SearchResponseImpl; const _SearchResponse._() : super._(); - factory _SearchResponse.fromJson(Map json) = - _$SearchResponseImpl.fromJson; + factory _SearchResponse.fromJson(Map json) = _$SearchResponseImpl.fromJson; @override @JsonKey(name: 'type_') @@ -294,6 +270,5 @@ abstract class _SearchResponse extends SearchResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SearchResponseImplCopyWith<_$SearchResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SearchResponseImplCopyWith<_$SearchResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/search/search_response.g.dart b/lib/src/v3/models/search/search_response.g.dart index f5afefde..697a6634 100644 --- a/lib/src/v3/models/search/search_response.g.dart +++ b/lib/src/v3/models/search/search_response.g.dart @@ -6,29 +6,18 @@ part of 'search_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SearchResponseImpl _$$SearchResponseImplFromJson(Map json) => - _$SearchResponseImpl( - type: SearchType.fromJson(json['type_'] as String), - comments: (json['comments'] as List) - .map((e) => CommentView.fromJson(e as Map)) - .toList(), - posts: (json['posts'] as List) - .map((e) => PostView.fromJson(e as Map)) - .toList(), - communities: (json['communities'] as List) - .map((e) => CommunityView.fromJson(e as Map)) - .toList(), - users: (json['users'] as List) - .map((e) => PersonView.fromJson(e as Map)) - .toList(), - ); +_$SearchResponseImpl _$$SearchResponseImplFromJson(Map json) => _$SearchResponseImpl( + type: SearchType.fromJson(json['type_'] as String), + comments: (json['comments'] as List).map((e) => CommentView.fromJson(e as Map)).toList(), + posts: (json['posts'] as List).map((e) => PostView.fromJson(e as Map)).toList(), + communities: (json['communities'] as List).map((e) => CommunityView.fromJson(e as Map)).toList(), + users: (json['users'] as List).map((e) => PersonView.fromJson(e as Map)).toList(), +); -Map _$$SearchResponseImplToJson( - _$SearchResponseImpl instance) => - { - 'type_': instance.type.toJson(), - 'comments': instance.comments.map((e) => e.toJson()).toList(), - 'posts': instance.posts.map((e) => e.toJson()).toList(), - 'communities': instance.communities.map((e) => e.toJson()).toList(), - 'users': instance.users.map((e) => e.toJson()).toList(), - }; +Map _$$SearchResponseImplToJson(_$SearchResponseImpl instance) => { + 'type_': instance.type.toJson(), + 'comments': instance.comments.map((e) => e.toJson()).toList(), + 'posts': instance.posts.map((e) => e.toJson()).toList(), + 'communities': instance.communities.map((e) => e.toJson()).toList(), + 'users': instance.users.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/site/block_instance_response.dart b/lib/src/v3/models/site/block_instance_response.dart index 11b19ec1..e66e3b05 100644 --- a/lib/src/v3/models/site/block_instance_response.dart +++ b/lib/src/v3/models/site/block_instance_response.dart @@ -13,6 +13,5 @@ class BlockInstanceResponse with _$BlockInstanceResponse { }) = _BlockInstanceResponse; const BlockInstanceResponse._(); - factory BlockInstanceResponse.fromJson(Map json) => - _$BlockInstanceResponseFromJson(json); + factory BlockInstanceResponse.fromJson(Map json) => _$BlockInstanceResponseFromJson(json); } diff --git a/lib/src/v3/models/site/block_instance_response.freezed.dart b/lib/src/v3/models/site/block_instance_response.freezed.dart index 0a91ef03..c3ae4fd7 100644 --- a/lib/src/v3/models/site/block_instance_response.freezed.dart +++ b/lib/src/v3/models/site/block_instance_response.freezed.dart @@ -12,10 +12,10 @@ part of 'block_instance_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -BlockInstanceResponse _$BlockInstanceResponseFromJson( - Map json) { +BlockInstanceResponse _$BlockInstanceResponseFromJson(Map json) { return _BlockInstanceResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$BlockInstanceResponse { /// Create a copy of BlockInstanceResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockInstanceResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockInstanceResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockInstanceResponseCopyWith<$Res> { - factory $BlockInstanceResponseCopyWith(BlockInstanceResponse value, - $Res Function(BlockInstanceResponse) then) = - _$BlockInstanceResponseCopyWithImpl<$Res, BlockInstanceResponse>; + factory $BlockInstanceResponseCopyWith(BlockInstanceResponse value, $Res Function(BlockInstanceResponse) then) = _$BlockInstanceResponseCopyWithImpl<$Res, BlockInstanceResponse>; @useResult $Res call({bool blocked}); } /// @nodoc -class _$BlockInstanceResponseCopyWithImpl<$Res, - $Val extends BlockInstanceResponse> - implements $BlockInstanceResponseCopyWith<$Res> { +class _$BlockInstanceResponseCopyWithImpl<$Res, $Val extends BlockInstanceResponse> implements $BlockInstanceResponseCopyWith<$Res> { _$BlockInstanceResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$BlockInstanceResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? blocked = null, - }) { - return _then(_value.copyWith( - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? blocked = null}) { + return _then( + _value.copyWith( + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$BlockInstanceResponseImplCopyWith<$Res> - implements $BlockInstanceResponseCopyWith<$Res> { - factory _$$BlockInstanceResponseImplCopyWith( - _$BlockInstanceResponseImpl value, - $Res Function(_$BlockInstanceResponseImpl) then) = - __$$BlockInstanceResponseImplCopyWithImpl<$Res>; +abstract class _$$BlockInstanceResponseImplCopyWith<$Res> implements $BlockInstanceResponseCopyWith<$Res> { + factory _$$BlockInstanceResponseImplCopyWith(_$BlockInstanceResponseImpl value, $Res Function(_$BlockInstanceResponseImpl) then) = __$$BlockInstanceResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool blocked}); } /// @nodoc -class __$$BlockInstanceResponseImplCopyWithImpl<$Res> - extends _$BlockInstanceResponseCopyWithImpl<$Res, - _$BlockInstanceResponseImpl> - implements _$$BlockInstanceResponseImplCopyWith<$Res> { - __$$BlockInstanceResponseImplCopyWithImpl(_$BlockInstanceResponseImpl _value, - $Res Function(_$BlockInstanceResponseImpl) _then) - : super(_value, _then); +class __$$BlockInstanceResponseImplCopyWithImpl<$Res> extends _$BlockInstanceResponseCopyWithImpl<$Res, _$BlockInstanceResponseImpl> implements _$$BlockInstanceResponseImplCopyWith<$Res> { + __$$BlockInstanceResponseImplCopyWithImpl(_$BlockInstanceResponseImpl _value, $Res Function(_$BlockInstanceResponseImpl) _then) : super(_value, _then); /// Create a copy of BlockInstanceResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? blocked = null, - }) { - return _then(_$BlockInstanceResponseImpl( - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? blocked = null}) { + return _then( + _$BlockInstanceResponseImpl( + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -112,8 +101,7 @@ class __$$BlockInstanceResponseImplCopyWithImpl<$Res> class _$BlockInstanceResponseImpl extends _BlockInstanceResponse { const _$BlockInstanceResponseImpl({required this.blocked}) : super._(); - factory _$BlockInstanceResponseImpl.fromJson(Map json) => - _$$BlockInstanceResponseImplFromJson(json); + factory _$BlockInstanceResponseImpl.fromJson(Map json) => _$$BlockInstanceResponseImplFromJson(json); @override final bool blocked; @@ -125,10 +113,7 @@ class _$BlockInstanceResponseImpl extends _BlockInstanceResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BlockInstanceResponseImpl && - (identical(other.blocked, blocked) || other.blocked == blocked)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlockInstanceResponseImpl && (identical(other.blocked, blocked) || other.blocked == blocked)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -140,25 +125,19 @@ class _$BlockInstanceResponseImpl extends _BlockInstanceResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockInstanceResponseImplCopyWith<_$BlockInstanceResponseImpl> - get copyWith => __$$BlockInstanceResponseImplCopyWithImpl< - _$BlockInstanceResponseImpl>(this, _$identity); + _$$BlockInstanceResponseImplCopyWith<_$BlockInstanceResponseImpl> get copyWith => __$$BlockInstanceResponseImplCopyWithImpl<_$BlockInstanceResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BlockInstanceResponseImplToJson( - this, - ); + return _$$BlockInstanceResponseImplToJson(this); } } abstract class _BlockInstanceResponse extends BlockInstanceResponse { - const factory _BlockInstanceResponse({required final bool blocked}) = - _$BlockInstanceResponseImpl; + const factory _BlockInstanceResponse({required final bool blocked}) = _$BlockInstanceResponseImpl; const _BlockInstanceResponse._() : super._(); - factory _BlockInstanceResponse.fromJson(Map json) = - _$BlockInstanceResponseImpl.fromJson; + factory _BlockInstanceResponse.fromJson(Map json) = _$BlockInstanceResponseImpl.fromJson; @override bool get blocked; @@ -167,6 +146,5 @@ abstract class _BlockInstanceResponse extends BlockInstanceResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockInstanceResponseImplCopyWith<_$BlockInstanceResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BlockInstanceResponseImplCopyWith<_$BlockInstanceResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/block_instance_response.g.dart b/lib/src/v3/models/site/block_instance_response.g.dart index 2a03175d..3c655a8c 100644 --- a/lib/src/v3/models/site/block_instance_response.g.dart +++ b/lib/src/v3/models/site/block_instance_response.g.dart @@ -6,14 +6,6 @@ part of 'block_instance_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BlockInstanceResponseImpl _$$BlockInstanceResponseImplFromJson( - Map json) => - _$BlockInstanceResponseImpl( - blocked: json['blocked'] as bool, - ); +_$BlockInstanceResponseImpl _$$BlockInstanceResponseImplFromJson(Map json) => _$BlockInstanceResponseImpl(blocked: json['blocked'] as bool); -Map _$$BlockInstanceResponseImplToJson( - _$BlockInstanceResponseImpl instance) => - { - 'blocked': instance.blocked, - }; +Map _$$BlockInstanceResponseImplToJson(_$BlockInstanceResponseImpl instance) => {'blocked': instance.blocked}; diff --git a/lib/src/v3/models/site/get_site_response.dart b/lib/src/v3/models/site/get_site_response.dart index 4d4dac56..2e7ff767 100644 --- a/lib/src/v3/models/site/get_site_response.dart +++ b/lib/src/v3/models/site/get_site_response.dart @@ -23,6 +23,5 @@ class GetSiteResponse with _$GetSiteResponse { }) = _GetSiteResponse; const GetSiteResponse._(); - factory GetSiteResponse.fromJson(Map json) => - _$GetSiteResponseFromJson(json); + factory GetSiteResponse.fromJson(Map json) => _$GetSiteResponseFromJson(json); } diff --git a/lib/src/v3/models/site/get_site_response.freezed.dart b/lib/src/v3/models/site/get_site_response.freezed.dart index dba23d92..d4b8336f 100644 --- a/lib/src/v3/models/site/get_site_response.freezed.dart +++ b/lib/src/v3/models/site/get_site_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_site_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetSiteResponse _$GetSiteResponseFromJson(Map json) { return _GetSiteResponse.fromJson(json); @@ -24,15 +25,11 @@ mixin _$GetSiteResponse { List get admins => throw _privateConstructorUsedError; // v0.18.0 String get version => throw _privateConstructorUsedError; // v0.18.0 MyUserInfo? get myUser => throw _privateConstructorUsedError; // v0.18.0 - List get allLanguages => - throw _privateConstructorUsedError; // v0.18.0 - List get discussionLanguages => - throw _privateConstructorUsedError; // v0.18.0 + List get allLanguages => throw _privateConstructorUsedError; // v0.18.0 + List get discussionLanguages => throw _privateConstructorUsedError; // v0.18.0 List get taglines => throw _privateConstructorUsedError; // v0.18.0 - List get customEmojis => - throw _privateConstructorUsedError; // v0.18.0 - List? get blockedUrls => - throw _privateConstructorUsedError; + List get customEmojis => throw _privateConstructorUsedError; // v0.18.0 + List? get blockedUrls => throw _privateConstructorUsedError; /// Serializes this GetSiteResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -40,34 +37,31 @@ mixin _$GetSiteResponse { /// Create a copy of GetSiteResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetSiteResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetSiteResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetSiteResponseCopyWith<$Res> { - factory $GetSiteResponseCopyWith( - GetSiteResponse value, $Res Function(GetSiteResponse) then) = - _$GetSiteResponseCopyWithImpl<$Res, GetSiteResponse>; + factory $GetSiteResponseCopyWith(GetSiteResponse value, $Res Function(GetSiteResponse) then) = _$GetSiteResponseCopyWithImpl<$Res, GetSiteResponse>; @useResult - $Res call( - {SiteView siteView, - List admins, - String version, - MyUserInfo? myUser, - List allLanguages, - List discussionLanguages, - List taglines, - List customEmojis, - List? blockedUrls}); + $Res call({ + SiteView siteView, + List admins, + String version, + MyUserInfo? myUser, + List allLanguages, + List discussionLanguages, + List taglines, + List customEmojis, + List? blockedUrls, + }); $SiteViewCopyWith<$Res> get siteView; $MyUserInfoCopyWith<$Res>? get myUser; } /// @nodoc -class _$GetSiteResponseCopyWithImpl<$Res, $Val extends GetSiteResponse> - implements $GetSiteResponseCopyWith<$Res> { +class _$GetSiteResponseCopyWithImpl<$Res, $Val extends GetSiteResponse> implements $GetSiteResponseCopyWith<$Res> { _$GetSiteResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -90,44 +84,56 @@ class _$GetSiteResponseCopyWithImpl<$Res, $Val extends GetSiteResponse> Object? customEmojis = null, Object? blockedUrls = freezed, }) { - return _then(_value.copyWith( - siteView: null == siteView - ? _value.siteView - : siteView // ignore: cast_nullable_to_non_nullable - as SiteView, - admins: null == admins - ? _value.admins - : admins // ignore: cast_nullable_to_non_nullable - as List, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - myUser: freezed == myUser - ? _value.myUser - : myUser // ignore: cast_nullable_to_non_nullable - as MyUserInfo?, - allLanguages: null == allLanguages - ? _value.allLanguages - : allLanguages // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value.discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - taglines: null == taglines - ? _value.taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List, - customEmojis: null == customEmojis - ? _value.customEmojis - : customEmojis // ignore: cast_nullable_to_non_nullable - as List, - blockedUrls: freezed == blockedUrls - ? _value.blockedUrls - : blockedUrls // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); + return _then( + _value.copyWith( + siteView: + null == siteView + ? _value.siteView + : siteView // ignore: cast_nullable_to_non_nullable + as SiteView, + admins: + null == admins + ? _value.admins + : admins // ignore: cast_nullable_to_non_nullable + as List, + version: + null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String, + myUser: + freezed == myUser + ? _value.myUser + : myUser // ignore: cast_nullable_to_non_nullable + as MyUserInfo?, + allLanguages: + null == allLanguages + ? _value.allLanguages + : allLanguages // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value.discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + taglines: + null == taglines + ? _value.taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List, + customEmojis: + null == customEmojis + ? _value.customEmojis + : customEmojis // ignore: cast_nullable_to_non_nullable + as List, + blockedUrls: + freezed == blockedUrls + ? _value.blockedUrls + : blockedUrls // ignore: cast_nullable_to_non_nullable + as List?, + ) + as $Val, + ); } /// Create a copy of GetSiteResponse @@ -156,23 +162,21 @@ class _$GetSiteResponseCopyWithImpl<$Res, $Val extends GetSiteResponse> } /// @nodoc -abstract class _$$GetSiteResponseImplCopyWith<$Res> - implements $GetSiteResponseCopyWith<$Res> { - factory _$$GetSiteResponseImplCopyWith(_$GetSiteResponseImpl value, - $Res Function(_$GetSiteResponseImpl) then) = - __$$GetSiteResponseImplCopyWithImpl<$Res>; +abstract class _$$GetSiteResponseImplCopyWith<$Res> implements $GetSiteResponseCopyWith<$Res> { + factory _$$GetSiteResponseImplCopyWith(_$GetSiteResponseImpl value, $Res Function(_$GetSiteResponseImpl) then) = __$$GetSiteResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {SiteView siteView, - List admins, - String version, - MyUserInfo? myUser, - List allLanguages, - List discussionLanguages, - List taglines, - List customEmojis, - List? blockedUrls}); + $Res call({ + SiteView siteView, + List admins, + String version, + MyUserInfo? myUser, + List allLanguages, + List discussionLanguages, + List taglines, + List customEmojis, + List? blockedUrls, + }); @override $SiteViewCopyWith<$Res> get siteView; @@ -181,12 +185,8 @@ abstract class _$$GetSiteResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetSiteResponseImplCopyWithImpl<$Res> - extends _$GetSiteResponseCopyWithImpl<$Res, _$GetSiteResponseImpl> - implements _$$GetSiteResponseImplCopyWith<$Res> { - __$$GetSiteResponseImplCopyWithImpl( - _$GetSiteResponseImpl _value, $Res Function(_$GetSiteResponseImpl) _then) - : super(_value, _then); +class __$$GetSiteResponseImplCopyWithImpl<$Res> extends _$GetSiteResponseCopyWithImpl<$Res, _$GetSiteResponseImpl> implements _$$GetSiteResponseImplCopyWith<$Res> { + __$$GetSiteResponseImplCopyWithImpl(_$GetSiteResponseImpl _value, $Res Function(_$GetSiteResponseImpl) _then) : super(_value, _then); /// Create a copy of GetSiteResponse /// with the given fields replaced by the non-null parameter values. @@ -203,44 +203,55 @@ class __$$GetSiteResponseImplCopyWithImpl<$Res> Object? customEmojis = null, Object? blockedUrls = freezed, }) { - return _then(_$GetSiteResponseImpl( - siteView: null == siteView - ? _value.siteView - : siteView // ignore: cast_nullable_to_non_nullable - as SiteView, - admins: null == admins - ? _value._admins - : admins // ignore: cast_nullable_to_non_nullable - as List, - version: null == version - ? _value.version - : version // ignore: cast_nullable_to_non_nullable - as String, - myUser: freezed == myUser - ? _value.myUser - : myUser // ignore: cast_nullable_to_non_nullable - as MyUserInfo?, - allLanguages: null == allLanguages - ? _value._allLanguages - : allLanguages // ignore: cast_nullable_to_non_nullable - as List, - discussionLanguages: null == discussionLanguages - ? _value._discussionLanguages - : discussionLanguages // ignore: cast_nullable_to_non_nullable - as List, - taglines: null == taglines - ? _value._taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List, - customEmojis: null == customEmojis - ? _value._customEmojis - : customEmojis // ignore: cast_nullable_to_non_nullable - as List, - blockedUrls: freezed == blockedUrls - ? _value._blockedUrls - : blockedUrls // ignore: cast_nullable_to_non_nullable - as List?, - )); + return _then( + _$GetSiteResponseImpl( + siteView: + null == siteView + ? _value.siteView + : siteView // ignore: cast_nullable_to_non_nullable + as SiteView, + admins: + null == admins + ? _value._admins + : admins // ignore: cast_nullable_to_non_nullable + as List, + version: + null == version + ? _value.version + : version // ignore: cast_nullable_to_non_nullable + as String, + myUser: + freezed == myUser + ? _value.myUser + : myUser // ignore: cast_nullable_to_non_nullable + as MyUserInfo?, + allLanguages: + null == allLanguages + ? _value._allLanguages + : allLanguages // ignore: cast_nullable_to_non_nullable + as List, + discussionLanguages: + null == discussionLanguages + ? _value._discussionLanguages + : discussionLanguages // ignore: cast_nullable_to_non_nullable + as List, + taglines: + null == taglines + ? _value._taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List, + customEmojis: + null == customEmojis + ? _value._customEmojis + : customEmojis // ignore: cast_nullable_to_non_nullable + as List, + blockedUrls: + freezed == blockedUrls + ? _value._blockedUrls + : blockedUrls // ignore: cast_nullable_to_non_nullable + as List?, + ), + ); } } @@ -248,32 +259,31 @@ class __$$GetSiteResponseImplCopyWithImpl<$Res> @modelSerde class _$GetSiteResponseImpl extends _GetSiteResponse { - const _$GetSiteResponseImpl( - {required this.siteView, - required final List admins, - required this.version, - this.myUser, - required final List allLanguages, - required final List discussionLanguages, - required final List taglines, - required final List customEmojis, - final List? blockedUrls}) - : _admins = admins, - _allLanguages = allLanguages, - _discussionLanguages = discussionLanguages, - _taglines = taglines, - _customEmojis = customEmojis, - _blockedUrls = blockedUrls, - super._(); - - factory _$GetSiteResponseImpl.fromJson(Map json) => - _$$GetSiteResponseImplFromJson(json); + const _$GetSiteResponseImpl({ + required this.siteView, + required final List admins, + required this.version, + this.myUser, + required final List allLanguages, + required final List discussionLanguages, + required final List taglines, + required final List customEmojis, + final List? blockedUrls, + }) : _admins = admins, + _allLanguages = allLanguages, + _discussionLanguages = discussionLanguages, + _taglines = taglines, + _customEmojis = customEmojis, + _blockedUrls = blockedUrls, + super._(); + + factory _$GetSiteResponseImpl.fromJson(Map json) => _$$GetSiteResponseImplFromJson(json); @override final SiteView siteView; -// v0.18.0 + // v0.18.0 final List _admins; -// v0.18.0 + // v0.18.0 @override List get admins { if (_admins is EqualUnmodifiableListView) return _admins; @@ -281,15 +291,15 @@ class _$GetSiteResponseImpl extends _GetSiteResponse { return EqualUnmodifiableListView(_admins); } -// v0.18.0 + // v0.18.0 @override final String version; -// v0.18.0 + // v0.18.0 @override final MyUserInfo? myUser; -// v0.18.0 + // v0.18.0 final List _allLanguages; -// v0.18.0 + // v0.18.0 @override List get allLanguages { if (_allLanguages is EqualUnmodifiableListView) return _allLanguages; @@ -297,20 +307,19 @@ class _$GetSiteResponseImpl extends _GetSiteResponse { return EqualUnmodifiableListView(_allLanguages); } -// v0.18.0 + // v0.18.0 final List _discussionLanguages; -// v0.18.0 + // v0.18.0 @override List get discussionLanguages { - if (_discussionLanguages is EqualUnmodifiableListView) - return _discussionLanguages; + if (_discussionLanguages is EqualUnmodifiableListView) return _discussionLanguages; // ignore: implicit_dynamic_type return EqualUnmodifiableListView(_discussionLanguages); } -// v0.18.0 + // v0.18.0 final List _taglines; -// v0.18.0 + // v0.18.0 @override List get taglines { if (_taglines is EqualUnmodifiableListView) return _taglines; @@ -318,9 +327,9 @@ class _$GetSiteResponseImpl extends _GetSiteResponse { return EqualUnmodifiableListView(_taglines); } -// v0.18.0 + // v0.18.0 final List _customEmojis; -// v0.18.0 + // v0.18.0 @override List get customEmojis { if (_customEmojis is EqualUnmodifiableListView) return _customEmojis; @@ -328,9 +337,9 @@ class _$GetSiteResponseImpl extends _GetSiteResponse { return EqualUnmodifiableListView(_customEmojis); } -// v0.18.0 + // v0.18.0 final List? _blockedUrls; -// v0.18.0 + // v0.18.0 @override List? get blockedUrls { final value = _blockedUrls; @@ -350,68 +359,60 @@ class _$GetSiteResponseImpl extends _GetSiteResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetSiteResponseImpl && - (identical(other.siteView, siteView) || - other.siteView == siteView) && + (identical(other.siteView, siteView) || other.siteView == siteView) && const DeepCollectionEquality().equals(other._admins, _admins) && (identical(other.version, version) || other.version == version) && (identical(other.myUser, myUser) || other.myUser == myUser) && - const DeepCollectionEquality() - .equals(other._allLanguages, _allLanguages) && - const DeepCollectionEquality() - .equals(other._discussionLanguages, _discussionLanguages) && + const DeepCollectionEquality().equals(other._allLanguages, _allLanguages) && + const DeepCollectionEquality().equals(other._discussionLanguages, _discussionLanguages) && const DeepCollectionEquality().equals(other._taglines, _taglines) && - const DeepCollectionEquality() - .equals(other._customEmojis, _customEmojis) && - const DeepCollectionEquality() - .equals(other._blockedUrls, _blockedUrls)); + const DeepCollectionEquality().equals(other._customEmojis, _customEmojis) && + const DeepCollectionEquality().equals(other._blockedUrls, _blockedUrls)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - siteView, - const DeepCollectionEquality().hash(_admins), - version, - myUser, - const DeepCollectionEquality().hash(_allLanguages), - const DeepCollectionEquality().hash(_discussionLanguages), - const DeepCollectionEquality().hash(_taglines), - const DeepCollectionEquality().hash(_customEmojis), - const DeepCollectionEquality().hash(_blockedUrls)); + runtimeType, + siteView, + const DeepCollectionEquality().hash(_admins), + version, + myUser, + const DeepCollectionEquality().hash(_allLanguages), + const DeepCollectionEquality().hash(_discussionLanguages), + const DeepCollectionEquality().hash(_taglines), + const DeepCollectionEquality().hash(_customEmojis), + const DeepCollectionEquality().hash(_blockedUrls), + ); /// Create a copy of GetSiteResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetSiteResponseImplCopyWith<_$GetSiteResponseImpl> get copyWith => - __$$GetSiteResponseImplCopyWithImpl<_$GetSiteResponseImpl>( - this, _$identity); + _$$GetSiteResponseImplCopyWith<_$GetSiteResponseImpl> get copyWith => __$$GetSiteResponseImplCopyWithImpl<_$GetSiteResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetSiteResponseImplToJson( - this, - ); + return _$$GetSiteResponseImplToJson(this); } } abstract class _GetSiteResponse extends GetSiteResponse { - const factory _GetSiteResponse( - {required final SiteView siteView, - required final List admins, - required final String version, - final MyUserInfo? myUser, - required final List allLanguages, - required final List discussionLanguages, - required final List taglines, - required final List customEmojis, - final List? blockedUrls}) = _$GetSiteResponseImpl; + const factory _GetSiteResponse({ + required final SiteView siteView, + required final List admins, + required final String version, + final MyUserInfo? myUser, + required final List allLanguages, + required final List discussionLanguages, + required final List taglines, + required final List customEmojis, + final List? blockedUrls, + }) = _$GetSiteResponseImpl; const _GetSiteResponse._() : super._(); - factory _GetSiteResponse.fromJson(Map json) = - _$GetSiteResponseImpl.fromJson; + factory _GetSiteResponse.fromJson(Map json) = _$GetSiteResponseImpl.fromJson; @override SiteView get siteView; // v0.18.0 @@ -436,6 +437,5 @@ abstract class _GetSiteResponse extends GetSiteResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetSiteResponseImplCopyWith<_$GetSiteResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetSiteResponseImplCopyWith<_$GetSiteResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/get_site_response.g.dart b/lib/src/v3/models/site/get_site_response.g.dart index 9ab4b327..785eecce 100644 --- a/lib/src/v3/models/site/get_site_response.g.dart +++ b/lib/src/v3/models/site/get_site_response.g.dart @@ -6,45 +6,26 @@ part of 'get_site_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetSiteResponseImpl _$$GetSiteResponseImplFromJson( - Map json) => - _$GetSiteResponseImpl( - siteView: SiteView.fromJson(json['site_view'] as Map), - admins: (json['admins'] as List) - .map((e) => PersonView.fromJson(e as Map)) - .toList(), - version: json['version'] as String, - myUser: json['my_user'] == null - ? null - : MyUserInfo.fromJson(json['my_user'] as Map), - allLanguages: (json['all_languages'] as List) - .map((e) => Language.fromJson(e as Map)) - .toList(), - discussionLanguages: (json['discussion_languages'] as List) - .map((e) => (e as num).toInt()) - .toList(), - taglines: (json['taglines'] as List) - .map((e) => Tagline.fromJson(e as Map)) - .toList(), - customEmojis: (json['custom_emojis'] as List) - .map((e) => CustomEmojiView.fromJson(e as Map)) - .toList(), - blockedUrls: (json['blocked_urls'] as List?) - ?.map( - (e) => LocalSiteUrlBlocklist.fromJson(e as Map)) - .toList(), - ); +_$GetSiteResponseImpl _$$GetSiteResponseImplFromJson(Map json) => _$GetSiteResponseImpl( + siteView: SiteView.fromJson(json['site_view'] as Map), + admins: (json['admins'] as List).map((e) => PersonView.fromJson(e as Map)).toList(), + version: json['version'] as String, + myUser: json['my_user'] == null ? null : MyUserInfo.fromJson(json['my_user'] as Map), + allLanguages: (json['all_languages'] as List).map((e) => Language.fromJson(e as Map)).toList(), + discussionLanguages: (json['discussion_languages'] as List).map((e) => (e as num).toInt()).toList(), + taglines: (json['taglines'] as List).map((e) => Tagline.fromJson(e as Map)).toList(), + customEmojis: (json['custom_emojis'] as List).map((e) => CustomEmojiView.fromJson(e as Map)).toList(), + blockedUrls: (json['blocked_urls'] as List?)?.map((e) => LocalSiteUrlBlocklist.fromJson(e as Map)).toList(), +); -Map _$$GetSiteResponseImplToJson( - _$GetSiteResponseImpl instance) => - { - 'site_view': instance.siteView.toJson(), - 'admins': instance.admins.map((e) => e.toJson()).toList(), - 'version': instance.version, - 'my_user': instance.myUser?.toJson(), - 'all_languages': instance.allLanguages.map((e) => e.toJson()).toList(), - 'discussion_languages': instance.discussionLanguages, - 'taglines': instance.taglines.map((e) => e.toJson()).toList(), - 'custom_emojis': instance.customEmojis.map((e) => e.toJson()).toList(), - 'blocked_urls': instance.blockedUrls?.map((e) => e.toJson()).toList(), - }; +Map _$$GetSiteResponseImplToJson(_$GetSiteResponseImpl instance) => { + 'site_view': instance.siteView.toJson(), + 'admins': instance.admins.map((e) => e.toJson()).toList(), + 'version': instance.version, + 'my_user': instance.myUser?.toJson(), + 'all_languages': instance.allLanguages.map((e) => e.toJson()).toList(), + 'discussion_languages': instance.discussionLanguages, + 'taglines': instance.taglines.map((e) => e.toJson()).toList(), + 'custom_emojis': instance.customEmojis.map((e) => e.toJson()).toList(), + 'blocked_urls': instance.blockedUrls?.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/site/link_metadata.dart b/lib/src/v3/models/site/link_metadata.dart index 80e9c04d..93fb8dba 100644 --- a/lib/src/v3/models/site/link_metadata.dart +++ b/lib/src/v3/models/site/link_metadata.dart @@ -17,6 +17,5 @@ class LinkMetadata with _$LinkMetadata { }) = _LinkMetadata; const LinkMetadata._(); - factory LinkMetadata.fromJson(Map json) => - _$LinkMetadataFromJson(json); + factory LinkMetadata.fromJson(Map json) => _$LinkMetadataFromJson(json); } diff --git a/lib/src/v3/models/site/link_metadata.freezed.dart b/lib/src/v3/models/site/link_metadata.freezed.dart index b17def62..b5a6e83e 100644 --- a/lib/src/v3/models/site/link_metadata.freezed.dart +++ b/lib/src/v3/models/site/link_metadata.freezed.dart @@ -12,7 +12,8 @@ part of 'link_metadata.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LinkMetadata _$LinkMetadataFromJson(Map json) { return _LinkMetadata.fromJson(json); @@ -32,27 +33,18 @@ mixin _$LinkMetadata { /// Create a copy of LinkMetadata /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LinkMetadataCopyWith get copyWith => - throw _privateConstructorUsedError; + $LinkMetadataCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LinkMetadataCopyWith<$Res> { - factory $LinkMetadataCopyWith( - LinkMetadata value, $Res Function(LinkMetadata) then) = - _$LinkMetadataCopyWithImpl<$Res, LinkMetadata>; + factory $LinkMetadataCopyWith(LinkMetadata value, $Res Function(LinkMetadata) then) = _$LinkMetadataCopyWithImpl<$Res, LinkMetadata>; @useResult - $Res call( - {String? title, - String? description, - String? image, - String? embedVideoUrl, - String? contentType}); + $Res call({String? title, String? description, String? image, String? embedVideoUrl, String? contentType}); } /// @nodoc -class _$LinkMetadataCopyWithImpl<$Res, $Val extends LinkMetadata> - implements $LinkMetadataCopyWith<$Res> { +class _$LinkMetadataCopyWithImpl<$Res, $Val extends LinkMetadata> implements $LinkMetadataCopyWith<$Res> { _$LinkMetadataCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -64,95 +56,86 @@ class _$LinkMetadataCopyWithImpl<$Res, $Val extends LinkMetadata> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? title = freezed, - Object? description = freezed, - Object? image = freezed, - Object? embedVideoUrl = freezed, - Object? contentType = freezed, - }) { - return _then(_value.copyWith( - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - embedVideoUrl: freezed == embedVideoUrl - ? _value.embedVideoUrl - : embedVideoUrl // ignore: cast_nullable_to_non_nullable - as String?, - contentType: freezed == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? title = freezed, Object? description = freezed, Object? image = freezed, Object? embedVideoUrl = freezed, Object? contentType = freezed}) { + return _then( + _value.copyWith( + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + embedVideoUrl: + freezed == embedVideoUrl + ? _value.embedVideoUrl + : embedVideoUrl // ignore: cast_nullable_to_non_nullable + as String?, + contentType: + freezed == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LinkMetadataImplCopyWith<$Res> - implements $LinkMetadataCopyWith<$Res> { - factory _$$LinkMetadataImplCopyWith( - _$LinkMetadataImpl value, $Res Function(_$LinkMetadataImpl) then) = - __$$LinkMetadataImplCopyWithImpl<$Res>; +abstract class _$$LinkMetadataImplCopyWith<$Res> implements $LinkMetadataCopyWith<$Res> { + factory _$$LinkMetadataImplCopyWith(_$LinkMetadataImpl value, $Res Function(_$LinkMetadataImpl) then) = __$$LinkMetadataImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String? title, - String? description, - String? image, - String? embedVideoUrl, - String? contentType}); + $Res call({String? title, String? description, String? image, String? embedVideoUrl, String? contentType}); } /// @nodoc -class __$$LinkMetadataImplCopyWithImpl<$Res> - extends _$LinkMetadataCopyWithImpl<$Res, _$LinkMetadataImpl> - implements _$$LinkMetadataImplCopyWith<$Res> { - __$$LinkMetadataImplCopyWithImpl( - _$LinkMetadataImpl _value, $Res Function(_$LinkMetadataImpl) _then) - : super(_value, _then); +class __$$LinkMetadataImplCopyWithImpl<$Res> extends _$LinkMetadataCopyWithImpl<$Res, _$LinkMetadataImpl> implements _$$LinkMetadataImplCopyWith<$Res> { + __$$LinkMetadataImplCopyWithImpl(_$LinkMetadataImpl _value, $Res Function(_$LinkMetadataImpl) _then) : super(_value, _then); /// Create a copy of LinkMetadata /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? title = freezed, - Object? description = freezed, - Object? image = freezed, - Object? embedVideoUrl = freezed, - Object? contentType = freezed, - }) { - return _then(_$LinkMetadataImpl( - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - embedVideoUrl: freezed == embedVideoUrl - ? _value.embedVideoUrl - : embedVideoUrl // ignore: cast_nullable_to_non_nullable - as String?, - contentType: freezed == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? title = freezed, Object? description = freezed, Object? image = freezed, Object? embedVideoUrl = freezed, Object? contentType = freezed}) { + return _then( + _$LinkMetadataImpl( + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + embedVideoUrl: + freezed == embedVideoUrl + ? _value.embedVideoUrl + : embedVideoUrl // ignore: cast_nullable_to_non_nullable + as String?, + contentType: + freezed == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -160,29 +143,22 @@ class __$$LinkMetadataImplCopyWithImpl<$Res> @modelSerde class _$LinkMetadataImpl extends _LinkMetadata { - const _$LinkMetadataImpl( - {this.title, - this.description, - this.image, - this.embedVideoUrl, - this.contentType}) - : super._(); + const _$LinkMetadataImpl({this.title, this.description, this.image, this.embedVideoUrl, this.contentType}) : super._(); - factory _$LinkMetadataImpl.fromJson(Map json) => - _$$LinkMetadataImplFromJson(json); + factory _$LinkMetadataImpl.fromJson(Map json) => _$$LinkMetadataImplFromJson(json); @override final String? title; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String? image; -// v0.18.0 + // v0.18.0 @override final String? embedVideoUrl; -// v0.18.0 + // v0.18.0 @override final String? contentType; @@ -197,47 +173,34 @@ class _$LinkMetadataImpl extends _LinkMetadata { (other.runtimeType == runtimeType && other is _$LinkMetadataImpl && (identical(other.title, title) || other.title == title) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.image, image) || other.image == image) && - (identical(other.embedVideoUrl, embedVideoUrl) || - other.embedVideoUrl == embedVideoUrl) && - (identical(other.contentType, contentType) || - other.contentType == contentType)); + (identical(other.embedVideoUrl, embedVideoUrl) || other.embedVideoUrl == embedVideoUrl) && + (identical(other.contentType, contentType) || other.contentType == contentType)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, title, description, image, embedVideoUrl, contentType); + int get hashCode => Object.hash(runtimeType, title, description, image, embedVideoUrl, contentType); /// Create a copy of LinkMetadata /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LinkMetadataImplCopyWith<_$LinkMetadataImpl> get copyWith => - __$$LinkMetadataImplCopyWithImpl<_$LinkMetadataImpl>(this, _$identity); + _$$LinkMetadataImplCopyWith<_$LinkMetadataImpl> get copyWith => __$$LinkMetadataImplCopyWithImpl<_$LinkMetadataImpl>(this, _$identity); @override Map toJson() { - return _$$LinkMetadataImplToJson( - this, - ); + return _$$LinkMetadataImplToJson(this); } } abstract class _LinkMetadata extends LinkMetadata { - const factory _LinkMetadata( - {final String? title, - final String? description, - final String? image, - final String? embedVideoUrl, - final String? contentType}) = _$LinkMetadataImpl; + const factory _LinkMetadata({final String? title, final String? description, final String? image, final String? embedVideoUrl, final String? contentType}) = _$LinkMetadataImpl; const _LinkMetadata._() : super._(); - factory _LinkMetadata.fromJson(Map json) = - _$LinkMetadataImpl.fromJson; + factory _LinkMetadata.fromJson(Map json) = _$LinkMetadataImpl.fromJson; @override String? get title; // v0.18.0 @@ -254,6 +217,5 @@ abstract class _LinkMetadata extends LinkMetadata { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LinkMetadataImplCopyWith<_$LinkMetadataImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LinkMetadataImplCopyWith<_$LinkMetadataImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/link_metadata.g.dart b/lib/src/v3/models/site/link_metadata.g.dart index 99c3b532..6c6d64e0 100644 --- a/lib/src/v3/models/site/link_metadata.g.dart +++ b/lib/src/v3/models/site/link_metadata.g.dart @@ -6,20 +6,18 @@ part of 'link_metadata.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LinkMetadataImpl _$$LinkMetadataImplFromJson(Map json) => - _$LinkMetadataImpl( - title: json['title'] as String?, - description: json['description'] as String?, - image: json['image'] as String?, - embedVideoUrl: json['embed_video_url'] as String?, - contentType: json['content_type'] as String?, - ); +_$LinkMetadataImpl _$$LinkMetadataImplFromJson(Map json) => _$LinkMetadataImpl( + title: json['title'] as String?, + description: json['description'] as String?, + image: json['image'] as String?, + embedVideoUrl: json['embed_video_url'] as String?, + contentType: json['content_type'] as String?, +); -Map _$$LinkMetadataImplToJson(_$LinkMetadataImpl instance) => - { - 'title': instance.title, - 'description': instance.description, - 'image': instance.image, - 'embed_video_url': instance.embedVideoUrl, - 'content_type': instance.contentType, - }; +Map _$$LinkMetadataImplToJson(_$LinkMetadataImpl instance) => { + 'title': instance.title, + 'description': instance.description, + 'image': instance.image, + 'embed_video_url': instance.embedVideoUrl, + 'content_type': instance.contentType, +}; diff --git a/lib/src/v3/models/site/local_site.dart b/lib/src/v3/models/site/local_site.dart index 5f4c785e..41426cad 100644 --- a/lib/src/v3/models/site/local_site.dart +++ b/lib/src/v3/models/site/local_site.dart @@ -41,6 +41,5 @@ class LocalSite with _$LocalSite { }) = _LocalSite; const LocalSite._(); - factory LocalSite.fromJson(Map json) => - _$LocalSiteFromJson(json); + factory LocalSite.fromJson(Map json) => _$LocalSiteFromJson(json); } diff --git a/lib/src/v3/models/site/local_site.freezed.dart b/lib/src/v3/models/site/local_site.freezed.dart index f17de1fa..bfb36515 100644 --- a/lib/src/v3/models/site/local_site.freezed.dart +++ b/lib/src/v3/models/site/local_site.freezed.dart @@ -12,7 +12,8 @@ part of 'local_site.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalSite _$LocalSiteFromJson(Map json) { return _LocalSite.fromJson(json); @@ -25,37 +26,28 @@ mixin _$LocalSite { bool get siteSetup => throw _privateConstructorUsedError; // v0.18.0 bool get enableDownvotes => throw _privateConstructorUsedError; // v0.18.0 bool get enableNsfw => throw _privateConstructorUsedError; // v0.18.0 - bool get communityCreationAdminOnly => - throw _privateConstructorUsedError; // v0.18.0 - bool get requireEmailVerification => - throw _privateConstructorUsedError; // v0.18.0 - String? get applicationQuestion => - throw _privateConstructorUsedError; // v0.18.0 + bool get communityCreationAdminOnly => throw _privateConstructorUsedError; // v0.18.0 + bool get requireEmailVerification => throw _privateConstructorUsedError; // v0.18.0 + String? get applicationQuestion => throw _privateConstructorUsedError; // v0.18.0 bool get privateInstance => throw _privateConstructorUsedError; // v0.18.0 String get defaultTheme => throw _privateConstructorUsedError; // v0.18.0 - ListingType get defaultPostListingType => - throw _privateConstructorUsedError; // v0.18.0 + ListingType get defaultPostListingType => throw _privateConstructorUsedError; // v0.18.0 String? get legalInformation => throw _privateConstructorUsedError; // v0.18.0 bool get hideModlogModNames => throw _privateConstructorUsedError; // v0.18.0 - bool get applicationEmailAdmins => - throw _privateConstructorUsedError; // v0.18.0 + bool get applicationEmailAdmins => throw _privateConstructorUsedError; // v0.18.0 String? get slurFilterRegex => throw _privateConstructorUsedError; // v0.18.0 int get actorNameMaxLength => throw _privateConstructorUsedError; // v0.18.0 bool get federationEnabled => throw _privateConstructorUsedError; // v0.18.0 @deprecated - int? get federationWorkerCount => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] + int? get federationWorkerCount => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.18.1] bool get captchaEnabled => throw _privateConstructorUsedError; // v0.18.0 String get captchaDifficulty => throw _privateConstructorUsedError; // v0.18.0 DateTime get published => throw _privateConstructorUsedError; // v0.18.0 DateTime? get updated => throw _privateConstructorUsedError; // v0.18.0 - RegistrationMode get registrationMode => - throw _privateConstructorUsedError; // v0.18.0 + RegistrationMode get registrationMode => throw _privateConstructorUsedError; // v0.18.0 bool get reportsEmailAdmins => throw _privateConstructorUsedError; // v0.18.0 - bool? get federationSignedFetch => - throw _privateConstructorUsedError; // v0.19.0 (required) - String? get defaultPostListingMode => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get federationSignedFetch => throw _privateConstructorUsedError; // v0.19.0 (required) + String? get defaultPostListingMode => throw _privateConstructorUsedError; // v0.19.4 (required) SortType? get defaultSortType => throw _privateConstructorUsedError; /// Serializes this LocalSite to a JSON map. @@ -64,48 +56,46 @@ mixin _$LocalSite { /// Create a copy of LocalSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalSiteCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalSiteCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalSiteCopyWith<$Res> { - factory $LocalSiteCopyWith(LocalSite value, $Res Function(LocalSite) then) = - _$LocalSiteCopyWithImpl<$Res, LocalSite>; + factory $LocalSiteCopyWith(LocalSite value, $Res Function(LocalSite) then) = _$LocalSiteCopyWithImpl<$Res, LocalSite>; @useResult - $Res call( - {int id, - int siteId, - bool siteSetup, - bool enableDownvotes, - bool enableNsfw, - bool communityCreationAdminOnly, - bool requireEmailVerification, - String? applicationQuestion, - bool privateInstance, - String defaultTheme, - ListingType defaultPostListingType, - String? legalInformation, - bool hideModlogModNames, - bool applicationEmailAdmins, - String? slurFilterRegex, - int actorNameMaxLength, - bool federationEnabled, - @deprecated int? federationWorkerCount, - bool captchaEnabled, - String captchaDifficulty, - DateTime published, - DateTime? updated, - RegistrationMode registrationMode, - bool reportsEmailAdmins, - bool? federationSignedFetch, - String? defaultPostListingMode, - SortType? defaultSortType}); + $Res call({ + int id, + int siteId, + bool siteSetup, + bool enableDownvotes, + bool enableNsfw, + bool communityCreationAdminOnly, + bool requireEmailVerification, + String? applicationQuestion, + bool privateInstance, + String defaultTheme, + ListingType defaultPostListingType, + String? legalInformation, + bool hideModlogModNames, + bool applicationEmailAdmins, + String? slurFilterRegex, + int actorNameMaxLength, + bool federationEnabled, + @deprecated int? federationWorkerCount, + bool captchaEnabled, + String captchaDifficulty, + DateTime published, + DateTime? updated, + RegistrationMode registrationMode, + bool reportsEmailAdmins, + bool? federationSignedFetch, + String? defaultPostListingMode, + SortType? defaultSortType, + }); } /// @nodoc -class _$LocalSiteCopyWithImpl<$Res, $Val extends LocalSite> - implements $LocalSiteCopyWith<$Res> { +class _$LocalSiteCopyWithImpl<$Res, $Val extends LocalSite> implements $LocalSiteCopyWith<$Res> { _$LocalSiteCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -146,164 +136,188 @@ class _$LocalSiteCopyWithImpl<$Res, $Val extends LocalSite> Object? defaultPostListingMode = freezed, Object? defaultSortType = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - siteId: null == siteId - ? _value.siteId - : siteId // ignore: cast_nullable_to_non_nullable - as int, - siteSetup: null == siteSetup - ? _value.siteSetup - : siteSetup // ignore: cast_nullable_to_non_nullable - as bool, - enableDownvotes: null == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool, - enableNsfw: null == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool, - communityCreationAdminOnly: null == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool, - requireEmailVerification: null == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: null == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool, - defaultTheme: null == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String, - defaultPostListingType: null == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - hideModlogModNames: null == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool, - applicationEmailAdmins: null == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: null == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int, - federationEnabled: null == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: null == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool, - captchaDifficulty: null == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - registrationMode: null == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode, - reportsEmailAdmins: null == reportsEmailAdmins - ? _value.reportsEmailAdmins - : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool, - federationSignedFetch: freezed == federationSignedFetch - ? _value.federationSignedFetch - : federationSignedFetch // ignore: cast_nullable_to_non_nullable - as bool?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + siteId: + null == siteId + ? _value.siteId + : siteId // ignore: cast_nullable_to_non_nullable + as int, + siteSetup: + null == siteSetup + ? _value.siteSetup + : siteSetup // ignore: cast_nullable_to_non_nullable + as bool, + enableDownvotes: + null == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool, + enableNsfw: + null == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool, + communityCreationAdminOnly: + null == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool, + requireEmailVerification: + null == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + null == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool, + defaultTheme: + null == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String, + defaultPostListingType: + null == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + hideModlogModNames: + null == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool, + applicationEmailAdmins: + null == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + null == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int, + federationEnabled: + null == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + null == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool, + captchaDifficulty: + null == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + registrationMode: + null == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode, + reportsEmailAdmins: + null == reportsEmailAdmins + ? _value.reportsEmailAdmins + : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool, + federationSignedFetch: + freezed == federationSignedFetch + ? _value.federationSignedFetch + : federationSignedFetch // ignore: cast_nullable_to_non_nullable + as bool?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalSiteImplCopyWith<$Res> - implements $LocalSiteCopyWith<$Res> { - factory _$$LocalSiteImplCopyWith( - _$LocalSiteImpl value, $Res Function(_$LocalSiteImpl) then) = - __$$LocalSiteImplCopyWithImpl<$Res>; +abstract class _$$LocalSiteImplCopyWith<$Res> implements $LocalSiteCopyWith<$Res> { + factory _$$LocalSiteImplCopyWith(_$LocalSiteImpl value, $Res Function(_$LocalSiteImpl) then) = __$$LocalSiteImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int siteId, - bool siteSetup, - bool enableDownvotes, - bool enableNsfw, - bool communityCreationAdminOnly, - bool requireEmailVerification, - String? applicationQuestion, - bool privateInstance, - String defaultTheme, - ListingType defaultPostListingType, - String? legalInformation, - bool hideModlogModNames, - bool applicationEmailAdmins, - String? slurFilterRegex, - int actorNameMaxLength, - bool federationEnabled, - @deprecated int? federationWorkerCount, - bool captchaEnabled, - String captchaDifficulty, - DateTime published, - DateTime? updated, - RegistrationMode registrationMode, - bool reportsEmailAdmins, - bool? federationSignedFetch, - String? defaultPostListingMode, - SortType? defaultSortType}); + $Res call({ + int id, + int siteId, + bool siteSetup, + bool enableDownvotes, + bool enableNsfw, + bool communityCreationAdminOnly, + bool requireEmailVerification, + String? applicationQuestion, + bool privateInstance, + String defaultTheme, + ListingType defaultPostListingType, + String? legalInformation, + bool hideModlogModNames, + bool applicationEmailAdmins, + String? slurFilterRegex, + int actorNameMaxLength, + bool federationEnabled, + @deprecated int? federationWorkerCount, + bool captchaEnabled, + String captchaDifficulty, + DateTime published, + DateTime? updated, + RegistrationMode registrationMode, + bool reportsEmailAdmins, + bool? federationSignedFetch, + String? defaultPostListingMode, + SortType? defaultSortType, + }); } /// @nodoc -class __$$LocalSiteImplCopyWithImpl<$Res> - extends _$LocalSiteCopyWithImpl<$Res, _$LocalSiteImpl> - implements _$$LocalSiteImplCopyWith<$Res> { - __$$LocalSiteImplCopyWithImpl( - _$LocalSiteImpl _value, $Res Function(_$LocalSiteImpl) _then) - : super(_value, _then); +class __$$LocalSiteImplCopyWithImpl<$Res> extends _$LocalSiteCopyWithImpl<$Res, _$LocalSiteImpl> implements _$$LocalSiteImplCopyWith<$Res> { + __$$LocalSiteImplCopyWithImpl(_$LocalSiteImpl _value, $Res Function(_$LocalSiteImpl) _then) : super(_value, _then); /// Create a copy of LocalSite /// with the given fields replaced by the non-null parameter values. @@ -338,116 +352,145 @@ class __$$LocalSiteImplCopyWithImpl<$Res> Object? defaultPostListingMode = freezed, Object? defaultSortType = freezed, }) { - return _then(_$LocalSiteImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - siteId: null == siteId - ? _value.siteId - : siteId // ignore: cast_nullable_to_non_nullable - as int, - siteSetup: null == siteSetup - ? _value.siteSetup - : siteSetup // ignore: cast_nullable_to_non_nullable - as bool, - enableDownvotes: null == enableDownvotes - ? _value.enableDownvotes - : enableDownvotes // ignore: cast_nullable_to_non_nullable - as bool, - enableNsfw: null == enableNsfw - ? _value.enableNsfw - : enableNsfw // ignore: cast_nullable_to_non_nullable - as bool, - communityCreationAdminOnly: null == communityCreationAdminOnly - ? _value.communityCreationAdminOnly - : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable - as bool, - requireEmailVerification: null == requireEmailVerification - ? _value.requireEmailVerification - : requireEmailVerification // ignore: cast_nullable_to_non_nullable - as bool, - applicationQuestion: freezed == applicationQuestion - ? _value.applicationQuestion - : applicationQuestion // ignore: cast_nullable_to_non_nullable - as String?, - privateInstance: null == privateInstance - ? _value.privateInstance - : privateInstance // ignore: cast_nullable_to_non_nullable - as bool, - defaultTheme: null == defaultTheme - ? _value.defaultTheme - : defaultTheme // ignore: cast_nullable_to_non_nullable - as String, - defaultPostListingType: null == defaultPostListingType - ? _value.defaultPostListingType - : defaultPostListingType // ignore: cast_nullable_to_non_nullable - as ListingType, - legalInformation: freezed == legalInformation - ? _value.legalInformation - : legalInformation // ignore: cast_nullable_to_non_nullable - as String?, - hideModlogModNames: null == hideModlogModNames - ? _value.hideModlogModNames - : hideModlogModNames // ignore: cast_nullable_to_non_nullable - as bool, - applicationEmailAdmins: null == applicationEmailAdmins - ? _value.applicationEmailAdmins - : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool, - slurFilterRegex: freezed == slurFilterRegex - ? _value.slurFilterRegex - : slurFilterRegex // ignore: cast_nullable_to_non_nullable - as String?, - actorNameMaxLength: null == actorNameMaxLength - ? _value.actorNameMaxLength - : actorNameMaxLength // ignore: cast_nullable_to_non_nullable - as int, - federationEnabled: null == federationEnabled - ? _value.federationEnabled - : federationEnabled // ignore: cast_nullable_to_non_nullable - as bool, - federationWorkerCount: freezed == federationWorkerCount - ? _value.federationWorkerCount - : federationWorkerCount // ignore: cast_nullable_to_non_nullable - as int?, - captchaEnabled: null == captchaEnabled - ? _value.captchaEnabled - : captchaEnabled // ignore: cast_nullable_to_non_nullable - as bool, - captchaDifficulty: null == captchaDifficulty - ? _value.captchaDifficulty - : captchaDifficulty // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - registrationMode: null == registrationMode - ? _value.registrationMode - : registrationMode // ignore: cast_nullable_to_non_nullable - as RegistrationMode, - reportsEmailAdmins: null == reportsEmailAdmins - ? _value.reportsEmailAdmins - : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable - as bool, - federationSignedFetch: freezed == federationSignedFetch - ? _value.federationSignedFetch - : federationSignedFetch // ignore: cast_nullable_to_non_nullable - as bool?, - defaultPostListingMode: freezed == defaultPostListingMode - ? _value.defaultPostListingMode - : defaultPostListingMode // ignore: cast_nullable_to_non_nullable - as String?, - defaultSortType: freezed == defaultSortType - ? _value.defaultSortType - : defaultSortType // ignore: cast_nullable_to_non_nullable - as SortType?, - )); + return _then( + _$LocalSiteImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + siteId: + null == siteId + ? _value.siteId + : siteId // ignore: cast_nullable_to_non_nullable + as int, + siteSetup: + null == siteSetup + ? _value.siteSetup + : siteSetup // ignore: cast_nullable_to_non_nullable + as bool, + enableDownvotes: + null == enableDownvotes + ? _value.enableDownvotes + : enableDownvotes // ignore: cast_nullable_to_non_nullable + as bool, + enableNsfw: + null == enableNsfw + ? _value.enableNsfw + : enableNsfw // ignore: cast_nullable_to_non_nullable + as bool, + communityCreationAdminOnly: + null == communityCreationAdminOnly + ? _value.communityCreationAdminOnly + : communityCreationAdminOnly // ignore: cast_nullable_to_non_nullable + as bool, + requireEmailVerification: + null == requireEmailVerification + ? _value.requireEmailVerification + : requireEmailVerification // ignore: cast_nullable_to_non_nullable + as bool, + applicationQuestion: + freezed == applicationQuestion + ? _value.applicationQuestion + : applicationQuestion // ignore: cast_nullable_to_non_nullable + as String?, + privateInstance: + null == privateInstance + ? _value.privateInstance + : privateInstance // ignore: cast_nullable_to_non_nullable + as bool, + defaultTheme: + null == defaultTheme + ? _value.defaultTheme + : defaultTheme // ignore: cast_nullable_to_non_nullable + as String, + defaultPostListingType: + null == defaultPostListingType + ? _value.defaultPostListingType + : defaultPostListingType // ignore: cast_nullable_to_non_nullable + as ListingType, + legalInformation: + freezed == legalInformation + ? _value.legalInformation + : legalInformation // ignore: cast_nullable_to_non_nullable + as String?, + hideModlogModNames: + null == hideModlogModNames + ? _value.hideModlogModNames + : hideModlogModNames // ignore: cast_nullable_to_non_nullable + as bool, + applicationEmailAdmins: + null == applicationEmailAdmins + ? _value.applicationEmailAdmins + : applicationEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool, + slurFilterRegex: + freezed == slurFilterRegex + ? _value.slurFilterRegex + : slurFilterRegex // ignore: cast_nullable_to_non_nullable + as String?, + actorNameMaxLength: + null == actorNameMaxLength + ? _value.actorNameMaxLength + : actorNameMaxLength // ignore: cast_nullable_to_non_nullable + as int, + federationEnabled: + null == federationEnabled + ? _value.federationEnabled + : federationEnabled // ignore: cast_nullable_to_non_nullable + as bool, + federationWorkerCount: + freezed == federationWorkerCount + ? _value.federationWorkerCount + : federationWorkerCount // ignore: cast_nullable_to_non_nullable + as int?, + captchaEnabled: + null == captchaEnabled + ? _value.captchaEnabled + : captchaEnabled // ignore: cast_nullable_to_non_nullable + as bool, + captchaDifficulty: + null == captchaDifficulty + ? _value.captchaDifficulty + : captchaDifficulty // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + registrationMode: + null == registrationMode + ? _value.registrationMode + : registrationMode // ignore: cast_nullable_to_non_nullable + as RegistrationMode, + reportsEmailAdmins: + null == reportsEmailAdmins + ? _value.reportsEmailAdmins + : reportsEmailAdmins // ignore: cast_nullable_to_non_nullable + as bool, + federationSignedFetch: + freezed == federationSignedFetch + ? _value.federationSignedFetch + : federationSignedFetch // ignore: cast_nullable_to_non_nullable + as bool?, + defaultPostListingMode: + freezed == defaultPostListingMode + ? _value.defaultPostListingMode + : defaultPostListingMode // ignore: cast_nullable_to_non_nullable + as String?, + defaultSortType: + freezed == defaultSortType + ? _value.defaultSortType + : defaultSortType // ignore: cast_nullable_to_non_nullable + as SortType?, + ), + ); } } @@ -455,118 +498,117 @@ class __$$LocalSiteImplCopyWithImpl<$Res> @modelSerde class _$LocalSiteImpl extends _LocalSite { - const _$LocalSiteImpl( - {required this.id, - required this.siteId, - required this.siteSetup, - required this.enableDownvotes, - required this.enableNsfw, - required this.communityCreationAdminOnly, - required this.requireEmailVerification, - this.applicationQuestion, - required this.privateInstance, - required this.defaultTheme, - required this.defaultPostListingType, - this.legalInformation, - required this.hideModlogModNames, - required this.applicationEmailAdmins, - this.slurFilterRegex, - required this.actorNameMaxLength, - required this.federationEnabled, - @deprecated this.federationWorkerCount, - required this.captchaEnabled, - required this.captchaDifficulty, - required this.published, - this.updated, - required this.registrationMode, - required this.reportsEmailAdmins, - this.federationSignedFetch, - this.defaultPostListingMode, - this.defaultSortType}) - : super._(); + const _$LocalSiteImpl({ + required this.id, + required this.siteId, + required this.siteSetup, + required this.enableDownvotes, + required this.enableNsfw, + required this.communityCreationAdminOnly, + required this.requireEmailVerification, + this.applicationQuestion, + required this.privateInstance, + required this.defaultTheme, + required this.defaultPostListingType, + this.legalInformation, + required this.hideModlogModNames, + required this.applicationEmailAdmins, + this.slurFilterRegex, + required this.actorNameMaxLength, + required this.federationEnabled, + @deprecated this.federationWorkerCount, + required this.captchaEnabled, + required this.captchaDifficulty, + required this.published, + this.updated, + required this.registrationMode, + required this.reportsEmailAdmins, + this.federationSignedFetch, + this.defaultPostListingMode, + this.defaultSortType, + }) : super._(); - factory _$LocalSiteImpl.fromJson(Map json) => - _$$LocalSiteImplFromJson(json); + factory _$LocalSiteImpl.fromJson(Map json) => _$$LocalSiteImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int siteId; -// v0.18.0 + // v0.18.0 @override final bool siteSetup; -// v0.18.0 + // v0.18.0 @override final bool enableDownvotes; -// v0.18.0 + // v0.18.0 @override final bool enableNsfw; -// v0.18.0 + // v0.18.0 @override final bool communityCreationAdminOnly; -// v0.18.0 + // v0.18.0 @override final bool requireEmailVerification; -// v0.18.0 + // v0.18.0 @override final String? applicationQuestion; -// v0.18.0 + // v0.18.0 @override final bool privateInstance; -// v0.18.0 + // v0.18.0 @override final String defaultTheme; -// v0.18.0 + // v0.18.0 @override final ListingType defaultPostListingType; -// v0.18.0 + // v0.18.0 @override final String? legalInformation; -// v0.18.0 + // v0.18.0 @override final bool hideModlogModNames; -// v0.18.0 + // v0.18.0 @override final bool applicationEmailAdmins; -// v0.18.0 + // v0.18.0 @override final String? slurFilterRegex; -// v0.18.0 + // v0.18.0 @override final int actorNameMaxLength; -// v0.18.0 + // v0.18.0 @override final bool federationEnabled; -// v0.18.0 + // v0.18.0 @override @deprecated final int? federationWorkerCount; -// v0.18.0 [deprecated in v0.18.1] + // v0.18.0 [deprecated in v0.18.1] @override final bool captchaEnabled; -// v0.18.0 + // v0.18.0 @override final String captchaDifficulty; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final RegistrationMode registrationMode; -// v0.18.0 + // v0.18.0 @override final bool reportsEmailAdmins; -// v0.18.0 + // v0.18.0 @override final bool? federationSignedFetch; -// v0.19.0 (required) + // v0.19.0 (required) @override final String? defaultPostListingMode; -// v0.19.4 (required) + // v0.19.4 (required) @override final SortType? defaultSortType; @@ -582,141 +624,112 @@ class _$LocalSiteImpl extends _LocalSite { other is _$LocalSiteImpl && (identical(other.id, id) || other.id == id) && (identical(other.siteId, siteId) || other.siteId == siteId) && - (identical(other.siteSetup, siteSetup) || - other.siteSetup == siteSetup) && - (identical(other.enableDownvotes, enableDownvotes) || - other.enableDownvotes == enableDownvotes) && - (identical(other.enableNsfw, enableNsfw) || - other.enableNsfw == enableNsfw) && - (identical(other.communityCreationAdminOnly, - communityCreationAdminOnly) || - other.communityCreationAdminOnly == - communityCreationAdminOnly) && - (identical(other.requireEmailVerification, requireEmailVerification) || - other.requireEmailVerification == requireEmailVerification) && - (identical(other.applicationQuestion, applicationQuestion) || - other.applicationQuestion == applicationQuestion) && - (identical(other.privateInstance, privateInstance) || - other.privateInstance == privateInstance) && - (identical(other.defaultTheme, defaultTheme) || - other.defaultTheme == defaultTheme) && - (identical(other.defaultPostListingType, defaultPostListingType) || - other.defaultPostListingType == defaultPostListingType) && - (identical(other.legalInformation, legalInformation) || - other.legalInformation == legalInformation) && - (identical(other.hideModlogModNames, hideModlogModNames) || - other.hideModlogModNames == hideModlogModNames) && - (identical(other.applicationEmailAdmins, applicationEmailAdmins) || - other.applicationEmailAdmins == applicationEmailAdmins) && - (identical(other.slurFilterRegex, slurFilterRegex) || - other.slurFilterRegex == slurFilterRegex) && - (identical(other.actorNameMaxLength, actorNameMaxLength) || - other.actorNameMaxLength == actorNameMaxLength) && - (identical(other.federationEnabled, federationEnabled) || - other.federationEnabled == federationEnabled) && - (identical(other.federationWorkerCount, federationWorkerCount) || - other.federationWorkerCount == federationWorkerCount) && - (identical(other.captchaEnabled, captchaEnabled) || - other.captchaEnabled == captchaEnabled) && - (identical(other.captchaDifficulty, captchaDifficulty) || - other.captchaDifficulty == captchaDifficulty) && - (identical(other.published, published) || - other.published == published) && + (identical(other.siteSetup, siteSetup) || other.siteSetup == siteSetup) && + (identical(other.enableDownvotes, enableDownvotes) || other.enableDownvotes == enableDownvotes) && + (identical(other.enableNsfw, enableNsfw) || other.enableNsfw == enableNsfw) && + (identical(other.communityCreationAdminOnly, communityCreationAdminOnly) || other.communityCreationAdminOnly == communityCreationAdminOnly) && + (identical(other.requireEmailVerification, requireEmailVerification) || other.requireEmailVerification == requireEmailVerification) && + (identical(other.applicationQuestion, applicationQuestion) || other.applicationQuestion == applicationQuestion) && + (identical(other.privateInstance, privateInstance) || other.privateInstance == privateInstance) && + (identical(other.defaultTheme, defaultTheme) || other.defaultTheme == defaultTheme) && + (identical(other.defaultPostListingType, defaultPostListingType) || other.defaultPostListingType == defaultPostListingType) && + (identical(other.legalInformation, legalInformation) || other.legalInformation == legalInformation) && + (identical(other.hideModlogModNames, hideModlogModNames) || other.hideModlogModNames == hideModlogModNames) && + (identical(other.applicationEmailAdmins, applicationEmailAdmins) || other.applicationEmailAdmins == applicationEmailAdmins) && + (identical(other.slurFilterRegex, slurFilterRegex) || other.slurFilterRegex == slurFilterRegex) && + (identical(other.actorNameMaxLength, actorNameMaxLength) || other.actorNameMaxLength == actorNameMaxLength) && + (identical(other.federationEnabled, federationEnabled) || other.federationEnabled == federationEnabled) && + (identical(other.federationWorkerCount, federationWorkerCount) || other.federationWorkerCount == federationWorkerCount) && + (identical(other.captchaEnabled, captchaEnabled) || other.captchaEnabled == captchaEnabled) && + (identical(other.captchaDifficulty, captchaDifficulty) || other.captchaDifficulty == captchaDifficulty) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && - (identical(other.registrationMode, registrationMode) || - other.registrationMode == registrationMode) && - (identical(other.reportsEmailAdmins, reportsEmailAdmins) || - other.reportsEmailAdmins == reportsEmailAdmins) && - (identical(other.federationSignedFetch, federationSignedFetch) || - other.federationSignedFetch == federationSignedFetch) && - (identical(other.defaultPostListingMode, defaultPostListingMode) || - other.defaultPostListingMode == defaultPostListingMode) && - (identical(other.defaultSortType, defaultSortType) || - other.defaultSortType == defaultSortType)); + (identical(other.registrationMode, registrationMode) || other.registrationMode == registrationMode) && + (identical(other.reportsEmailAdmins, reportsEmailAdmins) || other.reportsEmailAdmins == reportsEmailAdmins) && + (identical(other.federationSignedFetch, federationSignedFetch) || other.federationSignedFetch == federationSignedFetch) && + (identical(other.defaultPostListingMode, defaultPostListingMode) || other.defaultPostListingMode == defaultPostListingMode) && + (identical(other.defaultSortType, defaultSortType) || other.defaultSortType == defaultSortType)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - siteId, - siteSetup, - enableDownvotes, - enableNsfw, - communityCreationAdminOnly, - requireEmailVerification, - applicationQuestion, - privateInstance, - defaultTheme, - defaultPostListingType, - legalInformation, - hideModlogModNames, - applicationEmailAdmins, - slurFilterRegex, - actorNameMaxLength, - federationEnabled, - federationWorkerCount, - captchaEnabled, - captchaDifficulty, - published, - updated, - registrationMode, - reportsEmailAdmins, - federationSignedFetch, - defaultPostListingMode, - defaultSortType - ]); + runtimeType, + id, + siteId, + siteSetup, + enableDownvotes, + enableNsfw, + communityCreationAdminOnly, + requireEmailVerification, + applicationQuestion, + privateInstance, + defaultTheme, + defaultPostListingType, + legalInformation, + hideModlogModNames, + applicationEmailAdmins, + slurFilterRegex, + actorNameMaxLength, + federationEnabled, + federationWorkerCount, + captchaEnabled, + captchaDifficulty, + published, + updated, + registrationMode, + reportsEmailAdmins, + federationSignedFetch, + defaultPostListingMode, + defaultSortType, + ]); /// Create a copy of LocalSite /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalSiteImplCopyWith<_$LocalSiteImpl> get copyWith => - __$$LocalSiteImplCopyWithImpl<_$LocalSiteImpl>(this, _$identity); + _$$LocalSiteImplCopyWith<_$LocalSiteImpl> get copyWith => __$$LocalSiteImplCopyWithImpl<_$LocalSiteImpl>(this, _$identity); @override Map toJson() { - return _$$LocalSiteImplToJson( - this, - ); + return _$$LocalSiteImplToJson(this); } } abstract class _LocalSite extends LocalSite { - const factory _LocalSite( - {required final int id, - required final int siteId, - required final bool siteSetup, - required final bool enableDownvotes, - required final bool enableNsfw, - required final bool communityCreationAdminOnly, - required final bool requireEmailVerification, - final String? applicationQuestion, - required final bool privateInstance, - required final String defaultTheme, - required final ListingType defaultPostListingType, - final String? legalInformation, - required final bool hideModlogModNames, - required final bool applicationEmailAdmins, - final String? slurFilterRegex, - required final int actorNameMaxLength, - required final bool federationEnabled, - @deprecated final int? federationWorkerCount, - required final bool captchaEnabled, - required final String captchaDifficulty, - required final DateTime published, - final DateTime? updated, - required final RegistrationMode registrationMode, - required final bool reportsEmailAdmins, - final bool? federationSignedFetch, - final String? defaultPostListingMode, - final SortType? defaultSortType}) = _$LocalSiteImpl; + const factory _LocalSite({ + required final int id, + required final int siteId, + required final bool siteSetup, + required final bool enableDownvotes, + required final bool enableNsfw, + required final bool communityCreationAdminOnly, + required final bool requireEmailVerification, + final String? applicationQuestion, + required final bool privateInstance, + required final String defaultTheme, + required final ListingType defaultPostListingType, + final String? legalInformation, + required final bool hideModlogModNames, + required final bool applicationEmailAdmins, + final String? slurFilterRegex, + required final int actorNameMaxLength, + required final bool federationEnabled, + @deprecated final int? federationWorkerCount, + required final bool captchaEnabled, + required final String captchaDifficulty, + required final DateTime published, + final DateTime? updated, + required final RegistrationMode registrationMode, + required final bool reportsEmailAdmins, + final bool? federationSignedFetch, + final String? defaultPostListingMode, + final SortType? defaultSortType, + }) = _$LocalSiteImpl; const _LocalSite._() : super._(); - factory _LocalSite.fromJson(Map json) = - _$LocalSiteImpl.fromJson; + factory _LocalSite.fromJson(Map json) = _$LocalSiteImpl.fromJson; @override int get id; // v0.18.0 @@ -778,6 +791,5 @@ abstract class _LocalSite extends LocalSite { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalSiteImplCopyWith<_$LocalSiteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalSiteImplCopyWith<_$LocalSiteImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/local_site.g.dart b/lib/src/v3/models/site/local_site.g.dart index 950c9ef7..1345f828 100644 --- a/lib/src/v3/models/site/local_site.g.dart +++ b/lib/src/v3/models/site/local_site.g.dart @@ -6,82 +6,66 @@ part of 'local_site.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalSiteImpl _$$LocalSiteImplFromJson(Map json) => - _$LocalSiteImpl( - id: (json['id'] as num).toInt(), - siteId: (json['site_id'] as num).toInt(), - siteSetup: json['site_setup'] as bool, - enableDownvotes: json['enable_downvotes'] as bool, - enableNsfw: json['enable_nsfw'] as bool, - communityCreationAdminOnly: json['community_creation_admin_only'] as bool, - requireEmailVerification: json['require_email_verification'] as bool, - applicationQuestion: json['application_question'] as String?, - privateInstance: json['private_instance'] as bool, - defaultTheme: json['default_theme'] as String, - defaultPostListingType: - ListingType.fromJson(json['default_post_listing_type']), - legalInformation: json['legal_information'] as String?, - hideModlogModNames: json['hide_modlog_mod_names'] as bool, - applicationEmailAdmins: json['application_email_admins'] as bool, - slurFilterRegex: json['slur_filter_regex'] as String?, - actorNameMaxLength: (json['actor_name_max_length'] as num).toInt(), - federationEnabled: json['federation_enabled'] as bool, - federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), - captchaEnabled: json['captcha_enabled'] as bool, - captchaDifficulty: json['captcha_difficulty'] as String, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - registrationMode: - RegistrationMode.fromJson(json['registration_mode'] as String), - reportsEmailAdmins: json['reports_email_admins'] as bool, - federationSignedFetch: json['federation_signed_fetch'] as bool?, - defaultPostListingMode: json['default_post_listing_mode'] as String?, - defaultSortType: json['default_sort_type'] == null - ? null - : SortType.fromJson(json['default_sort_type']), - ); +_$LocalSiteImpl _$$LocalSiteImplFromJson(Map json) => _$LocalSiteImpl( + id: (json['id'] as num).toInt(), + siteId: (json['site_id'] as num).toInt(), + siteSetup: json['site_setup'] as bool, + enableDownvotes: json['enable_downvotes'] as bool, + enableNsfw: json['enable_nsfw'] as bool, + communityCreationAdminOnly: json['community_creation_admin_only'] as bool, + requireEmailVerification: json['require_email_verification'] as bool, + applicationQuestion: json['application_question'] as String?, + privateInstance: json['private_instance'] as bool, + defaultTheme: json['default_theme'] as String, + defaultPostListingType: ListingType.fromJson(json['default_post_listing_type']), + legalInformation: json['legal_information'] as String?, + hideModlogModNames: json['hide_modlog_mod_names'] as bool, + applicationEmailAdmins: json['application_email_admins'] as bool, + slurFilterRegex: json['slur_filter_regex'] as String?, + actorNameMaxLength: (json['actor_name_max_length'] as num).toInt(), + federationEnabled: json['federation_enabled'] as bool, + federationWorkerCount: (json['federation_worker_count'] as num?)?.toInt(), + captchaEnabled: json['captcha_enabled'] as bool, + captchaDifficulty: json['captcha_difficulty'] as String, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + registrationMode: RegistrationMode.fromJson(json['registration_mode'] as String), + reportsEmailAdmins: json['reports_email_admins'] as bool, + federationSignedFetch: json['federation_signed_fetch'] as bool?, + defaultPostListingMode: json['default_post_listing_mode'] as String?, + defaultSortType: json['default_sort_type'] == null ? null : SortType.fromJson(json['default_sort_type']), +); -Map _$$LocalSiteImplToJson(_$LocalSiteImpl instance) => - { - 'id': instance.id, - 'site_id': instance.siteId, - 'site_setup': instance.siteSetup, - 'enable_downvotes': instance.enableDownvotes, - 'enable_nsfw': instance.enableNsfw, - 'community_creation_admin_only': instance.communityCreationAdminOnly, - 'require_email_verification': instance.requireEmailVerification, - 'application_question': instance.applicationQuestion, - 'private_instance': instance.privateInstance, - 'default_theme': instance.defaultTheme, - 'default_post_listing_type': instance.defaultPostListingType.toJson(), - 'legal_information': instance.legalInformation, - 'hide_modlog_mod_names': instance.hideModlogModNames, - 'application_email_admins': instance.applicationEmailAdmins, - 'slur_filter_regex': instance.slurFilterRegex, - 'actor_name_max_length': instance.actorNameMaxLength, - 'federation_enabled': instance.federationEnabled, - 'federation_worker_count': instance.federationWorkerCount, - 'captcha_enabled': instance.captchaEnabled, - 'captcha_difficulty': instance.captchaDifficulty, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'registration_mode': instance.registrationMode.toJson(), - 'reports_email_admins': instance.reportsEmailAdmins, - 'federation_signed_fetch': instance.federationSignedFetch, - 'default_post_listing_mode': instance.defaultPostListingMode, - 'default_sort_type': instance.defaultSortType?.toJson(), - }; +Map _$$LocalSiteImplToJson(_$LocalSiteImpl instance) => { + 'id': instance.id, + 'site_id': instance.siteId, + 'site_setup': instance.siteSetup, + 'enable_downvotes': instance.enableDownvotes, + 'enable_nsfw': instance.enableNsfw, + 'community_creation_admin_only': instance.communityCreationAdminOnly, + 'require_email_verification': instance.requireEmailVerification, + 'application_question': instance.applicationQuestion, + 'private_instance': instance.privateInstance, + 'default_theme': instance.defaultTheme, + 'default_post_listing_type': instance.defaultPostListingType.toJson(), + 'legal_information': instance.legalInformation, + 'hide_modlog_mod_names': instance.hideModlogModNames, + 'application_email_admins': instance.applicationEmailAdmins, + 'slur_filter_regex': instance.slurFilterRegex, + 'actor_name_max_length': instance.actorNameMaxLength, + 'federation_enabled': instance.federationEnabled, + 'federation_worker_count': instance.federationWorkerCount, + 'captcha_enabled': instance.captchaEnabled, + 'captcha_difficulty': instance.captchaDifficulty, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'registration_mode': instance.registrationMode.toJson(), + 'reports_email_admins': instance.reportsEmailAdmins, + 'federation_signed_fetch': instance.federationSignedFetch, + 'default_post_listing_mode': instance.defaultPostListingMode, + 'default_sort_type': instance.defaultSortType?.toJson(), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/site/local_site_rate_limit.dart b/lib/src/v3/models/site/local_site_rate_limit.dart index 6d37b0d2..25b3d2ae 100644 --- a/lib/src/v3/models/site/local_site_rate_limit.dart +++ b/lib/src/v3/models/site/local_site_rate_limit.dart @@ -31,6 +31,5 @@ class LocalSiteRateLimit with _$LocalSiteRateLimit { }) = _LocalSiteRateLimit; const LocalSiteRateLimit._(); - factory LocalSiteRateLimit.fromJson(Map json) => - _$LocalSiteRateLimitFromJson(json); + factory LocalSiteRateLimit.fromJson(Map json) => _$LocalSiteRateLimitFromJson(json); } diff --git a/lib/src/v3/models/site/local_site_rate_limit.freezed.dart b/lib/src/v3/models/site/local_site_rate_limit.freezed.dart index 4969410c..e2a6f0a9 100644 --- a/lib/src/v3/models/site/local_site_rate_limit.freezed.dart +++ b/lib/src/v3/models/site/local_site_rate_limit.freezed.dart @@ -12,7 +12,8 @@ part of 'local_site_rate_limit.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalSiteRateLimit _$LocalSiteRateLimitFromJson(Map json) { return _LocalSiteRateLimit.fromJson(json); @@ -21,8 +22,7 @@ LocalSiteRateLimit _$LocalSiteRateLimitFromJson(Map json) { /// @nodoc mixin _$LocalSiteRateLimit { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get localSiteId => throw _privateConstructorUsedError; // v0.18.0 int get message => throw _privateConstructorUsedError; // v0.18.0 int get messagePerSecond => throw _privateConstructorUsedError; // v0.18.0 @@ -38,8 +38,7 @@ mixin _$LocalSiteRateLimit { int get searchPerSecond => throw _privateConstructorUsedError; // v0.18.0 DateTime get published => throw _privateConstructorUsedError; // v0.18.0 DateTime? get updated => throw _privateConstructorUsedError; // v0.18.0 - int? get importUserSettings => - throw _privateConstructorUsedError; // v0.19.0 (required) + int? get importUserSettings => throw _privateConstructorUsedError; // v0.19.0 (required) int? get importUserSettingsPerSecond => throw _privateConstructorUsedError; /// Serializes this LocalSiteRateLimit to a JSON map. @@ -48,40 +47,37 @@ mixin _$LocalSiteRateLimit { /// Create a copy of LocalSiteRateLimit /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalSiteRateLimitCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalSiteRateLimitCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalSiteRateLimitCopyWith<$Res> { - factory $LocalSiteRateLimitCopyWith( - LocalSiteRateLimit value, $Res Function(LocalSiteRateLimit) then) = - _$LocalSiteRateLimitCopyWithImpl<$Res, LocalSiteRateLimit>; + factory $LocalSiteRateLimitCopyWith(LocalSiteRateLimit value, $Res Function(LocalSiteRateLimit) then) = _$LocalSiteRateLimitCopyWithImpl<$Res, LocalSiteRateLimit>; @useResult - $Res call( - {@deprecated int? id, - int localSiteId, - int message, - int messagePerSecond, - int post, - int postPerSecond, - int register, - int registerPerSecond, - int image, - int imagePerSecond, - int comment, - int commentPerSecond, - int search, - int searchPerSecond, - DateTime published, - DateTime? updated, - int? importUserSettings, - int? importUserSettingsPerSecond}); + $Res call({ + @deprecated int? id, + int localSiteId, + int message, + int messagePerSecond, + int post, + int postPerSecond, + int register, + int registerPerSecond, + int image, + int imagePerSecond, + int comment, + int commentPerSecond, + int search, + int searchPerSecond, + DateTime published, + DateTime? updated, + int? importUserSettings, + int? importUserSettingsPerSecond, + }); } /// @nodoc -class _$LocalSiteRateLimitCopyWithImpl<$Res, $Val extends LocalSiteRateLimit> - implements $LocalSiteRateLimitCopyWith<$Res> { +class _$LocalSiteRateLimitCopyWithImpl<$Res, $Val extends LocalSiteRateLimit> implements $LocalSiteRateLimitCopyWith<$Res> { _$LocalSiteRateLimitCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -113,119 +109,134 @@ class _$LocalSiteRateLimitCopyWithImpl<$Res, $Val extends LocalSiteRateLimit> Object? importUserSettings = freezed, Object? importUserSettingsPerSecond = freezed, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as int, - messagePerSecond: null == messagePerSecond - ? _value.messagePerSecond - : messagePerSecond // ignore: cast_nullable_to_non_nullable - as int, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as int, - postPerSecond: null == postPerSecond - ? _value.postPerSecond - : postPerSecond // ignore: cast_nullable_to_non_nullable - as int, - register: null == register - ? _value.register - : register // ignore: cast_nullable_to_non_nullable - as int, - registerPerSecond: null == registerPerSecond - ? _value.registerPerSecond - : registerPerSecond // ignore: cast_nullable_to_non_nullable - as int, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as int, - imagePerSecond: null == imagePerSecond - ? _value.imagePerSecond - : imagePerSecond // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as int, - commentPerSecond: null == commentPerSecond - ? _value.commentPerSecond - : commentPerSecond // ignore: cast_nullable_to_non_nullable - as int, - search: null == search - ? _value.search - : search // ignore: cast_nullable_to_non_nullable - as int, - searchPerSecond: null == searchPerSecond - ? _value.searchPerSecond - : searchPerSecond // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - importUserSettings: freezed == importUserSettings - ? _value.importUserSettings - : importUserSettings // ignore: cast_nullable_to_non_nullable - as int?, - importUserSettingsPerSecond: freezed == importUserSettingsPerSecond - ? _value.importUserSettingsPerSecond - : importUserSettingsPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + message: + null == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as int, + messagePerSecond: + null == messagePerSecond + ? _value.messagePerSecond + : messagePerSecond // ignore: cast_nullable_to_non_nullable + as int, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as int, + postPerSecond: + null == postPerSecond + ? _value.postPerSecond + : postPerSecond // ignore: cast_nullable_to_non_nullable + as int, + register: + null == register + ? _value.register + : register // ignore: cast_nullable_to_non_nullable + as int, + registerPerSecond: + null == registerPerSecond + ? _value.registerPerSecond + : registerPerSecond // ignore: cast_nullable_to_non_nullable + as int, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as int, + imagePerSecond: + null == imagePerSecond + ? _value.imagePerSecond + : imagePerSecond // ignore: cast_nullable_to_non_nullable + as int, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as int, + commentPerSecond: + null == commentPerSecond + ? _value.commentPerSecond + : commentPerSecond // ignore: cast_nullable_to_non_nullable + as int, + search: + null == search + ? _value.search + : search // ignore: cast_nullable_to_non_nullable + as int, + searchPerSecond: + null == searchPerSecond + ? _value.searchPerSecond + : searchPerSecond // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + importUserSettings: + freezed == importUserSettings + ? _value.importUserSettings + : importUserSettings // ignore: cast_nullable_to_non_nullable + as int?, + importUserSettingsPerSecond: + freezed == importUserSettingsPerSecond + ? _value.importUserSettingsPerSecond + : importUserSettingsPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalSiteRateLimitImplCopyWith<$Res> - implements $LocalSiteRateLimitCopyWith<$Res> { - factory _$$LocalSiteRateLimitImplCopyWith(_$LocalSiteRateLimitImpl value, - $Res Function(_$LocalSiteRateLimitImpl) then) = - __$$LocalSiteRateLimitImplCopyWithImpl<$Res>; +abstract class _$$LocalSiteRateLimitImplCopyWith<$Res> implements $LocalSiteRateLimitCopyWith<$Res> { + factory _$$LocalSiteRateLimitImplCopyWith(_$LocalSiteRateLimitImpl value, $Res Function(_$LocalSiteRateLimitImpl) then) = __$$LocalSiteRateLimitImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int localSiteId, - int message, - int messagePerSecond, - int post, - int postPerSecond, - int register, - int registerPerSecond, - int image, - int imagePerSecond, - int comment, - int commentPerSecond, - int search, - int searchPerSecond, - DateTime published, - DateTime? updated, - int? importUserSettings, - int? importUserSettingsPerSecond}); + $Res call({ + @deprecated int? id, + int localSiteId, + int message, + int messagePerSecond, + int post, + int postPerSecond, + int register, + int registerPerSecond, + int image, + int imagePerSecond, + int comment, + int commentPerSecond, + int search, + int searchPerSecond, + DateTime published, + DateTime? updated, + int? importUserSettings, + int? importUserSettingsPerSecond, + }); } /// @nodoc -class __$$LocalSiteRateLimitImplCopyWithImpl<$Res> - extends _$LocalSiteRateLimitCopyWithImpl<$Res, _$LocalSiteRateLimitImpl> - implements _$$LocalSiteRateLimitImplCopyWith<$Res> { - __$$LocalSiteRateLimitImplCopyWithImpl(_$LocalSiteRateLimitImpl _value, - $Res Function(_$LocalSiteRateLimitImpl) _then) - : super(_value, _then); +class __$$LocalSiteRateLimitImplCopyWithImpl<$Res> extends _$LocalSiteRateLimitCopyWithImpl<$Res, _$LocalSiteRateLimitImpl> implements _$$LocalSiteRateLimitImplCopyWith<$Res> { + __$$LocalSiteRateLimitImplCopyWithImpl(_$LocalSiteRateLimitImpl _value, $Res Function(_$LocalSiteRateLimitImpl) _then) : super(_value, _then); /// Create a copy of LocalSiteRateLimit /// with the given fields replaced by the non-null parameter values. @@ -251,80 +262,100 @@ class __$$LocalSiteRateLimitImplCopyWithImpl<$Res> Object? importUserSettings = freezed, Object? importUserSettingsPerSecond = freezed, }) { - return _then(_$LocalSiteRateLimitImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as int, - messagePerSecond: null == messagePerSecond - ? _value.messagePerSecond - : messagePerSecond // ignore: cast_nullable_to_non_nullable - as int, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as int, - postPerSecond: null == postPerSecond - ? _value.postPerSecond - : postPerSecond // ignore: cast_nullable_to_non_nullable - as int, - register: null == register - ? _value.register - : register // ignore: cast_nullable_to_non_nullable - as int, - registerPerSecond: null == registerPerSecond - ? _value.registerPerSecond - : registerPerSecond // ignore: cast_nullable_to_non_nullable - as int, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as int, - imagePerSecond: null == imagePerSecond - ? _value.imagePerSecond - : imagePerSecond // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as int, - commentPerSecond: null == commentPerSecond - ? _value.commentPerSecond - : commentPerSecond // ignore: cast_nullable_to_non_nullable - as int, - search: null == search - ? _value.search - : search // ignore: cast_nullable_to_non_nullable - as int, - searchPerSecond: null == searchPerSecond - ? _value.searchPerSecond - : searchPerSecond // ignore: cast_nullable_to_non_nullable - as int, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - importUserSettings: freezed == importUserSettings - ? _value.importUserSettings - : importUserSettings // ignore: cast_nullable_to_non_nullable - as int?, - importUserSettingsPerSecond: freezed == importUserSettingsPerSecond - ? _value.importUserSettingsPerSecond - : importUserSettingsPerSecond // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$LocalSiteRateLimitImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + message: + null == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as int, + messagePerSecond: + null == messagePerSecond + ? _value.messagePerSecond + : messagePerSecond // ignore: cast_nullable_to_non_nullable + as int, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as int, + postPerSecond: + null == postPerSecond + ? _value.postPerSecond + : postPerSecond // ignore: cast_nullable_to_non_nullable + as int, + register: + null == register + ? _value.register + : register // ignore: cast_nullable_to_non_nullable + as int, + registerPerSecond: + null == registerPerSecond + ? _value.registerPerSecond + : registerPerSecond // ignore: cast_nullable_to_non_nullable + as int, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as int, + imagePerSecond: + null == imagePerSecond + ? _value.imagePerSecond + : imagePerSecond // ignore: cast_nullable_to_non_nullable + as int, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as int, + commentPerSecond: + null == commentPerSecond + ? _value.commentPerSecond + : commentPerSecond // ignore: cast_nullable_to_non_nullable + as int, + search: + null == search + ? _value.search + : search // ignore: cast_nullable_to_non_nullable + as int, + searchPerSecond: + null == searchPerSecond + ? _value.searchPerSecond + : searchPerSecond // ignore: cast_nullable_to_non_nullable + as int, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + importUserSettings: + freezed == importUserSettings + ? _value.importUserSettings + : importUserSettings // ignore: cast_nullable_to_non_nullable + as int?, + importUserSettingsPerSecond: + freezed == importUserSettingsPerSecond + ? _value.importUserSettingsPerSecond + : importUserSettingsPerSecond // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -332,82 +363,81 @@ class __$$LocalSiteRateLimitImplCopyWithImpl<$Res> @modelSerde class _$LocalSiteRateLimitImpl extends _LocalSiteRateLimit { - const _$LocalSiteRateLimitImpl( - {@deprecated this.id, - required this.localSiteId, - required this.message, - required this.messagePerSecond, - required this.post, - required this.postPerSecond, - required this.register, - required this.registerPerSecond, - required this.image, - required this.imagePerSecond, - required this.comment, - required this.commentPerSecond, - required this.search, - required this.searchPerSecond, - required this.published, - this.updated, - this.importUserSettings, - this.importUserSettingsPerSecond}) - : super._(); + const _$LocalSiteRateLimitImpl({ + @deprecated this.id, + required this.localSiteId, + required this.message, + required this.messagePerSecond, + required this.post, + required this.postPerSecond, + required this.register, + required this.registerPerSecond, + required this.image, + required this.imagePerSecond, + required this.comment, + required this.commentPerSecond, + required this.search, + required this.searchPerSecond, + required this.published, + this.updated, + this.importUserSettings, + this.importUserSettingsPerSecond, + }) : super._(); - factory _$LocalSiteRateLimitImpl.fromJson(Map json) => - _$$LocalSiteRateLimitImplFromJson(json); + factory _$LocalSiteRateLimitImpl.fromJson(Map json) => _$$LocalSiteRateLimitImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int localSiteId; -// v0.18.0 + // v0.18.0 @override final int message; -// v0.18.0 + // v0.18.0 @override final int messagePerSecond; -// v0.18.0 + // v0.18.0 @override final int post; -// v0.18.0 + // v0.18.0 @override final int postPerSecond; -// v0.18.0 + // v0.18.0 @override final int register; -// v0.18.0 + // v0.18.0 @override final int registerPerSecond; -// v0.18.0 + // v0.18.0 @override final int image; -// v0.18.0 + // v0.18.0 @override final int imagePerSecond; -// v0.18.0 + // v0.18.0 @override final int comment; -// v0.18.0 + // v0.18.0 @override final int commentPerSecond; -// v0.18.0 + // v0.18.0 @override final int search; -// v0.18.0 + // v0.18.0 @override final int searchPerSecond; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final int? importUserSettings; -// v0.19.0 (required) + // v0.19.0 (required) @override final int? importUserSettingsPerSecond; @@ -422,102 +452,86 @@ class _$LocalSiteRateLimitImpl extends _LocalSiteRateLimit { (other.runtimeType == runtimeType && other is _$LocalSiteRateLimitImpl && (identical(other.id, id) || other.id == id) && - (identical(other.localSiteId, localSiteId) || - other.localSiteId == localSiteId) && + (identical(other.localSiteId, localSiteId) || other.localSiteId == localSiteId) && (identical(other.message, message) || other.message == message) && - (identical(other.messagePerSecond, messagePerSecond) || - other.messagePerSecond == messagePerSecond) && + (identical(other.messagePerSecond, messagePerSecond) || other.messagePerSecond == messagePerSecond) && (identical(other.post, post) || other.post == post) && - (identical(other.postPerSecond, postPerSecond) || - other.postPerSecond == postPerSecond) && - (identical(other.register, register) || - other.register == register) && - (identical(other.registerPerSecond, registerPerSecond) || - other.registerPerSecond == registerPerSecond) && + (identical(other.postPerSecond, postPerSecond) || other.postPerSecond == postPerSecond) && + (identical(other.register, register) || other.register == register) && + (identical(other.registerPerSecond, registerPerSecond) || other.registerPerSecond == registerPerSecond) && (identical(other.image, image) || other.image == image) && - (identical(other.imagePerSecond, imagePerSecond) || - other.imagePerSecond == imagePerSecond) && + (identical(other.imagePerSecond, imagePerSecond) || other.imagePerSecond == imagePerSecond) && (identical(other.comment, comment) || other.comment == comment) && - (identical(other.commentPerSecond, commentPerSecond) || - other.commentPerSecond == commentPerSecond) && + (identical(other.commentPerSecond, commentPerSecond) || other.commentPerSecond == commentPerSecond) && (identical(other.search, search) || other.search == search) && - (identical(other.searchPerSecond, searchPerSecond) || - other.searchPerSecond == searchPerSecond) && - (identical(other.published, published) || - other.published == published) && + (identical(other.searchPerSecond, searchPerSecond) || other.searchPerSecond == searchPerSecond) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && - (identical(other.importUserSettings, importUserSettings) || - other.importUserSettings == importUserSettings) && - (identical(other.importUserSettingsPerSecond, - importUserSettingsPerSecond) || - other.importUserSettingsPerSecond == - importUserSettingsPerSecond)); + (identical(other.importUserSettings, importUserSettings) || other.importUserSettings == importUserSettings) && + (identical(other.importUserSettingsPerSecond, importUserSettingsPerSecond) || other.importUserSettingsPerSecond == importUserSettingsPerSecond)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - localSiteId, - message, - messagePerSecond, - post, - postPerSecond, - register, - registerPerSecond, - image, - imagePerSecond, - comment, - commentPerSecond, - search, - searchPerSecond, - published, - updated, - importUserSettings, - importUserSettingsPerSecond); + runtimeType, + id, + localSiteId, + message, + messagePerSecond, + post, + postPerSecond, + register, + registerPerSecond, + image, + imagePerSecond, + comment, + commentPerSecond, + search, + searchPerSecond, + published, + updated, + importUserSettings, + importUserSettingsPerSecond, + ); /// Create a copy of LocalSiteRateLimit /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalSiteRateLimitImplCopyWith<_$LocalSiteRateLimitImpl> get copyWith => - __$$LocalSiteRateLimitImplCopyWithImpl<_$LocalSiteRateLimitImpl>( - this, _$identity); + _$$LocalSiteRateLimitImplCopyWith<_$LocalSiteRateLimitImpl> get copyWith => __$$LocalSiteRateLimitImplCopyWithImpl<_$LocalSiteRateLimitImpl>(this, _$identity); @override Map toJson() { - return _$$LocalSiteRateLimitImplToJson( - this, - ); + return _$$LocalSiteRateLimitImplToJson(this); } } abstract class _LocalSiteRateLimit extends LocalSiteRateLimit { - const factory _LocalSiteRateLimit( - {@deprecated final int? id, - required final int localSiteId, - required final int message, - required final int messagePerSecond, - required final int post, - required final int postPerSecond, - required final int register, - required final int registerPerSecond, - required final int image, - required final int imagePerSecond, - required final int comment, - required final int commentPerSecond, - required final int search, - required final int searchPerSecond, - required final DateTime published, - final DateTime? updated, - final int? importUserSettings, - final int? importUserSettingsPerSecond}) = _$LocalSiteRateLimitImpl; + const factory _LocalSiteRateLimit({ + @deprecated final int? id, + required final int localSiteId, + required final int message, + required final int messagePerSecond, + required final int post, + required final int postPerSecond, + required final int register, + required final int registerPerSecond, + required final int image, + required final int imagePerSecond, + required final int comment, + required final int commentPerSecond, + required final int search, + required final int searchPerSecond, + required final DateTime published, + final DateTime? updated, + final int? importUserSettings, + final int? importUserSettingsPerSecond, + }) = _$LocalSiteRateLimitImpl; const _LocalSiteRateLimit._() : super._(); - factory _LocalSiteRateLimit.fromJson(Map json) = - _$LocalSiteRateLimitImpl.fromJson; + factory _LocalSiteRateLimit.fromJson(Map json) = _$LocalSiteRateLimitImpl.fromJson; @override @deprecated @@ -561,6 +575,5 @@ abstract class _LocalSiteRateLimit extends LocalSiteRateLimit { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalSiteRateLimitImplCopyWith<_$LocalSiteRateLimitImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalSiteRateLimitImplCopyWith<_$LocalSiteRateLimitImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/local_site_rate_limit.g.dart b/lib/src/v3/models/site/local_site_rate_limit.g.dart index c8c39e35..b1f71075 100644 --- a/lib/src/v3/models/site/local_site_rate_limit.g.dart +++ b/lib/src/v3/models/site/local_site_rate_limit.g.dart @@ -6,63 +6,48 @@ part of 'local_site_rate_limit.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalSiteRateLimitImpl _$$LocalSiteRateLimitImplFromJson( - Map json) => - _$LocalSiteRateLimitImpl( - id: (json['id'] as num?)?.toInt(), - localSiteId: (json['local_site_id'] as num).toInt(), - message: (json['message'] as num).toInt(), - messagePerSecond: (json['message_per_second'] as num).toInt(), - post: (json['post'] as num).toInt(), - postPerSecond: (json['post_per_second'] as num).toInt(), - register: (json['register'] as num).toInt(), - registerPerSecond: (json['register_per_second'] as num).toInt(), - image: (json['image'] as num).toInt(), - imagePerSecond: (json['image_per_second'] as num).toInt(), - comment: (json['comment'] as num).toInt(), - commentPerSecond: (json['comment_per_second'] as num).toInt(), - search: (json['search'] as num).toInt(), - searchPerSecond: (json['search_per_second'] as num).toInt(), - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - importUserSettings: (json['import_user_settings'] as num?)?.toInt(), - importUserSettingsPerSecond: - (json['import_user_settings_per_second'] as num?)?.toInt(), - ); +_$LocalSiteRateLimitImpl _$$LocalSiteRateLimitImplFromJson(Map json) => _$LocalSiteRateLimitImpl( + id: (json['id'] as num?)?.toInt(), + localSiteId: (json['local_site_id'] as num).toInt(), + message: (json['message'] as num).toInt(), + messagePerSecond: (json['message_per_second'] as num).toInt(), + post: (json['post'] as num).toInt(), + postPerSecond: (json['post_per_second'] as num).toInt(), + register: (json['register'] as num).toInt(), + registerPerSecond: (json['register_per_second'] as num).toInt(), + image: (json['image'] as num).toInt(), + imagePerSecond: (json['image_per_second'] as num).toInt(), + comment: (json['comment'] as num).toInt(), + commentPerSecond: (json['comment_per_second'] as num).toInt(), + search: (json['search'] as num).toInt(), + searchPerSecond: (json['search_per_second'] as num).toInt(), + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + importUserSettings: (json['import_user_settings'] as num?)?.toInt(), + importUserSettingsPerSecond: (json['import_user_settings_per_second'] as num?)?.toInt(), +); -Map _$$LocalSiteRateLimitImplToJson( - _$LocalSiteRateLimitImpl instance) => - { - 'id': instance.id, - 'local_site_id': instance.localSiteId, - 'message': instance.message, - 'message_per_second': instance.messagePerSecond, - 'post': instance.post, - 'post_per_second': instance.postPerSecond, - 'register': instance.register, - 'register_per_second': instance.registerPerSecond, - 'image': instance.image, - 'image_per_second': instance.imagePerSecond, - 'comment': instance.comment, - 'comment_per_second': instance.commentPerSecond, - 'search': instance.search, - 'search_per_second': instance.searchPerSecond, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'import_user_settings': instance.importUserSettings, - 'import_user_settings_per_second': instance.importUserSettingsPerSecond, - }; +Map _$$LocalSiteRateLimitImplToJson(_$LocalSiteRateLimitImpl instance) => { + 'id': instance.id, + 'local_site_id': instance.localSiteId, + 'message': instance.message, + 'message_per_second': instance.messagePerSecond, + 'post': instance.post, + 'post_per_second': instance.postPerSecond, + 'register': instance.register, + 'register_per_second': instance.registerPerSecond, + 'image': instance.image, + 'image_per_second': instance.imagePerSecond, + 'comment': instance.comment, + 'comment_per_second': instance.commentPerSecond, + 'search': instance.search, + 'search_per_second': instance.searchPerSecond, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'import_user_settings': instance.importUserSettings, + 'import_user_settings_per_second': instance.importUserSettingsPerSecond, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/site/local_site_url_blocklist.dart b/lib/src/v3/models/site/local_site_url_blocklist.dart index 27b6a626..3a6630ec 100644 --- a/lib/src/v3/models/site/local_site_url_blocklist.dart +++ b/lib/src/v3/models/site/local_site_url_blocklist.dart @@ -17,6 +17,5 @@ class LocalSiteUrlBlocklist with _$LocalSiteUrlBlocklist { }) = _LocalSiteUrlBlocklist; const LocalSiteUrlBlocklist._(); - factory LocalSiteUrlBlocklist.fromJson(Map json) => - _$LocalSiteUrlBlocklistFromJson(json); + factory LocalSiteUrlBlocklist.fromJson(Map json) => _$LocalSiteUrlBlocklistFromJson(json); } diff --git a/lib/src/v3/models/site/local_site_url_blocklist.freezed.dart b/lib/src/v3/models/site/local_site_url_blocklist.freezed.dart index b7407c7c..24754150 100644 --- a/lib/src/v3/models/site/local_site_url_blocklist.freezed.dart +++ b/lib/src/v3/models/site/local_site_url_blocklist.freezed.dart @@ -12,10 +12,10 @@ part of 'local_site_url_blocklist.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -LocalSiteUrlBlocklist _$LocalSiteUrlBlocklistFromJson( - Map json) { +LocalSiteUrlBlocklist _$LocalSiteUrlBlocklistFromJson(Map json) { return _LocalSiteUrlBlocklist.fromJson(json); } @@ -23,8 +23,7 @@ LocalSiteUrlBlocklist _$LocalSiteUrlBlocklistFromJson( mixin _$LocalSiteUrlBlocklist { int? get id => throw _privateConstructorUsedError; // v0.19.4 (required) String? get url => throw _privateConstructorUsedError; // v0.19.4 (required) - DateTime? get published => - throw _privateConstructorUsedError; // v0.19.4 (required) + DateTime? get published => throw _privateConstructorUsedError; // v0.19.4 (required) DateTime? get updated => throw _privateConstructorUsedError; /// Serializes this LocalSiteUrlBlocklist to a JSON map. @@ -33,23 +32,18 @@ mixin _$LocalSiteUrlBlocklist { /// Create a copy of LocalSiteUrlBlocklist /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalSiteUrlBlocklistCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalSiteUrlBlocklistCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalSiteUrlBlocklistCopyWith<$Res> { - factory $LocalSiteUrlBlocklistCopyWith(LocalSiteUrlBlocklist value, - $Res Function(LocalSiteUrlBlocklist) then) = - _$LocalSiteUrlBlocklistCopyWithImpl<$Res, LocalSiteUrlBlocklist>; + factory $LocalSiteUrlBlocklistCopyWith(LocalSiteUrlBlocklist value, $Res Function(LocalSiteUrlBlocklist) then) = _$LocalSiteUrlBlocklistCopyWithImpl<$Res, LocalSiteUrlBlocklist>; @useResult $Res call({int? id, String? url, DateTime? published, DateTime? updated}); } /// @nodoc -class _$LocalSiteUrlBlocklistCopyWithImpl<$Res, - $Val extends LocalSiteUrlBlocklist> - implements $LocalSiteUrlBlocklistCopyWith<$Res> { +class _$LocalSiteUrlBlocklistCopyWithImpl<$Res, $Val extends LocalSiteUrlBlocklist> implements $LocalSiteUrlBlocklistCopyWith<$Res> { _$LocalSiteUrlBlocklistCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,82 +55,76 @@ class _$LocalSiteUrlBlocklistCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? url = freezed, - Object? published = freezed, - Object? updated = freezed, - }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - published: freezed == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime?, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + $Res call({Object? id = freezed, Object? url = freezed, Object? published = freezed, Object? updated = freezed}) { + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + published: + freezed == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime?, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LocalSiteUrlBlocklistImplCopyWith<$Res> - implements $LocalSiteUrlBlocklistCopyWith<$Res> { - factory _$$LocalSiteUrlBlocklistImplCopyWith( - _$LocalSiteUrlBlocklistImpl value, - $Res Function(_$LocalSiteUrlBlocklistImpl) then) = - __$$LocalSiteUrlBlocklistImplCopyWithImpl<$Res>; +abstract class _$$LocalSiteUrlBlocklistImplCopyWith<$Res> implements $LocalSiteUrlBlocklistCopyWith<$Res> { + factory _$$LocalSiteUrlBlocklistImplCopyWith(_$LocalSiteUrlBlocklistImpl value, $Res Function(_$LocalSiteUrlBlocklistImpl) then) = __$$LocalSiteUrlBlocklistImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, String? url, DateTime? published, DateTime? updated}); } /// @nodoc -class __$$LocalSiteUrlBlocklistImplCopyWithImpl<$Res> - extends _$LocalSiteUrlBlocklistCopyWithImpl<$Res, - _$LocalSiteUrlBlocklistImpl> - implements _$$LocalSiteUrlBlocklistImplCopyWith<$Res> { - __$$LocalSiteUrlBlocklistImplCopyWithImpl(_$LocalSiteUrlBlocklistImpl _value, - $Res Function(_$LocalSiteUrlBlocklistImpl) _then) - : super(_value, _then); +class __$$LocalSiteUrlBlocklistImplCopyWithImpl<$Res> extends _$LocalSiteUrlBlocklistCopyWithImpl<$Res, _$LocalSiteUrlBlocklistImpl> implements _$$LocalSiteUrlBlocklistImplCopyWith<$Res> { + __$$LocalSiteUrlBlocklistImplCopyWithImpl(_$LocalSiteUrlBlocklistImpl _value, $Res Function(_$LocalSiteUrlBlocklistImpl) _then) : super(_value, _then); /// Create a copy of LocalSiteUrlBlocklist /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = freezed, - Object? url = freezed, - Object? published = freezed, - Object? updated = freezed, - }) { - return _then(_$LocalSiteUrlBlocklistImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - published: freezed == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime?, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + $Res call({Object? id = freezed, Object? url = freezed, Object? published = freezed, Object? updated = freezed}) { + return _then( + _$LocalSiteUrlBlocklistImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + published: + freezed == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime?, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -144,22 +132,19 @@ class __$$LocalSiteUrlBlocklistImplCopyWithImpl<$Res> @modelSerde class _$LocalSiteUrlBlocklistImpl extends _LocalSiteUrlBlocklist { - const _$LocalSiteUrlBlocklistImpl( - {this.id, this.url, this.published, this.updated}) - : super._(); + const _$LocalSiteUrlBlocklistImpl({this.id, this.url, this.published, this.updated}) : super._(); - factory _$LocalSiteUrlBlocklistImpl.fromJson(Map json) => - _$$LocalSiteUrlBlocklistImplFromJson(json); + factory _$LocalSiteUrlBlocklistImpl.fromJson(Map json) => _$$LocalSiteUrlBlocklistImplFromJson(json); @override final int? id; -// v0.19.4 (required) + // v0.19.4 (required) @override final String? url; -// v0.19.4 (required) + // v0.19.4 (required) @override final DateTime? published; -// v0.19.4 (required) + // v0.19.4 (required) @override final DateTime? updated; @@ -175,8 +160,7 @@ class _$LocalSiteUrlBlocklistImpl extends _LocalSiteUrlBlocklist { other is _$LocalSiteUrlBlocklistImpl && (identical(other.id, id) || other.id == id) && (identical(other.url, url) || other.url == url) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @@ -189,28 +173,19 @@ class _$LocalSiteUrlBlocklistImpl extends _LocalSiteUrlBlocklist { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalSiteUrlBlocklistImplCopyWith<_$LocalSiteUrlBlocklistImpl> - get copyWith => __$$LocalSiteUrlBlocklistImplCopyWithImpl< - _$LocalSiteUrlBlocklistImpl>(this, _$identity); + _$$LocalSiteUrlBlocklistImplCopyWith<_$LocalSiteUrlBlocklistImpl> get copyWith => __$$LocalSiteUrlBlocklistImplCopyWithImpl<_$LocalSiteUrlBlocklistImpl>(this, _$identity); @override Map toJson() { - return _$$LocalSiteUrlBlocklistImplToJson( - this, - ); + return _$$LocalSiteUrlBlocklistImplToJson(this); } } abstract class _LocalSiteUrlBlocklist extends LocalSiteUrlBlocklist { - const factory _LocalSiteUrlBlocklist( - {final int? id, - final String? url, - final DateTime? published, - final DateTime? updated}) = _$LocalSiteUrlBlocklistImpl; + const factory _LocalSiteUrlBlocklist({final int? id, final String? url, final DateTime? published, final DateTime? updated}) = _$LocalSiteUrlBlocklistImpl; const _LocalSiteUrlBlocklist._() : super._(); - factory _LocalSiteUrlBlocklist.fromJson(Map json) = - _$LocalSiteUrlBlocklistImpl.fromJson; + factory _LocalSiteUrlBlocklist.fromJson(Map json) = _$LocalSiteUrlBlocklistImpl.fromJson; @override int? get id; // v0.19.4 (required) @@ -225,6 +200,5 @@ abstract class _LocalSiteUrlBlocklist extends LocalSiteUrlBlocklist { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalSiteUrlBlocklistImplCopyWith<_$LocalSiteUrlBlocklistImpl> - get copyWith => throw _privateConstructorUsedError; + _$$LocalSiteUrlBlocklistImplCopyWith<_$LocalSiteUrlBlocklistImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/local_site_url_blocklist.g.dart b/lib/src/v3/models/site/local_site_url_blocklist.g.dart index 2989671c..0a17e38e 100644 --- a/lib/src/v3/models/site/local_site_url_blocklist.g.dart +++ b/lib/src/v3/models/site/local_site_url_blocklist.g.dart @@ -6,36 +6,20 @@ part of 'local_site_url_blocklist.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalSiteUrlBlocklistImpl _$$LocalSiteUrlBlocklistImplFromJson( - Map json) => - _$LocalSiteUrlBlocklistImpl( - id: (json['id'] as num?)?.toInt(), - url: json['url'] as String?, - published: _$JsonConverterFromJson( - json['published'], const ForceUtcDateTime().fromJson), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$LocalSiteUrlBlocklistImpl _$$LocalSiteUrlBlocklistImplFromJson(Map json) => _$LocalSiteUrlBlocklistImpl( + id: (json['id'] as num?)?.toInt(), + url: json['url'] as String?, + published: _$JsonConverterFromJson(json['published'], const ForceUtcDateTime().fromJson), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$LocalSiteUrlBlocklistImplToJson( - _$LocalSiteUrlBlocklistImpl instance) => - { - 'id': instance.id, - 'url': instance.url, - 'published': _$JsonConverterToJson( - instance.published, const ForceUtcDateTime().toJson), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$LocalSiteUrlBlocklistImplToJson(_$LocalSiteUrlBlocklistImpl instance) => { + 'id': instance.id, + 'url': instance.url, + 'published': _$JsonConverterToJson(instance.published, const ForceUtcDateTime().toJson), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/site/site.freezed.dart b/lib/src/v3/models/site/site.freezed.dart index 7a473f80..ef5c0a6a 100644 --- a/lib/src/v3/models/site/site.freezed.dart +++ b/lib/src/v3/models/site/site.freezed.dart @@ -12,7 +12,8 @@ part of 'site.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Site _$SiteFromJson(Map json) { return _Site.fromJson(json); @@ -32,11 +33,9 @@ mixin _$Site { DateTime get lastRefreshedAt => throw _privateConstructorUsedError; // v0.18.0 String get inboxUrl => throw _privateConstructorUsedError; // v0.18.0 @deprecated - String? get privateKey => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.4] + String? get privateKey => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.4] @deprecated - String? get publicKey => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.4] + String? get publicKey => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.4] int get instanceId => throw _privateConstructorUsedError; // v0.18.0 String? get contentWarning => throw _privateConstructorUsedError; @@ -51,30 +50,29 @@ mixin _$Site { /// @nodoc abstract class $SiteCopyWith<$Res> { - factory $SiteCopyWith(Site value, $Res Function(Site) then) = - _$SiteCopyWithImpl<$Res, Site>; + factory $SiteCopyWith(Site value, $Res Function(Site) then) = _$SiteCopyWithImpl<$Res, Site>; @useResult - $Res call( - {int id, - String name, - String? sidebar, - DateTime published, - DateTime? updated, - String? icon, - String? banner, - String? description, - String actorId, - DateTime lastRefreshedAt, - String inboxUrl, - @deprecated String? privateKey, - @deprecated String? publicKey, - int instanceId, - String? contentWarning}); + $Res call({ + int id, + String name, + String? sidebar, + DateTime published, + DateTime? updated, + String? icon, + String? banner, + String? description, + String actorId, + DateTime lastRefreshedAt, + String inboxUrl, + @deprecated String? privateKey, + @deprecated String? publicKey, + int instanceId, + String? contentWarning, + }); } /// @nodoc -class _$SiteCopyWithImpl<$Res, $Val extends Site> - implements $SiteCopyWith<$Res> { +class _$SiteCopyWithImpl<$Res, $Val extends Site> implements $SiteCopyWith<$Res> { _$SiteCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -103,102 +101,116 @@ class _$SiteCopyWithImpl<$Res, $Val extends Site> Object? instanceId = null, Object? contentWarning = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - lastRefreshedAt: null == lastRefreshedAt - ? _value.lastRefreshedAt - : lastRefreshedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - inboxUrl: null == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String, - privateKey: freezed == privateKey - ? _value.privateKey - : privateKey // ignore: cast_nullable_to_non_nullable - as String?, - publicKey: freezed == publicKey - ? _value.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + lastRefreshedAt: + null == lastRefreshedAt + ? _value.lastRefreshedAt + : lastRefreshedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + inboxUrl: + null == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String, + privateKey: + freezed == privateKey + ? _value.privateKey + : privateKey // ignore: cast_nullable_to_non_nullable + as String?, + publicKey: + freezed == publicKey + ? _value.publicKey + : publicKey // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$SiteImplCopyWith<$Res> implements $SiteCopyWith<$Res> { - factory _$$SiteImplCopyWith( - _$SiteImpl value, $Res Function(_$SiteImpl) then) = - __$$SiteImplCopyWithImpl<$Res>; + factory _$$SiteImplCopyWith(_$SiteImpl value, $Res Function(_$SiteImpl) then) = __$$SiteImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - String? sidebar, - DateTime published, - DateTime? updated, - String? icon, - String? banner, - String? description, - String actorId, - DateTime lastRefreshedAt, - String inboxUrl, - @deprecated String? privateKey, - @deprecated String? publicKey, - int instanceId, - String? contentWarning}); + $Res call({ + int id, + String name, + String? sidebar, + DateTime published, + DateTime? updated, + String? icon, + String? banner, + String? description, + String actorId, + DateTime lastRefreshedAt, + String inboxUrl, + @deprecated String? privateKey, + @deprecated String? publicKey, + int instanceId, + String? contentWarning, + }); } /// @nodoc -class __$$SiteImplCopyWithImpl<$Res> - extends _$SiteCopyWithImpl<$Res, _$SiteImpl> - implements _$$SiteImplCopyWith<$Res> { - __$$SiteImplCopyWithImpl(_$SiteImpl _value, $Res Function(_$SiteImpl) _then) - : super(_value, _then); +class __$$SiteImplCopyWithImpl<$Res> extends _$SiteCopyWithImpl<$Res, _$SiteImpl> implements _$$SiteImplCopyWith<$Res> { + __$$SiteImplCopyWithImpl(_$SiteImpl _value, $Res Function(_$SiteImpl) _then) : super(_value, _then); /// Create a copy of Site /// with the given fields replaced by the non-null parameter values. @@ -221,68 +233,85 @@ class __$$SiteImplCopyWithImpl<$Res> Object? instanceId = null, Object? contentWarning = freezed, }) { - return _then(_$SiteImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - sidebar: freezed == sidebar - ? _value.sidebar - : sidebar // ignore: cast_nullable_to_non_nullable - as String?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - icon: freezed == icon - ? _value.icon - : icon // ignore: cast_nullable_to_non_nullable - as String?, - banner: freezed == banner - ? _value.banner - : banner // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - actorId: null == actorId - ? _value.actorId - : actorId // ignore: cast_nullable_to_non_nullable - as String, - lastRefreshedAt: null == lastRefreshedAt - ? _value.lastRefreshedAt - : lastRefreshedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - inboxUrl: null == inboxUrl - ? _value.inboxUrl - : inboxUrl // ignore: cast_nullable_to_non_nullable - as String, - privateKey: freezed == privateKey - ? _value.privateKey - : privateKey // ignore: cast_nullable_to_non_nullable - as String?, - publicKey: freezed == publicKey - ? _value.publicKey - : publicKey // ignore: cast_nullable_to_non_nullable - as String?, - instanceId: null == instanceId - ? _value.instanceId - : instanceId // ignore: cast_nullable_to_non_nullable - as int, - contentWarning: freezed == contentWarning - ? _value.contentWarning - : contentWarning // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$SiteImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + sidebar: + freezed == sidebar + ? _value.sidebar + : sidebar // ignore: cast_nullable_to_non_nullable + as String?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + icon: + freezed == icon + ? _value.icon + : icon // ignore: cast_nullable_to_non_nullable + as String?, + banner: + freezed == banner + ? _value.banner + : banner // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + actorId: + null == actorId + ? _value.actorId + : actorId // ignore: cast_nullable_to_non_nullable + as String, + lastRefreshedAt: + null == lastRefreshedAt + ? _value.lastRefreshedAt + : lastRefreshedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + inboxUrl: + null == inboxUrl + ? _value.inboxUrl + : inboxUrl // ignore: cast_nullable_to_non_nullable + as String, + privateKey: + freezed == privateKey + ? _value.privateKey + : privateKey // ignore: cast_nullable_to_non_nullable + as String?, + publicKey: + freezed == publicKey + ? _value.publicKey + : publicKey // ignore: cast_nullable_to_non_nullable + as String?, + instanceId: + null == instanceId + ? _value.instanceId + : instanceId // ignore: cast_nullable_to_non_nullable + as int, + contentWarning: + freezed == contentWarning + ? _value.contentWarning + : contentWarning // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -290,71 +319,70 @@ class __$$SiteImplCopyWithImpl<$Res> @modelSerde class _$SiteImpl extends _Site { - const _$SiteImpl( - {required this.id, - required this.name, - this.sidebar, - required this.published, - this.updated, - this.icon, - this.banner, - this.description, - required this.actorId, - required this.lastRefreshedAt, - required this.inboxUrl, - @deprecated this.privateKey, - @deprecated this.publicKey, - required this.instanceId, - this.contentWarning}) - : super._(); + const _$SiteImpl({ + required this.id, + required this.name, + this.sidebar, + required this.published, + this.updated, + this.icon, + this.banner, + this.description, + required this.actorId, + required this.lastRefreshedAt, + required this.inboxUrl, + @deprecated this.privateKey, + @deprecated this.publicKey, + required this.instanceId, + this.contentWarning, + }) : super._(); - factory _$SiteImpl.fromJson(Map json) => - _$$SiteImplFromJson(json); + factory _$SiteImpl.fromJson(Map json) => _$$SiteImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final String name; -// v0.18.0 + // v0.18.0 @override final String? sidebar; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; -// v0.18.0 + // v0.18.0 @override final String? icon; -// v0.18.0 + // v0.18.0 @override final String? banner; -// v0.18.0 + // v0.18.0 @override final String? description; -// v0.18.0 + // v0.18.0 @override final String actorId; -// v0.18.0 + // v0.18.0 @override final DateTime lastRefreshedAt; -// v0.18.0 + // v0.18.0 @override final String inboxUrl; -// v0.18.0 + // v0.18.0 @override @deprecated final String? privateKey; -// v0.18.0 [deprecated in v0.19.4] + // v0.18.0 [deprecated in v0.19.4] @override @deprecated final String? publicKey; -// v0.18.0 [deprecated in v0.19.4] + // v0.18.0 [deprecated in v0.19.4] @override final int instanceId; -// v0.18.0 + // v0.18.0 @override final String? contentWarning; @@ -371,81 +399,55 @@ class _$SiteImpl extends _Site { (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && (identical(other.sidebar, sidebar) || other.sidebar == sidebar) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated) && (identical(other.icon, icon) || other.icon == icon) && (identical(other.banner, banner) || other.banner == banner) && - (identical(other.description, description) || - other.description == description) && + (identical(other.description, description) || other.description == description) && (identical(other.actorId, actorId) || other.actorId == actorId) && - (identical(other.lastRefreshedAt, lastRefreshedAt) || - other.lastRefreshedAt == lastRefreshedAt) && - (identical(other.inboxUrl, inboxUrl) || - other.inboxUrl == inboxUrl) && - (identical(other.privateKey, privateKey) || - other.privateKey == privateKey) && - (identical(other.publicKey, publicKey) || - other.publicKey == publicKey) && - (identical(other.instanceId, instanceId) || - other.instanceId == instanceId) && - (identical(other.contentWarning, contentWarning) || - other.contentWarning == contentWarning)); + (identical(other.lastRefreshedAt, lastRefreshedAt) || other.lastRefreshedAt == lastRefreshedAt) && + (identical(other.inboxUrl, inboxUrl) || other.inboxUrl == inboxUrl) && + (identical(other.privateKey, privateKey) || other.privateKey == privateKey) && + (identical(other.publicKey, publicKey) || other.publicKey == publicKey) && + (identical(other.instanceId, instanceId) || other.instanceId == instanceId) && + (identical(other.contentWarning, contentWarning) || other.contentWarning == contentWarning)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - name, - sidebar, - published, - updated, - icon, - banner, - description, - actorId, - lastRefreshedAt, - inboxUrl, - privateKey, - publicKey, - instanceId, - contentWarning); + int get hashCode => Object.hash(runtimeType, id, name, sidebar, published, updated, icon, banner, description, actorId, lastRefreshedAt, inboxUrl, privateKey, publicKey, instanceId, contentWarning); /// Create a copy of Site /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SiteImplCopyWith<_$SiteImpl> get copyWith => - __$$SiteImplCopyWithImpl<_$SiteImpl>(this, _$identity); + _$$SiteImplCopyWith<_$SiteImpl> get copyWith => __$$SiteImplCopyWithImpl<_$SiteImpl>(this, _$identity); @override Map toJson() { - return _$$SiteImplToJson( - this, - ); + return _$$SiteImplToJson(this); } } abstract class _Site extends Site { - const factory _Site( - {required final int id, - required final String name, - final String? sidebar, - required final DateTime published, - final DateTime? updated, - final String? icon, - final String? banner, - final String? description, - required final String actorId, - required final DateTime lastRefreshedAt, - required final String inboxUrl, - @deprecated final String? privateKey, - @deprecated final String? publicKey, - required final int instanceId, - final String? contentWarning}) = _$SiteImpl; + const factory _Site({ + required final int id, + required final String name, + final String? sidebar, + required final DateTime published, + final DateTime? updated, + final String? icon, + final String? banner, + final String? description, + required final String actorId, + required final DateTime lastRefreshedAt, + required final String inboxUrl, + @deprecated final String? privateKey, + @deprecated final String? publicKey, + required final int instanceId, + final String? contentWarning, + }) = _$SiteImpl; const _Site._() : super._(); factory _Site.fromJson(Map json) = _$SiteImpl.fromJson; @@ -487,6 +489,5 @@ abstract class _Site extends Site { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SiteImplCopyWith<_$SiteImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SiteImplCopyWith<_$SiteImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/site.g.dart b/lib/src/v3/models/site/site.g.dart index 5e14c088..afa379e3 100644 --- a/lib/src/v3/models/site/site.g.dart +++ b/lib/src/v3/models/site/site.g.dart @@ -7,54 +7,41 @@ part of 'site.dart'; // ************************************************************************** _$SiteImpl _$$SiteImplFromJson(Map json) => _$SiteImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - sidebar: json['sidebar'] as String?, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - icon: json['icon'] as String?, - banner: json['banner'] as String?, - description: json['description'] as String?, - actorId: json['actor_id'] as String, - lastRefreshedAt: const ForceUtcDateTime() - .fromJson(json['last_refreshed_at'] as String), - inboxUrl: json['inbox_url'] as String, - privateKey: json['private_key'] as String?, - publicKey: json['public_key'] as String?, - instanceId: (json['instance_id'] as num).toInt(), - contentWarning: json['content_warning'] as String?, - ); + id: (json['id'] as num).toInt(), + name: json['name'] as String, + sidebar: json['sidebar'] as String?, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), + icon: json['icon'] as String?, + banner: json['banner'] as String?, + description: json['description'] as String?, + actorId: json['actor_id'] as String, + lastRefreshedAt: const ForceUtcDateTime().fromJson(json['last_refreshed_at'] as String), + inboxUrl: json['inbox_url'] as String, + privateKey: json['private_key'] as String?, + publicKey: json['public_key'] as String?, + instanceId: (json['instance_id'] as num).toInt(), + contentWarning: json['content_warning'] as String?, +); -Map _$$SiteImplToJson(_$SiteImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'sidebar': instance.sidebar, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - 'icon': instance.icon, - 'banner': instance.banner, - 'description': instance.description, - 'actor_id': instance.actorId, - 'last_refreshed_at': - const ForceUtcDateTime().toJson(instance.lastRefreshedAt), - 'inbox_url': instance.inboxUrl, - 'private_key': instance.privateKey, - 'public_key': instance.publicKey, - 'instance_id': instance.instanceId, - 'content_warning': instance.contentWarning, - }; +Map _$$SiteImplToJson(_$SiteImpl instance) => { + 'id': instance.id, + 'name': instance.name, + 'sidebar': instance.sidebar, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), + 'icon': instance.icon, + 'banner': instance.banner, + 'description': instance.description, + 'actor_id': instance.actorId, + 'last_refreshed_at': const ForceUtcDateTime().toJson(instance.lastRefreshedAt), + 'inbox_url': instance.inboxUrl, + 'private_key': instance.privateKey, + 'public_key': instance.publicKey, + 'instance_id': instance.instanceId, + 'content_warning': instance.contentWarning, +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/site/site_aggregates.dart b/lib/src/v3/models/site/site_aggregates.dart index 28fb8eaa..816f90c2 100644 --- a/lib/src/v3/models/site/site_aggregates.dart +++ b/lib/src/v3/models/site/site_aggregates.dart @@ -22,6 +22,5 @@ class SiteAggregates with _$SiteAggregates { }) = _SiteAggregates; const SiteAggregates._(); - factory SiteAggregates.fromJson(Map json) => - _$SiteAggregatesFromJson(json); + factory SiteAggregates.fromJson(Map json) => _$SiteAggregatesFromJson(json); } diff --git a/lib/src/v3/models/site/site_aggregates.freezed.dart b/lib/src/v3/models/site/site_aggregates.freezed.dart index d284d64c..2cb8a7ef 100644 --- a/lib/src/v3/models/site/site_aggregates.freezed.dart +++ b/lib/src/v3/models/site/site_aggregates.freezed.dart @@ -12,7 +12,8 @@ part of 'site_aggregates.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); SiteAggregates _$SiteAggregatesFromJson(Map json) { return _SiteAggregates.fromJson(json); @@ -21,8 +22,7 @@ SiteAggregates _$SiteAggregatesFromJson(Map json) { /// @nodoc mixin _$SiteAggregates { @deprecated - int? get id => - throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] + int? get id => throw _privateConstructorUsedError; // v0.18.0 [deprecated in v0.19.0] int get siteId => throw _privateConstructorUsedError; // v0.18.0 int get users => throw _privateConstructorUsedError; // v0.18.0 int get posts => throw _privateConstructorUsedError; // v0.18.0 @@ -39,32 +39,18 @@ mixin _$SiteAggregates { /// Create a copy of SiteAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SiteAggregatesCopyWith get copyWith => - throw _privateConstructorUsedError; + $SiteAggregatesCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SiteAggregatesCopyWith<$Res> { - factory $SiteAggregatesCopyWith( - SiteAggregates value, $Res Function(SiteAggregates) then) = - _$SiteAggregatesCopyWithImpl<$Res, SiteAggregates>; + factory $SiteAggregatesCopyWith(SiteAggregates value, $Res Function(SiteAggregates) then) = _$SiteAggregatesCopyWithImpl<$Res, SiteAggregates>; @useResult - $Res call( - {@deprecated int? id, - int siteId, - int users, - int posts, - int comments, - int communities, - int usersActiveDay, - int usersActiveWeek, - int usersActiveMonth, - int usersActiveHalfYear}); + $Res call({@deprecated int? id, int siteId, int users, int posts, int comments, int communities, int usersActiveDay, int usersActiveWeek, int usersActiveMonth, int usersActiveHalfYear}); } /// @nodoc -class _$SiteAggregatesCopyWithImpl<$Res, $Val extends SiteAggregates> - implements $SiteAggregatesCopyWith<$Res> { +class _$SiteAggregatesCopyWithImpl<$Res, $Val extends SiteAggregates> implements $SiteAggregatesCopyWith<$Res> { _$SiteAggregatesCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -88,79 +74,75 @@ class _$SiteAggregatesCopyWithImpl<$Res, $Val extends SiteAggregates> Object? usersActiveMonth = null, Object? usersActiveHalfYear = null, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - siteId: null == siteId - ? _value.siteId - : siteId // ignore: cast_nullable_to_non_nullable - as int, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as int, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - communities: null == communities - ? _value.communities - : communities // ignore: cast_nullable_to_non_nullable - as int, - usersActiveDay: null == usersActiveDay - ? _value.usersActiveDay - : usersActiveDay // ignore: cast_nullable_to_non_nullable - as int, - usersActiveWeek: null == usersActiveWeek - ? _value.usersActiveWeek - : usersActiveWeek // ignore: cast_nullable_to_non_nullable - as int, - usersActiveMonth: null == usersActiveMonth - ? _value.usersActiveMonth - : usersActiveMonth // ignore: cast_nullable_to_non_nullable - as int, - usersActiveHalfYear: null == usersActiveHalfYear - ? _value.usersActiveHalfYear - : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + siteId: + null == siteId + ? _value.siteId + : siteId // ignore: cast_nullable_to_non_nullable + as int, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as int, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + communities: + null == communities + ? _value.communities + : communities // ignore: cast_nullable_to_non_nullable + as int, + usersActiveDay: + null == usersActiveDay + ? _value.usersActiveDay + : usersActiveDay // ignore: cast_nullable_to_non_nullable + as int, + usersActiveWeek: + null == usersActiveWeek + ? _value.usersActiveWeek + : usersActiveWeek // ignore: cast_nullable_to_non_nullable + as int, + usersActiveMonth: + null == usersActiveMonth + ? _value.usersActiveMonth + : usersActiveMonth // ignore: cast_nullable_to_non_nullable + as int, + usersActiveHalfYear: + null == usersActiveHalfYear + ? _value.usersActiveHalfYear + : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$SiteAggregatesImplCopyWith<$Res> - implements $SiteAggregatesCopyWith<$Res> { - factory _$$SiteAggregatesImplCopyWith(_$SiteAggregatesImpl value, - $Res Function(_$SiteAggregatesImpl) then) = - __$$SiteAggregatesImplCopyWithImpl<$Res>; +abstract class _$$SiteAggregatesImplCopyWith<$Res> implements $SiteAggregatesCopyWith<$Res> { + factory _$$SiteAggregatesImplCopyWith(_$SiteAggregatesImpl value, $Res Function(_$SiteAggregatesImpl) then) = __$$SiteAggregatesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated int? id, - int siteId, - int users, - int posts, - int comments, - int communities, - int usersActiveDay, - int usersActiveWeek, - int usersActiveMonth, - int usersActiveHalfYear}); + $Res call({@deprecated int? id, int siteId, int users, int posts, int comments, int communities, int usersActiveDay, int usersActiveWeek, int usersActiveMonth, int usersActiveHalfYear}); } /// @nodoc -class __$$SiteAggregatesImplCopyWithImpl<$Res> - extends _$SiteAggregatesCopyWithImpl<$Res, _$SiteAggregatesImpl> - implements _$$SiteAggregatesImplCopyWith<$Res> { - __$$SiteAggregatesImplCopyWithImpl( - _$SiteAggregatesImpl _value, $Res Function(_$SiteAggregatesImpl) _then) - : super(_value, _then); +class __$$SiteAggregatesImplCopyWithImpl<$Res> extends _$SiteAggregatesCopyWithImpl<$Res, _$SiteAggregatesImpl> implements _$$SiteAggregatesImplCopyWith<$Res> { + __$$SiteAggregatesImplCopyWithImpl(_$SiteAggregatesImpl _value, $Res Function(_$SiteAggregatesImpl) _then) : super(_value, _then); /// Create a copy of SiteAggregates /// with the given fields replaced by the non-null parameter values. @@ -178,48 +160,60 @@ class __$$SiteAggregatesImplCopyWithImpl<$Res> Object? usersActiveMonth = null, Object? usersActiveHalfYear = null, }) { - return _then(_$SiteAggregatesImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - siteId: null == siteId - ? _value.siteId - : siteId // ignore: cast_nullable_to_non_nullable - as int, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as int, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as int, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as int, - communities: null == communities - ? _value.communities - : communities // ignore: cast_nullable_to_non_nullable - as int, - usersActiveDay: null == usersActiveDay - ? _value.usersActiveDay - : usersActiveDay // ignore: cast_nullable_to_non_nullable - as int, - usersActiveWeek: null == usersActiveWeek - ? _value.usersActiveWeek - : usersActiveWeek // ignore: cast_nullable_to_non_nullable - as int, - usersActiveMonth: null == usersActiveMonth - ? _value.usersActiveMonth - : usersActiveMonth // ignore: cast_nullable_to_non_nullable - as int, - usersActiveHalfYear: null == usersActiveHalfYear - ? _value.usersActiveHalfYear - : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$SiteAggregatesImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + siteId: + null == siteId + ? _value.siteId + : siteId // ignore: cast_nullable_to_non_nullable + as int, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as int, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as int, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as int, + communities: + null == communities + ? _value.communities + : communities // ignore: cast_nullable_to_non_nullable + as int, + usersActiveDay: + null == usersActiveDay + ? _value.usersActiveDay + : usersActiveDay // ignore: cast_nullable_to_non_nullable + as int, + usersActiveWeek: + null == usersActiveWeek + ? _value.usersActiveWeek + : usersActiveWeek // ignore: cast_nullable_to_non_nullable + as int, + usersActiveMonth: + null == usersActiveMonth + ? _value.usersActiveMonth + : usersActiveMonth // ignore: cast_nullable_to_non_nullable + as int, + usersActiveHalfYear: + null == usersActiveHalfYear + ? _value.usersActiveHalfYear + : usersActiveHalfYear // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -227,50 +221,49 @@ class __$$SiteAggregatesImplCopyWithImpl<$Res> @modelSerde class _$SiteAggregatesImpl extends _SiteAggregates { - const _$SiteAggregatesImpl( - {@deprecated this.id, - required this.siteId, - required this.users, - required this.posts, - required this.comments, - required this.communities, - required this.usersActiveDay, - required this.usersActiveWeek, - required this.usersActiveMonth, - required this.usersActiveHalfYear}) - : super._(); + const _$SiteAggregatesImpl({ + @deprecated this.id, + required this.siteId, + required this.users, + required this.posts, + required this.comments, + required this.communities, + required this.usersActiveDay, + required this.usersActiveWeek, + required this.usersActiveMonth, + required this.usersActiveHalfYear, + }) : super._(); - factory _$SiteAggregatesImpl.fromJson(Map json) => - _$$SiteAggregatesImplFromJson(json); + factory _$SiteAggregatesImpl.fromJson(Map json) => _$$SiteAggregatesImplFromJson(json); @override @deprecated final int? id; -// v0.18.0 [deprecated in v0.19.0] + // v0.18.0 [deprecated in v0.19.0] @override final int siteId; -// v0.18.0 + // v0.18.0 @override final int users; -// v0.18.0 + // v0.18.0 @override final int posts; -// v0.18.0 + // v0.18.0 @override final int comments; -// v0.18.0 + // v0.18.0 @override final int communities; -// v0.18.0 + // v0.18.0 @override final int usersActiveDay; -// v0.18.0 + // v0.18.0 @override final int usersActiveWeek; -// v0.18.0 + // v0.18.0 @override final int usersActiveMonth; -// v0.18.0 + // v0.18.0 @override final int usersActiveHalfYear; @@ -288,68 +281,47 @@ class _$SiteAggregatesImpl extends _SiteAggregates { (identical(other.siteId, siteId) || other.siteId == siteId) && (identical(other.users, users) || other.users == users) && (identical(other.posts, posts) || other.posts == posts) && - (identical(other.comments, comments) || - other.comments == comments) && - (identical(other.communities, communities) || - other.communities == communities) && - (identical(other.usersActiveDay, usersActiveDay) || - other.usersActiveDay == usersActiveDay) && - (identical(other.usersActiveWeek, usersActiveWeek) || - other.usersActiveWeek == usersActiveWeek) && - (identical(other.usersActiveMonth, usersActiveMonth) || - other.usersActiveMonth == usersActiveMonth) && - (identical(other.usersActiveHalfYear, usersActiveHalfYear) || - other.usersActiveHalfYear == usersActiveHalfYear)); + (identical(other.comments, comments) || other.comments == comments) && + (identical(other.communities, communities) || other.communities == communities) && + (identical(other.usersActiveDay, usersActiveDay) || other.usersActiveDay == usersActiveDay) && + (identical(other.usersActiveWeek, usersActiveWeek) || other.usersActiveWeek == usersActiveWeek) && + (identical(other.usersActiveMonth, usersActiveMonth) || other.usersActiveMonth == usersActiveMonth) && + (identical(other.usersActiveHalfYear, usersActiveHalfYear) || other.usersActiveHalfYear == usersActiveHalfYear)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - id, - siteId, - users, - posts, - comments, - communities, - usersActiveDay, - usersActiveWeek, - usersActiveMonth, - usersActiveHalfYear); + int get hashCode => Object.hash(runtimeType, id, siteId, users, posts, comments, communities, usersActiveDay, usersActiveWeek, usersActiveMonth, usersActiveHalfYear); /// Create a copy of SiteAggregates /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SiteAggregatesImplCopyWith<_$SiteAggregatesImpl> get copyWith => - __$$SiteAggregatesImplCopyWithImpl<_$SiteAggregatesImpl>( - this, _$identity); + _$$SiteAggregatesImplCopyWith<_$SiteAggregatesImpl> get copyWith => __$$SiteAggregatesImplCopyWithImpl<_$SiteAggregatesImpl>(this, _$identity); @override Map toJson() { - return _$$SiteAggregatesImplToJson( - this, - ); + return _$$SiteAggregatesImplToJson(this); } } abstract class _SiteAggregates extends SiteAggregates { - const factory _SiteAggregates( - {@deprecated final int? id, - required final int siteId, - required final int users, - required final int posts, - required final int comments, - required final int communities, - required final int usersActiveDay, - required final int usersActiveWeek, - required final int usersActiveMonth, - required final int usersActiveHalfYear}) = _$SiteAggregatesImpl; + const factory _SiteAggregates({ + @deprecated final int? id, + required final int siteId, + required final int users, + required final int posts, + required final int comments, + required final int communities, + required final int usersActiveDay, + required final int usersActiveWeek, + required final int usersActiveMonth, + required final int usersActiveHalfYear, + }) = _$SiteAggregatesImpl; const _SiteAggregates._() : super._(); - factory _SiteAggregates.fromJson(Map json) = - _$SiteAggregatesImpl.fromJson; + factory _SiteAggregates.fromJson(Map json) = _$SiteAggregatesImpl.fromJson; @override @deprecated @@ -377,6 +349,5 @@ abstract class _SiteAggregates extends SiteAggregates { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SiteAggregatesImplCopyWith<_$SiteAggregatesImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SiteAggregatesImplCopyWith<_$SiteAggregatesImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/site_aggregates.g.dart b/lib/src/v3/models/site/site_aggregates.g.dart index 76b94fc6..237366c4 100644 --- a/lib/src/v3/models/site/site_aggregates.g.dart +++ b/lib/src/v3/models/site/site_aggregates.g.dart @@ -6,31 +6,28 @@ part of 'site_aggregates.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SiteAggregatesImpl _$$SiteAggregatesImplFromJson(Map json) => - _$SiteAggregatesImpl( - id: (json['id'] as num?)?.toInt(), - siteId: (json['site_id'] as num).toInt(), - users: (json['users'] as num).toInt(), - posts: (json['posts'] as num).toInt(), - comments: (json['comments'] as num).toInt(), - communities: (json['communities'] as num).toInt(), - usersActiveDay: (json['users_active_day'] as num).toInt(), - usersActiveWeek: (json['users_active_week'] as num).toInt(), - usersActiveMonth: (json['users_active_month'] as num).toInt(), - usersActiveHalfYear: (json['users_active_half_year'] as num).toInt(), - ); +_$SiteAggregatesImpl _$$SiteAggregatesImplFromJson(Map json) => _$SiteAggregatesImpl( + id: (json['id'] as num?)?.toInt(), + siteId: (json['site_id'] as num).toInt(), + users: (json['users'] as num).toInt(), + posts: (json['posts'] as num).toInt(), + comments: (json['comments'] as num).toInt(), + communities: (json['communities'] as num).toInt(), + usersActiveDay: (json['users_active_day'] as num).toInt(), + usersActiveWeek: (json['users_active_week'] as num).toInt(), + usersActiveMonth: (json['users_active_month'] as num).toInt(), + usersActiveHalfYear: (json['users_active_half_year'] as num).toInt(), +); -Map _$$SiteAggregatesImplToJson( - _$SiteAggregatesImpl instance) => - { - 'id': instance.id, - 'site_id': instance.siteId, - 'users': instance.users, - 'posts': instance.posts, - 'comments': instance.comments, - 'communities': instance.communities, - 'users_active_day': instance.usersActiveDay, - 'users_active_week': instance.usersActiveWeek, - 'users_active_month': instance.usersActiveMonth, - 'users_active_half_year': instance.usersActiveHalfYear, - }; +Map _$$SiteAggregatesImplToJson(_$SiteAggregatesImpl instance) => { + 'id': instance.id, + 'site_id': instance.siteId, + 'users': instance.users, + 'posts': instance.posts, + 'comments': instance.comments, + 'communities': instance.communities, + 'users_active_day': instance.usersActiveDay, + 'users_active_week': instance.usersActiveWeek, + 'users_active_month': instance.usersActiveMonth, + 'users_active_half_year': instance.usersActiveHalfYear, +}; diff --git a/lib/src/v3/models/site/site_response.dart b/lib/src/v3/models/site/site_response.dart index 4d034daa..3c566ca9 100644 --- a/lib/src/v3/models/site/site_response.dart +++ b/lib/src/v3/models/site/site_response.dart @@ -15,6 +15,5 @@ class SiteResponse with _$SiteResponse { }) = _SiteResponse; const SiteResponse._(); - factory SiteResponse.fromJson(Map json) => - _$SiteResponseFromJson(json); + factory SiteResponse.fromJson(Map json) => _$SiteResponseFromJson(json); } diff --git a/lib/src/v3/models/site/site_response.freezed.dart b/lib/src/v3/models/site/site_response.freezed.dart index 0acab507..3ebcc460 100644 --- a/lib/src/v3/models/site/site_response.freezed.dart +++ b/lib/src/v3/models/site/site_response.freezed.dart @@ -12,7 +12,8 @@ part of 'site_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); SiteResponse _$SiteResponseFromJson(Map json) { return _SiteResponse.fromJson(json); @@ -29,15 +30,12 @@ mixin _$SiteResponse { /// Create a copy of SiteResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SiteResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $SiteResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SiteResponseCopyWith<$Res> { - factory $SiteResponseCopyWith( - SiteResponse value, $Res Function(SiteResponse) then) = - _$SiteResponseCopyWithImpl<$Res, SiteResponse>; + factory $SiteResponseCopyWith(SiteResponse value, $Res Function(SiteResponse) then) = _$SiteResponseCopyWithImpl<$Res, SiteResponse>; @useResult $Res call({SiteView siteView, List taglines}); @@ -45,8 +43,7 @@ abstract class $SiteResponseCopyWith<$Res> { } /// @nodoc -class _$SiteResponseCopyWithImpl<$Res, $Val extends SiteResponse> - implements $SiteResponseCopyWith<$Res> { +class _$SiteResponseCopyWithImpl<$Res, $Val extends SiteResponse> implements $SiteResponseCopyWith<$Res> { _$SiteResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,20 +55,22 @@ class _$SiteResponseCopyWithImpl<$Res, $Val extends SiteResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? siteView = null, - Object? taglines = null, - }) { - return _then(_value.copyWith( - siteView: null == siteView - ? _value.siteView - : siteView // ignore: cast_nullable_to_non_nullable - as SiteView, - taglines: null == taglines - ? _value.taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? siteView = null, Object? taglines = null}) { + return _then( + _value.copyWith( + siteView: + null == siteView + ? _value.siteView + : siteView // ignore: cast_nullable_to_non_nullable + as SiteView, + taglines: + null == taglines + ? _value.taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of SiteResponse @@ -86,11 +85,8 @@ class _$SiteResponseCopyWithImpl<$Res, $Val extends SiteResponse> } /// @nodoc -abstract class _$$SiteResponseImplCopyWith<$Res> - implements $SiteResponseCopyWith<$Res> { - factory _$$SiteResponseImplCopyWith( - _$SiteResponseImpl value, $Res Function(_$SiteResponseImpl) then) = - __$$SiteResponseImplCopyWithImpl<$Res>; +abstract class _$$SiteResponseImplCopyWith<$Res> implements $SiteResponseCopyWith<$Res> { + factory _$$SiteResponseImplCopyWith(_$SiteResponseImpl value, $Res Function(_$SiteResponseImpl) then) = __$$SiteResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({SiteView siteView, List taglines}); @@ -100,31 +96,28 @@ abstract class _$$SiteResponseImplCopyWith<$Res> } /// @nodoc -class __$$SiteResponseImplCopyWithImpl<$Res> - extends _$SiteResponseCopyWithImpl<$Res, _$SiteResponseImpl> - implements _$$SiteResponseImplCopyWith<$Res> { - __$$SiteResponseImplCopyWithImpl( - _$SiteResponseImpl _value, $Res Function(_$SiteResponseImpl) _then) - : super(_value, _then); +class __$$SiteResponseImplCopyWithImpl<$Res> extends _$SiteResponseCopyWithImpl<$Res, _$SiteResponseImpl> implements _$$SiteResponseImplCopyWith<$Res> { + __$$SiteResponseImplCopyWithImpl(_$SiteResponseImpl _value, $Res Function(_$SiteResponseImpl) _then) : super(_value, _then); /// Create a copy of SiteResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? siteView = null, - Object? taglines = null, - }) { - return _then(_$SiteResponseImpl( - siteView: null == siteView - ? _value.siteView - : siteView // ignore: cast_nullable_to_non_nullable - as SiteView, - taglines: null == taglines - ? _value._taglines - : taglines // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? siteView = null, Object? taglines = null}) { + return _then( + _$SiteResponseImpl( + siteView: + null == siteView + ? _value.siteView + : siteView // ignore: cast_nullable_to_non_nullable + as SiteView, + taglines: + null == taglines + ? _value._taglines + : taglines // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -132,19 +125,15 @@ class __$$SiteResponseImplCopyWithImpl<$Res> @modelSerde class _$SiteResponseImpl extends _SiteResponse { - const _$SiteResponseImpl( - {required this.siteView, required final List taglines}) - : _taglines = taglines, - super._(); + const _$SiteResponseImpl({required this.siteView, required final List taglines}) : _taglines = taglines, super._(); - factory _$SiteResponseImpl.fromJson(Map json) => - _$$SiteResponseImplFromJson(json); + factory _$SiteResponseImpl.fromJson(Map json) => _$$SiteResponseImplFromJson(json); @override final SiteView siteView; -// v0.18.0 + // v0.18.0 final List _taglines; -// v0.18.0 + // v0.18.0 @override List get taglines { if (_taglines is EqualUnmodifiableListView) return _taglines; @@ -162,40 +151,32 @@ class _$SiteResponseImpl extends _SiteResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$SiteResponseImpl && - (identical(other.siteView, siteView) || - other.siteView == siteView) && + (identical(other.siteView, siteView) || other.siteView == siteView) && const DeepCollectionEquality().equals(other._taglines, _taglines)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, siteView, const DeepCollectionEquality().hash(_taglines)); + int get hashCode => Object.hash(runtimeType, siteView, const DeepCollectionEquality().hash(_taglines)); /// Create a copy of SiteResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SiteResponseImplCopyWith<_$SiteResponseImpl> get copyWith => - __$$SiteResponseImplCopyWithImpl<_$SiteResponseImpl>(this, _$identity); + _$$SiteResponseImplCopyWith<_$SiteResponseImpl> get copyWith => __$$SiteResponseImplCopyWithImpl<_$SiteResponseImpl>(this, _$identity); @override Map toJson() { - return _$$SiteResponseImplToJson( - this, - ); + return _$$SiteResponseImplToJson(this); } } abstract class _SiteResponse extends SiteResponse { - const factory _SiteResponse( - {required final SiteView siteView, - required final List taglines}) = _$SiteResponseImpl; + const factory _SiteResponse({required final SiteView siteView, required final List taglines}) = _$SiteResponseImpl; const _SiteResponse._() : super._(); - factory _SiteResponse.fromJson(Map json) = - _$SiteResponseImpl.fromJson; + factory _SiteResponse.fromJson(Map json) = _$SiteResponseImpl.fromJson; @override SiteView get siteView; // v0.18.0 @@ -206,6 +187,5 @@ abstract class _SiteResponse extends SiteResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SiteResponseImplCopyWith<_$SiteResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SiteResponseImplCopyWith<_$SiteResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/site_response.g.dart b/lib/src/v3/models/site/site_response.g.dart index 096c0c23..d1ee40ca 100644 --- a/lib/src/v3/models/site/site_response.g.dart +++ b/lib/src/v3/models/site/site_response.g.dart @@ -6,16 +6,12 @@ part of 'site_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SiteResponseImpl _$$SiteResponseImplFromJson(Map json) => - _$SiteResponseImpl( - siteView: SiteView.fromJson(json['site_view'] as Map), - taglines: (json['taglines'] as List) - .map((e) => Tagline.fromJson(e as Map)) - .toList(), - ); +_$SiteResponseImpl _$$SiteResponseImplFromJson(Map json) => _$SiteResponseImpl( + siteView: SiteView.fromJson(json['site_view'] as Map), + taglines: (json['taglines'] as List).map((e) => Tagline.fromJson(e as Map)).toList(), +); -Map _$$SiteResponseImplToJson(_$SiteResponseImpl instance) => - { - 'site_view': instance.siteView.toJson(), - 'taglines': instance.taglines.map((e) => e.toJson()).toList(), - }; +Map _$$SiteResponseImplToJson(_$SiteResponseImpl instance) => { + 'site_view': instance.siteView.toJson(), + 'taglines': instance.taglines.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/site/site_view.dart b/lib/src/v3/models/site/site_view.dart index 9af7dd1b..19955227 100644 --- a/lib/src/v3/models/site/site_view.dart +++ b/lib/src/v3/models/site/site_view.dart @@ -17,6 +17,5 @@ class SiteView with _$SiteView { }) = _SiteView; const SiteView._(); - factory SiteView.fromJson(Map json) => - _$SiteViewFromJson(json); + factory SiteView.fromJson(Map json) => _$SiteViewFromJson(json); } diff --git a/lib/src/v3/models/site/site_view.freezed.dart b/lib/src/v3/models/site/site_view.freezed.dart index fb733279..bc79d844 100644 --- a/lib/src/v3/models/site/site_view.freezed.dart +++ b/lib/src/v3/models/site/site_view.freezed.dart @@ -12,7 +12,8 @@ part of 'site_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); SiteView _$SiteViewFromJson(Map json) { return _SiteView.fromJson(json); @@ -22,8 +23,7 @@ SiteView _$SiteViewFromJson(Map json) { mixin _$SiteView { Site get site => throw _privateConstructorUsedError; // v0.18.0 LocalSite get localSite => throw _privateConstructorUsedError; // v0.18.0 - LocalSiteRateLimit get localSiteRateLimit => - throw _privateConstructorUsedError; // v0.18.0 + LocalSiteRateLimit get localSiteRateLimit => throw _privateConstructorUsedError; // v0.18.0 SiteAggregates get counts => throw _privateConstructorUsedError; /// Serializes this SiteView to a JSON map. @@ -32,20 +32,14 @@ mixin _$SiteView { /// Create a copy of SiteView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SiteViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $SiteViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SiteViewCopyWith<$Res> { - factory $SiteViewCopyWith(SiteView value, $Res Function(SiteView) then) = - _$SiteViewCopyWithImpl<$Res, SiteView>; + factory $SiteViewCopyWith(SiteView value, $Res Function(SiteView) then) = _$SiteViewCopyWithImpl<$Res, SiteView>; @useResult - $Res call( - {Site site, - LocalSite localSite, - LocalSiteRateLimit localSiteRateLimit, - SiteAggregates counts}); + $Res call({Site site, LocalSite localSite, LocalSiteRateLimit localSiteRateLimit, SiteAggregates counts}); $SiteCopyWith<$Res> get site; $LocalSiteCopyWith<$Res> get localSite; @@ -54,8 +48,7 @@ abstract class $SiteViewCopyWith<$Res> { } /// @nodoc -class _$SiteViewCopyWithImpl<$Res, $Val extends SiteView> - implements $SiteViewCopyWith<$Res> { +class _$SiteViewCopyWithImpl<$Res, $Val extends SiteView> implements $SiteViewCopyWith<$Res> { _$SiteViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,30 +60,32 @@ class _$SiteViewCopyWithImpl<$Res, $Val extends SiteView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? site = null, - Object? localSite = null, - Object? localSiteRateLimit = null, - Object? counts = null, - }) { - return _then(_value.copyWith( - site: null == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site, - localSite: null == localSite - ? _value.localSite - : localSite // ignore: cast_nullable_to_non_nullable - as LocalSite, - localSiteRateLimit: null == localSiteRateLimit - ? _value.localSiteRateLimit - : localSiteRateLimit // ignore: cast_nullable_to_non_nullable - as LocalSiteRateLimit, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as SiteAggregates, - ) as $Val); + $Res call({Object? site = null, Object? localSite = null, Object? localSiteRateLimit = null, Object? counts = null}) { + return _then( + _value.copyWith( + site: + null == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site, + localSite: + null == localSite + ? _value.localSite + : localSite // ignore: cast_nullable_to_non_nullable + as LocalSite, + localSiteRateLimit: + null == localSiteRateLimit + ? _value.localSiteRateLimit + : localSiteRateLimit // ignore: cast_nullable_to_non_nullable + as LocalSiteRateLimit, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as SiteAggregates, + ) + as $Val, + ); } /// Create a copy of SiteView @@ -118,8 +113,7 @@ class _$SiteViewCopyWithImpl<$Res, $Val extends SiteView> @override @pragma('vm:prefer-inline') $LocalSiteRateLimitCopyWith<$Res> get localSiteRateLimit { - return $LocalSiteRateLimitCopyWith<$Res>(_value.localSiteRateLimit, - (value) { + return $LocalSiteRateLimitCopyWith<$Res>(_value.localSiteRateLimit, (value) { return _then(_value.copyWith(localSiteRateLimit: value) as $Val); }); } @@ -136,18 +130,11 @@ class _$SiteViewCopyWithImpl<$Res, $Val extends SiteView> } /// @nodoc -abstract class _$$SiteViewImplCopyWith<$Res> - implements $SiteViewCopyWith<$Res> { - factory _$$SiteViewImplCopyWith( - _$SiteViewImpl value, $Res Function(_$SiteViewImpl) then) = - __$$SiteViewImplCopyWithImpl<$Res>; +abstract class _$$SiteViewImplCopyWith<$Res> implements $SiteViewCopyWith<$Res> { + factory _$$SiteViewImplCopyWith(_$SiteViewImpl value, $Res Function(_$SiteViewImpl) then) = __$$SiteViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {Site site, - LocalSite localSite, - LocalSiteRateLimit localSiteRateLimit, - SiteAggregates counts}); + $Res call({Site site, LocalSite localSite, LocalSiteRateLimit localSiteRateLimit, SiteAggregates counts}); @override $SiteCopyWith<$Res> get site; @@ -160,41 +147,38 @@ abstract class _$$SiteViewImplCopyWith<$Res> } /// @nodoc -class __$$SiteViewImplCopyWithImpl<$Res> - extends _$SiteViewCopyWithImpl<$Res, _$SiteViewImpl> - implements _$$SiteViewImplCopyWith<$Res> { - __$$SiteViewImplCopyWithImpl( - _$SiteViewImpl _value, $Res Function(_$SiteViewImpl) _then) - : super(_value, _then); +class __$$SiteViewImplCopyWithImpl<$Res> extends _$SiteViewCopyWithImpl<$Res, _$SiteViewImpl> implements _$$SiteViewImplCopyWith<$Res> { + __$$SiteViewImplCopyWithImpl(_$SiteViewImpl _value, $Res Function(_$SiteViewImpl) _then) : super(_value, _then); /// Create a copy of SiteView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? site = null, - Object? localSite = null, - Object? localSiteRateLimit = null, - Object? counts = null, - }) { - return _then(_$SiteViewImpl( - site: null == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site, - localSite: null == localSite - ? _value.localSite - : localSite // ignore: cast_nullable_to_non_nullable - as LocalSite, - localSiteRateLimit: null == localSiteRateLimit - ? _value.localSiteRateLimit - : localSiteRateLimit // ignore: cast_nullable_to_non_nullable - as LocalSiteRateLimit, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as SiteAggregates, - )); + $Res call({Object? site = null, Object? localSite = null, Object? localSiteRateLimit = null, Object? counts = null}) { + return _then( + _$SiteViewImpl( + site: + null == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site, + localSite: + null == localSite + ? _value.localSite + : localSite // ignore: cast_nullable_to_non_nullable + as LocalSite, + localSiteRateLimit: + null == localSiteRateLimit + ? _value.localSiteRateLimit + : localSiteRateLimit // ignore: cast_nullable_to_non_nullable + as LocalSiteRateLimit, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as SiteAggregates, + ), + ); } } @@ -202,25 +186,19 @@ class __$$SiteViewImplCopyWithImpl<$Res> @modelSerde class _$SiteViewImpl extends _SiteView { - const _$SiteViewImpl( - {required this.site, - required this.localSite, - required this.localSiteRateLimit, - required this.counts}) - : super._(); + const _$SiteViewImpl({required this.site, required this.localSite, required this.localSiteRateLimit, required this.counts}) : super._(); - factory _$SiteViewImpl.fromJson(Map json) => - _$$SiteViewImplFromJson(json); + factory _$SiteViewImpl.fromJson(Map json) => _$$SiteViewImplFromJson(json); @override final Site site; -// v0.18.0 + // v0.18.0 @override final LocalSite localSite; -// v0.18.0 + // v0.18.0 @override final LocalSiteRateLimit localSiteRateLimit; -// v0.18.0 + // v0.18.0 @override final SiteAggregates counts; @@ -235,44 +213,33 @@ class _$SiteViewImpl extends _SiteView { (other.runtimeType == runtimeType && other is _$SiteViewImpl && (identical(other.site, site) || other.site == site) && - (identical(other.localSite, localSite) || - other.localSite == localSite) && - (identical(other.localSiteRateLimit, localSiteRateLimit) || - other.localSiteRateLimit == localSiteRateLimit) && + (identical(other.localSite, localSite) || other.localSite == localSite) && + (identical(other.localSiteRateLimit, localSiteRateLimit) || other.localSiteRateLimit == localSiteRateLimit) && (identical(other.counts, counts) || other.counts == counts)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, site, localSite, localSiteRateLimit, counts); + int get hashCode => Object.hash(runtimeType, site, localSite, localSiteRateLimit, counts); /// Create a copy of SiteView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SiteViewImplCopyWith<_$SiteViewImpl> get copyWith => - __$$SiteViewImplCopyWithImpl<_$SiteViewImpl>(this, _$identity); + _$$SiteViewImplCopyWith<_$SiteViewImpl> get copyWith => __$$SiteViewImplCopyWithImpl<_$SiteViewImpl>(this, _$identity); @override Map toJson() { - return _$$SiteViewImplToJson( - this, - ); + return _$$SiteViewImplToJson(this); } } abstract class _SiteView extends SiteView { - const factory _SiteView( - {required final Site site, - required final LocalSite localSite, - required final LocalSiteRateLimit localSiteRateLimit, - required final SiteAggregates counts}) = _$SiteViewImpl; + const factory _SiteView({required final Site site, required final LocalSite localSite, required final LocalSiteRateLimit localSiteRateLimit, required final SiteAggregates counts}) = _$SiteViewImpl; const _SiteView._() : super._(); - factory _SiteView.fromJson(Map json) = - _$SiteViewImpl.fromJson; + factory _SiteView.fromJson(Map json) = _$SiteViewImpl.fromJson; @override Site get site; // v0.18.0 @@ -287,6 +254,5 @@ abstract class _SiteView extends SiteView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SiteViewImplCopyWith<_$SiteViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SiteViewImplCopyWith<_$SiteViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/site/site_view.g.dart b/lib/src/v3/models/site/site_view.g.dart index 0c39ec17..36902674 100644 --- a/lib/src/v3/models/site/site_view.g.dart +++ b/lib/src/v3/models/site/site_view.g.dart @@ -6,19 +6,16 @@ part of 'site_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SiteViewImpl _$$SiteViewImplFromJson(Map json) => - _$SiteViewImpl( - site: Site.fromJson(json['site'] as Map), - localSite: LocalSite.fromJson(json['local_site'] as Map), - localSiteRateLimit: LocalSiteRateLimit.fromJson( - json['local_site_rate_limit'] as Map), - counts: SiteAggregates.fromJson(json['counts'] as Map), - ); +_$SiteViewImpl _$$SiteViewImplFromJson(Map json) => _$SiteViewImpl( + site: Site.fromJson(json['site'] as Map), + localSite: LocalSite.fromJson(json['local_site'] as Map), + localSiteRateLimit: LocalSiteRateLimit.fromJson(json['local_site_rate_limit'] as Map), + counts: SiteAggregates.fromJson(json['counts'] as Map), +); -Map _$$SiteViewImplToJson(_$SiteViewImpl instance) => - { - 'site': instance.site.toJson(), - 'local_site': instance.localSite.toJson(), - 'local_site_rate_limit': instance.localSiteRateLimit.toJson(), - 'counts': instance.counts.toJson(), - }; +Map _$$SiteViewImplToJson(_$SiteViewImpl instance) => { + 'site': instance.site.toJson(), + 'local_site': instance.localSite.toJson(), + 'local_site_rate_limit': instance.localSiteRateLimit.toJson(), + 'counts': instance.counts.toJson(), +}; diff --git a/lib/src/v3/models/tagline/tagline.dart b/lib/src/v3/models/tagline/tagline.dart index d736798a..422d9303 100644 --- a/lib/src/v3/models/tagline/tagline.dart +++ b/lib/src/v3/models/tagline/tagline.dart @@ -18,6 +18,5 @@ class Tagline with _$Tagline { }) = _Tagline; const Tagline._(); - factory Tagline.fromJson(Map json) => - _$TaglineFromJson(json); + factory Tagline.fromJson(Map json) => _$TaglineFromJson(json); } diff --git a/lib/src/v3/models/tagline/tagline.freezed.dart b/lib/src/v3/models/tagline/tagline.freezed.dart index c4c4dcb1..17dbca41 100644 --- a/lib/src/v3/models/tagline/tagline.freezed.dart +++ b/lib/src/v3/models/tagline/tagline.freezed.dart @@ -12,7 +12,8 @@ part of 'tagline.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); Tagline _$TaglineFromJson(Map json) { return _Tagline.fromJson(json); @@ -37,20 +38,13 @@ mixin _$Tagline { /// @nodoc abstract class $TaglineCopyWith<$Res> { - factory $TaglineCopyWith(Tagline value, $Res Function(Tagline) then) = - _$TaglineCopyWithImpl<$Res, Tagline>; + factory $TaglineCopyWith(Tagline value, $Res Function(Tagline) then) = _$TaglineCopyWithImpl<$Res, Tagline>; @useResult - $Res call( - {int id, - int localSiteId, - String content, - DateTime published, - DateTime? updated}); + $Res call({int id, int localSiteId, String content, DateTime published, DateTime? updated}); } /// @nodoc -class _$TaglineCopyWithImpl<$Res, $Val extends Tagline> - implements $TaglineCopyWith<$Res> { +class _$TaglineCopyWithImpl<$Res, $Val extends Tagline> implements $TaglineCopyWith<$Res> { _$TaglineCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,94 +56,86 @@ class _$TaglineCopyWithImpl<$Res, $Val extends Tagline> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? localSiteId = null, - Object? content = null, - Object? published = null, - Object? updated = freezed, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - ) as $Val); + $Res call({Object? id = null, Object? localSiteId = null, Object? content = null, Object? published = null, Object? updated = freezed}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$TaglineImplCopyWith<$Res> implements $TaglineCopyWith<$Res> { - factory _$$TaglineImplCopyWith( - _$TaglineImpl value, $Res Function(_$TaglineImpl) then) = - __$$TaglineImplCopyWithImpl<$Res>; + factory _$$TaglineImplCopyWith(_$TaglineImpl value, $Res Function(_$TaglineImpl) then) = __$$TaglineImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - int localSiteId, - String content, - DateTime published, - DateTime? updated}); + $Res call({int id, int localSiteId, String content, DateTime published, DateTime? updated}); } /// @nodoc -class __$$TaglineImplCopyWithImpl<$Res> - extends _$TaglineCopyWithImpl<$Res, _$TaglineImpl> - implements _$$TaglineImplCopyWith<$Res> { - __$$TaglineImplCopyWithImpl( - _$TaglineImpl _value, $Res Function(_$TaglineImpl) _then) - : super(_value, _then); +class __$$TaglineImplCopyWithImpl<$Res> extends _$TaglineCopyWithImpl<$Res, _$TaglineImpl> implements _$$TaglineImplCopyWith<$Res> { + __$$TaglineImplCopyWithImpl(_$TaglineImpl _value, $Res Function(_$TaglineImpl) _then) : super(_value, _then); /// Create a copy of Tagline /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? localSiteId = null, - Object? content = null, - Object? published = null, - Object? updated = freezed, - }) { - return _then(_$TaglineImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - localSiteId: null == localSiteId - ? _value.localSiteId - : localSiteId // ignore: cast_nullable_to_non_nullable - as int, - content: null == content - ? _value.content - : content // ignore: cast_nullable_to_non_nullable - as String, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as DateTime, - updated: freezed == updated - ? _value.updated - : updated // ignore: cast_nullable_to_non_nullable - as DateTime?, - )); + $Res call({Object? id = null, Object? localSiteId = null, Object? content = null, Object? published = null, Object? updated = freezed}) { + return _then( + _$TaglineImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + localSiteId: + null == localSiteId + ? _value.localSiteId + : localSiteId // ignore: cast_nullable_to_non_nullable + as int, + content: + null == content + ? _value.content + : content // ignore: cast_nullable_to_non_nullable + as String, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as DateTime, + updated: + freezed == updated + ? _value.updated + : updated // ignore: cast_nullable_to_non_nullable + as DateTime?, + ), + ); } } @@ -157,29 +143,22 @@ class __$$TaglineImplCopyWithImpl<$Res> @modelSerde class _$TaglineImpl extends _Tagline { - const _$TaglineImpl( - {required this.id, - required this.localSiteId, - required this.content, - required this.published, - this.updated}) - : super._(); + const _$TaglineImpl({required this.id, required this.localSiteId, required this.content, required this.published, this.updated}) : super._(); - factory _$TaglineImpl.fromJson(Map json) => - _$$TaglineImplFromJson(json); + factory _$TaglineImpl.fromJson(Map json) => _$$TaglineImplFromJson(json); @override final int id; -// v0.18.0 + // v0.18.0 @override final int localSiteId; -// v0.18.0 + // v0.18.0 @override final String content; -// v0.18.0 + // v0.18.0 @override final DateTime published; -// v0.18.0 + // v0.18.0 @override final DateTime? updated; @@ -194,42 +173,31 @@ class _$TaglineImpl extends _Tagline { (other.runtimeType == runtimeType && other is _$TaglineImpl && (identical(other.id, id) || other.id == id) && - (identical(other.localSiteId, localSiteId) || - other.localSiteId == localSiteId) && + (identical(other.localSiteId, localSiteId) || other.localSiteId == localSiteId) && (identical(other.content, content) || other.content == content) && - (identical(other.published, published) || - other.published == published) && + (identical(other.published, published) || other.published == published) && (identical(other.updated, updated) || other.updated == updated)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, localSiteId, content, published, updated); + int get hashCode => Object.hash(runtimeType, id, localSiteId, content, published, updated); /// Create a copy of Tagline /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$TaglineImplCopyWith<_$TaglineImpl> get copyWith => - __$$TaglineImplCopyWithImpl<_$TaglineImpl>(this, _$identity); + _$$TaglineImplCopyWith<_$TaglineImpl> get copyWith => __$$TaglineImplCopyWithImpl<_$TaglineImpl>(this, _$identity); @override Map toJson() { - return _$$TaglineImplToJson( - this, - ); + return _$$TaglineImplToJson(this); } } abstract class _Tagline extends Tagline { - const factory _Tagline( - {required final int id, - required final int localSiteId, - required final String content, - required final DateTime published, - final DateTime? updated}) = _$TaglineImpl; + const factory _Tagline({required final int id, required final int localSiteId, required final String content, required final DateTime published, final DateTime? updated}) = _$TaglineImpl; const _Tagline._() : super._(); factory _Tagline.fromJson(Map json) = _$TaglineImpl.fromJson; @@ -249,6 +217,5 @@ abstract class _Tagline extends Tagline { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$TaglineImplCopyWith<_$TaglineImpl> get copyWith => - throw _privateConstructorUsedError; + _$$TaglineImplCopyWith<_$TaglineImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/tagline/tagline.g.dart b/lib/src/v3/models/tagline/tagline.g.dart index 1d08d94d..512460ec 100644 --- a/lib/src/v3/models/tagline/tagline.g.dart +++ b/lib/src/v3/models/tagline/tagline.g.dart @@ -6,34 +6,22 @@ part of 'tagline.dart'; // JsonSerializableGenerator // ************************************************************************** -_$TaglineImpl _$$TaglineImplFromJson(Map json) => - _$TaglineImpl( - id: (json['id'] as num).toInt(), - localSiteId: (json['local_site_id'] as num).toInt(), - content: json['content'] as String, - published: const ForceUtcDateTime().fromJson(json['published'] as String), - updated: _$JsonConverterFromJson( - json['updated'], const ForceUtcDateTime().fromJson), - ); +_$TaglineImpl _$$TaglineImplFromJson(Map json) => _$TaglineImpl( + id: (json['id'] as num).toInt(), + localSiteId: (json['local_site_id'] as num).toInt(), + content: json['content'] as String, + published: const ForceUtcDateTime().fromJson(json['published'] as String), + updated: _$JsonConverterFromJson(json['updated'], const ForceUtcDateTime().fromJson), +); -Map _$$TaglineImplToJson(_$TaglineImpl instance) => - { - 'id': instance.id, - 'local_site_id': instance.localSiteId, - 'content': instance.content, - 'published': const ForceUtcDateTime().toJson(instance.published), - 'updated': _$JsonConverterToJson( - instance.updated, const ForceUtcDateTime().toJson), - }; +Map _$$TaglineImplToJson(_$TaglineImpl instance) => { + 'id': instance.id, + 'local_site_id': instance.localSiteId, + 'content': instance.content, + 'published': const ForceUtcDateTime().toJson(instance.published), + 'updated': _$JsonConverterToJson(instance.updated, const ForceUtcDateTime().toJson), +}; -Value? _$JsonConverterFromJson( - Object? json, - Value? Function(Json json) fromJson, -) => - json == null ? null : fromJson(json as Json); +Value? _$JsonConverterFromJson(Object? json, Value? Function(Json json) fromJson) => json == null ? null : fromJson(json as Json); -Json? _$JsonConverterToJson( - Value? value, - Json? Function(Value value) toJson, -) => - value == null ? null : toJson(value); +Json? _$JsonConverterToJson(Value? value, Json? Function(Value value) toJson) => value == null ? null : toJson(value); diff --git a/lib/src/v3/models/user/ban_person_response.dart b/lib/src/v3/models/user/ban_person_response.dart index f7c71d39..e13557a0 100644 --- a/lib/src/v3/models/user/ban_person_response.dart +++ b/lib/src/v3/models/user/ban_person_response.dart @@ -15,6 +15,5 @@ class BanPersonResponse with _$BanPersonResponse { }) = _BanPersonResponse; const BanPersonResponse._(); - factory BanPersonResponse.fromJson(Map json) => - _$BanPersonResponseFromJson(json); + factory BanPersonResponse.fromJson(Map json) => _$BanPersonResponseFromJson(json); } diff --git a/lib/src/v3/models/user/ban_person_response.freezed.dart b/lib/src/v3/models/user/ban_person_response.freezed.dart index b181129a..98b82852 100644 --- a/lib/src/v3/models/user/ban_person_response.freezed.dart +++ b/lib/src/v3/models/user/ban_person_response.freezed.dart @@ -12,7 +12,8 @@ part of 'ban_person_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); BanPersonResponse _$BanPersonResponseFromJson(Map json) { return _BanPersonResponse.fromJson(json); @@ -29,15 +30,12 @@ mixin _$BanPersonResponse { /// Create a copy of BanPersonResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BanPersonResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BanPersonResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BanPersonResponseCopyWith<$Res> { - factory $BanPersonResponseCopyWith( - BanPersonResponse value, $Res Function(BanPersonResponse) then) = - _$BanPersonResponseCopyWithImpl<$Res, BanPersonResponse>; + factory $BanPersonResponseCopyWith(BanPersonResponse value, $Res Function(BanPersonResponse) then) = _$BanPersonResponseCopyWithImpl<$Res, BanPersonResponse>; @useResult $Res call({PersonView personView, bool banned}); @@ -45,8 +43,7 @@ abstract class $BanPersonResponseCopyWith<$Res> { } /// @nodoc -class _$BanPersonResponseCopyWithImpl<$Res, $Val extends BanPersonResponse> - implements $BanPersonResponseCopyWith<$Res> { +class _$BanPersonResponseCopyWithImpl<$Res, $Val extends BanPersonResponse> implements $BanPersonResponseCopyWith<$Res> { _$BanPersonResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,20 +55,22 @@ class _$BanPersonResponseCopyWithImpl<$Res, $Val extends BanPersonResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? banned = null, - }) { - return _then(_value.copyWith( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? personView = null, Object? banned = null}) { + return _then( + _value.copyWith( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of BanPersonResponse @@ -86,11 +85,8 @@ class _$BanPersonResponseCopyWithImpl<$Res, $Val extends BanPersonResponse> } /// @nodoc -abstract class _$$BanPersonResponseImplCopyWith<$Res> - implements $BanPersonResponseCopyWith<$Res> { - factory _$$BanPersonResponseImplCopyWith(_$BanPersonResponseImpl value, - $Res Function(_$BanPersonResponseImpl) then) = - __$$BanPersonResponseImplCopyWithImpl<$Res>; +abstract class _$$BanPersonResponseImplCopyWith<$Res> implements $BanPersonResponseCopyWith<$Res> { + factory _$$BanPersonResponseImplCopyWith(_$BanPersonResponseImpl value, $Res Function(_$BanPersonResponseImpl) then) = __$$BanPersonResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PersonView personView, bool banned}); @@ -100,31 +96,28 @@ abstract class _$$BanPersonResponseImplCopyWith<$Res> } /// @nodoc -class __$$BanPersonResponseImplCopyWithImpl<$Res> - extends _$BanPersonResponseCopyWithImpl<$Res, _$BanPersonResponseImpl> - implements _$$BanPersonResponseImplCopyWith<$Res> { - __$$BanPersonResponseImplCopyWithImpl(_$BanPersonResponseImpl _value, - $Res Function(_$BanPersonResponseImpl) _then) - : super(_value, _then); +class __$$BanPersonResponseImplCopyWithImpl<$Res> extends _$BanPersonResponseCopyWithImpl<$Res, _$BanPersonResponseImpl> implements _$$BanPersonResponseImplCopyWith<$Res> { + __$$BanPersonResponseImplCopyWithImpl(_$BanPersonResponseImpl _value, $Res Function(_$BanPersonResponseImpl) _then) : super(_value, _then); /// Create a copy of BanPersonResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? banned = null, - }) { - return _then(_$BanPersonResponseImpl( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? personView = null, Object? banned = null}) { + return _then( + _$BanPersonResponseImpl( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -132,16 +125,13 @@ class __$$BanPersonResponseImplCopyWithImpl<$Res> @modelSerde class _$BanPersonResponseImpl extends _BanPersonResponse { - const _$BanPersonResponseImpl( - {required this.personView, required this.banned}) - : super._(); + const _$BanPersonResponseImpl({required this.personView, required this.banned}) : super._(); - factory _$BanPersonResponseImpl.fromJson(Map json) => - _$$BanPersonResponseImplFromJson(json); + factory _$BanPersonResponseImpl.fromJson(Map json) => _$$BanPersonResponseImplFromJson(json); @override final PersonView personView; -// v0.18.0 + // v0.18.0 @override final bool banned; @@ -155,8 +145,7 @@ class _$BanPersonResponseImpl extends _BanPersonResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BanPersonResponseImpl && - (identical(other.personView, personView) || - other.personView == personView) && + (identical(other.personView, personView) || other.personView == personView) && (identical(other.banned, banned) || other.banned == banned)); } @@ -169,26 +158,19 @@ class _$BanPersonResponseImpl extends _BanPersonResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BanPersonResponseImplCopyWith<_$BanPersonResponseImpl> get copyWith => - __$$BanPersonResponseImplCopyWithImpl<_$BanPersonResponseImpl>( - this, _$identity); + _$$BanPersonResponseImplCopyWith<_$BanPersonResponseImpl> get copyWith => __$$BanPersonResponseImplCopyWithImpl<_$BanPersonResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BanPersonResponseImplToJson( - this, - ); + return _$$BanPersonResponseImplToJson(this); } } abstract class _BanPersonResponse extends BanPersonResponse { - const factory _BanPersonResponse( - {required final PersonView personView, - required final bool banned}) = _$BanPersonResponseImpl; + const factory _BanPersonResponse({required final PersonView personView, required final bool banned}) = _$BanPersonResponseImpl; const _BanPersonResponse._() : super._(); - factory _BanPersonResponse.fromJson(Map json) = - _$BanPersonResponseImpl.fromJson; + factory _BanPersonResponse.fromJson(Map json) = _$BanPersonResponseImpl.fromJson; @override PersonView get personView; // v0.18.0 @@ -199,6 +181,5 @@ abstract class _BanPersonResponse extends BanPersonResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BanPersonResponseImplCopyWith<_$BanPersonResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BanPersonResponseImplCopyWith<_$BanPersonResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/ban_person_response.g.dart b/lib/src/v3/models/user/ban_person_response.g.dart index 17d9230f..bfdff882 100644 --- a/lib/src/v3/models/user/ban_person_response.g.dart +++ b/lib/src/v3/models/user/ban_person_response.g.dart @@ -6,17 +6,7 @@ part of 'ban_person_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BanPersonResponseImpl _$$BanPersonResponseImplFromJson( - Map json) => - _$BanPersonResponseImpl( - personView: - PersonView.fromJson(json['person_view'] as Map), - banned: json['banned'] as bool, - ); +_$BanPersonResponseImpl _$$BanPersonResponseImplFromJson(Map json) => + _$BanPersonResponseImpl(personView: PersonView.fromJson(json['person_view'] as Map), banned: json['banned'] as bool); -Map _$$BanPersonResponseImplToJson( - _$BanPersonResponseImpl instance) => - { - 'person_view': instance.personView.toJson(), - 'banned': instance.banned, - }; +Map _$$BanPersonResponseImplToJson(_$BanPersonResponseImpl instance) => {'person_view': instance.personView.toJson(), 'banned': instance.banned}; diff --git a/lib/src/v3/models/user/banned_persons_response.dart b/lib/src/v3/models/user/banned_persons_response.dart index de04bb5f..08872ded 100644 --- a/lib/src/v3/models/user/banned_persons_response.dart +++ b/lib/src/v3/models/user/banned_persons_response.dart @@ -14,6 +14,5 @@ class BannedPersonsResponse with _$BannedPersonsResponse { }) = _BannedPersonsResponse; const BannedPersonsResponse._(); - factory BannedPersonsResponse.fromJson(Map json) => - _$BannedPersonsResponseFromJson(json); + factory BannedPersonsResponse.fromJson(Map json) => _$BannedPersonsResponseFromJson(json); } diff --git a/lib/src/v3/models/user/banned_persons_response.freezed.dart b/lib/src/v3/models/user/banned_persons_response.freezed.dart index c2b33817..ff4c1a37 100644 --- a/lib/src/v3/models/user/banned_persons_response.freezed.dart +++ b/lib/src/v3/models/user/banned_persons_response.freezed.dart @@ -12,10 +12,10 @@ part of 'banned_persons_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -BannedPersonsResponse _$BannedPersonsResponseFromJson( - Map json) { +BannedPersonsResponse _$BannedPersonsResponseFromJson(Map json) { return _BannedPersonsResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$BannedPersonsResponse { /// Create a copy of BannedPersonsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BannedPersonsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BannedPersonsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BannedPersonsResponseCopyWith<$Res> { - factory $BannedPersonsResponseCopyWith(BannedPersonsResponse value, - $Res Function(BannedPersonsResponse) then) = - _$BannedPersonsResponseCopyWithImpl<$Res, BannedPersonsResponse>; + factory $BannedPersonsResponseCopyWith(BannedPersonsResponse value, $Res Function(BannedPersonsResponse) then) = _$BannedPersonsResponseCopyWithImpl<$Res, BannedPersonsResponse>; @useResult $Res call({List banned}); } /// @nodoc -class _$BannedPersonsResponseCopyWithImpl<$Res, - $Val extends BannedPersonsResponse> - implements $BannedPersonsResponseCopyWith<$Res> { +class _$BannedPersonsResponseCopyWithImpl<$Res, $Val extends BannedPersonsResponse> implements $BannedPersonsResponseCopyWith<$Res> { _$BannedPersonsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$BannedPersonsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? banned = null, - }) { - return _then(_value.copyWith( - banned: null == banned - ? _value.banned - : banned // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? banned = null}) { + return _then( + _value.copyWith( + banned: + null == banned + ? _value.banned + : banned // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$BannedPersonsResponseImplCopyWith<$Res> - implements $BannedPersonsResponseCopyWith<$Res> { - factory _$$BannedPersonsResponseImplCopyWith( - _$BannedPersonsResponseImpl value, - $Res Function(_$BannedPersonsResponseImpl) then) = - __$$BannedPersonsResponseImplCopyWithImpl<$Res>; +abstract class _$$BannedPersonsResponseImplCopyWith<$Res> implements $BannedPersonsResponseCopyWith<$Res> { + factory _$$BannedPersonsResponseImplCopyWith(_$BannedPersonsResponseImpl value, $Res Function(_$BannedPersonsResponseImpl) then) = __$$BannedPersonsResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List banned}); } /// @nodoc -class __$$BannedPersonsResponseImplCopyWithImpl<$Res> - extends _$BannedPersonsResponseCopyWithImpl<$Res, - _$BannedPersonsResponseImpl> - implements _$$BannedPersonsResponseImplCopyWith<$Res> { - __$$BannedPersonsResponseImplCopyWithImpl(_$BannedPersonsResponseImpl _value, - $Res Function(_$BannedPersonsResponseImpl) _then) - : super(_value, _then); +class __$$BannedPersonsResponseImplCopyWithImpl<$Res> extends _$BannedPersonsResponseCopyWithImpl<$Res, _$BannedPersonsResponseImpl> implements _$$BannedPersonsResponseImplCopyWith<$Res> { + __$$BannedPersonsResponseImplCopyWithImpl(_$BannedPersonsResponseImpl _value, $Res Function(_$BannedPersonsResponseImpl) _then) : super(_value, _then); /// Create a copy of BannedPersonsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? banned = null, - }) { - return _then(_$BannedPersonsResponseImpl( - banned: null == banned - ? _value._banned - : banned // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? banned = null}) { + return _then( + _$BannedPersonsResponseImpl( + banned: + null == banned + ? _value._banned + : banned // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -110,12 +99,9 @@ class __$$BannedPersonsResponseImplCopyWithImpl<$Res> @modelSerde class _$BannedPersonsResponseImpl extends _BannedPersonsResponse { - const _$BannedPersonsResponseImpl({required final List banned}) - : _banned = banned, - super._(); + const _$BannedPersonsResponseImpl({required final List banned}) : _banned = banned, super._(); - factory _$BannedPersonsResponseImpl.fromJson(Map json) => - _$$BannedPersonsResponseImplFromJson(json); + factory _$BannedPersonsResponseImpl.fromJson(Map json) => _$$BannedPersonsResponseImplFromJson(json); final List _banned; @override @@ -132,41 +118,31 @@ class _$BannedPersonsResponseImpl extends _BannedPersonsResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$BannedPersonsResponseImpl && - const DeepCollectionEquality().equals(other._banned, _banned)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$BannedPersonsResponseImpl && const DeepCollectionEquality().equals(other._banned, _banned)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_banned)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_banned)); /// Create a copy of BannedPersonsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BannedPersonsResponseImplCopyWith<_$BannedPersonsResponseImpl> - get copyWith => __$$BannedPersonsResponseImplCopyWithImpl< - _$BannedPersonsResponseImpl>(this, _$identity); + _$$BannedPersonsResponseImplCopyWith<_$BannedPersonsResponseImpl> get copyWith => __$$BannedPersonsResponseImplCopyWithImpl<_$BannedPersonsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BannedPersonsResponseImplToJson( - this, - ); + return _$$BannedPersonsResponseImplToJson(this); } } abstract class _BannedPersonsResponse extends BannedPersonsResponse { - const factory _BannedPersonsResponse( - {required final List banned}) = _$BannedPersonsResponseImpl; + const factory _BannedPersonsResponse({required final List banned}) = _$BannedPersonsResponseImpl; const _BannedPersonsResponse._() : super._(); - factory _BannedPersonsResponse.fromJson(Map json) = - _$BannedPersonsResponseImpl.fromJson; + factory _BannedPersonsResponse.fromJson(Map json) = _$BannedPersonsResponseImpl.fromJson; @override List get banned; @@ -175,6 +151,5 @@ abstract class _BannedPersonsResponse extends BannedPersonsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BannedPersonsResponseImplCopyWith<_$BannedPersonsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$BannedPersonsResponseImplCopyWith<_$BannedPersonsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/banned_persons_response.g.dart b/lib/src/v3/models/user/banned_persons_response.g.dart index 65d10a6b..39d117df 100644 --- a/lib/src/v3/models/user/banned_persons_response.g.dart +++ b/lib/src/v3/models/user/banned_persons_response.g.dart @@ -6,16 +6,7 @@ part of 'banned_persons_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BannedPersonsResponseImpl _$$BannedPersonsResponseImplFromJson( - Map json) => - _$BannedPersonsResponseImpl( - banned: (json['banned'] as List) - .map((e) => PersonView.fromJson(e as Map)) - .toList(), - ); +_$BannedPersonsResponseImpl _$$BannedPersonsResponseImplFromJson(Map json) => + _$BannedPersonsResponseImpl(banned: (json['banned'] as List).map((e) => PersonView.fromJson(e as Map)).toList()); -Map _$$BannedPersonsResponseImplToJson( - _$BannedPersonsResponseImpl instance) => - { - 'banned': instance.banned.map((e) => e.toJson()).toList(), - }; +Map _$$BannedPersonsResponseImplToJson(_$BannedPersonsResponseImpl instance) => {'banned': instance.banned.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/user/block_person_response.dart b/lib/src/v3/models/user/block_person_response.dart index 695946ef..d89cac4c 100644 --- a/lib/src/v3/models/user/block_person_response.dart +++ b/lib/src/v3/models/user/block_person_response.dart @@ -15,6 +15,5 @@ class BlockPersonResponse with _$BlockPersonResponse { }) = _BlockPersonResponse; const BlockPersonResponse._(); - factory BlockPersonResponse.fromJson(Map json) => - _$BlockPersonResponseFromJson(json); + factory BlockPersonResponse.fromJson(Map json) => _$BlockPersonResponseFromJson(json); } diff --git a/lib/src/v3/models/user/block_person_response.freezed.dart b/lib/src/v3/models/user/block_person_response.freezed.dart index e17cf9ac..c9e8dd18 100644 --- a/lib/src/v3/models/user/block_person_response.freezed.dart +++ b/lib/src/v3/models/user/block_person_response.freezed.dart @@ -12,7 +12,8 @@ part of 'block_person_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); BlockPersonResponse _$BlockPersonResponseFromJson(Map json) { return _BlockPersonResponse.fromJson(json); @@ -29,15 +30,12 @@ mixin _$BlockPersonResponse { /// Create a copy of BlockPersonResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $BlockPersonResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $BlockPersonResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlockPersonResponseCopyWith<$Res> { - factory $BlockPersonResponseCopyWith( - BlockPersonResponse value, $Res Function(BlockPersonResponse) then) = - _$BlockPersonResponseCopyWithImpl<$Res, BlockPersonResponse>; + factory $BlockPersonResponseCopyWith(BlockPersonResponse value, $Res Function(BlockPersonResponse) then) = _$BlockPersonResponseCopyWithImpl<$Res, BlockPersonResponse>; @useResult $Res call({PersonView personView, bool blocked}); @@ -45,8 +43,7 @@ abstract class $BlockPersonResponseCopyWith<$Res> { } /// @nodoc -class _$BlockPersonResponseCopyWithImpl<$Res, $Val extends BlockPersonResponse> - implements $BlockPersonResponseCopyWith<$Res> { +class _$BlockPersonResponseCopyWithImpl<$Res, $Val extends BlockPersonResponse> implements $BlockPersonResponseCopyWith<$Res> { _$BlockPersonResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,20 +55,22 @@ class _$BlockPersonResponseCopyWithImpl<$Res, $Val extends BlockPersonResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? blocked = null, - }) { - return _then(_value.copyWith( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? personView = null, Object? blocked = null}) { + return _then( + _value.copyWith( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of BlockPersonResponse @@ -86,11 +85,8 @@ class _$BlockPersonResponseCopyWithImpl<$Res, $Val extends BlockPersonResponse> } /// @nodoc -abstract class _$$BlockPersonResponseImplCopyWith<$Res> - implements $BlockPersonResponseCopyWith<$Res> { - factory _$$BlockPersonResponseImplCopyWith(_$BlockPersonResponseImpl value, - $Res Function(_$BlockPersonResponseImpl) then) = - __$$BlockPersonResponseImplCopyWithImpl<$Res>; +abstract class _$$BlockPersonResponseImplCopyWith<$Res> implements $BlockPersonResponseCopyWith<$Res> { + factory _$$BlockPersonResponseImplCopyWith(_$BlockPersonResponseImpl value, $Res Function(_$BlockPersonResponseImpl) then) = __$$BlockPersonResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PersonView personView, bool blocked}); @@ -100,31 +96,28 @@ abstract class _$$BlockPersonResponseImplCopyWith<$Res> } /// @nodoc -class __$$BlockPersonResponseImplCopyWithImpl<$Res> - extends _$BlockPersonResponseCopyWithImpl<$Res, _$BlockPersonResponseImpl> - implements _$$BlockPersonResponseImplCopyWith<$Res> { - __$$BlockPersonResponseImplCopyWithImpl(_$BlockPersonResponseImpl _value, - $Res Function(_$BlockPersonResponseImpl) _then) - : super(_value, _then); +class __$$BlockPersonResponseImplCopyWithImpl<$Res> extends _$BlockPersonResponseCopyWithImpl<$Res, _$BlockPersonResponseImpl> implements _$$BlockPersonResponseImplCopyWith<$Res> { + __$$BlockPersonResponseImplCopyWithImpl(_$BlockPersonResponseImpl _value, $Res Function(_$BlockPersonResponseImpl) _then) : super(_value, _then); /// Create a copy of BlockPersonResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? blocked = null, - }) { - return _then(_$BlockPersonResponseImpl( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? personView = null, Object? blocked = null}) { + return _then( + _$BlockPersonResponseImpl( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -132,16 +125,13 @@ class __$$BlockPersonResponseImplCopyWithImpl<$Res> @modelSerde class _$BlockPersonResponseImpl extends _BlockPersonResponse { - const _$BlockPersonResponseImpl( - {required this.personView, required this.blocked}) - : super._(); + const _$BlockPersonResponseImpl({required this.personView, required this.blocked}) : super._(); - factory _$BlockPersonResponseImpl.fromJson(Map json) => - _$$BlockPersonResponseImplFromJson(json); + factory _$BlockPersonResponseImpl.fromJson(Map json) => _$$BlockPersonResponseImplFromJson(json); @override final PersonView personView; -// v0.18.0 + // v0.18.0 @override final bool blocked; @@ -155,8 +145,7 @@ class _$BlockPersonResponseImpl extends _BlockPersonResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$BlockPersonResponseImpl && - (identical(other.personView, personView) || - other.personView == personView) && + (identical(other.personView, personView) || other.personView == personView) && (identical(other.blocked, blocked) || other.blocked == blocked)); } @@ -169,26 +158,19 @@ class _$BlockPersonResponseImpl extends _BlockPersonResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$BlockPersonResponseImplCopyWith<_$BlockPersonResponseImpl> get copyWith => - __$$BlockPersonResponseImplCopyWithImpl<_$BlockPersonResponseImpl>( - this, _$identity); + _$$BlockPersonResponseImplCopyWith<_$BlockPersonResponseImpl> get copyWith => __$$BlockPersonResponseImplCopyWithImpl<_$BlockPersonResponseImpl>(this, _$identity); @override Map toJson() { - return _$$BlockPersonResponseImplToJson( - this, - ); + return _$$BlockPersonResponseImplToJson(this); } } abstract class _BlockPersonResponse extends BlockPersonResponse { - const factory _BlockPersonResponse( - {required final PersonView personView, - required final bool blocked}) = _$BlockPersonResponseImpl; + const factory _BlockPersonResponse({required final PersonView personView, required final bool blocked}) = _$BlockPersonResponseImpl; const _BlockPersonResponse._() : super._(); - factory _BlockPersonResponse.fromJson(Map json) = - _$BlockPersonResponseImpl.fromJson; + factory _BlockPersonResponse.fromJson(Map json) = _$BlockPersonResponseImpl.fromJson; @override PersonView get personView; // v0.18.0 @@ -199,6 +181,5 @@ abstract class _BlockPersonResponse extends BlockPersonResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$BlockPersonResponseImplCopyWith<_$BlockPersonResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$BlockPersonResponseImplCopyWith<_$BlockPersonResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/block_person_response.g.dart b/lib/src/v3/models/user/block_person_response.g.dart index 65115b4e..3907073c 100644 --- a/lib/src/v3/models/user/block_person_response.g.dart +++ b/lib/src/v3/models/user/block_person_response.g.dart @@ -6,17 +6,7 @@ part of 'block_person_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$BlockPersonResponseImpl _$$BlockPersonResponseImplFromJson( - Map json) => - _$BlockPersonResponseImpl( - personView: - PersonView.fromJson(json['person_view'] as Map), - blocked: json['blocked'] as bool, - ); +_$BlockPersonResponseImpl _$$BlockPersonResponseImplFromJson(Map json) => + _$BlockPersonResponseImpl(personView: PersonView.fromJson(json['person_view'] as Map), blocked: json['blocked'] as bool); -Map _$$BlockPersonResponseImplToJson( - _$BlockPersonResponseImpl instance) => - { - 'person_view': instance.personView.toJson(), - 'blocked': instance.blocked, - }; +Map _$$BlockPersonResponseImplToJson(_$BlockPersonResponseImpl instance) => {'person_view': instance.personView.toJson(), 'blocked': instance.blocked}; diff --git a/lib/src/v3/models/user/captcha_response.dart b/lib/src/v3/models/user/captcha_response.dart index 50b27aef..6ba3f89b 100644 --- a/lib/src/v3/models/user/captcha_response.dart +++ b/lib/src/v3/models/user/captcha_response.dart @@ -15,6 +15,5 @@ class CaptchaResponse with _$CaptchaResponse { }) = _CaptchaResponse; const CaptchaResponse._(); - factory CaptchaResponse.fromJson(Map json) => - _$CaptchaResponseFromJson(json); + factory CaptchaResponse.fromJson(Map json) => _$CaptchaResponseFromJson(json); } diff --git a/lib/src/v3/models/user/captcha_response.freezed.dart b/lib/src/v3/models/user/captcha_response.freezed.dart index 2d256822..8b7c7e66 100644 --- a/lib/src/v3/models/user/captcha_response.freezed.dart +++ b/lib/src/v3/models/user/captcha_response.freezed.dart @@ -12,7 +12,8 @@ part of 'captcha_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CaptchaResponse _$CaptchaResponseFromJson(Map json) { return _CaptchaResponse.fromJson(json); @@ -30,22 +31,18 @@ mixin _$CaptchaResponse { /// Create a copy of CaptchaResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CaptchaResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $CaptchaResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CaptchaResponseCopyWith<$Res> { - factory $CaptchaResponseCopyWith( - CaptchaResponse value, $Res Function(CaptchaResponse) then) = - _$CaptchaResponseCopyWithImpl<$Res, CaptchaResponse>; + factory $CaptchaResponseCopyWith(CaptchaResponse value, $Res Function(CaptchaResponse) then) = _$CaptchaResponseCopyWithImpl<$Res, CaptchaResponse>; @useResult $Res call({String png, String wav, String uuid}); } /// @nodoc -class _$CaptchaResponseCopyWithImpl<$Res, $Val extends CaptchaResponse> - implements $CaptchaResponseCopyWith<$Res> { +class _$CaptchaResponseCopyWithImpl<$Res, $Val extends CaptchaResponse> implements $CaptchaResponseCopyWith<$Res> { _$CaptchaResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,70 +54,66 @@ class _$CaptchaResponseCopyWithImpl<$Res, $Val extends CaptchaResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? png = null, - Object? wav = null, - Object? uuid = null, - }) { - return _then(_value.copyWith( - png: null == png - ? _value.png - : png // ignore: cast_nullable_to_non_nullable - as String, - wav: null == wav - ? _value.wav - : wav // ignore: cast_nullable_to_non_nullable - as String, - uuid: null == uuid - ? _value.uuid - : uuid // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? png = null, Object? wav = null, Object? uuid = null}) { + return _then( + _value.copyWith( + png: + null == png + ? _value.png + : png // ignore: cast_nullable_to_non_nullable + as String, + wav: + null == wav + ? _value.wav + : wav // ignore: cast_nullable_to_non_nullable + as String, + uuid: + null == uuid + ? _value.uuid + : uuid // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$CaptchaResponseImplCopyWith<$Res> - implements $CaptchaResponseCopyWith<$Res> { - factory _$$CaptchaResponseImplCopyWith(_$CaptchaResponseImpl value, - $Res Function(_$CaptchaResponseImpl) then) = - __$$CaptchaResponseImplCopyWithImpl<$Res>; +abstract class _$$CaptchaResponseImplCopyWith<$Res> implements $CaptchaResponseCopyWith<$Res> { + factory _$$CaptchaResponseImplCopyWith(_$CaptchaResponseImpl value, $Res Function(_$CaptchaResponseImpl) then) = __$$CaptchaResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({String png, String wav, String uuid}); } /// @nodoc -class __$$CaptchaResponseImplCopyWithImpl<$Res> - extends _$CaptchaResponseCopyWithImpl<$Res, _$CaptchaResponseImpl> - implements _$$CaptchaResponseImplCopyWith<$Res> { - __$$CaptchaResponseImplCopyWithImpl( - _$CaptchaResponseImpl _value, $Res Function(_$CaptchaResponseImpl) _then) - : super(_value, _then); +class __$$CaptchaResponseImplCopyWithImpl<$Res> extends _$CaptchaResponseCopyWithImpl<$Res, _$CaptchaResponseImpl> implements _$$CaptchaResponseImplCopyWith<$Res> { + __$$CaptchaResponseImplCopyWithImpl(_$CaptchaResponseImpl _value, $Res Function(_$CaptchaResponseImpl) _then) : super(_value, _then); /// Create a copy of CaptchaResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? png = null, - Object? wav = null, - Object? uuid = null, - }) { - return _then(_$CaptchaResponseImpl( - png: null == png - ? _value.png - : png // ignore: cast_nullable_to_non_nullable - as String, - wav: null == wav - ? _value.wav - : wav // ignore: cast_nullable_to_non_nullable - as String, - uuid: null == uuid - ? _value.uuid - : uuid // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? png = null, Object? wav = null, Object? uuid = null}) { + return _then( + _$CaptchaResponseImpl( + png: + null == png + ? _value.png + : png // ignore: cast_nullable_to_non_nullable + as String, + wav: + null == wav + ? _value.wav + : wav // ignore: cast_nullable_to_non_nullable + as String, + uuid: + null == uuid + ? _value.uuid + : uuid // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -128,19 +121,16 @@ class __$$CaptchaResponseImplCopyWithImpl<$Res> @modelSerde class _$CaptchaResponseImpl extends _CaptchaResponse { - const _$CaptchaResponseImpl( - {required this.png, required this.wav, required this.uuid}) - : super._(); + const _$CaptchaResponseImpl({required this.png, required this.wav, required this.uuid}) : super._(); - factory _$CaptchaResponseImpl.fromJson(Map json) => - _$$CaptchaResponseImplFromJson(json); + factory _$CaptchaResponseImpl.fromJson(Map json) => _$$CaptchaResponseImplFromJson(json); @override final String png; -// v0.18.0 + // v0.18.0 @override final String wav; -// v0.18.0 + // v0.18.0 @override final String uuid; @@ -168,27 +158,19 @@ class _$CaptchaResponseImpl extends _CaptchaResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CaptchaResponseImplCopyWith<_$CaptchaResponseImpl> get copyWith => - __$$CaptchaResponseImplCopyWithImpl<_$CaptchaResponseImpl>( - this, _$identity); + _$$CaptchaResponseImplCopyWith<_$CaptchaResponseImpl> get copyWith => __$$CaptchaResponseImplCopyWithImpl<_$CaptchaResponseImpl>(this, _$identity); @override Map toJson() { - return _$$CaptchaResponseImplToJson( - this, - ); + return _$$CaptchaResponseImplToJson(this); } } abstract class _CaptchaResponse extends CaptchaResponse { - const factory _CaptchaResponse( - {required final String png, - required final String wav, - required final String uuid}) = _$CaptchaResponseImpl; + const factory _CaptchaResponse({required final String png, required final String wav, required final String uuid}) = _$CaptchaResponseImpl; const _CaptchaResponse._() : super._(); - factory _CaptchaResponse.fromJson(Map json) = - _$CaptchaResponseImpl.fromJson; + factory _CaptchaResponse.fromJson(Map json) = _$CaptchaResponseImpl.fromJson; @override String get png; // v0.18.0 @@ -201,6 +183,5 @@ abstract class _CaptchaResponse extends CaptchaResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CaptchaResponseImplCopyWith<_$CaptchaResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CaptchaResponseImplCopyWith<_$CaptchaResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/captcha_response.g.dart b/lib/src/v3/models/user/captcha_response.g.dart index e86ad2a2..3586696c 100644 --- a/lib/src/v3/models/user/captcha_response.g.dart +++ b/lib/src/v3/models/user/captcha_response.g.dart @@ -6,18 +6,6 @@ part of 'captcha_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CaptchaResponseImpl _$$CaptchaResponseImplFromJson( - Map json) => - _$CaptchaResponseImpl( - png: json['png'] as String, - wav: json['wav'] as String, - uuid: json['uuid'] as String, - ); +_$CaptchaResponseImpl _$$CaptchaResponseImplFromJson(Map json) => _$CaptchaResponseImpl(png: json['png'] as String, wav: json['wav'] as String, uuid: json['uuid'] as String); -Map _$$CaptchaResponseImplToJson( - _$CaptchaResponseImpl instance) => - { - 'png': instance.png, - 'wav': instance.wav, - 'uuid': instance.uuid, - }; +Map _$$CaptchaResponseImplToJson(_$CaptchaResponseImpl instance) => {'png': instance.png, 'wav': instance.wav, 'uuid': instance.uuid}; diff --git a/lib/src/v3/models/user/delete_account_response.dart b/lib/src/v3/models/user/delete_account_response.dart index ec604c10..a24678e6 100644 --- a/lib/src/v3/models/user/delete_account_response.dart +++ b/lib/src/v3/models/user/delete_account_response.dart @@ -13,6 +13,5 @@ class DeleteAccountResponse with _$DeleteAccountResponse { }) = _DeleteAccountResponse; const DeleteAccountResponse._(); - factory DeleteAccountResponse.fromJson(Map json) => - _$DeleteAccountResponseFromJson(json); + factory DeleteAccountResponse.fromJson(Map json) => _$DeleteAccountResponseFromJson(json); } diff --git a/lib/src/v3/models/user/delete_account_response.freezed.dart b/lib/src/v3/models/user/delete_account_response.freezed.dart index ef765a6f..729dd705 100644 --- a/lib/src/v3/models/user/delete_account_response.freezed.dart +++ b/lib/src/v3/models/user/delete_account_response.freezed.dart @@ -12,10 +12,10 @@ part of 'delete_account_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -DeleteAccountResponse _$DeleteAccountResponseFromJson( - Map json) { +DeleteAccountResponse _$DeleteAccountResponseFromJson(Map json) { return _DeleteAccountResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$DeleteAccountResponse { /// Create a copy of DeleteAccountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $DeleteAccountResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $DeleteAccountResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DeleteAccountResponseCopyWith<$Res> { - factory $DeleteAccountResponseCopyWith(DeleteAccountResponse value, - $Res Function(DeleteAccountResponse) then) = - _$DeleteAccountResponseCopyWithImpl<$Res, DeleteAccountResponse>; + factory $DeleteAccountResponseCopyWith(DeleteAccountResponse value, $Res Function(DeleteAccountResponse) then) = _$DeleteAccountResponseCopyWithImpl<$Res, DeleteAccountResponse>; @useResult $Res call({bool? success}); } /// @nodoc -class _$DeleteAccountResponseCopyWithImpl<$Res, - $Val extends DeleteAccountResponse> - implements $DeleteAccountResponseCopyWith<$Res> { +class _$DeleteAccountResponseCopyWithImpl<$Res, $Val extends DeleteAccountResponse> implements $DeleteAccountResponseCopyWith<$Res> { _$DeleteAccountResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$DeleteAccountResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_value.copyWith( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? success = freezed}) { + return _then( + _value.copyWith( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$DeleteAccountResponseImplCopyWith<$Res> - implements $DeleteAccountResponseCopyWith<$Res> { - factory _$$DeleteAccountResponseImplCopyWith( - _$DeleteAccountResponseImpl value, - $Res Function(_$DeleteAccountResponseImpl) then) = - __$$DeleteAccountResponseImplCopyWithImpl<$Res>; +abstract class _$$DeleteAccountResponseImplCopyWith<$Res> implements $DeleteAccountResponseCopyWith<$Res> { + factory _$$DeleteAccountResponseImplCopyWith(_$DeleteAccountResponseImpl value, $Res Function(_$DeleteAccountResponseImpl) then) = __$$DeleteAccountResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool? success}); } /// @nodoc -class __$$DeleteAccountResponseImplCopyWithImpl<$Res> - extends _$DeleteAccountResponseCopyWithImpl<$Res, - _$DeleteAccountResponseImpl> - implements _$$DeleteAccountResponseImplCopyWith<$Res> { - __$$DeleteAccountResponseImplCopyWithImpl(_$DeleteAccountResponseImpl _value, - $Res Function(_$DeleteAccountResponseImpl) _then) - : super(_value, _then); +class __$$DeleteAccountResponseImplCopyWithImpl<$Res> extends _$DeleteAccountResponseCopyWithImpl<$Res, _$DeleteAccountResponseImpl> implements _$$DeleteAccountResponseImplCopyWith<$Res> { + __$$DeleteAccountResponseImplCopyWithImpl(_$DeleteAccountResponseImpl _value, $Res Function(_$DeleteAccountResponseImpl) _then) : super(_value, _then); /// Create a copy of DeleteAccountResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_$DeleteAccountResponseImpl( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? success = freezed}) { + return _then( + _$DeleteAccountResponseImpl( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -112,8 +101,7 @@ class __$$DeleteAccountResponseImplCopyWithImpl<$Res> class _$DeleteAccountResponseImpl extends _DeleteAccountResponse { const _$DeleteAccountResponseImpl({this.success}) : super._(); - factory _$DeleteAccountResponseImpl.fromJson(Map json) => - _$$DeleteAccountResponseImplFromJson(json); + factory _$DeleteAccountResponseImpl.fromJson(Map json) => _$$DeleteAccountResponseImplFromJson(json); @override final bool? success; @@ -125,10 +113,7 @@ class _$DeleteAccountResponseImpl extends _DeleteAccountResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$DeleteAccountResponseImpl && - (identical(other.success, success) || other.success == success)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$DeleteAccountResponseImpl && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -140,25 +125,19 @@ class _$DeleteAccountResponseImpl extends _DeleteAccountResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$DeleteAccountResponseImplCopyWith<_$DeleteAccountResponseImpl> - get copyWith => __$$DeleteAccountResponseImplCopyWithImpl< - _$DeleteAccountResponseImpl>(this, _$identity); + _$$DeleteAccountResponseImplCopyWith<_$DeleteAccountResponseImpl> get copyWith => __$$DeleteAccountResponseImplCopyWithImpl<_$DeleteAccountResponseImpl>(this, _$identity); @override Map toJson() { - return _$$DeleteAccountResponseImplToJson( - this, - ); + return _$$DeleteAccountResponseImplToJson(this); } } abstract class _DeleteAccountResponse extends DeleteAccountResponse { - const factory _DeleteAccountResponse({final bool? success}) = - _$DeleteAccountResponseImpl; + const factory _DeleteAccountResponse({final bool? success}) = _$DeleteAccountResponseImpl; const _DeleteAccountResponse._() : super._(); - factory _DeleteAccountResponse.fromJson(Map json) = - _$DeleteAccountResponseImpl.fromJson; + factory _DeleteAccountResponse.fromJson(Map json) = _$DeleteAccountResponseImpl.fromJson; @override bool? get success; @@ -167,6 +146,5 @@ abstract class _DeleteAccountResponse extends DeleteAccountResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$DeleteAccountResponseImplCopyWith<_$DeleteAccountResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$DeleteAccountResponseImplCopyWith<_$DeleteAccountResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/delete_account_response.g.dart b/lib/src/v3/models/user/delete_account_response.g.dart index 89a53604..67415744 100644 --- a/lib/src/v3/models/user/delete_account_response.g.dart +++ b/lib/src/v3/models/user/delete_account_response.g.dart @@ -6,14 +6,6 @@ part of 'delete_account_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$DeleteAccountResponseImpl _$$DeleteAccountResponseImplFromJson( - Map json) => - _$DeleteAccountResponseImpl( - success: json['success'] as bool?, - ); +_$DeleteAccountResponseImpl _$$DeleteAccountResponseImplFromJson(Map json) => _$DeleteAccountResponseImpl(success: json['success'] as bool?); -Map _$$DeleteAccountResponseImplToJson( - _$DeleteAccountResponseImpl instance) => - { - 'success': instance.success, - }; +Map _$$DeleteAccountResponseImplToJson(_$DeleteAccountResponseImpl instance) => {'success': instance.success}; diff --git a/lib/src/v3/models/user/generate_totp_secret_response.dart b/lib/src/v3/models/user/generate_totp_secret_response.dart index 15cc6133..456b2b38 100644 --- a/lib/src/v3/models/user/generate_totp_secret_response.dart +++ b/lib/src/v3/models/user/generate_totp_secret_response.dart @@ -13,6 +13,5 @@ class GenerateTotpSecretResponse with _$GenerateTotpSecretResponse { }) = _GenerateTotpSecretResponse; const GenerateTotpSecretResponse._(); - factory GenerateTotpSecretResponse.fromJson(Map json) => - _$GenerateTotpSecretResponseFromJson(json); + factory GenerateTotpSecretResponse.fromJson(Map json) => _$GenerateTotpSecretResponseFromJson(json); } diff --git a/lib/src/v3/models/user/generate_totp_secret_response.freezed.dart b/lib/src/v3/models/user/generate_totp_secret_response.freezed.dart index 1794896b..3d6b1d79 100644 --- a/lib/src/v3/models/user/generate_totp_secret_response.freezed.dart +++ b/lib/src/v3/models/user/generate_totp_secret_response.freezed.dart @@ -12,10 +12,10 @@ part of 'generate_totp_secret_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GenerateTotpSecretResponse _$GenerateTotpSecretResponseFromJson( - Map json) { +GenerateTotpSecretResponse _$GenerateTotpSecretResponseFromJson(Map json) { return _GenerateTotpSecretResponse.fromJson(json); } @@ -29,24 +29,19 @@ mixin _$GenerateTotpSecretResponse { /// Create a copy of GenerateTotpSecretResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GenerateTotpSecretResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $GenerateTotpSecretResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GenerateTotpSecretResponseCopyWith<$Res> { - factory $GenerateTotpSecretResponseCopyWith(GenerateTotpSecretResponse value, - $Res Function(GenerateTotpSecretResponse) then) = - _$GenerateTotpSecretResponseCopyWithImpl<$Res, - GenerateTotpSecretResponse>; + factory $GenerateTotpSecretResponseCopyWith(GenerateTotpSecretResponse value, $Res Function(GenerateTotpSecretResponse) then) = + _$GenerateTotpSecretResponseCopyWithImpl<$Res, GenerateTotpSecretResponse>; @useResult $Res call({String totpSecretUrl}); } /// @nodoc -class _$GenerateTotpSecretResponseCopyWithImpl<$Res, - $Val extends GenerateTotpSecretResponse> - implements $GenerateTotpSecretResponseCopyWith<$Res> { +class _$GenerateTotpSecretResponseCopyWithImpl<$Res, $Val extends GenerateTotpSecretResponse> implements $GenerateTotpSecretResponseCopyWith<$Res> { _$GenerateTotpSecretResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,24 +53,23 @@ class _$GenerateTotpSecretResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? totpSecretUrl = null, - }) { - return _then(_value.copyWith( - totpSecretUrl: null == totpSecretUrl - ? _value.totpSecretUrl - : totpSecretUrl // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? totpSecretUrl = null}) { + return _then( + _value.copyWith( + totpSecretUrl: + null == totpSecretUrl + ? _value.totpSecretUrl + : totpSecretUrl // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GenerateTotpSecretResponseImplCopyWith<$Res> - implements $GenerateTotpSecretResponseCopyWith<$Res> { - factory _$$GenerateTotpSecretResponseImplCopyWith( - _$GenerateTotpSecretResponseImpl value, - $Res Function(_$GenerateTotpSecretResponseImpl) then) = +abstract class _$$GenerateTotpSecretResponseImplCopyWith<$Res> implements $GenerateTotpSecretResponseCopyWith<$Res> { + factory _$$GenerateTotpSecretResponseImplCopyWith(_$GenerateTotpSecretResponseImpl value, $Res Function(_$GenerateTotpSecretResponseImpl) then) = __$$GenerateTotpSecretResponseImplCopyWithImpl<$Res>; @override @useResult @@ -83,28 +77,24 @@ abstract class _$$GenerateTotpSecretResponseImplCopyWith<$Res> } /// @nodoc -class __$$GenerateTotpSecretResponseImplCopyWithImpl<$Res> - extends _$GenerateTotpSecretResponseCopyWithImpl<$Res, - _$GenerateTotpSecretResponseImpl> +class __$$GenerateTotpSecretResponseImplCopyWithImpl<$Res> extends _$GenerateTotpSecretResponseCopyWithImpl<$Res, _$GenerateTotpSecretResponseImpl> implements _$$GenerateTotpSecretResponseImplCopyWith<$Res> { - __$$GenerateTotpSecretResponseImplCopyWithImpl( - _$GenerateTotpSecretResponseImpl _value, - $Res Function(_$GenerateTotpSecretResponseImpl) _then) - : super(_value, _then); + __$$GenerateTotpSecretResponseImplCopyWithImpl(_$GenerateTotpSecretResponseImpl _value, $Res Function(_$GenerateTotpSecretResponseImpl) _then) : super(_value, _then); /// Create a copy of GenerateTotpSecretResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? totpSecretUrl = null, - }) { - return _then(_$GenerateTotpSecretResponseImpl( - totpSecretUrl: null == totpSecretUrl - ? _value.totpSecretUrl - : totpSecretUrl // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? totpSecretUrl = null}) { + return _then( + _$GenerateTotpSecretResponseImpl( + totpSecretUrl: + null == totpSecretUrl + ? _value.totpSecretUrl + : totpSecretUrl // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -112,12 +102,9 @@ class __$$GenerateTotpSecretResponseImplCopyWithImpl<$Res> @modelSerde class _$GenerateTotpSecretResponseImpl extends _GenerateTotpSecretResponse { - const _$GenerateTotpSecretResponseImpl({required this.totpSecretUrl}) - : super._(); + const _$GenerateTotpSecretResponseImpl({required this.totpSecretUrl}) : super._(); - factory _$GenerateTotpSecretResponseImpl.fromJson( - Map json) => - _$$GenerateTotpSecretResponseImplFromJson(json); + factory _$GenerateTotpSecretResponseImpl.fromJson(Map json) => _$$GenerateTotpSecretResponseImplFromJson(json); @override final String totpSecretUrl; @@ -130,10 +117,7 @@ class _$GenerateTotpSecretResponseImpl extends _GenerateTotpSecretResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GenerateTotpSecretResponseImpl && - (identical(other.totpSecretUrl, totpSecretUrl) || - other.totpSecretUrl == totpSecretUrl)); + (other.runtimeType == runtimeType && other is _$GenerateTotpSecretResponseImpl && (identical(other.totpSecretUrl, totpSecretUrl) || other.totpSecretUrl == totpSecretUrl)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -145,25 +129,19 @@ class _$GenerateTotpSecretResponseImpl extends _GenerateTotpSecretResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GenerateTotpSecretResponseImplCopyWith<_$GenerateTotpSecretResponseImpl> - get copyWith => __$$GenerateTotpSecretResponseImplCopyWithImpl< - _$GenerateTotpSecretResponseImpl>(this, _$identity); + _$$GenerateTotpSecretResponseImplCopyWith<_$GenerateTotpSecretResponseImpl> get copyWith => __$$GenerateTotpSecretResponseImplCopyWithImpl<_$GenerateTotpSecretResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GenerateTotpSecretResponseImplToJson( - this, - ); + return _$$GenerateTotpSecretResponseImplToJson(this); } } abstract class _GenerateTotpSecretResponse extends GenerateTotpSecretResponse { - const factory _GenerateTotpSecretResponse( - {required final String totpSecretUrl}) = _$GenerateTotpSecretResponseImpl; + const factory _GenerateTotpSecretResponse({required final String totpSecretUrl}) = _$GenerateTotpSecretResponseImpl; const _GenerateTotpSecretResponse._() : super._(); - factory _GenerateTotpSecretResponse.fromJson(Map json) = - _$GenerateTotpSecretResponseImpl.fromJson; + factory _GenerateTotpSecretResponse.fromJson(Map json) = _$GenerateTotpSecretResponseImpl.fromJson; @override String get totpSecretUrl; @@ -172,6 +150,5 @@ abstract class _GenerateTotpSecretResponse extends GenerateTotpSecretResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GenerateTotpSecretResponseImplCopyWith<_$GenerateTotpSecretResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GenerateTotpSecretResponseImplCopyWith<_$GenerateTotpSecretResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/generate_totp_secret_response.g.dart b/lib/src/v3/models/user/generate_totp_secret_response.g.dart index 21d7842b..e203c36f 100644 --- a/lib/src/v3/models/user/generate_totp_secret_response.g.dart +++ b/lib/src/v3/models/user/generate_totp_secret_response.g.dart @@ -6,14 +6,6 @@ part of 'generate_totp_secret_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GenerateTotpSecretResponseImpl _$$GenerateTotpSecretResponseImplFromJson( - Map json) => - _$GenerateTotpSecretResponseImpl( - totpSecretUrl: json['totp_secret_url'] as String, - ); +_$GenerateTotpSecretResponseImpl _$$GenerateTotpSecretResponseImplFromJson(Map json) => _$GenerateTotpSecretResponseImpl(totpSecretUrl: json['totp_secret_url'] as String); -Map _$$GenerateTotpSecretResponseImplToJson( - _$GenerateTotpSecretResponseImpl instance) => - { - 'totp_secret_url': instance.totpSecretUrl, - }; +Map _$$GenerateTotpSecretResponseImplToJson(_$GenerateTotpSecretResponseImpl instance) => {'totp_secret_url': instance.totpSecretUrl}; diff --git a/lib/src/v3/models/user/get_captcha_response.dart b/lib/src/v3/models/user/get_captcha_response.dart index cf96744c..10cd8958 100644 --- a/lib/src/v3/models/user/get_captcha_response.dart +++ b/lib/src/v3/models/user/get_captcha_response.dart @@ -14,6 +14,5 @@ class GetCaptchaResponse with _$GetCaptchaResponse { }) = _GetCaptchaResponse; const GetCaptchaResponse._(); - factory GetCaptchaResponse.fromJson(Map json) => - _$GetCaptchaResponseFromJson(json); + factory GetCaptchaResponse.fromJson(Map json) => _$GetCaptchaResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_captcha_response.freezed.dart b/lib/src/v3/models/user/get_captcha_response.freezed.dart index 70922b8e..087b3f8f 100644 --- a/lib/src/v3/models/user/get_captcha_response.freezed.dart +++ b/lib/src/v3/models/user/get_captcha_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_captcha_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetCaptchaResponse _$GetCaptchaResponseFromJson(Map json) { return _GetCaptchaResponse.fromJson(json); @@ -28,15 +29,12 @@ mixin _$GetCaptchaResponse { /// Create a copy of GetCaptchaResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetCaptchaResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetCaptchaResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetCaptchaResponseCopyWith<$Res> { - factory $GetCaptchaResponseCopyWith( - GetCaptchaResponse value, $Res Function(GetCaptchaResponse) then) = - _$GetCaptchaResponseCopyWithImpl<$Res, GetCaptchaResponse>; + factory $GetCaptchaResponseCopyWith(GetCaptchaResponse value, $Res Function(GetCaptchaResponse) then) = _$GetCaptchaResponseCopyWithImpl<$Res, GetCaptchaResponse>; @useResult $Res call({CaptchaResponse? ok}); @@ -44,8 +42,7 @@ abstract class $GetCaptchaResponseCopyWith<$Res> { } /// @nodoc -class _$GetCaptchaResponseCopyWithImpl<$Res, $Val extends GetCaptchaResponse> - implements $GetCaptchaResponseCopyWith<$Res> { +class _$GetCaptchaResponseCopyWithImpl<$Res, $Val extends GetCaptchaResponse> implements $GetCaptchaResponseCopyWith<$Res> { _$GetCaptchaResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,15 +54,17 @@ class _$GetCaptchaResponseCopyWithImpl<$Res, $Val extends GetCaptchaResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? ok = freezed, - }) { - return _then(_value.copyWith( - ok: freezed == ok - ? _value.ok - : ok // ignore: cast_nullable_to_non_nullable - as CaptchaResponse?, - ) as $Val); + $Res call({Object? ok = freezed}) { + return _then( + _value.copyWith( + ok: + freezed == ok + ? _value.ok + : ok // ignore: cast_nullable_to_non_nullable + as CaptchaResponse?, + ) + as $Val, + ); } /// Create a copy of GetCaptchaResponse @@ -84,11 +83,8 @@ class _$GetCaptchaResponseCopyWithImpl<$Res, $Val extends GetCaptchaResponse> } /// @nodoc -abstract class _$$GetCaptchaResponseImplCopyWith<$Res> - implements $GetCaptchaResponseCopyWith<$Res> { - factory _$$GetCaptchaResponseImplCopyWith(_$GetCaptchaResponseImpl value, - $Res Function(_$GetCaptchaResponseImpl) then) = - __$$GetCaptchaResponseImplCopyWithImpl<$Res>; +abstract class _$$GetCaptchaResponseImplCopyWith<$Res> implements $GetCaptchaResponseCopyWith<$Res> { + factory _$$GetCaptchaResponseImplCopyWith(_$GetCaptchaResponseImpl value, $Res Function(_$GetCaptchaResponseImpl) then) = __$$GetCaptchaResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({CaptchaResponse? ok}); @@ -98,26 +94,23 @@ abstract class _$$GetCaptchaResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetCaptchaResponseImplCopyWithImpl<$Res> - extends _$GetCaptchaResponseCopyWithImpl<$Res, _$GetCaptchaResponseImpl> - implements _$$GetCaptchaResponseImplCopyWith<$Res> { - __$$GetCaptchaResponseImplCopyWithImpl(_$GetCaptchaResponseImpl _value, - $Res Function(_$GetCaptchaResponseImpl) _then) - : super(_value, _then); +class __$$GetCaptchaResponseImplCopyWithImpl<$Res> extends _$GetCaptchaResponseCopyWithImpl<$Res, _$GetCaptchaResponseImpl> implements _$$GetCaptchaResponseImplCopyWith<$Res> { + __$$GetCaptchaResponseImplCopyWithImpl(_$GetCaptchaResponseImpl _value, $Res Function(_$GetCaptchaResponseImpl) _then) : super(_value, _then); /// Create a copy of GetCaptchaResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? ok = freezed, - }) { - return _then(_$GetCaptchaResponseImpl( - ok: freezed == ok - ? _value.ok - : ok // ignore: cast_nullable_to_non_nullable - as CaptchaResponse?, - )); + $Res call({Object? ok = freezed}) { + return _then( + _$GetCaptchaResponseImpl( + ok: + freezed == ok + ? _value.ok + : ok // ignore: cast_nullable_to_non_nullable + as CaptchaResponse?, + ), + ); } } @@ -127,8 +120,7 @@ class __$$GetCaptchaResponseImplCopyWithImpl<$Res> class _$GetCaptchaResponseImpl extends _GetCaptchaResponse { const _$GetCaptchaResponseImpl({this.ok}) : super._(); - factory _$GetCaptchaResponseImpl.fromJson(Map json) => - _$$GetCaptchaResponseImplFromJson(json); + factory _$GetCaptchaResponseImpl.fromJson(Map json) => _$$GetCaptchaResponseImplFromJson(json); @override final CaptchaResponse? ok; @@ -140,10 +132,7 @@ class _$GetCaptchaResponseImpl extends _GetCaptchaResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetCaptchaResponseImpl && - (identical(other.ok, ok) || other.ok == ok)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetCaptchaResponseImpl && (identical(other.ok, ok) || other.ok == ok)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -155,25 +144,19 @@ class _$GetCaptchaResponseImpl extends _GetCaptchaResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetCaptchaResponseImplCopyWith<_$GetCaptchaResponseImpl> get copyWith => - __$$GetCaptchaResponseImplCopyWithImpl<_$GetCaptchaResponseImpl>( - this, _$identity); + _$$GetCaptchaResponseImplCopyWith<_$GetCaptchaResponseImpl> get copyWith => __$$GetCaptchaResponseImplCopyWithImpl<_$GetCaptchaResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetCaptchaResponseImplToJson( - this, - ); + return _$$GetCaptchaResponseImplToJson(this); } } abstract class _GetCaptchaResponse extends GetCaptchaResponse { - const factory _GetCaptchaResponse({final CaptchaResponse? ok}) = - _$GetCaptchaResponseImpl; + const factory _GetCaptchaResponse({final CaptchaResponse? ok}) = _$GetCaptchaResponseImpl; const _GetCaptchaResponse._() : super._(); - factory _GetCaptchaResponse.fromJson(Map json) = - _$GetCaptchaResponseImpl.fromJson; + factory _GetCaptchaResponse.fromJson(Map json) = _$GetCaptchaResponseImpl.fromJson; @override CaptchaResponse? get ok; @@ -182,6 +165,5 @@ abstract class _GetCaptchaResponse extends GetCaptchaResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetCaptchaResponseImplCopyWith<_$GetCaptchaResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetCaptchaResponseImplCopyWith<_$GetCaptchaResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_captcha_response.g.dart b/lib/src/v3/models/user/get_captcha_response.g.dart index a9d5b4cd..cb63c52f 100644 --- a/lib/src/v3/models/user/get_captcha_response.g.dart +++ b/lib/src/v3/models/user/get_captcha_response.g.dart @@ -6,16 +6,7 @@ part of 'get_captcha_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetCaptchaResponseImpl _$$GetCaptchaResponseImplFromJson( - Map json) => - _$GetCaptchaResponseImpl( - ok: json['ok'] == null - ? null - : CaptchaResponse.fromJson(json['ok'] as Map), - ); +_$GetCaptchaResponseImpl _$$GetCaptchaResponseImplFromJson(Map json) => + _$GetCaptchaResponseImpl(ok: json['ok'] == null ? null : CaptchaResponse.fromJson(json['ok'] as Map)); -Map _$$GetCaptchaResponseImplToJson( - _$GetCaptchaResponseImpl instance) => - { - 'ok': instance.ok?.toJson(), - }; +Map _$$GetCaptchaResponseImplToJson(_$GetCaptchaResponseImpl instance) => {'ok': instance.ok?.toJson()}; diff --git a/lib/src/v3/models/user/get_person_details_response.dart b/lib/src/v3/models/user/get_person_details_response.dart index c528d44b..09951325 100644 --- a/lib/src/v3/models/user/get_person_details_response.dart +++ b/lib/src/v3/models/user/get_person_details_response.dart @@ -18,6 +18,5 @@ class GetPersonDetailsResponse with _$GetPersonDetailsResponse { }) = _GetPersonDetailsResponse; const GetPersonDetailsResponse._(); - factory GetPersonDetailsResponse.fromJson(Map json) => - _$GetPersonDetailsResponseFromJson(json); + factory GetPersonDetailsResponse.fromJson(Map json) => _$GetPersonDetailsResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_person_details_response.freezed.dart b/lib/src/v3/models/user/get_person_details_response.freezed.dart index eb16e405..bb1f3062 100644 --- a/lib/src/v3/models/user/get_person_details_response.freezed.dart +++ b/lib/src/v3/models/user/get_person_details_response.freezed.dart @@ -12,10 +12,10 @@ part of 'get_person_details_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetPersonDetailsResponse _$GetPersonDetailsResponseFromJson( - Map json) { +GetPersonDetailsResponse _$GetPersonDetailsResponseFromJson(Map json) { return _GetPersonDetailsResponse.fromJson(json); } @@ -23,11 +23,9 @@ GetPersonDetailsResponse _$GetPersonDetailsResponseFromJson( mixin _$GetPersonDetailsResponse { PersonView get personView => throw _privateConstructorUsedError; // v0.18.0 Site? get site => throw _privateConstructorUsedError; // v0.19.2 (optional) - List get comments => - throw _privateConstructorUsedError; // v0.18.0 + List get comments => throw _privateConstructorUsedError; // v0.18.0 List get posts => throw _privateConstructorUsedError; // v0.18.0 - List get moderates => - throw _privateConstructorUsedError; + List get moderates => throw _privateConstructorUsedError; /// Serializes this GetPersonDetailsResponse to a JSON map. Map toJson() => throw _privateConstructorUsedError; @@ -35,31 +33,21 @@ mixin _$GetPersonDetailsResponse { /// Create a copy of GetPersonDetailsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPersonDetailsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPersonDetailsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPersonDetailsResponseCopyWith<$Res> { - factory $GetPersonDetailsResponseCopyWith(GetPersonDetailsResponse value, - $Res Function(GetPersonDetailsResponse) then) = - _$GetPersonDetailsResponseCopyWithImpl<$Res, GetPersonDetailsResponse>; + factory $GetPersonDetailsResponseCopyWith(GetPersonDetailsResponse value, $Res Function(GetPersonDetailsResponse) then) = _$GetPersonDetailsResponseCopyWithImpl<$Res, GetPersonDetailsResponse>; @useResult - $Res call( - {PersonView personView, - Site? site, - List comments, - List posts, - List moderates}); + $Res call({PersonView personView, Site? site, List comments, List posts, List moderates}); $PersonViewCopyWith<$Res> get personView; $SiteCopyWith<$Res>? get site; } /// @nodoc -class _$GetPersonDetailsResponseCopyWithImpl<$Res, - $Val extends GetPersonDetailsResponse> - implements $GetPersonDetailsResponseCopyWith<$Res> { +class _$GetPersonDetailsResponseCopyWithImpl<$Res, $Val extends GetPersonDetailsResponse> implements $GetPersonDetailsResponseCopyWith<$Res> { _$GetPersonDetailsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -71,35 +59,37 @@ class _$GetPersonDetailsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? site = freezed, - Object? comments = null, - Object? posts = null, - Object? moderates = null, - }) { - return _then(_value.copyWith( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - comments: null == comments - ? _value.comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - posts: null == posts - ? _value.posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - moderates: null == moderates - ? _value.moderates - : moderates // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? personView = null, Object? site = freezed, Object? comments = null, Object? posts = null, Object? moderates = null}) { + return _then( + _value.copyWith( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + comments: + null == comments + ? _value.comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + posts: + null == posts + ? _value.posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + moderates: + null == moderates + ? _value.moderates + : moderates // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of GetPersonDetailsResponse @@ -128,20 +118,11 @@ class _$GetPersonDetailsResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$GetPersonDetailsResponseImplCopyWith<$Res> - implements $GetPersonDetailsResponseCopyWith<$Res> { - factory _$$GetPersonDetailsResponseImplCopyWith( - _$GetPersonDetailsResponseImpl value, - $Res Function(_$GetPersonDetailsResponseImpl) then) = - __$$GetPersonDetailsResponseImplCopyWithImpl<$Res>; +abstract class _$$GetPersonDetailsResponseImplCopyWith<$Res> implements $GetPersonDetailsResponseCopyWith<$Res> { + factory _$$GetPersonDetailsResponseImplCopyWith(_$GetPersonDetailsResponseImpl value, $Res Function(_$GetPersonDetailsResponseImpl) then) = __$$GetPersonDetailsResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {PersonView personView, - Site? site, - List comments, - List posts, - List moderates}); + $Res call({PersonView personView, Site? site, List comments, List posts, List moderates}); @override $PersonViewCopyWith<$Res> get personView; @@ -150,48 +131,43 @@ abstract class _$$GetPersonDetailsResponseImplCopyWith<$Res> } /// @nodoc -class __$$GetPersonDetailsResponseImplCopyWithImpl<$Res> - extends _$GetPersonDetailsResponseCopyWithImpl<$Res, - _$GetPersonDetailsResponseImpl> - implements _$$GetPersonDetailsResponseImplCopyWith<$Res> { - __$$GetPersonDetailsResponseImplCopyWithImpl( - _$GetPersonDetailsResponseImpl _value, - $Res Function(_$GetPersonDetailsResponseImpl) _then) - : super(_value, _then); +class __$$GetPersonDetailsResponseImplCopyWithImpl<$Res> extends _$GetPersonDetailsResponseCopyWithImpl<$Res, _$GetPersonDetailsResponseImpl> implements _$$GetPersonDetailsResponseImplCopyWith<$Res> { + __$$GetPersonDetailsResponseImplCopyWithImpl(_$GetPersonDetailsResponseImpl _value, $Res Function(_$GetPersonDetailsResponseImpl) _then) : super(_value, _then); /// Create a copy of GetPersonDetailsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personView = null, - Object? site = freezed, - Object? comments = null, - Object? posts = null, - Object? moderates = null, - }) { - return _then(_$GetPersonDetailsResponseImpl( - personView: null == personView - ? _value.personView - : personView // ignore: cast_nullable_to_non_nullable - as PersonView, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - comments: null == comments - ? _value._comments - : comments // ignore: cast_nullable_to_non_nullable - as List, - posts: null == posts - ? _value._posts - : posts // ignore: cast_nullable_to_non_nullable - as List, - moderates: null == moderates - ? _value._moderates - : moderates // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? personView = null, Object? site = freezed, Object? comments = null, Object? posts = null, Object? moderates = null}) { + return _then( + _$GetPersonDetailsResponseImpl( + personView: + null == personView + ? _value.personView + : personView // ignore: cast_nullable_to_non_nullable + as PersonView, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + comments: + null == comments + ? _value._comments + : comments // ignore: cast_nullable_to_non_nullable + as List, + posts: + null == posts + ? _value._posts + : posts // ignore: cast_nullable_to_non_nullable + as List, + moderates: + null == moderates + ? _value._moderates + : moderates // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -199,28 +175,27 @@ class __$$GetPersonDetailsResponseImplCopyWithImpl<$Res> @modelSerde class _$GetPersonDetailsResponseImpl extends _GetPersonDetailsResponse { - const _$GetPersonDetailsResponseImpl( - {required this.personView, - this.site, - required final List comments, - required final List posts, - required final List moderates}) - : _comments = comments, - _posts = posts, - _moderates = moderates, - super._(); - - factory _$GetPersonDetailsResponseImpl.fromJson(Map json) => - _$$GetPersonDetailsResponseImplFromJson(json); + const _$GetPersonDetailsResponseImpl({ + required this.personView, + this.site, + required final List comments, + required final List posts, + required final List moderates, + }) : _comments = comments, + _posts = posts, + _moderates = moderates, + super._(); + + factory _$GetPersonDetailsResponseImpl.fromJson(Map json) => _$$GetPersonDetailsResponseImplFromJson(json); @override final PersonView personView; -// v0.18.0 + // v0.18.0 @override final Site? site; -// v0.19.2 (optional) + // v0.19.2 (optional) final List _comments; -// v0.19.2 (optional) + // v0.19.2 (optional) @override List get comments { if (_comments is EqualUnmodifiableListView) return _comments; @@ -228,9 +203,9 @@ class _$GetPersonDetailsResponseImpl extends _GetPersonDetailsResponse { return EqualUnmodifiableListView(_comments); } -// v0.18.0 + // v0.18.0 final List _posts; -// v0.18.0 + // v0.18.0 @override List get posts { if (_posts is EqualUnmodifiableListView) return _posts; @@ -238,9 +213,9 @@ class _$GetPersonDetailsResponseImpl extends _GetPersonDetailsResponse { return EqualUnmodifiableListView(_posts); } -// v0.18.0 + // v0.18.0 final List _moderates; -// v0.18.0 + // v0.18.0 @override List get moderates { if (_moderates is EqualUnmodifiableListView) return _moderates; @@ -258,54 +233,42 @@ class _$GetPersonDetailsResponseImpl extends _GetPersonDetailsResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetPersonDetailsResponseImpl && - (identical(other.personView, personView) || - other.personView == personView) && + (identical(other.personView, personView) || other.personView == personView) && (identical(other.site, site) || other.site == site) && const DeepCollectionEquality().equals(other._comments, _comments) && const DeepCollectionEquality().equals(other._posts, _posts) && - const DeepCollectionEquality() - .equals(other._moderates, _moderates)); + const DeepCollectionEquality().equals(other._moderates, _moderates)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, - personView, - site, - const DeepCollectionEquality().hash(_comments), - const DeepCollectionEquality().hash(_posts), - const DeepCollectionEquality().hash(_moderates)); + int get hashCode => + Object.hash(runtimeType, personView, site, const DeepCollectionEquality().hash(_comments), const DeepCollectionEquality().hash(_posts), const DeepCollectionEquality().hash(_moderates)); /// Create a copy of GetPersonDetailsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPersonDetailsResponseImplCopyWith<_$GetPersonDetailsResponseImpl> - get copyWith => __$$GetPersonDetailsResponseImplCopyWithImpl< - _$GetPersonDetailsResponseImpl>(this, _$identity); + _$$GetPersonDetailsResponseImplCopyWith<_$GetPersonDetailsResponseImpl> get copyWith => __$$GetPersonDetailsResponseImplCopyWithImpl<_$GetPersonDetailsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetPersonDetailsResponseImplToJson( - this, - ); + return _$$GetPersonDetailsResponseImplToJson(this); } } abstract class _GetPersonDetailsResponse extends GetPersonDetailsResponse { - const factory _GetPersonDetailsResponse( - {required final PersonView personView, - final Site? site, - required final List comments, - required final List posts, - required final List moderates}) = - _$GetPersonDetailsResponseImpl; + const factory _GetPersonDetailsResponse({ + required final PersonView personView, + final Site? site, + required final List comments, + required final List posts, + required final List moderates, + }) = _$GetPersonDetailsResponseImpl; const _GetPersonDetailsResponse._() : super._(); - factory _GetPersonDetailsResponse.fromJson(Map json) = - _$GetPersonDetailsResponseImpl.fromJson; + factory _GetPersonDetailsResponse.fromJson(Map json) = _$GetPersonDetailsResponseImpl.fromJson; @override PersonView get personView; // v0.18.0 @@ -322,6 +285,5 @@ abstract class _GetPersonDetailsResponse extends GetPersonDetailsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPersonDetailsResponseImplCopyWith<_$GetPersonDetailsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetPersonDetailsResponseImplCopyWith<_$GetPersonDetailsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_person_details_response.g.dart b/lib/src/v3/models/user/get_person_details_response.g.dart index e03f9ea0..00845481 100644 --- a/lib/src/v3/models/user/get_person_details_response.g.dart +++ b/lib/src/v3/models/user/get_person_details_response.g.dart @@ -6,32 +6,18 @@ part of 'get_person_details_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetPersonDetailsResponseImpl _$$GetPersonDetailsResponseImplFromJson( - Map json) => - _$GetPersonDetailsResponseImpl( - personView: - PersonView.fromJson(json['person_view'] as Map), - site: json['site'] == null - ? null - : Site.fromJson(json['site'] as Map), - comments: (json['comments'] as List) - .map((e) => CommentView.fromJson(e as Map)) - .toList(), - posts: (json['posts'] as List) - .map((e) => PostView.fromJson(e as Map)) - .toList(), - moderates: (json['moderates'] as List) - .map( - (e) => CommunityModeratorView.fromJson(e as Map)) - .toList(), - ); +_$GetPersonDetailsResponseImpl _$$GetPersonDetailsResponseImplFromJson(Map json) => _$GetPersonDetailsResponseImpl( + personView: PersonView.fromJson(json['person_view'] as Map), + site: json['site'] == null ? null : Site.fromJson(json['site'] as Map), + comments: (json['comments'] as List).map((e) => CommentView.fromJson(e as Map)).toList(), + posts: (json['posts'] as List).map((e) => PostView.fromJson(e as Map)).toList(), + moderates: (json['moderates'] as List).map((e) => CommunityModeratorView.fromJson(e as Map)).toList(), +); -Map _$$GetPersonDetailsResponseImplToJson( - _$GetPersonDetailsResponseImpl instance) => - { - 'person_view': instance.personView.toJson(), - 'site': instance.site?.toJson(), - 'comments': instance.comments.map((e) => e.toJson()).toList(), - 'posts': instance.posts.map((e) => e.toJson()).toList(), - 'moderates': instance.moderates.map((e) => e.toJson()).toList(), - }; +Map _$$GetPersonDetailsResponseImplToJson(_$GetPersonDetailsResponseImpl instance) => { + 'person_view': instance.personView.toJson(), + 'site': instance.site?.toJson(), + 'comments': instance.comments.map((e) => e.toJson()).toList(), + 'posts': instance.posts.map((e) => e.toJson()).toList(), + 'moderates': instance.moderates.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/models/user/get_person_mentions_response.dart b/lib/src/v3/models/user/get_person_mentions_response.dart index cf2f1fa7..c695380e 100644 --- a/lib/src/v3/models/user/get_person_mentions_response.dart +++ b/lib/src/v3/models/user/get_person_mentions_response.dart @@ -14,6 +14,5 @@ class GetPersonMentionsResponse with _$GetPersonMentionsResponse { }) = _GetPersonMentionsResponse; const GetPersonMentionsResponse._(); - factory GetPersonMentionsResponse.fromJson(Map json) => - _$GetPersonMentionsResponseFromJson(json); + factory GetPersonMentionsResponse.fromJson(Map json) => _$GetPersonMentionsResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_person_mentions_response.freezed.dart b/lib/src/v3/models/user/get_person_mentions_response.freezed.dart index 88c3598e..d6af2c81 100644 --- a/lib/src/v3/models/user/get_person_mentions_response.freezed.dart +++ b/lib/src/v3/models/user/get_person_mentions_response.freezed.dart @@ -12,10 +12,10 @@ part of 'get_person_mentions_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetPersonMentionsResponse _$GetPersonMentionsResponseFromJson( - Map json) { +GetPersonMentionsResponse _$GetPersonMentionsResponseFromJson(Map json) { return _GetPersonMentionsResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$GetPersonMentionsResponse { /// Create a copy of GetPersonMentionsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetPersonMentionsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetPersonMentionsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetPersonMentionsResponseCopyWith<$Res> { - factory $GetPersonMentionsResponseCopyWith(GetPersonMentionsResponse value, - $Res Function(GetPersonMentionsResponse) then) = - _$GetPersonMentionsResponseCopyWithImpl<$Res, GetPersonMentionsResponse>; + factory $GetPersonMentionsResponseCopyWith(GetPersonMentionsResponse value, $Res Function(GetPersonMentionsResponse) then) = _$GetPersonMentionsResponseCopyWithImpl<$Res, GetPersonMentionsResponse>; @useResult $Res call({List mentions}); } /// @nodoc -class _$GetPersonMentionsResponseCopyWithImpl<$Res, - $Val extends GetPersonMentionsResponse> - implements $GetPersonMentionsResponseCopyWith<$Res> { +class _$GetPersonMentionsResponseCopyWithImpl<$Res, $Val extends GetPersonMentionsResponse> implements $GetPersonMentionsResponseCopyWith<$Res> { _$GetPersonMentionsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,53 +52,47 @@ class _$GetPersonMentionsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? mentions = null, - }) { - return _then(_value.copyWith( - mentions: null == mentions - ? _value.mentions - : mentions // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? mentions = null}) { + return _then( + _value.copyWith( + mentions: + null == mentions + ? _value.mentions + : mentions // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetPersonMentionsResponseImplCopyWith<$Res> - implements $GetPersonMentionsResponseCopyWith<$Res> { - factory _$$GetPersonMentionsResponseImplCopyWith( - _$GetPersonMentionsResponseImpl value, - $Res Function(_$GetPersonMentionsResponseImpl) then) = - __$$GetPersonMentionsResponseImplCopyWithImpl<$Res>; +abstract class _$$GetPersonMentionsResponseImplCopyWith<$Res> implements $GetPersonMentionsResponseCopyWith<$Res> { + factory _$$GetPersonMentionsResponseImplCopyWith(_$GetPersonMentionsResponseImpl value, $Res Function(_$GetPersonMentionsResponseImpl) then) = __$$GetPersonMentionsResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List mentions}); } /// @nodoc -class __$$GetPersonMentionsResponseImplCopyWithImpl<$Res> - extends _$GetPersonMentionsResponseCopyWithImpl<$Res, - _$GetPersonMentionsResponseImpl> +class __$$GetPersonMentionsResponseImplCopyWithImpl<$Res> extends _$GetPersonMentionsResponseCopyWithImpl<$Res, _$GetPersonMentionsResponseImpl> implements _$$GetPersonMentionsResponseImplCopyWith<$Res> { - __$$GetPersonMentionsResponseImplCopyWithImpl( - _$GetPersonMentionsResponseImpl _value, - $Res Function(_$GetPersonMentionsResponseImpl) _then) - : super(_value, _then); + __$$GetPersonMentionsResponseImplCopyWithImpl(_$GetPersonMentionsResponseImpl _value, $Res Function(_$GetPersonMentionsResponseImpl) _then) : super(_value, _then); /// Create a copy of GetPersonMentionsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? mentions = null, - }) { - return _then(_$GetPersonMentionsResponseImpl( - mentions: null == mentions - ? _value._mentions - : mentions // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? mentions = null}) { + return _then( + _$GetPersonMentionsResponseImpl( + mentions: + null == mentions + ? _value._mentions + : mentions // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -111,13 +100,9 @@ class __$$GetPersonMentionsResponseImplCopyWithImpl<$Res> @modelSerde class _$GetPersonMentionsResponseImpl extends _GetPersonMentionsResponse { - const _$GetPersonMentionsResponseImpl( - {required final List mentions}) - : _mentions = mentions, - super._(); + const _$GetPersonMentionsResponseImpl({required final List mentions}) : _mentions = mentions, super._(); - factory _$GetPersonMentionsResponseImpl.fromJson(Map json) => - _$$GetPersonMentionsResponseImplFromJson(json); + factory _$GetPersonMentionsResponseImpl.fromJson(Map json) => _$$GetPersonMentionsResponseImplFromJson(json); final List _mentions; @override @@ -134,42 +119,31 @@ class _$GetPersonMentionsResponseImpl extends _GetPersonMentionsResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetPersonMentionsResponseImpl && - const DeepCollectionEquality().equals(other._mentions, _mentions)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetPersonMentionsResponseImpl && const DeepCollectionEquality().equals(other._mentions, _mentions)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_mentions)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_mentions)); /// Create a copy of GetPersonMentionsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetPersonMentionsResponseImplCopyWith<_$GetPersonMentionsResponseImpl> - get copyWith => __$$GetPersonMentionsResponseImplCopyWithImpl< - _$GetPersonMentionsResponseImpl>(this, _$identity); + _$$GetPersonMentionsResponseImplCopyWith<_$GetPersonMentionsResponseImpl> get copyWith => __$$GetPersonMentionsResponseImplCopyWithImpl<_$GetPersonMentionsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetPersonMentionsResponseImplToJson( - this, - ); + return _$$GetPersonMentionsResponseImplToJson(this); } } abstract class _GetPersonMentionsResponse extends GetPersonMentionsResponse { - const factory _GetPersonMentionsResponse( - {required final List mentions}) = - _$GetPersonMentionsResponseImpl; + const factory _GetPersonMentionsResponse({required final List mentions}) = _$GetPersonMentionsResponseImpl; const _GetPersonMentionsResponse._() : super._(); - factory _GetPersonMentionsResponse.fromJson(Map json) = - _$GetPersonMentionsResponseImpl.fromJson; + factory _GetPersonMentionsResponse.fromJson(Map json) = _$GetPersonMentionsResponseImpl.fromJson; @override List get mentions; @@ -178,6 +152,5 @@ abstract class _GetPersonMentionsResponse extends GetPersonMentionsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetPersonMentionsResponseImplCopyWith<_$GetPersonMentionsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetPersonMentionsResponseImplCopyWith<_$GetPersonMentionsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_person_mentions_response.g.dart b/lib/src/v3/models/user/get_person_mentions_response.g.dart index 0159c7b2..9587a6be 100644 --- a/lib/src/v3/models/user/get_person_mentions_response.g.dart +++ b/lib/src/v3/models/user/get_person_mentions_response.g.dart @@ -6,16 +6,7 @@ part of 'get_person_mentions_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetPersonMentionsResponseImpl _$$GetPersonMentionsResponseImplFromJson( - Map json) => - _$GetPersonMentionsResponseImpl( - mentions: (json['mentions'] as List) - .map((e) => PersonMentionView.fromJson(e as Map)) - .toList(), - ); +_$GetPersonMentionsResponseImpl _$$GetPersonMentionsResponseImplFromJson(Map json) => + _$GetPersonMentionsResponseImpl(mentions: (json['mentions'] as List).map((e) => PersonMentionView.fromJson(e as Map)).toList()); -Map _$$GetPersonMentionsResponseImplToJson( - _$GetPersonMentionsResponseImpl instance) => - { - 'mentions': instance.mentions.map((e) => e.toJson()).toList(), - }; +Map _$$GetPersonMentionsResponseImplToJson(_$GetPersonMentionsResponseImpl instance) => {'mentions': instance.mentions.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/user/get_replies_response.dart b/lib/src/v3/models/user/get_replies_response.dart index 8026b793..aa79bfdf 100644 --- a/lib/src/v3/models/user/get_replies_response.dart +++ b/lib/src/v3/models/user/get_replies_response.dart @@ -14,6 +14,5 @@ class GetRepliesResponse with _$GetRepliesResponse { }) = _GetRepliesResponse; const GetRepliesResponse._(); - factory GetRepliesResponse.fromJson(Map json) => - _$GetRepliesResponseFromJson(json); + factory GetRepliesResponse.fromJson(Map json) => _$GetRepliesResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_replies_response.freezed.dart b/lib/src/v3/models/user/get_replies_response.freezed.dart index 8fe2d10e..2116f6a7 100644 --- a/lib/src/v3/models/user/get_replies_response.freezed.dart +++ b/lib/src/v3/models/user/get_replies_response.freezed.dart @@ -12,7 +12,8 @@ part of 'get_replies_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); GetRepliesResponse _$GetRepliesResponseFromJson(Map json) { return _GetRepliesResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$GetRepliesResponse { /// Create a copy of GetRepliesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetRepliesResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetRepliesResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetRepliesResponseCopyWith<$Res> { - factory $GetRepliesResponseCopyWith( - GetRepliesResponse value, $Res Function(GetRepliesResponse) then) = - _$GetRepliesResponseCopyWithImpl<$Res, GetRepliesResponse>; + factory $GetRepliesResponseCopyWith(GetRepliesResponse value, $Res Function(GetRepliesResponse) then) = _$GetRepliesResponseCopyWithImpl<$Res, GetRepliesResponse>; @useResult $Res call({List replies}); } /// @nodoc -class _$GetRepliesResponseCopyWithImpl<$Res, $Val extends GetRepliesResponse> - implements $GetRepliesResponseCopyWith<$Res> { +class _$GetRepliesResponseCopyWithImpl<$Res, $Val extends GetRepliesResponse> implements $GetRepliesResponseCopyWith<$Res> { _$GetRepliesResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$GetRepliesResponseCopyWithImpl<$Res, $Val extends GetRepliesResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? replies = null, - }) { - return _then(_value.copyWith( - replies: null == replies - ? _value.replies - : replies // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? replies = null}) { + return _then( + _value.copyWith( + replies: + null == replies + ? _value.replies + : replies // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetRepliesResponseImplCopyWith<$Res> - implements $GetRepliesResponseCopyWith<$Res> { - factory _$$GetRepliesResponseImplCopyWith(_$GetRepliesResponseImpl value, - $Res Function(_$GetRepliesResponseImpl) then) = - __$$GetRepliesResponseImplCopyWithImpl<$Res>; +abstract class _$$GetRepliesResponseImplCopyWith<$Res> implements $GetRepliesResponseCopyWith<$Res> { + factory _$$GetRepliesResponseImplCopyWith(_$GetRepliesResponseImpl value, $Res Function(_$GetRepliesResponseImpl) then) = __$$GetRepliesResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List replies}); } /// @nodoc -class __$$GetRepliesResponseImplCopyWithImpl<$Res> - extends _$GetRepliesResponseCopyWithImpl<$Res, _$GetRepliesResponseImpl> - implements _$$GetRepliesResponseImplCopyWith<$Res> { - __$$GetRepliesResponseImplCopyWithImpl(_$GetRepliesResponseImpl _value, - $Res Function(_$GetRepliesResponseImpl) _then) - : super(_value, _then); +class __$$GetRepliesResponseImplCopyWithImpl<$Res> extends _$GetRepliesResponseCopyWithImpl<$Res, _$GetRepliesResponseImpl> implements _$$GetRepliesResponseImplCopyWith<$Res> { + __$$GetRepliesResponseImplCopyWithImpl(_$GetRepliesResponseImpl _value, $Res Function(_$GetRepliesResponseImpl) _then) : super(_value, _then); /// Create a copy of GetRepliesResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? replies = null, - }) { - return _then(_$GetRepliesResponseImpl( - replies: null == replies - ? _value._replies - : replies // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? replies = null}) { + return _then( + _$GetRepliesResponseImpl( + replies: + null == replies + ? _value._replies + : replies // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -106,13 +99,9 @@ class __$$GetRepliesResponseImplCopyWithImpl<$Res> @modelSerde class _$GetRepliesResponseImpl extends _GetRepliesResponse { - const _$GetRepliesResponseImpl( - {required final List replies}) - : _replies = replies, - super._(); + const _$GetRepliesResponseImpl({required final List replies}) : _replies = replies, super._(); - factory _$GetRepliesResponseImpl.fromJson(Map json) => - _$$GetRepliesResponseImplFromJson(json); + factory _$GetRepliesResponseImpl.fromJson(Map json) => _$$GetRepliesResponseImplFromJson(json); final List _replies; @override @@ -129,42 +118,31 @@ class _$GetRepliesResponseImpl extends _GetRepliesResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$GetRepliesResponseImpl && - const DeepCollectionEquality().equals(other._replies, _replies)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetRepliesResponseImpl && const DeepCollectionEquality().equals(other._replies, _replies)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_replies)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_replies)); /// Create a copy of GetRepliesResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetRepliesResponseImplCopyWith<_$GetRepliesResponseImpl> get copyWith => - __$$GetRepliesResponseImplCopyWithImpl<_$GetRepliesResponseImpl>( - this, _$identity); + _$$GetRepliesResponseImplCopyWith<_$GetRepliesResponseImpl> get copyWith => __$$GetRepliesResponseImplCopyWithImpl<_$GetRepliesResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetRepliesResponseImplToJson( - this, - ); + return _$$GetRepliesResponseImplToJson(this); } } abstract class _GetRepliesResponse extends GetRepliesResponse { - const factory _GetRepliesResponse( - {required final List replies}) = - _$GetRepliesResponseImpl; + const factory _GetRepliesResponse({required final List replies}) = _$GetRepliesResponseImpl; const _GetRepliesResponse._() : super._(); - factory _GetRepliesResponse.fromJson(Map json) = - _$GetRepliesResponseImpl.fromJson; + factory _GetRepliesResponse.fromJson(Map json) = _$GetRepliesResponseImpl.fromJson; @override List get replies; @@ -173,6 +151,5 @@ abstract class _GetRepliesResponse extends GetRepliesResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetRepliesResponseImplCopyWith<_$GetRepliesResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$GetRepliesResponseImplCopyWith<_$GetRepliesResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_replies_response.g.dart b/lib/src/v3/models/user/get_replies_response.g.dart index 4ffd6793..74a3f2f7 100644 --- a/lib/src/v3/models/user/get_replies_response.g.dart +++ b/lib/src/v3/models/user/get_replies_response.g.dart @@ -6,16 +6,7 @@ part of 'get_replies_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetRepliesResponseImpl _$$GetRepliesResponseImplFromJson( - Map json) => - _$GetRepliesResponseImpl( - replies: (json['replies'] as List) - .map((e) => CommentReplyView.fromJson(e as Map)) - .toList(), - ); +_$GetRepliesResponseImpl _$$GetRepliesResponseImplFromJson(Map json) => + _$GetRepliesResponseImpl(replies: (json['replies'] as List).map((e) => CommentReplyView.fromJson(e as Map)).toList()); -Map _$$GetRepliesResponseImplToJson( - _$GetRepliesResponseImpl instance) => - { - 'replies': instance.replies.map((e) => e.toJson()).toList(), - }; +Map _$$GetRepliesResponseImplToJson(_$GetRepliesResponseImpl instance) => {'replies': instance.replies.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/user/get_report_count_response.dart b/lib/src/v3/models/user/get_report_count_response.dart index 43a2320f..32fe5ce3 100644 --- a/lib/src/v3/models/user/get_report_count_response.dart +++ b/lib/src/v3/models/user/get_report_count_response.dart @@ -16,6 +16,5 @@ class GetReportCountResponse with _$GetReportCountResponse { }) = _GetReportCountResponse; const GetReportCountResponse._(); - factory GetReportCountResponse.fromJson(Map json) => - _$GetReportCountResponseFromJson(json); + factory GetReportCountResponse.fromJson(Map json) => _$GetReportCountResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_report_count_response.freezed.dart b/lib/src/v3/models/user/get_report_count_response.freezed.dart index f4b9a7bb..a4deddbe 100644 --- a/lib/src/v3/models/user/get_report_count_response.freezed.dart +++ b/lib/src/v3/models/user/get_report_count_response.freezed.dart @@ -12,10 +12,10 @@ part of 'get_report_count_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetReportCountResponse _$GetReportCountResponseFromJson( - Map json) { +GetReportCountResponse _$GetReportCountResponseFromJson(Map json) { return _GetReportCountResponse.fromJson(json); } @@ -32,27 +32,18 @@ mixin _$GetReportCountResponse { /// Create a copy of GetReportCountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetReportCountResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetReportCountResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetReportCountResponseCopyWith<$Res> { - factory $GetReportCountResponseCopyWith(GetReportCountResponse value, - $Res Function(GetReportCountResponse) then) = - _$GetReportCountResponseCopyWithImpl<$Res, GetReportCountResponse>; + factory $GetReportCountResponseCopyWith(GetReportCountResponse value, $Res Function(GetReportCountResponse) then) = _$GetReportCountResponseCopyWithImpl<$Res, GetReportCountResponse>; @useResult - $Res call( - {int? communityId, - int commentReports, - int postReports, - int? privateMessageReports}); + $Res call({int? communityId, int commentReports, int postReports, int? privateMessageReports}); } /// @nodoc -class _$GetReportCountResponseCopyWithImpl<$Res, - $Val extends GetReportCountResponse> - implements $GetReportCountResponseCopyWith<$Res> { +class _$GetReportCountResponseCopyWithImpl<$Res, $Val extends GetReportCountResponse> implements $GetReportCountResponseCopyWith<$Res> { _$GetReportCountResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -64,87 +55,76 @@ class _$GetReportCountResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = freezed, - Object? commentReports = null, - Object? postReports = null, - Object? privateMessageReports = freezed, - }) { - return _then(_value.copyWith( - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - commentReports: null == commentReports - ? _value.commentReports - : commentReports // ignore: cast_nullable_to_non_nullable - as int, - postReports: null == postReports - ? _value.postReports - : postReports // ignore: cast_nullable_to_non_nullable - as int, - privateMessageReports: freezed == privateMessageReports - ? _value.privateMessageReports - : privateMessageReports // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + $Res call({Object? communityId = freezed, Object? commentReports = null, Object? postReports = null, Object? privateMessageReports = freezed}) { + return _then( + _value.copyWith( + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + commentReports: + null == commentReports + ? _value.commentReports + : commentReports // ignore: cast_nullable_to_non_nullable + as int, + postReports: + null == postReports + ? _value.postReports + : postReports // ignore: cast_nullable_to_non_nullable + as int, + privateMessageReports: + freezed == privateMessageReports + ? _value.privateMessageReports + : privateMessageReports // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetReportCountResponseImplCopyWith<$Res> - implements $GetReportCountResponseCopyWith<$Res> { - factory _$$GetReportCountResponseImplCopyWith( - _$GetReportCountResponseImpl value, - $Res Function(_$GetReportCountResponseImpl) then) = - __$$GetReportCountResponseImplCopyWithImpl<$Res>; +abstract class _$$GetReportCountResponseImplCopyWith<$Res> implements $GetReportCountResponseCopyWith<$Res> { + factory _$$GetReportCountResponseImplCopyWith(_$GetReportCountResponseImpl value, $Res Function(_$GetReportCountResponseImpl) then) = __$$GetReportCountResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int? communityId, - int commentReports, - int postReports, - int? privateMessageReports}); + $Res call({int? communityId, int commentReports, int postReports, int? privateMessageReports}); } /// @nodoc -class __$$GetReportCountResponseImplCopyWithImpl<$Res> - extends _$GetReportCountResponseCopyWithImpl<$Res, - _$GetReportCountResponseImpl> - implements _$$GetReportCountResponseImplCopyWith<$Res> { - __$$GetReportCountResponseImplCopyWithImpl( - _$GetReportCountResponseImpl _value, - $Res Function(_$GetReportCountResponseImpl) _then) - : super(_value, _then); +class __$$GetReportCountResponseImplCopyWithImpl<$Res> extends _$GetReportCountResponseCopyWithImpl<$Res, _$GetReportCountResponseImpl> implements _$$GetReportCountResponseImplCopyWith<$Res> { + __$$GetReportCountResponseImplCopyWithImpl(_$GetReportCountResponseImpl _value, $Res Function(_$GetReportCountResponseImpl) _then) : super(_value, _then); /// Create a copy of GetReportCountResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? communityId = freezed, - Object? commentReports = null, - Object? postReports = null, - Object? privateMessageReports = freezed, - }) { - return _then(_$GetReportCountResponseImpl( - communityId: freezed == communityId - ? _value.communityId - : communityId // ignore: cast_nullable_to_non_nullable - as int?, - commentReports: null == commentReports - ? _value.commentReports - : commentReports // ignore: cast_nullable_to_non_nullable - as int, - postReports: null == postReports - ? _value.postReports - : postReports // ignore: cast_nullable_to_non_nullable - as int, - privateMessageReports: freezed == privateMessageReports - ? _value.privateMessageReports - : privateMessageReports // ignore: cast_nullable_to_non_nullable - as int?, - )); + $Res call({Object? communityId = freezed, Object? commentReports = null, Object? postReports = null, Object? privateMessageReports = freezed}) { + return _then( + _$GetReportCountResponseImpl( + communityId: + freezed == communityId + ? _value.communityId + : communityId // ignore: cast_nullable_to_non_nullable + as int?, + commentReports: + null == commentReports + ? _value.commentReports + : commentReports // ignore: cast_nullable_to_non_nullable + as int, + postReports: + null == postReports + ? _value.postReports + : postReports // ignore: cast_nullable_to_non_nullable + as int, + privateMessageReports: + freezed == privateMessageReports + ? _value.privateMessageReports + : privateMessageReports // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -152,25 +132,19 @@ class __$$GetReportCountResponseImplCopyWithImpl<$Res> @modelSerde class _$GetReportCountResponseImpl extends _GetReportCountResponse { - const _$GetReportCountResponseImpl( - {this.communityId, - required this.commentReports, - required this.postReports, - this.privateMessageReports}) - : super._(); + const _$GetReportCountResponseImpl({this.communityId, required this.commentReports, required this.postReports, this.privateMessageReports}) : super._(); - factory _$GetReportCountResponseImpl.fromJson(Map json) => - _$$GetReportCountResponseImplFromJson(json); + factory _$GetReportCountResponseImpl.fromJson(Map json) => _$$GetReportCountResponseImplFromJson(json); @override final int? communityId; -// v0.18.0 + // v0.18.0 @override final int commentReports; -// v0.18.0 + // v0.18.0 @override final int postReports; -// v0.18.0 + // v0.18.0 @override final int? privateMessageReports; @@ -184,48 +158,34 @@ class _$GetReportCountResponseImpl extends _GetReportCountResponse { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GetReportCountResponseImpl && - (identical(other.communityId, communityId) || - other.communityId == communityId) && - (identical(other.commentReports, commentReports) || - other.commentReports == commentReports) && - (identical(other.postReports, postReports) || - other.postReports == postReports) && - (identical(other.privateMessageReports, privateMessageReports) || - other.privateMessageReports == privateMessageReports)); + (identical(other.communityId, communityId) || other.communityId == communityId) && + (identical(other.commentReports, commentReports) || other.commentReports == commentReports) && + (identical(other.postReports, postReports) || other.postReports == postReports) && + (identical(other.privateMessageReports, privateMessageReports) || other.privateMessageReports == privateMessageReports)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, communityId, commentReports, - postReports, privateMessageReports); + int get hashCode => Object.hash(runtimeType, communityId, commentReports, postReports, privateMessageReports); /// Create a copy of GetReportCountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetReportCountResponseImplCopyWith<_$GetReportCountResponseImpl> - get copyWith => __$$GetReportCountResponseImplCopyWithImpl< - _$GetReportCountResponseImpl>(this, _$identity); + _$$GetReportCountResponseImplCopyWith<_$GetReportCountResponseImpl> get copyWith => __$$GetReportCountResponseImplCopyWithImpl<_$GetReportCountResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetReportCountResponseImplToJson( - this, - ); + return _$$GetReportCountResponseImplToJson(this); } } abstract class _GetReportCountResponse extends GetReportCountResponse { - const factory _GetReportCountResponse( - {final int? communityId, - required final int commentReports, - required final int postReports, - final int? privateMessageReports}) = _$GetReportCountResponseImpl; + const factory _GetReportCountResponse({final int? communityId, required final int commentReports, required final int postReports, final int? privateMessageReports}) = _$GetReportCountResponseImpl; const _GetReportCountResponse._() : super._(); - factory _GetReportCountResponse.fromJson(Map json) = - _$GetReportCountResponseImpl.fromJson; + factory _GetReportCountResponse.fromJson(Map json) = _$GetReportCountResponseImpl.fromJson; @override int? get communityId; // v0.18.0 @@ -240,6 +200,5 @@ abstract class _GetReportCountResponse extends GetReportCountResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetReportCountResponseImplCopyWith<_$GetReportCountResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetReportCountResponseImplCopyWith<_$GetReportCountResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_report_count_response.g.dart b/lib/src/v3/models/user/get_report_count_response.g.dart index eeeab9d4..933d29af 100644 --- a/lib/src/v3/models/user/get_report_count_response.g.dart +++ b/lib/src/v3/models/user/get_report_count_response.g.dart @@ -6,20 +6,16 @@ part of 'get_report_count_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetReportCountResponseImpl _$$GetReportCountResponseImplFromJson( - Map json) => - _$GetReportCountResponseImpl( - communityId: (json['community_id'] as num?)?.toInt(), - commentReports: (json['comment_reports'] as num).toInt(), - postReports: (json['post_reports'] as num).toInt(), - privateMessageReports: (json['private_message_reports'] as num?)?.toInt(), - ); +_$GetReportCountResponseImpl _$$GetReportCountResponseImplFromJson(Map json) => _$GetReportCountResponseImpl( + communityId: (json['community_id'] as num?)?.toInt(), + commentReports: (json['comment_reports'] as num).toInt(), + postReports: (json['post_reports'] as num).toInt(), + privateMessageReports: (json['private_message_reports'] as num?)?.toInt(), +); -Map _$$GetReportCountResponseImplToJson( - _$GetReportCountResponseImpl instance) => - { - 'community_id': instance.communityId, - 'comment_reports': instance.commentReports, - 'post_reports': instance.postReports, - 'private_message_reports': instance.privateMessageReports, - }; +Map _$$GetReportCountResponseImplToJson(_$GetReportCountResponseImpl instance) => { + 'community_id': instance.communityId, + 'comment_reports': instance.commentReports, + 'post_reports': instance.postReports, + 'private_message_reports': instance.privateMessageReports, +}; diff --git a/lib/src/v3/models/user/get_unread_count_response.dart b/lib/src/v3/models/user/get_unread_count_response.dart index 1a67fb45..e7b608df 100644 --- a/lib/src/v3/models/user/get_unread_count_response.dart +++ b/lib/src/v3/models/user/get_unread_count_response.dart @@ -15,6 +15,5 @@ class GetUnreadCountResponse with _$GetUnreadCountResponse { }) = _GetUnreadCountResponse; const GetUnreadCountResponse._(); - factory GetUnreadCountResponse.fromJson(Map json) => - _$GetUnreadCountResponseFromJson(json); + factory GetUnreadCountResponse.fromJson(Map json) => _$GetUnreadCountResponseFromJson(json); } diff --git a/lib/src/v3/models/user/get_unread_count_response.freezed.dart b/lib/src/v3/models/user/get_unread_count_response.freezed.dart index 1b9274bb..f9942fd8 100644 --- a/lib/src/v3/models/user/get_unread_count_response.freezed.dart +++ b/lib/src/v3/models/user/get_unread_count_response.freezed.dart @@ -12,10 +12,10 @@ part of 'get_unread_count_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -GetUnreadCountResponse _$GetUnreadCountResponseFromJson( - Map json) { +GetUnreadCountResponse _$GetUnreadCountResponseFromJson(Map json) { return _GetUnreadCountResponse.fromJson(json); } @@ -31,23 +31,18 @@ mixin _$GetUnreadCountResponse { /// Create a copy of GetUnreadCountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $GetUnreadCountResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $GetUnreadCountResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $GetUnreadCountResponseCopyWith<$Res> { - factory $GetUnreadCountResponseCopyWith(GetUnreadCountResponse value, - $Res Function(GetUnreadCountResponse) then) = - _$GetUnreadCountResponseCopyWithImpl<$Res, GetUnreadCountResponse>; + factory $GetUnreadCountResponseCopyWith(GetUnreadCountResponse value, $Res Function(GetUnreadCountResponse) then) = _$GetUnreadCountResponseCopyWithImpl<$Res, GetUnreadCountResponse>; @useResult $Res call({int replies, int mentions, int privateMessages}); } /// @nodoc -class _$GetUnreadCountResponseCopyWithImpl<$Res, - $Val extends GetUnreadCountResponse> - implements $GetUnreadCountResponseCopyWith<$Res> { +class _$GetUnreadCountResponseCopyWithImpl<$Res, $Val extends GetUnreadCountResponse> implements $GetUnreadCountResponseCopyWith<$Res> { _$GetUnreadCountResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,73 +54,66 @@ class _$GetUnreadCountResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? replies = null, - Object? mentions = null, - Object? privateMessages = null, - }) { - return _then(_value.copyWith( - replies: null == replies - ? _value.replies - : replies // ignore: cast_nullable_to_non_nullable - as int, - mentions: null == mentions - ? _value.mentions - : mentions // ignore: cast_nullable_to_non_nullable - as int, - privateMessages: null == privateMessages - ? _value.privateMessages - : privateMessages // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? replies = null, Object? mentions = null, Object? privateMessages = null}) { + return _then( + _value.copyWith( + replies: + null == replies + ? _value.replies + : replies // ignore: cast_nullable_to_non_nullable + as int, + mentions: + null == mentions + ? _value.mentions + : mentions // ignore: cast_nullable_to_non_nullable + as int, + privateMessages: + null == privateMessages + ? _value.privateMessages + : privateMessages // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$GetUnreadCountResponseImplCopyWith<$Res> - implements $GetUnreadCountResponseCopyWith<$Res> { - factory _$$GetUnreadCountResponseImplCopyWith( - _$GetUnreadCountResponseImpl value, - $Res Function(_$GetUnreadCountResponseImpl) then) = - __$$GetUnreadCountResponseImplCopyWithImpl<$Res>; +abstract class _$$GetUnreadCountResponseImplCopyWith<$Res> implements $GetUnreadCountResponseCopyWith<$Res> { + factory _$$GetUnreadCountResponseImplCopyWith(_$GetUnreadCountResponseImpl value, $Res Function(_$GetUnreadCountResponseImpl) then) = __$$GetUnreadCountResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({int replies, int mentions, int privateMessages}); } /// @nodoc -class __$$GetUnreadCountResponseImplCopyWithImpl<$Res> - extends _$GetUnreadCountResponseCopyWithImpl<$Res, - _$GetUnreadCountResponseImpl> - implements _$$GetUnreadCountResponseImplCopyWith<$Res> { - __$$GetUnreadCountResponseImplCopyWithImpl( - _$GetUnreadCountResponseImpl _value, - $Res Function(_$GetUnreadCountResponseImpl) _then) - : super(_value, _then); +class __$$GetUnreadCountResponseImplCopyWithImpl<$Res> extends _$GetUnreadCountResponseCopyWithImpl<$Res, _$GetUnreadCountResponseImpl> implements _$$GetUnreadCountResponseImplCopyWith<$Res> { + __$$GetUnreadCountResponseImplCopyWithImpl(_$GetUnreadCountResponseImpl _value, $Res Function(_$GetUnreadCountResponseImpl) _then) : super(_value, _then); /// Create a copy of GetUnreadCountResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? replies = null, - Object? mentions = null, - Object? privateMessages = null, - }) { - return _then(_$GetUnreadCountResponseImpl( - replies: null == replies - ? _value.replies - : replies // ignore: cast_nullable_to_non_nullable - as int, - mentions: null == mentions - ? _value.mentions - : mentions // ignore: cast_nullable_to_non_nullable - as int, - privateMessages: null == privateMessages - ? _value.privateMessages - : privateMessages // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? replies = null, Object? mentions = null, Object? privateMessages = null}) { + return _then( + _$GetUnreadCountResponseImpl( + replies: + null == replies + ? _value.replies + : replies // ignore: cast_nullable_to_non_nullable + as int, + mentions: + null == mentions + ? _value.mentions + : mentions // ignore: cast_nullable_to_non_nullable + as int, + privateMessages: + null == privateMessages + ? _value.privateMessages + : privateMessages // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -133,21 +121,16 @@ class __$$GetUnreadCountResponseImplCopyWithImpl<$Res> @modelSerde class _$GetUnreadCountResponseImpl extends _GetUnreadCountResponse { - const _$GetUnreadCountResponseImpl( - {required this.replies, - required this.mentions, - required this.privateMessages}) - : super._(); + const _$GetUnreadCountResponseImpl({required this.replies, required this.mentions, required this.privateMessages}) : super._(); - factory _$GetUnreadCountResponseImpl.fromJson(Map json) => - _$$GetUnreadCountResponseImplFromJson(json); + factory _$GetUnreadCountResponseImpl.fromJson(Map json) => _$$GetUnreadCountResponseImplFromJson(json); @override final int replies; -// v0.18.0 + // v0.18.0 @override final int mentions; -// v0.18.0 + // v0.18.0 @override final int privateMessages; @@ -162,43 +145,32 @@ class _$GetUnreadCountResponseImpl extends _GetUnreadCountResponse { (other.runtimeType == runtimeType && other is _$GetUnreadCountResponseImpl && (identical(other.replies, replies) || other.replies == replies) && - (identical(other.mentions, mentions) || - other.mentions == mentions) && - (identical(other.privateMessages, privateMessages) || - other.privateMessages == privateMessages)); + (identical(other.mentions, mentions) || other.mentions == mentions) && + (identical(other.privateMessages, privateMessages) || other.privateMessages == privateMessages)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, replies, mentions, privateMessages); + int get hashCode => Object.hash(runtimeType, replies, mentions, privateMessages); /// Create a copy of GetUnreadCountResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$GetUnreadCountResponseImplCopyWith<_$GetUnreadCountResponseImpl> - get copyWith => __$$GetUnreadCountResponseImplCopyWithImpl< - _$GetUnreadCountResponseImpl>(this, _$identity); + _$$GetUnreadCountResponseImplCopyWith<_$GetUnreadCountResponseImpl> get copyWith => __$$GetUnreadCountResponseImplCopyWithImpl<_$GetUnreadCountResponseImpl>(this, _$identity); @override Map toJson() { - return _$$GetUnreadCountResponseImplToJson( - this, - ); + return _$$GetUnreadCountResponseImplToJson(this); } } abstract class _GetUnreadCountResponse extends GetUnreadCountResponse { - const factory _GetUnreadCountResponse( - {required final int replies, - required final int mentions, - required final int privateMessages}) = _$GetUnreadCountResponseImpl; + const factory _GetUnreadCountResponse({required final int replies, required final int mentions, required final int privateMessages}) = _$GetUnreadCountResponseImpl; const _GetUnreadCountResponse._() : super._(); - factory _GetUnreadCountResponse.fromJson(Map json) = - _$GetUnreadCountResponseImpl.fromJson; + factory _GetUnreadCountResponse.fromJson(Map json) = _$GetUnreadCountResponseImpl.fromJson; @override int get replies; // v0.18.0 @@ -211,6 +183,5 @@ abstract class _GetUnreadCountResponse extends GetUnreadCountResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$GetUnreadCountResponseImplCopyWith<_$GetUnreadCountResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$GetUnreadCountResponseImplCopyWith<_$GetUnreadCountResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/get_unread_count_response.g.dart b/lib/src/v3/models/user/get_unread_count_response.g.dart index c5905035..7bb65913 100644 --- a/lib/src/v3/models/user/get_unread_count_response.g.dart +++ b/lib/src/v3/models/user/get_unread_count_response.g.dart @@ -6,18 +6,11 @@ part of 'get_unread_count_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$GetUnreadCountResponseImpl _$$GetUnreadCountResponseImplFromJson( - Map json) => - _$GetUnreadCountResponseImpl( - replies: (json['replies'] as num).toInt(), - mentions: (json['mentions'] as num).toInt(), - privateMessages: (json['private_messages'] as num).toInt(), - ); +_$GetUnreadCountResponseImpl _$$GetUnreadCountResponseImplFromJson(Map json) => + _$GetUnreadCountResponseImpl(replies: (json['replies'] as num).toInt(), mentions: (json['mentions'] as num).toInt(), privateMessages: (json['private_messages'] as num).toInt()); -Map _$$GetUnreadCountResponseImplToJson( - _$GetUnreadCountResponseImpl instance) => - { - 'replies': instance.replies, - 'mentions': instance.mentions, - 'private_messages': instance.privateMessages, - }; +Map _$$GetUnreadCountResponseImplToJson(_$GetUnreadCountResponseImpl instance) => { + 'replies': instance.replies, + 'mentions': instance.mentions, + 'private_messages': instance.privateMessages, +}; diff --git a/lib/src/v3/models/user/list_media_response.dart b/lib/src/v3/models/user/list_media_response.dart index 183df612..472079fe 100644 --- a/lib/src/v3/models/user/list_media_response.dart +++ b/lib/src/v3/models/user/list_media_response.dart @@ -9,11 +9,8 @@ part 'list_media_response.g.dart'; @freezed class ListMediaResponse with _$ListMediaResponse { @modelSerde - const factory ListMediaResponse({ - required List images, - }) = _ListMediaResponse; + const factory ListMediaResponse({required List images}) = _ListMediaResponse; const ListMediaResponse._(); - factory ListMediaResponse.fromJson(Map json) => - _$ListMediaResponseFromJson(json); + factory ListMediaResponse.fromJson(Map json) => _$ListMediaResponseFromJson(json); } diff --git a/lib/src/v3/models/user/list_media_response.freezed.dart b/lib/src/v3/models/user/list_media_response.freezed.dart index ad942e87..c7ecd935 100644 --- a/lib/src/v3/models/user/list_media_response.freezed.dart +++ b/lib/src/v3/models/user/list_media_response.freezed.dart @@ -12,7 +12,8 @@ part of 'list_media_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ListMediaResponse _$ListMediaResponseFromJson(Map json) { return _ListMediaResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$ListMediaResponse { /// Create a copy of ListMediaResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ListMediaResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $ListMediaResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ListMediaResponseCopyWith<$Res> { - factory $ListMediaResponseCopyWith( - ListMediaResponse value, $Res Function(ListMediaResponse) then) = - _$ListMediaResponseCopyWithImpl<$Res, ListMediaResponse>; + factory $ListMediaResponseCopyWith(ListMediaResponse value, $Res Function(ListMediaResponse) then) = _$ListMediaResponseCopyWithImpl<$Res, ListMediaResponse>; @useResult $Res call({List images}); } /// @nodoc -class _$ListMediaResponseCopyWithImpl<$Res, $Val extends ListMediaResponse> - implements $ListMediaResponseCopyWith<$Res> { +class _$ListMediaResponseCopyWithImpl<$Res, $Val extends ListMediaResponse> implements $ListMediaResponseCopyWith<$Res> { _$ListMediaResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$ListMediaResponseCopyWithImpl<$Res, $Val extends ListMediaResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? images = null, - }) { - return _then(_value.copyWith( - images: null == images - ? _value.images - : images // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? images = null}) { + return _then( + _value.copyWith( + images: + null == images + ? _value.images + : images // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$ListMediaResponseImplCopyWith<$Res> - implements $ListMediaResponseCopyWith<$Res> { - factory _$$ListMediaResponseImplCopyWith(_$ListMediaResponseImpl value, - $Res Function(_$ListMediaResponseImpl) then) = - __$$ListMediaResponseImplCopyWithImpl<$Res>; +abstract class _$$ListMediaResponseImplCopyWith<$Res> implements $ListMediaResponseCopyWith<$Res> { + factory _$$ListMediaResponseImplCopyWith(_$ListMediaResponseImpl value, $Res Function(_$ListMediaResponseImpl) then) = __$$ListMediaResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({List images}); } /// @nodoc -class __$$ListMediaResponseImplCopyWithImpl<$Res> - extends _$ListMediaResponseCopyWithImpl<$Res, _$ListMediaResponseImpl> - implements _$$ListMediaResponseImplCopyWith<$Res> { - __$$ListMediaResponseImplCopyWithImpl(_$ListMediaResponseImpl _value, - $Res Function(_$ListMediaResponseImpl) _then) - : super(_value, _then); +class __$$ListMediaResponseImplCopyWithImpl<$Res> extends _$ListMediaResponseCopyWithImpl<$Res, _$ListMediaResponseImpl> implements _$$ListMediaResponseImplCopyWith<$Res> { + __$$ListMediaResponseImplCopyWithImpl(_$ListMediaResponseImpl _value, $Res Function(_$ListMediaResponseImpl) _then) : super(_value, _then); /// Create a copy of ListMediaResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? images = null, - }) { - return _then(_$ListMediaResponseImpl( - images: null == images - ? _value._images - : images // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? images = null}) { + return _then( + _$ListMediaResponseImpl( + images: + null == images + ? _value._images + : images // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -106,12 +99,9 @@ class __$$ListMediaResponseImplCopyWithImpl<$Res> @modelSerde class _$ListMediaResponseImpl extends _ListMediaResponse { - const _$ListMediaResponseImpl({required final List images}) - : _images = images, - super._(); + const _$ListMediaResponseImpl({required final List images}) : _images = images, super._(); - factory _$ListMediaResponseImpl.fromJson(Map json) => - _$$ListMediaResponseImplFromJson(json); + factory _$ListMediaResponseImpl.fromJson(Map json) => _$$ListMediaResponseImplFromJson(json); final List _images; @override @@ -128,41 +118,31 @@ class _$ListMediaResponseImpl extends _ListMediaResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$ListMediaResponseImpl && - const DeepCollectionEquality().equals(other._images, _images)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$ListMediaResponseImpl && const DeepCollectionEquality().equals(other._images, _images)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, const DeepCollectionEquality().hash(_images)); + int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_images)); /// Create a copy of ListMediaResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ListMediaResponseImplCopyWith<_$ListMediaResponseImpl> get copyWith => - __$$ListMediaResponseImplCopyWithImpl<_$ListMediaResponseImpl>( - this, _$identity); + _$$ListMediaResponseImplCopyWith<_$ListMediaResponseImpl> get copyWith => __$$ListMediaResponseImplCopyWithImpl<_$ListMediaResponseImpl>(this, _$identity); @override Map toJson() { - return _$$ListMediaResponseImplToJson( - this, - ); + return _$$ListMediaResponseImplToJson(this); } } abstract class _ListMediaResponse extends ListMediaResponse { - const factory _ListMediaResponse( - {required final List images}) = _$ListMediaResponseImpl; + const factory _ListMediaResponse({required final List images}) = _$ListMediaResponseImpl; const _ListMediaResponse._() : super._(); - factory _ListMediaResponse.fromJson(Map json) = - _$ListMediaResponseImpl.fromJson; + factory _ListMediaResponse.fromJson(Map json) = _$ListMediaResponseImpl.fromJson; @override List get images; @@ -171,6 +151,5 @@ abstract class _ListMediaResponse extends ListMediaResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ListMediaResponseImplCopyWith<_$ListMediaResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ListMediaResponseImplCopyWith<_$ListMediaResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/list_media_response.g.dart b/lib/src/v3/models/user/list_media_response.g.dart index 6cf69477..1361a667 100644 --- a/lib/src/v3/models/user/list_media_response.g.dart +++ b/lib/src/v3/models/user/list_media_response.g.dart @@ -6,16 +6,7 @@ part of 'list_media_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ListMediaResponseImpl _$$ListMediaResponseImplFromJson( - Map json) => - _$ListMediaResponseImpl( - images: (json['images'] as List) - .map((e) => LocalImageView.fromJson(e as Map)) - .toList(), - ); +_$ListMediaResponseImpl _$$ListMediaResponseImplFromJson(Map json) => + _$ListMediaResponseImpl(images: (json['images'] as List).map((e) => LocalImageView.fromJson(e as Map)).toList()); -Map _$$ListMediaResponseImplToJson( - _$ListMediaResponseImpl instance) => - { - 'images': instance.images.map((e) => e.toJson()).toList(), - }; +Map _$$ListMediaResponseImplToJson(_$ListMediaResponseImpl instance) => {'images': instance.images.map((e) => e.toJson()).toList()}; diff --git a/lib/src/v3/models/user/login_response.dart b/lib/src/v3/models/user/login_response.dart index 4df94fe1..b7d7c650 100644 --- a/lib/src/v3/models/user/login_response.dart +++ b/lib/src/v3/models/user/login_response.dart @@ -15,6 +15,5 @@ class LoginResponse with _$LoginResponse { }) = _LoginResponse; const LoginResponse._(); - factory LoginResponse.fromJson(Map json) => - _$LoginResponseFromJson(json); + factory LoginResponse.fromJson(Map json) => _$LoginResponseFromJson(json); } diff --git a/lib/src/v3/models/user/login_response.freezed.dart b/lib/src/v3/models/user/login_response.freezed.dart index f4421d59..14f0d462 100644 --- a/lib/src/v3/models/user/login_response.freezed.dart +++ b/lib/src/v3/models/user/login_response.freezed.dart @@ -12,7 +12,8 @@ part of 'login_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LoginResponse _$LoginResponseFromJson(Map json) { return _LoginResponse.fromJson(json); @@ -30,22 +31,18 @@ mixin _$LoginResponse { /// Create a copy of LoginResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LoginResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $LoginResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LoginResponseCopyWith<$Res> { - factory $LoginResponseCopyWith( - LoginResponse value, $Res Function(LoginResponse) then) = - _$LoginResponseCopyWithImpl<$Res, LoginResponse>; + factory $LoginResponseCopyWith(LoginResponse value, $Res Function(LoginResponse) then) = _$LoginResponseCopyWithImpl<$Res, LoginResponse>; @useResult $Res call({String? jwt, bool registrationCreated, bool verifyEmailSent}); } /// @nodoc -class _$LoginResponseCopyWithImpl<$Res, $Val extends LoginResponse> - implements $LoginResponseCopyWith<$Res> { +class _$LoginResponseCopyWithImpl<$Res, $Val extends LoginResponse> implements $LoginResponseCopyWith<$Res> { _$LoginResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,70 +54,66 @@ class _$LoginResponseCopyWithImpl<$Res, $Val extends LoginResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = null, - Object? verifyEmailSent = null, - }) { - return _then(_value.copyWith( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: null == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool, - verifyEmailSent: null == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? jwt = freezed, Object? registrationCreated = null, Object? verifyEmailSent = null}) { + return _then( + _value.copyWith( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + null == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool, + verifyEmailSent: + null == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$LoginResponseImplCopyWith<$Res> - implements $LoginResponseCopyWith<$Res> { - factory _$$LoginResponseImplCopyWith( - _$LoginResponseImpl value, $Res Function(_$LoginResponseImpl) then) = - __$$LoginResponseImplCopyWithImpl<$Res>; +abstract class _$$LoginResponseImplCopyWith<$Res> implements $LoginResponseCopyWith<$Res> { + factory _$$LoginResponseImplCopyWith(_$LoginResponseImpl value, $Res Function(_$LoginResponseImpl) then) = __$$LoginResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({String? jwt, bool registrationCreated, bool verifyEmailSent}); } /// @nodoc -class __$$LoginResponseImplCopyWithImpl<$Res> - extends _$LoginResponseCopyWithImpl<$Res, _$LoginResponseImpl> - implements _$$LoginResponseImplCopyWith<$Res> { - __$$LoginResponseImplCopyWithImpl( - _$LoginResponseImpl _value, $Res Function(_$LoginResponseImpl) _then) - : super(_value, _then); +class __$$LoginResponseImplCopyWithImpl<$Res> extends _$LoginResponseCopyWithImpl<$Res, _$LoginResponseImpl> implements _$$LoginResponseImplCopyWith<$Res> { + __$$LoginResponseImplCopyWithImpl(_$LoginResponseImpl _value, $Res Function(_$LoginResponseImpl) _then) : super(_value, _then); /// Create a copy of LoginResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = null, - Object? verifyEmailSent = null, - }) { - return _then(_$LoginResponseImpl( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: null == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool, - verifyEmailSent: null == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? jwt = freezed, Object? registrationCreated = null, Object? verifyEmailSent = null}) { + return _then( + _$LoginResponseImpl( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + null == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool, + verifyEmailSent: + null == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -128,21 +121,16 @@ class __$$LoginResponseImplCopyWithImpl<$Res> @modelSerde class _$LoginResponseImpl extends _LoginResponse { - const _$LoginResponseImpl( - {this.jwt, - required this.registrationCreated, - required this.verifyEmailSent}) - : super._(); + const _$LoginResponseImpl({this.jwt, required this.registrationCreated, required this.verifyEmailSent}) : super._(); - factory _$LoginResponseImpl.fromJson(Map json) => - _$$LoginResponseImplFromJson(json); + factory _$LoginResponseImpl.fromJson(Map json) => _$$LoginResponseImplFromJson(json); @override final String? jwt; -// v0.18.0 + // v0.18.0 @override final bool registrationCreated; -// v0.18.0 + // v0.18.0 @override final bool verifyEmailSent; @@ -157,42 +145,32 @@ class _$LoginResponseImpl extends _LoginResponse { (other.runtimeType == runtimeType && other is _$LoginResponseImpl && (identical(other.jwt, jwt) || other.jwt == jwt) && - (identical(other.registrationCreated, registrationCreated) || - other.registrationCreated == registrationCreated) && - (identical(other.verifyEmailSent, verifyEmailSent) || - other.verifyEmailSent == verifyEmailSent)); + (identical(other.registrationCreated, registrationCreated) || other.registrationCreated == registrationCreated) && + (identical(other.verifyEmailSent, verifyEmailSent) || other.verifyEmailSent == verifyEmailSent)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, jwt, registrationCreated, verifyEmailSent); + int get hashCode => Object.hash(runtimeType, jwt, registrationCreated, verifyEmailSent); /// Create a copy of LoginResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LoginResponseImplCopyWith<_$LoginResponseImpl> get copyWith => - __$$LoginResponseImplCopyWithImpl<_$LoginResponseImpl>(this, _$identity); + _$$LoginResponseImplCopyWith<_$LoginResponseImpl> get copyWith => __$$LoginResponseImplCopyWithImpl<_$LoginResponseImpl>(this, _$identity); @override Map toJson() { - return _$$LoginResponseImplToJson( - this, - ); + return _$$LoginResponseImplToJson(this); } } abstract class _LoginResponse extends LoginResponse { - const factory _LoginResponse( - {final String? jwt, - required final bool registrationCreated, - required final bool verifyEmailSent}) = _$LoginResponseImpl; + const factory _LoginResponse({final String? jwt, required final bool registrationCreated, required final bool verifyEmailSent}) = _$LoginResponseImpl; const _LoginResponse._() : super._(); - factory _LoginResponse.fromJson(Map json) = - _$LoginResponseImpl.fromJson; + factory _LoginResponse.fromJson(Map json) = _$LoginResponseImpl.fromJson; @override String? get jwt; // v0.18.0 @@ -205,6 +183,5 @@ abstract class _LoginResponse extends LoginResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LoginResponseImplCopyWith<_$LoginResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LoginResponseImplCopyWith<_$LoginResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/login_response.g.dart b/lib/src/v3/models/user/login_response.g.dart index 599bc7ec..a4258dc4 100644 --- a/lib/src/v3/models/user/login_response.g.dart +++ b/lib/src/v3/models/user/login_response.g.dart @@ -7,15 +7,10 @@ part of 'login_response.dart'; // ************************************************************************** _$LoginResponseImpl _$$LoginResponseImplFromJson(Map json) => - _$LoginResponseImpl( - jwt: json['jwt'] as String?, - registrationCreated: json['registration_created'] as bool, - verifyEmailSent: json['verify_email_sent'] as bool, - ); + _$LoginResponseImpl(jwt: json['jwt'] as String?, registrationCreated: json['registration_created'] as bool, verifyEmailSent: json['verify_email_sent'] as bool); -Map _$$LoginResponseImplToJson(_$LoginResponseImpl instance) => - { - 'jwt': instance.jwt, - 'registration_created': instance.registrationCreated, - 'verify_email_sent': instance.verifyEmailSent, - }; +Map _$$LoginResponseImplToJson(_$LoginResponseImpl instance) => { + 'jwt': instance.jwt, + 'registration_created': instance.registrationCreated, + 'verify_email_sent': instance.verifyEmailSent, +}; diff --git a/lib/src/v3/models/user/password_change_after_reset_response.dart b/lib/src/v3/models/user/password_change_after_reset_response.dart index 138689b3..9b8e5bef 100644 --- a/lib/src/v3/models/user/password_change_after_reset_response.dart +++ b/lib/src/v3/models/user/password_change_after_reset_response.dart @@ -16,8 +16,5 @@ class PasswordChangeAfterResetResponse with _$PasswordChangeAfterResetResponse { }) = _PasswordChangeAfterResetResponse; const PasswordChangeAfterResetResponse._(); - factory PasswordChangeAfterResetResponse.fromJson( - Map json, - ) => - _$PasswordChangeAfterResetResponseFromJson(json); + factory PasswordChangeAfterResetResponse.fromJson(Map json) => _$PasswordChangeAfterResetResponseFromJson(json); } diff --git a/lib/src/v3/models/user/password_change_after_reset_response.freezed.dart b/lib/src/v3/models/user/password_change_after_reset_response.freezed.dart index 52d4da8f..48e131a7 100644 --- a/lib/src/v3/models/user/password_change_after_reset_response.freezed.dart +++ b/lib/src/v3/models/user/password_change_after_reset_response.freezed.dart @@ -12,10 +12,10 @@ part of 'password_change_after_reset_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PasswordChangeAfterResetResponse _$PasswordChangeAfterResetResponseFromJson( - Map json) { +PasswordChangeAfterResetResponse _$PasswordChangeAfterResetResponseFromJson(Map json) { return _PasswordChangeAfterResetResponse.fromJson(json); } @@ -35,29 +35,19 @@ mixin _$PasswordChangeAfterResetResponse { /// Create a copy of PasswordChangeAfterResetResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PasswordChangeAfterResetResponseCopyWith - get copyWith => throw _privateConstructorUsedError; + $PasswordChangeAfterResetResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PasswordChangeAfterResetResponseCopyWith<$Res> { - factory $PasswordChangeAfterResetResponseCopyWith( - PasswordChangeAfterResetResponse value, - $Res Function(PasswordChangeAfterResetResponse) then) = - _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, - PasswordChangeAfterResetResponse>; + factory $PasswordChangeAfterResetResponseCopyWith(PasswordChangeAfterResetResponse value, $Res Function(PasswordChangeAfterResetResponse) then) = + _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, PasswordChangeAfterResetResponse>; @useResult - $Res call( - {@deprecated String? jwt, - @deprecated bool? registrationCreated, - @deprecated bool? verifyEmailSent, - bool? success}); + $Res call({@deprecated String? jwt, @deprecated bool? registrationCreated, @deprecated bool? verifyEmailSent, bool? success}); } /// @nodoc -class _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, - $Val extends PasswordChangeAfterResetResponse> - implements $PasswordChangeAfterResetResponseCopyWith<$Res> { +class _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, $Val extends PasswordChangeAfterResetResponse> implements $PasswordChangeAfterResetResponseCopyWith<$Res> { _$PasswordChangeAfterResetResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -69,105 +59,88 @@ class _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = freezed, - Object? verifyEmailSent = freezed, - Object? success = freezed, - }) { - return _then(_value.copyWith( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: freezed == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool?, - verifyEmailSent: freezed == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? jwt = freezed, Object? registrationCreated = freezed, Object? verifyEmailSent = freezed, Object? success = freezed}) { + return _then( + _value.copyWith( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + freezed == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool?, + verifyEmailSent: + freezed == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PasswordChangeAfterResetResponseImplCopyWith<$Res> - implements $PasswordChangeAfterResetResponseCopyWith<$Res> { - factory _$$PasswordChangeAfterResetResponseImplCopyWith( - _$PasswordChangeAfterResetResponseImpl value, - $Res Function(_$PasswordChangeAfterResetResponseImpl) then) = +abstract class _$$PasswordChangeAfterResetResponseImplCopyWith<$Res> implements $PasswordChangeAfterResetResponseCopyWith<$Res> { + factory _$$PasswordChangeAfterResetResponseImplCopyWith(_$PasswordChangeAfterResetResponseImpl value, $Res Function(_$PasswordChangeAfterResetResponseImpl) then) = __$$PasswordChangeAfterResetResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated String? jwt, - @deprecated bool? registrationCreated, - @deprecated bool? verifyEmailSent, - bool? success}); + $Res call({@deprecated String? jwt, @deprecated bool? registrationCreated, @deprecated bool? verifyEmailSent, bool? success}); } /// @nodoc -class __$$PasswordChangeAfterResetResponseImplCopyWithImpl<$Res> - extends _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, - _$PasswordChangeAfterResetResponseImpl> +class __$$PasswordChangeAfterResetResponseImplCopyWithImpl<$Res> extends _$PasswordChangeAfterResetResponseCopyWithImpl<$Res, _$PasswordChangeAfterResetResponseImpl> implements _$$PasswordChangeAfterResetResponseImplCopyWith<$Res> { - __$$PasswordChangeAfterResetResponseImplCopyWithImpl( - _$PasswordChangeAfterResetResponseImpl _value, - $Res Function(_$PasswordChangeAfterResetResponseImpl) _then) - : super(_value, _then); + __$$PasswordChangeAfterResetResponseImplCopyWithImpl(_$PasswordChangeAfterResetResponseImpl _value, $Res Function(_$PasswordChangeAfterResetResponseImpl) _then) : super(_value, _then); /// Create a copy of PasswordChangeAfterResetResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = freezed, - Object? verifyEmailSent = freezed, - Object? success = freezed, - }) { - return _then(_$PasswordChangeAfterResetResponseImpl( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: freezed == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool?, - verifyEmailSent: freezed == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? jwt = freezed, Object? registrationCreated = freezed, Object? verifyEmailSent = freezed, Object? success = freezed}) { + return _then( + _$PasswordChangeAfterResetResponseImpl( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + freezed == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool?, + verifyEmailSent: + freezed == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } /// @nodoc @modelSerde -class _$PasswordChangeAfterResetResponseImpl - extends _PasswordChangeAfterResetResponse { - const _$PasswordChangeAfterResetResponseImpl( - {@deprecated this.jwt, - @deprecated this.registrationCreated, - @deprecated this.verifyEmailSent, - this.success}) - : super._(); +class _$PasswordChangeAfterResetResponseImpl extends _PasswordChangeAfterResetResponse { + const _$PasswordChangeAfterResetResponseImpl({@deprecated this.jwt, @deprecated this.registrationCreated, @deprecated this.verifyEmailSent, this.success}) : super._(); - factory _$PasswordChangeAfterResetResponseImpl.fromJson( - Map json) => - _$$PasswordChangeAfterResetResponseImplFromJson(json); + factory _$PasswordChangeAfterResetResponseImpl.fromJson(Map json) => _$$PasswordChangeAfterResetResponseImplFromJson(json); @override @deprecated @@ -192,48 +165,35 @@ class _$PasswordChangeAfterResetResponseImpl (other.runtimeType == runtimeType && other is _$PasswordChangeAfterResetResponseImpl && (identical(other.jwt, jwt) || other.jwt == jwt) && - (identical(other.registrationCreated, registrationCreated) || - other.registrationCreated == registrationCreated) && - (identical(other.verifyEmailSent, verifyEmailSent) || - other.verifyEmailSent == verifyEmailSent) && + (identical(other.registrationCreated, registrationCreated) || other.registrationCreated == registrationCreated) && + (identical(other.verifyEmailSent, verifyEmailSent) || other.verifyEmailSent == verifyEmailSent) && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, jwt, registrationCreated, verifyEmailSent, success); + int get hashCode => Object.hash(runtimeType, jwt, registrationCreated, verifyEmailSent, success); /// Create a copy of PasswordChangeAfterResetResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PasswordChangeAfterResetResponseImplCopyWith< - _$PasswordChangeAfterResetResponseImpl> - get copyWith => __$$PasswordChangeAfterResetResponseImplCopyWithImpl< - _$PasswordChangeAfterResetResponseImpl>(this, _$identity); + _$$PasswordChangeAfterResetResponseImplCopyWith<_$PasswordChangeAfterResetResponseImpl> get copyWith => + __$$PasswordChangeAfterResetResponseImplCopyWithImpl<_$PasswordChangeAfterResetResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PasswordChangeAfterResetResponseImplToJson( - this, - ); + return _$$PasswordChangeAfterResetResponseImplToJson(this); } } -abstract class _PasswordChangeAfterResetResponse - extends PasswordChangeAfterResetResponse { - const factory _PasswordChangeAfterResetResponse( - {@deprecated final String? jwt, - @deprecated final bool? registrationCreated, - @deprecated final bool? verifyEmailSent, - final bool? success}) = _$PasswordChangeAfterResetResponseImpl; +abstract class _PasswordChangeAfterResetResponse extends PasswordChangeAfterResetResponse { + const factory _PasswordChangeAfterResetResponse({@deprecated final String? jwt, @deprecated final bool? registrationCreated, @deprecated final bool? verifyEmailSent, final bool? success}) = + _$PasswordChangeAfterResetResponseImpl; const _PasswordChangeAfterResetResponse._() : super._(); - factory _PasswordChangeAfterResetResponse.fromJson( - Map json) = - _$PasswordChangeAfterResetResponseImpl.fromJson; + factory _PasswordChangeAfterResetResponse.fromJson(Map json) = _$PasswordChangeAfterResetResponseImpl.fromJson; @override @deprecated @@ -251,7 +211,5 @@ abstract class _PasswordChangeAfterResetResponse /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PasswordChangeAfterResetResponseImplCopyWith< - _$PasswordChangeAfterResetResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PasswordChangeAfterResetResponseImplCopyWith<_$PasswordChangeAfterResetResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/password_change_after_reset_response.g.dart b/lib/src/v3/models/user/password_change_after_reset_response.g.dart index 48f3fd58..20994adc 100644 --- a/lib/src/v3/models/user/password_change_after_reset_response.g.dart +++ b/lib/src/v3/models/user/password_change_after_reset_response.g.dart @@ -6,21 +6,16 @@ part of 'password_change_after_reset_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PasswordChangeAfterResetResponseImpl - _$$PasswordChangeAfterResetResponseImplFromJson( - Map json) => - _$PasswordChangeAfterResetResponseImpl( - jwt: json['jwt'] as String?, - registrationCreated: json['registration_created'] as bool?, - verifyEmailSent: json['verify_email_sent'] as bool?, - success: json['success'] as bool?, - ); +_$PasswordChangeAfterResetResponseImpl _$$PasswordChangeAfterResetResponseImplFromJson(Map json) => _$PasswordChangeAfterResetResponseImpl( + jwt: json['jwt'] as String?, + registrationCreated: json['registration_created'] as bool?, + verifyEmailSent: json['verify_email_sent'] as bool?, + success: json['success'] as bool?, +); -Map _$$PasswordChangeAfterResetResponseImplToJson( - _$PasswordChangeAfterResetResponseImpl instance) => - { - 'jwt': instance.jwt, - 'registration_created': instance.registrationCreated, - 'verify_email_sent': instance.verifyEmailSent, - 'success': instance.success, - }; +Map _$$PasswordChangeAfterResetResponseImplToJson(_$PasswordChangeAfterResetResponseImpl instance) => { + 'jwt': instance.jwt, + 'registration_created': instance.registrationCreated, + 'verify_email_sent': instance.verifyEmailSent, + 'success': instance.success, +}; diff --git a/lib/src/v3/models/user/password_reset_response.dart b/lib/src/v3/models/user/password_reset_response.dart index 3c0e3d78..e1c27613 100644 --- a/lib/src/v3/models/user/password_reset_response.dart +++ b/lib/src/v3/models/user/password_reset_response.dart @@ -13,6 +13,5 @@ class PasswordResetResponse with _$PasswordResetResponse { }) = _PasswordResetResponse; const PasswordResetResponse._(); - factory PasswordResetResponse.fromJson(Map json) => - _$PasswordResetResponseFromJson(json); + factory PasswordResetResponse.fromJson(Map json) => _$PasswordResetResponseFromJson(json); } diff --git a/lib/src/v3/models/user/password_reset_response.freezed.dart b/lib/src/v3/models/user/password_reset_response.freezed.dart index 246b3efd..174c5ace 100644 --- a/lib/src/v3/models/user/password_reset_response.freezed.dart +++ b/lib/src/v3/models/user/password_reset_response.freezed.dart @@ -12,10 +12,10 @@ part of 'password_reset_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PasswordResetResponse _$PasswordResetResponseFromJson( - Map json) { +PasswordResetResponse _$PasswordResetResponseFromJson(Map json) { return _PasswordResetResponse.fromJson(json); } @@ -29,23 +29,18 @@ mixin _$PasswordResetResponse { /// Create a copy of PasswordResetResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PasswordResetResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PasswordResetResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PasswordResetResponseCopyWith<$Res> { - factory $PasswordResetResponseCopyWith(PasswordResetResponse value, - $Res Function(PasswordResetResponse) then) = - _$PasswordResetResponseCopyWithImpl<$Res, PasswordResetResponse>; + factory $PasswordResetResponseCopyWith(PasswordResetResponse value, $Res Function(PasswordResetResponse) then) = _$PasswordResetResponseCopyWithImpl<$Res, PasswordResetResponse>; @useResult $Res call({bool? success}); } /// @nodoc -class _$PasswordResetResponseCopyWithImpl<$Res, - $Val extends PasswordResetResponse> - implements $PasswordResetResponseCopyWith<$Res> { +class _$PasswordResetResponseCopyWithImpl<$Res, $Val extends PasswordResetResponse> implements $PasswordResetResponseCopyWith<$Res> { _$PasswordResetResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -57,52 +52,46 @@ class _$PasswordResetResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_value.copyWith( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? success = freezed}) { + return _then( + _value.copyWith( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$PasswordResetResponseImplCopyWith<$Res> - implements $PasswordResetResponseCopyWith<$Res> { - factory _$$PasswordResetResponseImplCopyWith( - _$PasswordResetResponseImpl value, - $Res Function(_$PasswordResetResponseImpl) then) = - __$$PasswordResetResponseImplCopyWithImpl<$Res>; +abstract class _$$PasswordResetResponseImplCopyWith<$Res> implements $PasswordResetResponseCopyWith<$Res> { + factory _$$PasswordResetResponseImplCopyWith(_$PasswordResetResponseImpl value, $Res Function(_$PasswordResetResponseImpl) then) = __$$PasswordResetResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool? success}); } /// @nodoc -class __$$PasswordResetResponseImplCopyWithImpl<$Res> - extends _$PasswordResetResponseCopyWithImpl<$Res, - _$PasswordResetResponseImpl> - implements _$$PasswordResetResponseImplCopyWith<$Res> { - __$$PasswordResetResponseImplCopyWithImpl(_$PasswordResetResponseImpl _value, - $Res Function(_$PasswordResetResponseImpl) _then) - : super(_value, _then); +class __$$PasswordResetResponseImplCopyWithImpl<$Res> extends _$PasswordResetResponseCopyWithImpl<$Res, _$PasswordResetResponseImpl> implements _$$PasswordResetResponseImplCopyWith<$Res> { + __$$PasswordResetResponseImplCopyWithImpl(_$PasswordResetResponseImpl _value, $Res Function(_$PasswordResetResponseImpl) _then) : super(_value, _then); /// Create a copy of PasswordResetResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_$PasswordResetResponseImpl( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? success = freezed}) { + return _then( + _$PasswordResetResponseImpl( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -112,8 +101,7 @@ class __$$PasswordResetResponseImplCopyWithImpl<$Res> class _$PasswordResetResponseImpl extends _PasswordResetResponse { const _$PasswordResetResponseImpl({this.success}) : super._(); - factory _$PasswordResetResponseImpl.fromJson(Map json) => - _$$PasswordResetResponseImplFromJson(json); + factory _$PasswordResetResponseImpl.fromJson(Map json) => _$$PasswordResetResponseImplFromJson(json); @override final bool? success; @@ -125,10 +113,7 @@ class _$PasswordResetResponseImpl extends _PasswordResetResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PasswordResetResponseImpl && - (identical(other.success, success) || other.success == success)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$PasswordResetResponseImpl && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -140,25 +125,19 @@ class _$PasswordResetResponseImpl extends _PasswordResetResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PasswordResetResponseImplCopyWith<_$PasswordResetResponseImpl> - get copyWith => __$$PasswordResetResponseImplCopyWithImpl< - _$PasswordResetResponseImpl>(this, _$identity); + _$$PasswordResetResponseImplCopyWith<_$PasswordResetResponseImpl> get copyWith => __$$PasswordResetResponseImplCopyWithImpl<_$PasswordResetResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PasswordResetResponseImplToJson( - this, - ); + return _$$PasswordResetResponseImplToJson(this); } } abstract class _PasswordResetResponse extends PasswordResetResponse { - const factory _PasswordResetResponse({final bool? success}) = - _$PasswordResetResponseImpl; + const factory _PasswordResetResponse({final bool? success}) = _$PasswordResetResponseImpl; const _PasswordResetResponse._() : super._(); - factory _PasswordResetResponse.fromJson(Map json) = - _$PasswordResetResponseImpl.fromJson; + factory _PasswordResetResponse.fromJson(Map json) = _$PasswordResetResponseImpl.fromJson; @override bool? get success; @@ -167,6 +146,5 @@ abstract class _PasswordResetResponse extends PasswordResetResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PasswordResetResponseImplCopyWith<_$PasswordResetResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PasswordResetResponseImplCopyWith<_$PasswordResetResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/password_reset_response.g.dart b/lib/src/v3/models/user/password_reset_response.g.dart index fec57987..07346696 100644 --- a/lib/src/v3/models/user/password_reset_response.g.dart +++ b/lib/src/v3/models/user/password_reset_response.g.dart @@ -6,14 +6,6 @@ part of 'password_reset_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PasswordResetResponseImpl _$$PasswordResetResponseImplFromJson( - Map json) => - _$PasswordResetResponseImpl( - success: json['success'] as bool?, - ); +_$PasswordResetResponseImpl _$$PasswordResetResponseImplFromJson(Map json) => _$PasswordResetResponseImpl(success: json['success'] as bool?); -Map _$$PasswordResetResponseImplToJson( - _$PasswordResetResponseImpl instance) => - { - 'success': instance.success, - }; +Map _$$PasswordResetResponseImplToJson(_$PasswordResetResponseImpl instance) => {'success': instance.success}; diff --git a/lib/src/v3/models/user/person_mention_response.dart b/lib/src/v3/models/user/person_mention_response.dart index eab398f3..342e802b 100644 --- a/lib/src/v3/models/user/person_mention_response.dart +++ b/lib/src/v3/models/user/person_mention_response.dart @@ -14,6 +14,5 @@ class PersonMentionResponse with _$PersonMentionResponse { }) = _PersonMentionResponse; const PersonMentionResponse._(); - factory PersonMentionResponse.fromJson(Map json) => - _$PersonMentionResponseFromJson(json); + factory PersonMentionResponse.fromJson(Map json) => _$PersonMentionResponseFromJson(json); } diff --git a/lib/src/v3/models/user/person_mention_response.freezed.dart b/lib/src/v3/models/user/person_mention_response.freezed.dart index f7eb5d8d..662fe69f 100644 --- a/lib/src/v3/models/user/person_mention_response.freezed.dart +++ b/lib/src/v3/models/user/person_mention_response.freezed.dart @@ -12,10 +12,10 @@ part of 'person_mention_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PersonMentionResponse _$PersonMentionResponseFromJson( - Map json) { +PersonMentionResponse _$PersonMentionResponseFromJson(Map json) { return _PersonMentionResponse.fromJson(json); } @@ -29,15 +29,12 @@ mixin _$PersonMentionResponse { /// Create a copy of PersonMentionResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonMentionResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonMentionResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonMentionResponseCopyWith<$Res> { - factory $PersonMentionResponseCopyWith(PersonMentionResponse value, - $Res Function(PersonMentionResponse) then) = - _$PersonMentionResponseCopyWithImpl<$Res, PersonMentionResponse>; + factory $PersonMentionResponseCopyWith(PersonMentionResponse value, $Res Function(PersonMentionResponse) then) = _$PersonMentionResponseCopyWithImpl<$Res, PersonMentionResponse>; @useResult $Res call({PersonMentionView personMentionView}); @@ -45,9 +42,7 @@ abstract class $PersonMentionResponseCopyWith<$Res> { } /// @nodoc -class _$PersonMentionResponseCopyWithImpl<$Res, - $Val extends PersonMentionResponse> - implements $PersonMentionResponseCopyWith<$Res> { +class _$PersonMentionResponseCopyWithImpl<$Res, $Val extends PersonMentionResponse> implements $PersonMentionResponseCopyWith<$Res> { _$PersonMentionResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,15 +54,17 @@ class _$PersonMentionResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personMentionView = null, - }) { - return _then(_value.copyWith( - personMentionView: null == personMentionView - ? _value.personMentionView - : personMentionView // ignore: cast_nullable_to_non_nullable - as PersonMentionView, - ) as $Val); + $Res call({Object? personMentionView = null}) { + return _then( + _value.copyWith( + personMentionView: + null == personMentionView + ? _value.personMentionView + : personMentionView // ignore: cast_nullable_to_non_nullable + as PersonMentionView, + ) + as $Val, + ); } /// Create a copy of PersonMentionResponse @@ -82,12 +79,8 @@ class _$PersonMentionResponseCopyWithImpl<$Res, } /// @nodoc -abstract class _$$PersonMentionResponseImplCopyWith<$Res> - implements $PersonMentionResponseCopyWith<$Res> { - factory _$$PersonMentionResponseImplCopyWith( - _$PersonMentionResponseImpl value, - $Res Function(_$PersonMentionResponseImpl) then) = - __$$PersonMentionResponseImplCopyWithImpl<$Res>; +abstract class _$$PersonMentionResponseImplCopyWith<$Res> implements $PersonMentionResponseCopyWith<$Res> { + factory _$$PersonMentionResponseImplCopyWith(_$PersonMentionResponseImpl value, $Res Function(_$PersonMentionResponseImpl) then) = __$$PersonMentionResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({PersonMentionView personMentionView}); @@ -97,27 +90,23 @@ abstract class _$$PersonMentionResponseImplCopyWith<$Res> } /// @nodoc -class __$$PersonMentionResponseImplCopyWithImpl<$Res> - extends _$PersonMentionResponseCopyWithImpl<$Res, - _$PersonMentionResponseImpl> - implements _$$PersonMentionResponseImplCopyWith<$Res> { - __$$PersonMentionResponseImplCopyWithImpl(_$PersonMentionResponseImpl _value, - $Res Function(_$PersonMentionResponseImpl) _then) - : super(_value, _then); +class __$$PersonMentionResponseImplCopyWithImpl<$Res> extends _$PersonMentionResponseCopyWithImpl<$Res, _$PersonMentionResponseImpl> implements _$$PersonMentionResponseImplCopyWith<$Res> { + __$$PersonMentionResponseImplCopyWithImpl(_$PersonMentionResponseImpl _value, $Res Function(_$PersonMentionResponseImpl) _then) : super(_value, _then); /// Create a copy of PersonMentionResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? personMentionView = null, - }) { - return _then(_$PersonMentionResponseImpl( - personMentionView: null == personMentionView - ? _value.personMentionView - : personMentionView // ignore: cast_nullable_to_non_nullable - as PersonMentionView, - )); + $Res call({Object? personMentionView = null}) { + return _then( + _$PersonMentionResponseImpl( + personMentionView: + null == personMentionView + ? _value.personMentionView + : personMentionView // ignore: cast_nullable_to_non_nullable + as PersonMentionView, + ), + ); } } @@ -125,11 +114,9 @@ class __$$PersonMentionResponseImplCopyWithImpl<$Res> @modelSerde class _$PersonMentionResponseImpl extends _PersonMentionResponse { - const _$PersonMentionResponseImpl({required this.personMentionView}) - : super._(); + const _$PersonMentionResponseImpl({required this.personMentionView}) : super._(); - factory _$PersonMentionResponseImpl.fromJson(Map json) => - _$$PersonMentionResponseImplFromJson(json); + factory _$PersonMentionResponseImpl.fromJson(Map json) => _$$PersonMentionResponseImplFromJson(json); @override final PersonMentionView personMentionView; @@ -142,10 +129,7 @@ class _$PersonMentionResponseImpl extends _PersonMentionResponse { @override bool operator ==(Object other) { return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$PersonMentionResponseImpl && - (identical(other.personMentionView, personMentionView) || - other.personMentionView == personMentionView)); + (other.runtimeType == runtimeType && other is _$PersonMentionResponseImpl && (identical(other.personMentionView, personMentionView) || other.personMentionView == personMentionView)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -157,26 +141,19 @@ class _$PersonMentionResponseImpl extends _PersonMentionResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonMentionResponseImplCopyWith<_$PersonMentionResponseImpl> - get copyWith => __$$PersonMentionResponseImplCopyWithImpl< - _$PersonMentionResponseImpl>(this, _$identity); + _$$PersonMentionResponseImplCopyWith<_$PersonMentionResponseImpl> get copyWith => __$$PersonMentionResponseImplCopyWithImpl<_$PersonMentionResponseImpl>(this, _$identity); @override Map toJson() { - return _$$PersonMentionResponseImplToJson( - this, - ); + return _$$PersonMentionResponseImplToJson(this); } } abstract class _PersonMentionResponse extends PersonMentionResponse { - const factory _PersonMentionResponse( - {required final PersonMentionView personMentionView}) = - _$PersonMentionResponseImpl; + const factory _PersonMentionResponse({required final PersonMentionView personMentionView}) = _$PersonMentionResponseImpl; const _PersonMentionResponse._() : super._(); - factory _PersonMentionResponse.fromJson(Map json) = - _$PersonMentionResponseImpl.fromJson; + factory _PersonMentionResponse.fromJson(Map json) = _$PersonMentionResponseImpl.fromJson; @override PersonMentionView get personMentionView; @@ -185,6 +162,5 @@ abstract class _PersonMentionResponse extends PersonMentionResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonMentionResponseImplCopyWith<_$PersonMentionResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PersonMentionResponseImplCopyWith<_$PersonMentionResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/person_mention_response.g.dart b/lib/src/v3/models/user/person_mention_response.g.dart index 608b921c..7735528f 100644 --- a/lib/src/v3/models/user/person_mention_response.g.dart +++ b/lib/src/v3/models/user/person_mention_response.g.dart @@ -6,15 +6,7 @@ part of 'person_mention_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PersonMentionResponseImpl _$$PersonMentionResponseImplFromJson( - Map json) => - _$PersonMentionResponseImpl( - personMentionView: PersonMentionView.fromJson( - json['person_mention_view'] as Map), - ); +_$PersonMentionResponseImpl _$$PersonMentionResponseImplFromJson(Map json) => + _$PersonMentionResponseImpl(personMentionView: PersonMentionView.fromJson(json['person_mention_view'] as Map)); -Map _$$PersonMentionResponseImplToJson( - _$PersonMentionResponseImpl instance) => - { - 'person_mention_view': instance.personMentionView.toJson(), - }; +Map _$$PersonMentionResponseImplToJson(_$PersonMentionResponseImpl instance) => {'person_mention_view': instance.personMentionView.toJson()}; diff --git a/lib/src/v3/models/user/save_user_settings_response.dart b/lib/src/v3/models/user/save_user_settings_response.dart index 93505e47..dcc6c848 100644 --- a/lib/src/v3/models/user/save_user_settings_response.dart +++ b/lib/src/v3/models/user/save_user_settings_response.dart @@ -16,6 +16,5 @@ class SaveUserSettingsResponse with _$SaveUserSettingsResponse { }) = _SaveUserSettingsResponse; const SaveUserSettingsResponse._(); - factory SaveUserSettingsResponse.fromJson(Map json) => - _$SaveUserSettingsResponseFromJson(json); + factory SaveUserSettingsResponse.fromJson(Map json) => _$SaveUserSettingsResponseFromJson(json); } diff --git a/lib/src/v3/models/user/save_user_settings_response.freezed.dart b/lib/src/v3/models/user/save_user_settings_response.freezed.dart index 863a2410..f889622d 100644 --- a/lib/src/v3/models/user/save_user_settings_response.freezed.dart +++ b/lib/src/v3/models/user/save_user_settings_response.freezed.dart @@ -12,10 +12,10 @@ part of 'save_user_settings_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -SaveUserSettingsResponse _$SaveUserSettingsResponseFromJson( - Map json) { +SaveUserSettingsResponse _$SaveUserSettingsResponseFromJson(Map json) { return _SaveUserSettingsResponse.fromJson(json); } @@ -35,27 +35,18 @@ mixin _$SaveUserSettingsResponse { /// Create a copy of SaveUserSettingsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SaveUserSettingsResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $SaveUserSettingsResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SaveUserSettingsResponseCopyWith<$Res> { - factory $SaveUserSettingsResponseCopyWith(SaveUserSettingsResponse value, - $Res Function(SaveUserSettingsResponse) then) = - _$SaveUserSettingsResponseCopyWithImpl<$Res, SaveUserSettingsResponse>; + factory $SaveUserSettingsResponseCopyWith(SaveUserSettingsResponse value, $Res Function(SaveUserSettingsResponse) then) = _$SaveUserSettingsResponseCopyWithImpl<$Res, SaveUserSettingsResponse>; @useResult - $Res call( - {@deprecated String? jwt, - @deprecated bool? registrationCreated, - @deprecated bool? verifyEmailSent, - bool? success}); + $Res call({@deprecated String? jwt, @deprecated bool? registrationCreated, @deprecated bool? verifyEmailSent, bool? success}); } /// @nodoc -class _$SaveUserSettingsResponseCopyWithImpl<$Res, - $Val extends SaveUserSettingsResponse> - implements $SaveUserSettingsResponseCopyWith<$Res> { +class _$SaveUserSettingsResponseCopyWithImpl<$Res, $Val extends SaveUserSettingsResponse> implements $SaveUserSettingsResponseCopyWith<$Res> { _$SaveUserSettingsResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,87 +58,76 @@ class _$SaveUserSettingsResponseCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = freezed, - Object? verifyEmailSent = freezed, - Object? success = freezed, - }) { - return _then(_value.copyWith( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: freezed == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool?, - verifyEmailSent: freezed == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? jwt = freezed, Object? registrationCreated = freezed, Object? verifyEmailSent = freezed, Object? success = freezed}) { + return _then( + _value.copyWith( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + freezed == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool?, + verifyEmailSent: + freezed == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$SaveUserSettingsResponseImplCopyWith<$Res> - implements $SaveUserSettingsResponseCopyWith<$Res> { - factory _$$SaveUserSettingsResponseImplCopyWith( - _$SaveUserSettingsResponseImpl value, - $Res Function(_$SaveUserSettingsResponseImpl) then) = - __$$SaveUserSettingsResponseImplCopyWithImpl<$Res>; +abstract class _$$SaveUserSettingsResponseImplCopyWith<$Res> implements $SaveUserSettingsResponseCopyWith<$Res> { + factory _$$SaveUserSettingsResponseImplCopyWith(_$SaveUserSettingsResponseImpl value, $Res Function(_$SaveUserSettingsResponseImpl) then) = __$$SaveUserSettingsResponseImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@deprecated String? jwt, - @deprecated bool? registrationCreated, - @deprecated bool? verifyEmailSent, - bool? success}); + $Res call({@deprecated String? jwt, @deprecated bool? registrationCreated, @deprecated bool? verifyEmailSent, bool? success}); } /// @nodoc -class __$$SaveUserSettingsResponseImplCopyWithImpl<$Res> - extends _$SaveUserSettingsResponseCopyWithImpl<$Res, - _$SaveUserSettingsResponseImpl> - implements _$$SaveUserSettingsResponseImplCopyWith<$Res> { - __$$SaveUserSettingsResponseImplCopyWithImpl( - _$SaveUserSettingsResponseImpl _value, - $Res Function(_$SaveUserSettingsResponseImpl) _then) - : super(_value, _then); +class __$$SaveUserSettingsResponseImplCopyWithImpl<$Res> extends _$SaveUserSettingsResponseCopyWithImpl<$Res, _$SaveUserSettingsResponseImpl> implements _$$SaveUserSettingsResponseImplCopyWith<$Res> { + __$$SaveUserSettingsResponseImplCopyWithImpl(_$SaveUserSettingsResponseImpl _value, $Res Function(_$SaveUserSettingsResponseImpl) _then) : super(_value, _then); /// Create a copy of SaveUserSettingsResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? jwt = freezed, - Object? registrationCreated = freezed, - Object? verifyEmailSent = freezed, - Object? success = freezed, - }) { - return _then(_$SaveUserSettingsResponseImpl( - jwt: freezed == jwt - ? _value.jwt - : jwt // ignore: cast_nullable_to_non_nullable - as String?, - registrationCreated: freezed == registrationCreated - ? _value.registrationCreated - : registrationCreated // ignore: cast_nullable_to_non_nullable - as bool?, - verifyEmailSent: freezed == verifyEmailSent - ? _value.verifyEmailSent - : verifyEmailSent // ignore: cast_nullable_to_non_nullable - as bool?, - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? jwt = freezed, Object? registrationCreated = freezed, Object? verifyEmailSent = freezed, Object? success = freezed}) { + return _then( + _$SaveUserSettingsResponseImpl( + jwt: + freezed == jwt + ? _value.jwt + : jwt // ignore: cast_nullable_to_non_nullable + as String?, + registrationCreated: + freezed == registrationCreated + ? _value.registrationCreated + : registrationCreated // ignore: cast_nullable_to_non_nullable + as bool?, + verifyEmailSent: + freezed == verifyEmailSent + ? _value.verifyEmailSent + : verifyEmailSent // ignore: cast_nullable_to_non_nullable + as bool?, + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -155,15 +135,9 @@ class __$$SaveUserSettingsResponseImplCopyWithImpl<$Res> @modelSerde class _$SaveUserSettingsResponseImpl extends _SaveUserSettingsResponse { - const _$SaveUserSettingsResponseImpl( - {@deprecated this.jwt, - @deprecated this.registrationCreated, - @deprecated this.verifyEmailSent, - this.success}) - : super._(); + const _$SaveUserSettingsResponseImpl({@deprecated this.jwt, @deprecated this.registrationCreated, @deprecated this.verifyEmailSent, this.success}) : super._(); - factory _$SaveUserSettingsResponseImpl.fromJson(Map json) => - _$$SaveUserSettingsResponseImplFromJson(json); + factory _$SaveUserSettingsResponseImpl.fromJson(Map json) => _$$SaveUserSettingsResponseImplFromJson(json); @override @deprecated @@ -188,45 +162,34 @@ class _$SaveUserSettingsResponseImpl extends _SaveUserSettingsResponse { (other.runtimeType == runtimeType && other is _$SaveUserSettingsResponseImpl && (identical(other.jwt, jwt) || other.jwt == jwt) && - (identical(other.registrationCreated, registrationCreated) || - other.registrationCreated == registrationCreated) && - (identical(other.verifyEmailSent, verifyEmailSent) || - other.verifyEmailSent == verifyEmailSent) && + (identical(other.registrationCreated, registrationCreated) || other.registrationCreated == registrationCreated) && + (identical(other.verifyEmailSent, verifyEmailSent) || other.verifyEmailSent == verifyEmailSent) && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, jwt, registrationCreated, verifyEmailSent, success); + int get hashCode => Object.hash(runtimeType, jwt, registrationCreated, verifyEmailSent, success); /// Create a copy of SaveUserSettingsResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SaveUserSettingsResponseImplCopyWith<_$SaveUserSettingsResponseImpl> - get copyWith => __$$SaveUserSettingsResponseImplCopyWithImpl< - _$SaveUserSettingsResponseImpl>(this, _$identity); + _$$SaveUserSettingsResponseImplCopyWith<_$SaveUserSettingsResponseImpl> get copyWith => __$$SaveUserSettingsResponseImplCopyWithImpl<_$SaveUserSettingsResponseImpl>(this, _$identity); @override Map toJson() { - return _$$SaveUserSettingsResponseImplToJson( - this, - ); + return _$$SaveUserSettingsResponseImplToJson(this); } } abstract class _SaveUserSettingsResponse extends SaveUserSettingsResponse { - const factory _SaveUserSettingsResponse( - {@deprecated final String? jwt, - @deprecated final bool? registrationCreated, - @deprecated final bool? verifyEmailSent, - final bool? success}) = _$SaveUserSettingsResponseImpl; + const factory _SaveUserSettingsResponse({@deprecated final String? jwt, @deprecated final bool? registrationCreated, @deprecated final bool? verifyEmailSent, final bool? success}) = + _$SaveUserSettingsResponseImpl; const _SaveUserSettingsResponse._() : super._(); - factory _SaveUserSettingsResponse.fromJson(Map json) = - _$SaveUserSettingsResponseImpl.fromJson; + factory _SaveUserSettingsResponse.fromJson(Map json) = _$SaveUserSettingsResponseImpl.fromJson; @override @deprecated @@ -244,6 +207,5 @@ abstract class _SaveUserSettingsResponse extends SaveUserSettingsResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SaveUserSettingsResponseImplCopyWith<_$SaveUserSettingsResponseImpl> - get copyWith => throw _privateConstructorUsedError; + _$$SaveUserSettingsResponseImplCopyWith<_$SaveUserSettingsResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/save_user_settings_response.g.dart b/lib/src/v3/models/user/save_user_settings_response.g.dart index 095de2cc..dee713a1 100644 --- a/lib/src/v3/models/user/save_user_settings_response.g.dart +++ b/lib/src/v3/models/user/save_user_settings_response.g.dart @@ -6,20 +6,16 @@ part of 'save_user_settings_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SaveUserSettingsResponseImpl _$$SaveUserSettingsResponseImplFromJson( - Map json) => - _$SaveUserSettingsResponseImpl( - jwt: json['jwt'] as String?, - registrationCreated: json['registration_created'] as bool?, - verifyEmailSent: json['verify_email_sent'] as bool?, - success: json['success'] as bool?, - ); +_$SaveUserSettingsResponseImpl _$$SaveUserSettingsResponseImplFromJson(Map json) => _$SaveUserSettingsResponseImpl( + jwt: json['jwt'] as String?, + registrationCreated: json['registration_created'] as bool?, + verifyEmailSent: json['verify_email_sent'] as bool?, + success: json['success'] as bool?, +); -Map _$$SaveUserSettingsResponseImplToJson( - _$SaveUserSettingsResponseImpl instance) => - { - 'jwt': instance.jwt, - 'registration_created': instance.registrationCreated, - 'verify_email_sent': instance.verifyEmailSent, - 'success': instance.success, - }; +Map _$$SaveUserSettingsResponseImplToJson(_$SaveUserSettingsResponseImpl instance) => { + 'jwt': instance.jwt, + 'registration_created': instance.registrationCreated, + 'verify_email_sent': instance.verifyEmailSent, + 'success': instance.success, +}; diff --git a/lib/src/v3/models/user/success_response.dart b/lib/src/v3/models/user/success_response.dart index 62a2d96a..12b39366 100644 --- a/lib/src/v3/models/user/success_response.dart +++ b/lib/src/v3/models/user/success_response.dart @@ -8,11 +8,8 @@ part 'success_response.g.dart'; @freezed class SuccessResponse with _$SuccessResponse { @modelSerde - const factory SuccessResponse({ - required bool success, - }) = _SuccessResponse; + const factory SuccessResponse({required bool success}) = _SuccessResponse; const SuccessResponse._(); - factory SuccessResponse.fromJson(Map json) => - _$SuccessResponseFromJson(json); + factory SuccessResponse.fromJson(Map json) => _$SuccessResponseFromJson(json); } diff --git a/lib/src/v3/models/user/success_response.freezed.dart b/lib/src/v3/models/user/success_response.freezed.dart index 16e2ebc5..7ab0654b 100644 --- a/lib/src/v3/models/user/success_response.freezed.dart +++ b/lib/src/v3/models/user/success_response.freezed.dart @@ -12,7 +12,8 @@ part of 'success_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); SuccessResponse _$SuccessResponseFromJson(Map json) { return _SuccessResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$SuccessResponse { /// Create a copy of SuccessResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $SuccessResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $SuccessResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $SuccessResponseCopyWith<$Res> { - factory $SuccessResponseCopyWith( - SuccessResponse value, $Res Function(SuccessResponse) then) = - _$SuccessResponseCopyWithImpl<$Res, SuccessResponse>; + factory $SuccessResponseCopyWith(SuccessResponse value, $Res Function(SuccessResponse) then) = _$SuccessResponseCopyWithImpl<$Res, SuccessResponse>; @useResult $Res call({bool success}); } /// @nodoc -class _$SuccessResponseCopyWithImpl<$Res, $Val extends SuccessResponse> - implements $SuccessResponseCopyWith<$Res> { +class _$SuccessResponseCopyWithImpl<$Res, $Val extends SuccessResponse> implements $SuccessResponseCopyWith<$Res> { _$SuccessResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$SuccessResponseCopyWithImpl<$Res, $Val extends SuccessResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = null, - }) { - return _then(_value.copyWith( - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? success = null}) { + return _then( + _value.copyWith( + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$SuccessResponseImplCopyWith<$Res> - implements $SuccessResponseCopyWith<$Res> { - factory _$$SuccessResponseImplCopyWith(_$SuccessResponseImpl value, - $Res Function(_$SuccessResponseImpl) then) = - __$$SuccessResponseImplCopyWithImpl<$Res>; +abstract class _$$SuccessResponseImplCopyWith<$Res> implements $SuccessResponseCopyWith<$Res> { + factory _$$SuccessResponseImplCopyWith(_$SuccessResponseImpl value, $Res Function(_$SuccessResponseImpl) then) = __$$SuccessResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool success}); } /// @nodoc -class __$$SuccessResponseImplCopyWithImpl<$Res> - extends _$SuccessResponseCopyWithImpl<$Res, _$SuccessResponseImpl> - implements _$$SuccessResponseImplCopyWith<$Res> { - __$$SuccessResponseImplCopyWithImpl( - _$SuccessResponseImpl _value, $Res Function(_$SuccessResponseImpl) _then) - : super(_value, _then); +class __$$SuccessResponseImplCopyWithImpl<$Res> extends _$SuccessResponseCopyWithImpl<$Res, _$SuccessResponseImpl> implements _$$SuccessResponseImplCopyWith<$Res> { + __$$SuccessResponseImplCopyWithImpl(_$SuccessResponseImpl _value, $Res Function(_$SuccessResponseImpl) _then) : super(_value, _then); /// Create a copy of SuccessResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = null, - }) { - return _then(_$SuccessResponseImpl( - success: null == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? success = null}) { + return _then( + _$SuccessResponseImpl( + success: + null == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -108,8 +101,7 @@ class __$$SuccessResponseImplCopyWithImpl<$Res> class _$SuccessResponseImpl extends _SuccessResponse { const _$SuccessResponseImpl({required this.success}) : super._(); - factory _$SuccessResponseImpl.fromJson(Map json) => - _$$SuccessResponseImplFromJson(json); + factory _$SuccessResponseImpl.fromJson(Map json) => _$$SuccessResponseImplFromJson(json); @override final bool success; @@ -121,10 +113,7 @@ class _$SuccessResponseImpl extends _SuccessResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$SuccessResponseImpl && - (identical(other.success, success) || other.success == success)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$SuccessResponseImpl && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -136,25 +125,19 @@ class _$SuccessResponseImpl extends _SuccessResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$SuccessResponseImplCopyWith<_$SuccessResponseImpl> get copyWith => - __$$SuccessResponseImplCopyWithImpl<_$SuccessResponseImpl>( - this, _$identity); + _$$SuccessResponseImplCopyWith<_$SuccessResponseImpl> get copyWith => __$$SuccessResponseImplCopyWithImpl<_$SuccessResponseImpl>(this, _$identity); @override Map toJson() { - return _$$SuccessResponseImplToJson( - this, - ); + return _$$SuccessResponseImplToJson(this); } } abstract class _SuccessResponse extends SuccessResponse { - const factory _SuccessResponse({required final bool success}) = - _$SuccessResponseImpl; + const factory _SuccessResponse({required final bool success}) = _$SuccessResponseImpl; const _SuccessResponse._() : super._(); - factory _SuccessResponse.fromJson(Map json) = - _$SuccessResponseImpl.fromJson; + factory _SuccessResponse.fromJson(Map json) = _$SuccessResponseImpl.fromJson; @override bool get success; @@ -163,6 +146,5 @@ abstract class _SuccessResponse extends SuccessResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$SuccessResponseImplCopyWith<_$SuccessResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$SuccessResponseImplCopyWith<_$SuccessResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/success_response.g.dart b/lib/src/v3/models/user/success_response.g.dart index 684ed6f4..e49b01c3 100644 --- a/lib/src/v3/models/user/success_response.g.dart +++ b/lib/src/v3/models/user/success_response.g.dart @@ -6,14 +6,6 @@ part of 'success_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$SuccessResponseImpl _$$SuccessResponseImplFromJson( - Map json) => - _$SuccessResponseImpl( - success: json['success'] as bool, - ); +_$SuccessResponseImpl _$$SuccessResponseImplFromJson(Map json) => _$SuccessResponseImpl(success: json['success'] as bool); -Map _$$SuccessResponseImplToJson( - _$SuccessResponseImpl instance) => - { - 'success': instance.success, - }; +Map _$$SuccessResponseImplToJson(_$SuccessResponseImpl instance) => {'success': instance.success}; diff --git a/lib/src/v3/models/user/update_totp_response.dart b/lib/src/v3/models/user/update_totp_response.dart index a6261b68..e3fd721a 100644 --- a/lib/src/v3/models/user/update_totp_response.dart +++ b/lib/src/v3/models/user/update_totp_response.dart @@ -13,6 +13,5 @@ class UpdateTotpResponse with _$UpdateTotpResponse { }) = _UpdateTotpResponse; const UpdateTotpResponse._(); - factory UpdateTotpResponse.fromJson(Map json) => - _$UpdateTotpResponseFromJson(json); + factory UpdateTotpResponse.fromJson(Map json) => _$UpdateTotpResponseFromJson(json); } diff --git a/lib/src/v3/models/user/update_totp_response.freezed.dart b/lib/src/v3/models/user/update_totp_response.freezed.dart index ed4c6e4f..2cd23e4e 100644 --- a/lib/src/v3/models/user/update_totp_response.freezed.dart +++ b/lib/src/v3/models/user/update_totp_response.freezed.dart @@ -12,7 +12,8 @@ part of 'update_totp_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); UpdateTotpResponse _$UpdateTotpResponseFromJson(Map json) { return _UpdateTotpResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$UpdateTotpResponse { /// Create a copy of UpdateTotpResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $UpdateTotpResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $UpdateTotpResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $UpdateTotpResponseCopyWith<$Res> { - factory $UpdateTotpResponseCopyWith( - UpdateTotpResponse value, $Res Function(UpdateTotpResponse) then) = - _$UpdateTotpResponseCopyWithImpl<$Res, UpdateTotpResponse>; + factory $UpdateTotpResponseCopyWith(UpdateTotpResponse value, $Res Function(UpdateTotpResponse) then) = _$UpdateTotpResponseCopyWithImpl<$Res, UpdateTotpResponse>; @useResult $Res call({bool enabled}); } /// @nodoc -class _$UpdateTotpResponseCopyWithImpl<$Res, $Val extends UpdateTotpResponse> - implements $UpdateTotpResponseCopyWith<$Res> { +class _$UpdateTotpResponseCopyWithImpl<$Res, $Val extends UpdateTotpResponse> implements $UpdateTotpResponseCopyWith<$Res> { _$UpdateTotpResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$UpdateTotpResponseCopyWithImpl<$Res, $Val extends UpdateTotpResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? enabled = null, - }) { - return _then(_value.copyWith( - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? enabled = null}) { + return _then( + _value.copyWith( + enabled: + null == enabled + ? _value.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$UpdateTotpResponseImplCopyWith<$Res> - implements $UpdateTotpResponseCopyWith<$Res> { - factory _$$UpdateTotpResponseImplCopyWith(_$UpdateTotpResponseImpl value, - $Res Function(_$UpdateTotpResponseImpl) then) = - __$$UpdateTotpResponseImplCopyWithImpl<$Res>; +abstract class _$$UpdateTotpResponseImplCopyWith<$Res> implements $UpdateTotpResponseCopyWith<$Res> { + factory _$$UpdateTotpResponseImplCopyWith(_$UpdateTotpResponseImpl value, $Res Function(_$UpdateTotpResponseImpl) then) = __$$UpdateTotpResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool enabled}); } /// @nodoc -class __$$UpdateTotpResponseImplCopyWithImpl<$Res> - extends _$UpdateTotpResponseCopyWithImpl<$Res, _$UpdateTotpResponseImpl> - implements _$$UpdateTotpResponseImplCopyWith<$Res> { - __$$UpdateTotpResponseImplCopyWithImpl(_$UpdateTotpResponseImpl _value, - $Res Function(_$UpdateTotpResponseImpl) _then) - : super(_value, _then); +class __$$UpdateTotpResponseImplCopyWithImpl<$Res> extends _$UpdateTotpResponseCopyWithImpl<$Res, _$UpdateTotpResponseImpl> implements _$$UpdateTotpResponseImplCopyWith<$Res> { + __$$UpdateTotpResponseImplCopyWithImpl(_$UpdateTotpResponseImpl _value, $Res Function(_$UpdateTotpResponseImpl) _then) : super(_value, _then); /// Create a copy of UpdateTotpResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? enabled = null, - }) { - return _then(_$UpdateTotpResponseImpl( - enabled: null == enabled - ? _value.enabled - : enabled // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? enabled = null}) { + return _then( + _$UpdateTotpResponseImpl( + enabled: + null == enabled + ? _value.enabled + : enabled // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } @@ -108,8 +101,7 @@ class __$$UpdateTotpResponseImplCopyWithImpl<$Res> class _$UpdateTotpResponseImpl extends _UpdateTotpResponse { const _$UpdateTotpResponseImpl({required this.enabled}) : super._(); - factory _$UpdateTotpResponseImpl.fromJson(Map json) => - _$$UpdateTotpResponseImplFromJson(json); + factory _$UpdateTotpResponseImpl.fromJson(Map json) => _$$UpdateTotpResponseImplFromJson(json); @override final bool enabled; @@ -121,10 +113,7 @@ class _$UpdateTotpResponseImpl extends _UpdateTotpResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$UpdateTotpResponseImpl && - (identical(other.enabled, enabled) || other.enabled == enabled)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$UpdateTotpResponseImpl && (identical(other.enabled, enabled) || other.enabled == enabled)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -136,25 +125,19 @@ class _$UpdateTotpResponseImpl extends _UpdateTotpResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$UpdateTotpResponseImplCopyWith<_$UpdateTotpResponseImpl> get copyWith => - __$$UpdateTotpResponseImplCopyWithImpl<_$UpdateTotpResponseImpl>( - this, _$identity); + _$$UpdateTotpResponseImplCopyWith<_$UpdateTotpResponseImpl> get copyWith => __$$UpdateTotpResponseImplCopyWithImpl<_$UpdateTotpResponseImpl>(this, _$identity); @override Map toJson() { - return _$$UpdateTotpResponseImplToJson( - this, - ); + return _$$UpdateTotpResponseImplToJson(this); } } abstract class _UpdateTotpResponse extends UpdateTotpResponse { - const factory _UpdateTotpResponse({required final bool enabled}) = - _$UpdateTotpResponseImpl; + const factory _UpdateTotpResponse({required final bool enabled}) = _$UpdateTotpResponseImpl; const _UpdateTotpResponse._() : super._(); - factory _UpdateTotpResponse.fromJson(Map json) = - _$UpdateTotpResponseImpl.fromJson; + factory _UpdateTotpResponse.fromJson(Map json) = _$UpdateTotpResponseImpl.fromJson; @override bool get enabled; @@ -163,6 +146,5 @@ abstract class _UpdateTotpResponse extends UpdateTotpResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$UpdateTotpResponseImplCopyWith<_$UpdateTotpResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$UpdateTotpResponseImplCopyWith<_$UpdateTotpResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/update_totp_response.g.dart b/lib/src/v3/models/user/update_totp_response.g.dart index 446af95e..62a6e9a6 100644 --- a/lib/src/v3/models/user/update_totp_response.g.dart +++ b/lib/src/v3/models/user/update_totp_response.g.dart @@ -6,14 +6,6 @@ part of 'update_totp_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$UpdateTotpResponseImpl _$$UpdateTotpResponseImplFromJson( - Map json) => - _$UpdateTotpResponseImpl( - enabled: json['enabled'] as bool, - ); +_$UpdateTotpResponseImpl _$$UpdateTotpResponseImplFromJson(Map json) => _$UpdateTotpResponseImpl(enabled: json['enabled'] as bool); -Map _$$UpdateTotpResponseImplToJson( - _$UpdateTotpResponseImpl instance) => - { - 'enabled': instance.enabled, - }; +Map _$$UpdateTotpResponseImplToJson(_$UpdateTotpResponseImpl instance) => {'enabled': instance.enabled}; diff --git a/lib/src/v3/models/user/verify_email_response.dart b/lib/src/v3/models/user/verify_email_response.dart index 9dbfc8e5..6b4f5eb1 100644 --- a/lib/src/v3/models/user/verify_email_response.dart +++ b/lib/src/v3/models/user/verify_email_response.dart @@ -13,6 +13,5 @@ class VerifyEmailResponse with _$VerifyEmailResponse { }) = _VerifyEmailResponse; const VerifyEmailResponse._(); - factory VerifyEmailResponse.fromJson(Map json) => - _$VerifyEmailResponseFromJson(json); + factory VerifyEmailResponse.fromJson(Map json) => _$VerifyEmailResponseFromJson(json); } diff --git a/lib/src/v3/models/user/verify_email_response.freezed.dart b/lib/src/v3/models/user/verify_email_response.freezed.dart index ed5acb21..23e6fc28 100644 --- a/lib/src/v3/models/user/verify_email_response.freezed.dart +++ b/lib/src/v3/models/user/verify_email_response.freezed.dart @@ -12,7 +12,8 @@ part of 'verify_email_response.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); VerifyEmailResponse _$VerifyEmailResponseFromJson(Map json) { return _VerifyEmailResponse.fromJson(json); @@ -28,22 +29,18 @@ mixin _$VerifyEmailResponse { /// Create a copy of VerifyEmailResponse /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $VerifyEmailResponseCopyWith get copyWith => - throw _privateConstructorUsedError; + $VerifyEmailResponseCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $VerifyEmailResponseCopyWith<$Res> { - factory $VerifyEmailResponseCopyWith( - VerifyEmailResponse value, $Res Function(VerifyEmailResponse) then) = - _$VerifyEmailResponseCopyWithImpl<$Res, VerifyEmailResponse>; + factory $VerifyEmailResponseCopyWith(VerifyEmailResponse value, $Res Function(VerifyEmailResponse) then) = _$VerifyEmailResponseCopyWithImpl<$Res, VerifyEmailResponse>; @useResult $Res call({bool? success}); } /// @nodoc -class _$VerifyEmailResponseCopyWithImpl<$Res, $Val extends VerifyEmailResponse> - implements $VerifyEmailResponseCopyWith<$Res> { +class _$VerifyEmailResponseCopyWithImpl<$Res, $Val extends VerifyEmailResponse> implements $VerifyEmailResponseCopyWith<$Res> { _$VerifyEmailResponseCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -55,50 +52,46 @@ class _$VerifyEmailResponseCopyWithImpl<$Res, $Val extends VerifyEmailResponse> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_value.copyWith( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? success = freezed}) { + return _then( + _value.copyWith( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc -abstract class _$$VerifyEmailResponseImplCopyWith<$Res> - implements $VerifyEmailResponseCopyWith<$Res> { - factory _$$VerifyEmailResponseImplCopyWith(_$VerifyEmailResponseImpl value, - $Res Function(_$VerifyEmailResponseImpl) then) = - __$$VerifyEmailResponseImplCopyWithImpl<$Res>; +abstract class _$$VerifyEmailResponseImplCopyWith<$Res> implements $VerifyEmailResponseCopyWith<$Res> { + factory _$$VerifyEmailResponseImplCopyWith(_$VerifyEmailResponseImpl value, $Res Function(_$VerifyEmailResponseImpl) then) = __$$VerifyEmailResponseImplCopyWithImpl<$Res>; @override @useResult $Res call({bool? success}); } /// @nodoc -class __$$VerifyEmailResponseImplCopyWithImpl<$Res> - extends _$VerifyEmailResponseCopyWithImpl<$Res, _$VerifyEmailResponseImpl> - implements _$$VerifyEmailResponseImplCopyWith<$Res> { - __$$VerifyEmailResponseImplCopyWithImpl(_$VerifyEmailResponseImpl _value, - $Res Function(_$VerifyEmailResponseImpl) _then) - : super(_value, _then); +class __$$VerifyEmailResponseImplCopyWithImpl<$Res> extends _$VerifyEmailResponseCopyWithImpl<$Res, _$VerifyEmailResponseImpl> implements _$$VerifyEmailResponseImplCopyWith<$Res> { + __$$VerifyEmailResponseImplCopyWithImpl(_$VerifyEmailResponseImpl _value, $Res Function(_$VerifyEmailResponseImpl) _then) : super(_value, _then); /// Create a copy of VerifyEmailResponse /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? success = freezed, - }) { - return _then(_$VerifyEmailResponseImpl( - success: freezed == success - ? _value.success - : success // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? success = freezed}) { + return _then( + _$VerifyEmailResponseImpl( + success: + freezed == success + ? _value.success + : success // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -108,8 +101,7 @@ class __$$VerifyEmailResponseImplCopyWithImpl<$Res> class _$VerifyEmailResponseImpl extends _VerifyEmailResponse { const _$VerifyEmailResponseImpl({this.success}) : super._(); - factory _$VerifyEmailResponseImpl.fromJson(Map json) => - _$$VerifyEmailResponseImplFromJson(json); + factory _$VerifyEmailResponseImpl.fromJson(Map json) => _$$VerifyEmailResponseImplFromJson(json); @override final bool? success; @@ -121,10 +113,7 @@ class _$VerifyEmailResponseImpl extends _VerifyEmailResponse { @override bool operator ==(Object other) { - return identical(this, other) || - (other.runtimeType == runtimeType && - other is _$VerifyEmailResponseImpl && - (identical(other.success, success) || other.success == success)); + return identical(this, other) || (other.runtimeType == runtimeType && other is _$VerifyEmailResponseImpl && (identical(other.success, success) || other.success == success)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -136,25 +125,19 @@ class _$VerifyEmailResponseImpl extends _VerifyEmailResponse { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$VerifyEmailResponseImplCopyWith<_$VerifyEmailResponseImpl> get copyWith => - __$$VerifyEmailResponseImplCopyWithImpl<_$VerifyEmailResponseImpl>( - this, _$identity); + _$$VerifyEmailResponseImplCopyWith<_$VerifyEmailResponseImpl> get copyWith => __$$VerifyEmailResponseImplCopyWithImpl<_$VerifyEmailResponseImpl>(this, _$identity); @override Map toJson() { - return _$$VerifyEmailResponseImplToJson( - this, - ); + return _$$VerifyEmailResponseImplToJson(this); } } abstract class _VerifyEmailResponse extends VerifyEmailResponse { - const factory _VerifyEmailResponse({final bool? success}) = - _$VerifyEmailResponseImpl; + const factory _VerifyEmailResponse({final bool? success}) = _$VerifyEmailResponseImpl; const _VerifyEmailResponse._() : super._(); - factory _VerifyEmailResponse.fromJson(Map json) = - _$VerifyEmailResponseImpl.fromJson; + factory _VerifyEmailResponse.fromJson(Map json) = _$VerifyEmailResponseImpl.fromJson; @override bool? get success; @@ -163,6 +146,5 @@ abstract class _VerifyEmailResponse extends VerifyEmailResponse { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$VerifyEmailResponseImplCopyWith<_$VerifyEmailResponseImpl> get copyWith => - throw _privateConstructorUsedError; + _$$VerifyEmailResponseImplCopyWith<_$VerifyEmailResponseImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/models/user/verify_email_response.g.dart b/lib/src/v3/models/user/verify_email_response.g.dart index 6153c4a0..06cf3115 100644 --- a/lib/src/v3/models/user/verify_email_response.g.dart +++ b/lib/src/v3/models/user/verify_email_response.g.dart @@ -6,14 +6,6 @@ part of 'verify_email_response.dart'; // JsonSerializableGenerator // ************************************************************************** -_$VerifyEmailResponseImpl _$$VerifyEmailResponseImplFromJson( - Map json) => - _$VerifyEmailResponseImpl( - success: json['success'] as bool?, - ); +_$VerifyEmailResponseImpl _$$VerifyEmailResponseImplFromJson(Map json) => _$VerifyEmailResponseImpl(success: json['success'] as bool?); -Map _$$VerifyEmailResponseImplToJson( - _$VerifyEmailResponseImpl instance) => - { - 'success': instance.success, - }; +Map _$$VerifyEmailResponseImplToJson(_$VerifyEmailResponseImpl instance) => {'success': instance.success}; diff --git a/lib/src/v3/views/admin_purge_comment_view.dart b/lib/src/v3/views/admin_purge_comment_view.dart index 199a75fd..9d7569b0 100644 --- a/lib/src/v3/views/admin_purge_comment_view.dart +++ b/lib/src/v3/views/admin_purge_comment_view.dart @@ -16,6 +16,5 @@ class AdminPurgeCommentView with _$AdminPurgeCommentView { }) = _AdminPurgeCommentView; const AdminPurgeCommentView._(); - factory AdminPurgeCommentView.fromJson(Map json) => - _$AdminPurgeCommentViewFromJson(json); + factory AdminPurgeCommentView.fromJson(Map json) => _$AdminPurgeCommentViewFromJson(json); } diff --git a/lib/src/v3/views/admin_purge_comment_view.freezed.dart b/lib/src/v3/views/admin_purge_comment_view.freezed.dart index 17c06fff..b1971aec 100644 --- a/lib/src/v3/views/admin_purge_comment_view.freezed.dart +++ b/lib/src/v3/views/admin_purge_comment_view.freezed.dart @@ -12,17 +12,16 @@ part of 'admin_purge_comment_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -AdminPurgeCommentView _$AdminPurgeCommentViewFromJson( - Map json) { +AdminPurgeCommentView _$AdminPurgeCommentViewFromJson(Map json) { return _AdminPurgeCommentView.fromJson(json); } /// @nodoc mixin _$AdminPurgeCommentView { - AdminPurgeComment get adminPurgeComment => - throw _privateConstructorUsedError; // v0.18.0 + AdminPurgeComment get adminPurgeComment => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; @@ -32,15 +31,12 @@ mixin _$AdminPurgeCommentView { /// Create a copy of AdminPurgeCommentView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgeCommentViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgeCommentViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgeCommentViewCopyWith<$Res> { - factory $AdminPurgeCommentViewCopyWith(AdminPurgeCommentView value, - $Res Function(AdminPurgeCommentView) then) = - _$AdminPurgeCommentViewCopyWithImpl<$Res, AdminPurgeCommentView>; + factory $AdminPurgeCommentViewCopyWith(AdminPurgeCommentView value, $Res Function(AdminPurgeCommentView) then) = _$AdminPurgeCommentViewCopyWithImpl<$Res, AdminPurgeCommentView>; @useResult $Res call({AdminPurgeComment adminPurgeComment, Person? admin, Post post}); @@ -50,9 +46,7 @@ abstract class $AdminPurgeCommentViewCopyWith<$Res> { } /// @nodoc -class _$AdminPurgeCommentViewCopyWithImpl<$Res, - $Val extends AdminPurgeCommentView> - implements $AdminPurgeCommentViewCopyWith<$Res> { +class _$AdminPurgeCommentViewCopyWithImpl<$Res, $Val extends AdminPurgeCommentView> implements $AdminPurgeCommentViewCopyWith<$Res> { _$AdminPurgeCommentViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -64,25 +58,27 @@ class _$AdminPurgeCommentViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgeComment = null, - Object? admin = freezed, - Object? post = null, - }) { - return _then(_value.copyWith( - adminPurgeComment: null == adminPurgeComment - ? _value.adminPurgeComment - : adminPurgeComment // ignore: cast_nullable_to_non_nullable - as AdminPurgeComment, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - ) as $Val); + $Res call({Object? adminPurgeComment = null, Object? admin = freezed, Object? post = null}) { + return _then( + _value.copyWith( + adminPurgeComment: + null == adminPurgeComment + ? _value.adminPurgeComment + : adminPurgeComment // ignore: cast_nullable_to_non_nullable + as AdminPurgeComment, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + ) + as $Val, + ); } /// Create a copy of AdminPurgeCommentView @@ -121,12 +117,8 @@ class _$AdminPurgeCommentViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$AdminPurgeCommentViewImplCopyWith<$Res> - implements $AdminPurgeCommentViewCopyWith<$Res> { - factory _$$AdminPurgeCommentViewImplCopyWith( - _$AdminPurgeCommentViewImpl value, - $Res Function(_$AdminPurgeCommentViewImpl) then) = - __$$AdminPurgeCommentViewImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgeCommentViewImplCopyWith<$Res> implements $AdminPurgeCommentViewCopyWith<$Res> { + factory _$$AdminPurgeCommentViewImplCopyWith(_$AdminPurgeCommentViewImpl value, $Res Function(_$AdminPurgeCommentViewImpl) then) = __$$AdminPurgeCommentViewImplCopyWithImpl<$Res>; @override @useResult $Res call({AdminPurgeComment adminPurgeComment, Person? admin, Post post}); @@ -140,37 +132,33 @@ abstract class _$$AdminPurgeCommentViewImplCopyWith<$Res> } /// @nodoc -class __$$AdminPurgeCommentViewImplCopyWithImpl<$Res> - extends _$AdminPurgeCommentViewCopyWithImpl<$Res, - _$AdminPurgeCommentViewImpl> - implements _$$AdminPurgeCommentViewImplCopyWith<$Res> { - __$$AdminPurgeCommentViewImplCopyWithImpl(_$AdminPurgeCommentViewImpl _value, - $Res Function(_$AdminPurgeCommentViewImpl) _then) - : super(_value, _then); +class __$$AdminPurgeCommentViewImplCopyWithImpl<$Res> extends _$AdminPurgeCommentViewCopyWithImpl<$Res, _$AdminPurgeCommentViewImpl> implements _$$AdminPurgeCommentViewImplCopyWith<$Res> { + __$$AdminPurgeCommentViewImplCopyWithImpl(_$AdminPurgeCommentViewImpl _value, $Res Function(_$AdminPurgeCommentViewImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgeCommentView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgeComment = null, - Object? admin = freezed, - Object? post = null, - }) { - return _then(_$AdminPurgeCommentViewImpl( - adminPurgeComment: null == adminPurgeComment - ? _value.adminPurgeComment - : adminPurgeComment // ignore: cast_nullable_to_non_nullable - as AdminPurgeComment, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - )); + $Res call({Object? adminPurgeComment = null, Object? admin = freezed, Object? post = null}) { + return _then( + _$AdminPurgeCommentViewImpl( + adminPurgeComment: + null == adminPurgeComment + ? _value.adminPurgeComment + : adminPurgeComment // ignore: cast_nullable_to_non_nullable + as AdminPurgeComment, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + ), + ); } } @@ -178,19 +166,16 @@ class __$$AdminPurgeCommentViewImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgeCommentViewImpl extends _AdminPurgeCommentView { - const _$AdminPurgeCommentViewImpl( - {required this.adminPurgeComment, this.admin, required this.post}) - : super._(); + const _$AdminPurgeCommentViewImpl({required this.adminPurgeComment, this.admin, required this.post}) : super._(); - factory _$AdminPurgeCommentViewImpl.fromJson(Map json) => - _$$AdminPurgeCommentViewImplFromJson(json); + factory _$AdminPurgeCommentViewImpl.fromJson(Map json) => _$$AdminPurgeCommentViewImplFromJson(json); @override final AdminPurgeComment adminPurgeComment; -// v0.18.0 + // v0.18.0 @override final Person? admin; -// v0.18.0 + // v0.18.0 @override final Post post; @@ -204,8 +189,7 @@ class _$AdminPurgeCommentViewImpl extends _AdminPurgeCommentView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AdminPurgeCommentViewImpl && - (identical(other.adminPurgeComment, adminPurgeComment) || - other.adminPurgeComment == adminPurgeComment) && + (identical(other.adminPurgeComment, adminPurgeComment) || other.adminPurgeComment == adminPurgeComment) && (identical(other.admin, admin) || other.admin == admin) && (identical(other.post, post) || other.post == post)); } @@ -219,27 +203,19 @@ class _$AdminPurgeCommentViewImpl extends _AdminPurgeCommentView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgeCommentViewImplCopyWith<_$AdminPurgeCommentViewImpl> - get copyWith => __$$AdminPurgeCommentViewImplCopyWithImpl< - _$AdminPurgeCommentViewImpl>(this, _$identity); + _$$AdminPurgeCommentViewImplCopyWith<_$AdminPurgeCommentViewImpl> get copyWith => __$$AdminPurgeCommentViewImplCopyWithImpl<_$AdminPurgeCommentViewImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgeCommentViewImplToJson( - this, - ); + return _$$AdminPurgeCommentViewImplToJson(this); } } abstract class _AdminPurgeCommentView extends AdminPurgeCommentView { - const factory _AdminPurgeCommentView( - {required final AdminPurgeComment adminPurgeComment, - final Person? admin, - required final Post post}) = _$AdminPurgeCommentViewImpl; + const factory _AdminPurgeCommentView({required final AdminPurgeComment adminPurgeComment, final Person? admin, required final Post post}) = _$AdminPurgeCommentViewImpl; const _AdminPurgeCommentView._() : super._(); - factory _AdminPurgeCommentView.fromJson(Map json) = - _$AdminPurgeCommentViewImpl.fromJson; + factory _AdminPurgeCommentView.fromJson(Map json) = _$AdminPurgeCommentViewImpl.fromJson; @override AdminPurgeComment get adminPurgeComment; // v0.18.0 @@ -252,6 +228,5 @@ abstract class _AdminPurgeCommentView extends AdminPurgeCommentView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgeCommentViewImplCopyWith<_$AdminPurgeCommentViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$AdminPurgeCommentViewImplCopyWith<_$AdminPurgeCommentViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/admin_purge_comment_view.g.dart b/lib/src/v3/views/admin_purge_comment_view.g.dart index aa5f8550..e0eb7292 100644 --- a/lib/src/v3/views/admin_purge_comment_view.g.dart +++ b/lib/src/v3/views/admin_purge_comment_view.g.dart @@ -6,21 +6,14 @@ part of 'admin_purge_comment_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgeCommentViewImpl _$$AdminPurgeCommentViewImplFromJson( - Map json) => - _$AdminPurgeCommentViewImpl( - adminPurgeComment: AdminPurgeComment.fromJson( - json['admin_purge_comment'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - post: Post.fromJson(json['post'] as Map), - ); +_$AdminPurgeCommentViewImpl _$$AdminPurgeCommentViewImplFromJson(Map json) => _$AdminPurgeCommentViewImpl( + adminPurgeComment: AdminPurgeComment.fromJson(json['admin_purge_comment'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), + post: Post.fromJson(json['post'] as Map), +); -Map _$$AdminPurgeCommentViewImplToJson( - _$AdminPurgeCommentViewImpl instance) => - { - 'admin_purge_comment': instance.adminPurgeComment.toJson(), - 'admin': instance.admin?.toJson(), - 'post': instance.post.toJson(), - }; +Map _$$AdminPurgeCommentViewImplToJson(_$AdminPurgeCommentViewImpl instance) => { + 'admin_purge_comment': instance.adminPurgeComment.toJson(), + 'admin': instance.admin?.toJson(), + 'post': instance.post.toJson(), +}; diff --git a/lib/src/v3/views/admin_purge_community_view.dart b/lib/src/v3/views/admin_purge_community_view.dart index 19a8af54..7d34b729 100644 --- a/lib/src/v3/views/admin_purge_community_view.dart +++ b/lib/src/v3/views/admin_purge_community_view.dart @@ -15,6 +15,5 @@ class AdminPurgeCommunityView with _$AdminPurgeCommunityView { }) = _AdminPurgeCommunityView; const AdminPurgeCommunityView._(); - factory AdminPurgeCommunityView.fromJson(Map json) => - _$AdminPurgeCommunityViewFromJson(json); + factory AdminPurgeCommunityView.fromJson(Map json) => _$AdminPurgeCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/admin_purge_community_view.freezed.dart b/lib/src/v3/views/admin_purge_community_view.freezed.dart index c19dffa8..32f9b393 100644 --- a/lib/src/v3/views/admin_purge_community_view.freezed.dart +++ b/lib/src/v3/views/admin_purge_community_view.freezed.dart @@ -12,17 +12,16 @@ part of 'admin_purge_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -AdminPurgeCommunityView _$AdminPurgeCommunityViewFromJson( - Map json) { +AdminPurgeCommunityView _$AdminPurgeCommunityViewFromJson(Map json) { return _AdminPurgeCommunityView.fromJson(json); } /// @nodoc mixin _$AdminPurgeCommunityView { - AdminPurgeCommunity get adminPurgeCommunity => - throw _privateConstructorUsedError; // v0.18.0 + AdminPurgeCommunity get adminPurgeCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; /// Serializes this AdminPurgeCommunityView to a JSON map. @@ -31,15 +30,12 @@ mixin _$AdminPurgeCommunityView { /// Create a copy of AdminPurgeCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgeCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgeCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgeCommunityViewCopyWith<$Res> { - factory $AdminPurgeCommunityViewCopyWith(AdminPurgeCommunityView value, - $Res Function(AdminPurgeCommunityView) then) = - _$AdminPurgeCommunityViewCopyWithImpl<$Res, AdminPurgeCommunityView>; + factory $AdminPurgeCommunityViewCopyWith(AdminPurgeCommunityView value, $Res Function(AdminPurgeCommunityView) then) = _$AdminPurgeCommunityViewCopyWithImpl<$Res, AdminPurgeCommunityView>; @useResult $Res call({AdminPurgeCommunity adminPurgeCommunity, Person? admin}); @@ -48,9 +44,7 @@ abstract class $AdminPurgeCommunityViewCopyWith<$Res> { } /// @nodoc -class _$AdminPurgeCommunityViewCopyWithImpl<$Res, - $Val extends AdminPurgeCommunityView> - implements $AdminPurgeCommunityViewCopyWith<$Res> { +class _$AdminPurgeCommunityViewCopyWithImpl<$Res, $Val extends AdminPurgeCommunityView> implements $AdminPurgeCommunityViewCopyWith<$Res> { _$AdminPurgeCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,20 +56,22 @@ class _$AdminPurgeCommunityViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgeCommunity = null, - Object? admin = freezed, - }) { - return _then(_value.copyWith( - adminPurgeCommunity: null == adminPurgeCommunity - ? _value.adminPurgeCommunity - : adminPurgeCommunity // ignore: cast_nullable_to_non_nullable - as AdminPurgeCommunity, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + $Res call({Object? adminPurgeCommunity = null, Object? admin = freezed}) { + return _then( + _value.copyWith( + adminPurgeCommunity: + null == adminPurgeCommunity + ? _value.adminPurgeCommunity + : adminPurgeCommunity // ignore: cast_nullable_to_non_nullable + as AdminPurgeCommunity, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of AdminPurgeCommunityView @@ -83,8 +79,7 @@ class _$AdminPurgeCommunityViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $AdminPurgeCommunityCopyWith<$Res> get adminPurgeCommunity { - return $AdminPurgeCommunityCopyWith<$Res>(_value.adminPurgeCommunity, - (value) { + return $AdminPurgeCommunityCopyWith<$Res>(_value.adminPurgeCommunity, (value) { return _then(_value.copyWith(adminPurgeCommunity: value) as $Val); }); } @@ -105,12 +100,8 @@ class _$AdminPurgeCommunityViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$AdminPurgeCommunityViewImplCopyWith<$Res> - implements $AdminPurgeCommunityViewCopyWith<$Res> { - factory _$$AdminPurgeCommunityViewImplCopyWith( - _$AdminPurgeCommunityViewImpl value, - $Res Function(_$AdminPurgeCommunityViewImpl) then) = - __$$AdminPurgeCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgeCommunityViewImplCopyWith<$Res> implements $AdminPurgeCommunityViewCopyWith<$Res> { + factory _$$AdminPurgeCommunityViewImplCopyWith(_$AdminPurgeCommunityViewImpl value, $Res Function(_$AdminPurgeCommunityViewImpl) then) = __$$AdminPurgeCommunityViewImplCopyWithImpl<$Res>; @override @useResult $Res call({AdminPurgeCommunity adminPurgeCommunity, Person? admin}); @@ -122,33 +113,28 @@ abstract class _$$AdminPurgeCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$AdminPurgeCommunityViewImplCopyWithImpl<$Res> - extends _$AdminPurgeCommunityViewCopyWithImpl<$Res, - _$AdminPurgeCommunityViewImpl> - implements _$$AdminPurgeCommunityViewImplCopyWith<$Res> { - __$$AdminPurgeCommunityViewImplCopyWithImpl( - _$AdminPurgeCommunityViewImpl _value, - $Res Function(_$AdminPurgeCommunityViewImpl) _then) - : super(_value, _then); +class __$$AdminPurgeCommunityViewImplCopyWithImpl<$Res> extends _$AdminPurgeCommunityViewCopyWithImpl<$Res, _$AdminPurgeCommunityViewImpl> implements _$$AdminPurgeCommunityViewImplCopyWith<$Res> { + __$$AdminPurgeCommunityViewImplCopyWithImpl(_$AdminPurgeCommunityViewImpl _value, $Res Function(_$AdminPurgeCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgeCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgeCommunity = null, - Object? admin = freezed, - }) { - return _then(_$AdminPurgeCommunityViewImpl( - adminPurgeCommunity: null == adminPurgeCommunity - ? _value.adminPurgeCommunity - : adminPurgeCommunity // ignore: cast_nullable_to_non_nullable - as AdminPurgeCommunity, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - )); + $Res call({Object? adminPurgeCommunity = null, Object? admin = freezed}) { + return _then( + _$AdminPurgeCommunityViewImpl( + adminPurgeCommunity: + null == adminPurgeCommunity + ? _value.adminPurgeCommunity + : adminPurgeCommunity // ignore: cast_nullable_to_non_nullable + as AdminPurgeCommunity, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -156,16 +142,13 @@ class __$$AdminPurgeCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgeCommunityViewImpl extends _AdminPurgeCommunityView { - const _$AdminPurgeCommunityViewImpl( - {required this.adminPurgeCommunity, this.admin}) - : super._(); + const _$AdminPurgeCommunityViewImpl({required this.adminPurgeCommunity, this.admin}) : super._(); - factory _$AdminPurgeCommunityViewImpl.fromJson(Map json) => - _$$AdminPurgeCommunityViewImplFromJson(json); + factory _$AdminPurgeCommunityViewImpl.fromJson(Map json) => _$$AdminPurgeCommunityViewImplFromJson(json); @override final AdminPurgeCommunity adminPurgeCommunity; -// v0.18.0 + // v0.18.0 @override final Person? admin; @@ -179,8 +162,7 @@ class _$AdminPurgeCommunityViewImpl extends _AdminPurgeCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AdminPurgeCommunityViewImpl && - (identical(other.adminPurgeCommunity, adminPurgeCommunity) || - other.adminPurgeCommunity == adminPurgeCommunity) && + (identical(other.adminPurgeCommunity, adminPurgeCommunity) || other.adminPurgeCommunity == adminPurgeCommunity) && (identical(other.admin, admin) || other.admin == admin)); } @@ -193,26 +175,19 @@ class _$AdminPurgeCommunityViewImpl extends _AdminPurgeCommunityView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgeCommunityViewImplCopyWith<_$AdminPurgeCommunityViewImpl> - get copyWith => __$$AdminPurgeCommunityViewImplCopyWithImpl< - _$AdminPurgeCommunityViewImpl>(this, _$identity); + _$$AdminPurgeCommunityViewImplCopyWith<_$AdminPurgeCommunityViewImpl> get copyWith => __$$AdminPurgeCommunityViewImplCopyWithImpl<_$AdminPurgeCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgeCommunityViewImplToJson( - this, - ); + return _$$AdminPurgeCommunityViewImplToJson(this); } } abstract class _AdminPurgeCommunityView extends AdminPurgeCommunityView { - const factory _AdminPurgeCommunityView( - {required final AdminPurgeCommunity adminPurgeCommunity, - final Person? admin}) = _$AdminPurgeCommunityViewImpl; + const factory _AdminPurgeCommunityView({required final AdminPurgeCommunity adminPurgeCommunity, final Person? admin}) = _$AdminPurgeCommunityViewImpl; const _AdminPurgeCommunityView._() : super._(); - factory _AdminPurgeCommunityView.fromJson(Map json) = - _$AdminPurgeCommunityViewImpl.fromJson; + factory _AdminPurgeCommunityView.fromJson(Map json) = _$AdminPurgeCommunityViewImpl.fromJson; @override AdminPurgeCommunity get adminPurgeCommunity; // v0.18.0 @@ -223,6 +198,5 @@ abstract class _AdminPurgeCommunityView extends AdminPurgeCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgeCommunityViewImplCopyWith<_$AdminPurgeCommunityViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$AdminPurgeCommunityViewImplCopyWith<_$AdminPurgeCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/admin_purge_community_view.g.dart b/lib/src/v3/views/admin_purge_community_view.g.dart index 9ab595c1..dd094e8d 100644 --- a/lib/src/v3/views/admin_purge_community_view.g.dart +++ b/lib/src/v3/views/admin_purge_community_view.g.dart @@ -6,19 +6,12 @@ part of 'admin_purge_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgeCommunityViewImpl _$$AdminPurgeCommunityViewImplFromJson( - Map json) => - _$AdminPurgeCommunityViewImpl( - adminPurgeCommunity: AdminPurgeCommunity.fromJson( - json['admin_purge_community'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - ); +_$AdminPurgeCommunityViewImpl _$$AdminPurgeCommunityViewImplFromJson(Map json) => _$AdminPurgeCommunityViewImpl( + adminPurgeCommunity: AdminPurgeCommunity.fromJson(json['admin_purge_community'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), +); -Map _$$AdminPurgeCommunityViewImplToJson( - _$AdminPurgeCommunityViewImpl instance) => - { - 'admin_purge_community': instance.adminPurgeCommunity.toJson(), - 'admin': instance.admin?.toJson(), - }; +Map _$$AdminPurgeCommunityViewImplToJson(_$AdminPurgeCommunityViewImpl instance) => { + 'admin_purge_community': instance.adminPurgeCommunity.toJson(), + 'admin': instance.admin?.toJson(), +}; diff --git a/lib/src/v3/views/admin_purge_person_view.dart b/lib/src/v3/views/admin_purge_person_view.dart index e3d61842..69b95349 100644 --- a/lib/src/v3/views/admin_purge_person_view.dart +++ b/lib/src/v3/views/admin_purge_person_view.dart @@ -15,6 +15,5 @@ class AdminPurgePersonView with _$AdminPurgePersonView { }) = _AdminPurgePersonView; const AdminPurgePersonView._(); - factory AdminPurgePersonView.fromJson(Map json) => - _$AdminPurgePersonViewFromJson(json); + factory AdminPurgePersonView.fromJson(Map json) => _$AdminPurgePersonViewFromJson(json); } diff --git a/lib/src/v3/views/admin_purge_person_view.freezed.dart b/lib/src/v3/views/admin_purge_person_view.freezed.dart index 73f34c21..8d421ed7 100644 --- a/lib/src/v3/views/admin_purge_person_view.freezed.dart +++ b/lib/src/v3/views/admin_purge_person_view.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_person_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgePersonView _$AdminPurgePersonViewFromJson(Map json) { return _AdminPurgePersonView.fromJson(json); @@ -20,8 +21,7 @@ AdminPurgePersonView _$AdminPurgePersonViewFromJson(Map json) { /// @nodoc mixin _$AdminPurgePersonView { - AdminPurgePerson get adminPurgePerson => - throw _privateConstructorUsedError; // v0.18.0 + AdminPurgePerson get adminPurgePerson => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; /// Serializes this AdminPurgePersonView to a JSON map. @@ -30,15 +30,12 @@ mixin _$AdminPurgePersonView { /// Create a copy of AdminPurgePersonView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgePersonViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgePersonViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgePersonViewCopyWith<$Res> { - factory $AdminPurgePersonViewCopyWith(AdminPurgePersonView value, - $Res Function(AdminPurgePersonView) then) = - _$AdminPurgePersonViewCopyWithImpl<$Res, AdminPurgePersonView>; + factory $AdminPurgePersonViewCopyWith(AdminPurgePersonView value, $Res Function(AdminPurgePersonView) then) = _$AdminPurgePersonViewCopyWithImpl<$Res, AdminPurgePersonView>; @useResult $Res call({AdminPurgePerson adminPurgePerson, Person? admin}); @@ -47,9 +44,7 @@ abstract class $AdminPurgePersonViewCopyWith<$Res> { } /// @nodoc -class _$AdminPurgePersonViewCopyWithImpl<$Res, - $Val extends AdminPurgePersonView> - implements $AdminPurgePersonViewCopyWith<$Res> { +class _$AdminPurgePersonViewCopyWithImpl<$Res, $Val extends AdminPurgePersonView> implements $AdminPurgePersonViewCopyWith<$Res> { _$AdminPurgePersonViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,20 +56,22 @@ class _$AdminPurgePersonViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgePerson = null, - Object? admin = freezed, - }) { - return _then(_value.copyWith( - adminPurgePerson: null == adminPurgePerson - ? _value.adminPurgePerson - : adminPurgePerson // ignore: cast_nullable_to_non_nullable - as AdminPurgePerson, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + $Res call({Object? adminPurgePerson = null, Object? admin = freezed}) { + return _then( + _value.copyWith( + adminPurgePerson: + null == adminPurgePerson + ? _value.adminPurgePerson + : adminPurgePerson // ignore: cast_nullable_to_non_nullable + as AdminPurgePerson, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of AdminPurgePersonView @@ -103,11 +100,8 @@ class _$AdminPurgePersonViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$AdminPurgePersonViewImplCopyWith<$Res> - implements $AdminPurgePersonViewCopyWith<$Res> { - factory _$$AdminPurgePersonViewImplCopyWith(_$AdminPurgePersonViewImpl value, - $Res Function(_$AdminPurgePersonViewImpl) then) = - __$$AdminPurgePersonViewImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgePersonViewImplCopyWith<$Res> implements $AdminPurgePersonViewCopyWith<$Res> { + factory _$$AdminPurgePersonViewImplCopyWith(_$AdminPurgePersonViewImpl value, $Res Function(_$AdminPurgePersonViewImpl) then) = __$$AdminPurgePersonViewImplCopyWithImpl<$Res>; @override @useResult $Res call({AdminPurgePerson adminPurgePerson, Person? admin}); @@ -119,31 +113,28 @@ abstract class _$$AdminPurgePersonViewImplCopyWith<$Res> } /// @nodoc -class __$$AdminPurgePersonViewImplCopyWithImpl<$Res> - extends _$AdminPurgePersonViewCopyWithImpl<$Res, _$AdminPurgePersonViewImpl> - implements _$$AdminPurgePersonViewImplCopyWith<$Res> { - __$$AdminPurgePersonViewImplCopyWithImpl(_$AdminPurgePersonViewImpl _value, - $Res Function(_$AdminPurgePersonViewImpl) _then) - : super(_value, _then); +class __$$AdminPurgePersonViewImplCopyWithImpl<$Res> extends _$AdminPurgePersonViewCopyWithImpl<$Res, _$AdminPurgePersonViewImpl> implements _$$AdminPurgePersonViewImplCopyWith<$Res> { + __$$AdminPurgePersonViewImplCopyWithImpl(_$AdminPurgePersonViewImpl _value, $Res Function(_$AdminPurgePersonViewImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgePersonView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgePerson = null, - Object? admin = freezed, - }) { - return _then(_$AdminPurgePersonViewImpl( - adminPurgePerson: null == adminPurgePerson - ? _value.adminPurgePerson - : adminPurgePerson // ignore: cast_nullable_to_non_nullable - as AdminPurgePerson, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - )); + $Res call({Object? adminPurgePerson = null, Object? admin = freezed}) { + return _then( + _$AdminPurgePersonViewImpl( + adminPurgePerson: + null == adminPurgePerson + ? _value.adminPurgePerson + : adminPurgePerson // ignore: cast_nullable_to_non_nullable + as AdminPurgePerson, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -151,15 +142,13 @@ class __$$AdminPurgePersonViewImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgePersonViewImpl extends _AdminPurgePersonView { - const _$AdminPurgePersonViewImpl({required this.adminPurgePerson, this.admin}) - : super._(); + const _$AdminPurgePersonViewImpl({required this.adminPurgePerson, this.admin}) : super._(); - factory _$AdminPurgePersonViewImpl.fromJson(Map json) => - _$$AdminPurgePersonViewImplFromJson(json); + factory _$AdminPurgePersonViewImpl.fromJson(Map json) => _$$AdminPurgePersonViewImplFromJson(json); @override final AdminPurgePerson adminPurgePerson; -// v0.18.0 + // v0.18.0 @override final Person? admin; @@ -173,8 +162,7 @@ class _$AdminPurgePersonViewImpl extends _AdminPurgePersonView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AdminPurgePersonViewImpl && - (identical(other.adminPurgePerson, adminPurgePerson) || - other.adminPurgePerson == adminPurgePerson) && + (identical(other.adminPurgePerson, adminPurgePerson) || other.adminPurgePerson == adminPurgePerson) && (identical(other.admin, admin) || other.admin == admin)); } @@ -187,27 +175,19 @@ class _$AdminPurgePersonViewImpl extends _AdminPurgePersonView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgePersonViewImplCopyWith<_$AdminPurgePersonViewImpl> - get copyWith => - __$$AdminPurgePersonViewImplCopyWithImpl<_$AdminPurgePersonViewImpl>( - this, _$identity); + _$$AdminPurgePersonViewImplCopyWith<_$AdminPurgePersonViewImpl> get copyWith => __$$AdminPurgePersonViewImplCopyWithImpl<_$AdminPurgePersonViewImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgePersonViewImplToJson( - this, - ); + return _$$AdminPurgePersonViewImplToJson(this); } } abstract class _AdminPurgePersonView extends AdminPurgePersonView { - const factory _AdminPurgePersonView( - {required final AdminPurgePerson adminPurgePerson, - final Person? admin}) = _$AdminPurgePersonViewImpl; + const factory _AdminPurgePersonView({required final AdminPurgePerson adminPurgePerson, final Person? admin}) = _$AdminPurgePersonViewImpl; const _AdminPurgePersonView._() : super._(); - factory _AdminPurgePersonView.fromJson(Map json) = - _$AdminPurgePersonViewImpl.fromJson; + factory _AdminPurgePersonView.fromJson(Map json) = _$AdminPurgePersonViewImpl.fromJson; @override AdminPurgePerson get adminPurgePerson; // v0.18.0 @@ -218,6 +198,5 @@ abstract class _AdminPurgePersonView extends AdminPurgePersonView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgePersonViewImplCopyWith<_$AdminPurgePersonViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$AdminPurgePersonViewImplCopyWith<_$AdminPurgePersonViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/admin_purge_person_view.g.dart b/lib/src/v3/views/admin_purge_person_view.g.dart index b0f6e6ea..6ff46517 100644 --- a/lib/src/v3/views/admin_purge_person_view.g.dart +++ b/lib/src/v3/views/admin_purge_person_view.g.dart @@ -6,19 +6,12 @@ part of 'admin_purge_person_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgePersonViewImpl _$$AdminPurgePersonViewImplFromJson( - Map json) => - _$AdminPurgePersonViewImpl( - adminPurgePerson: AdminPurgePerson.fromJson( - json['admin_purge_person'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - ); +_$AdminPurgePersonViewImpl _$$AdminPurgePersonViewImplFromJson(Map json) => _$AdminPurgePersonViewImpl( + adminPurgePerson: AdminPurgePerson.fromJson(json['admin_purge_person'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), +); -Map _$$AdminPurgePersonViewImplToJson( - _$AdminPurgePersonViewImpl instance) => - { - 'admin_purge_person': instance.adminPurgePerson.toJson(), - 'admin': instance.admin?.toJson(), - }; +Map _$$AdminPurgePersonViewImplToJson(_$AdminPurgePersonViewImpl instance) => { + 'admin_purge_person': instance.adminPurgePerson.toJson(), + 'admin': instance.admin?.toJson(), +}; diff --git a/lib/src/v3/views/admin_purge_post_view.dart b/lib/src/v3/views/admin_purge_post_view.dart index cb575a5e..e0ce973a 100644 --- a/lib/src/v3/views/admin_purge_post_view.dart +++ b/lib/src/v3/views/admin_purge_post_view.dart @@ -16,6 +16,5 @@ class AdminPurgePostView with _$AdminPurgePostView { }) = _AdminPurgePostView; const AdminPurgePostView._(); - factory AdminPurgePostView.fromJson(Map json) => - _$AdminPurgePostViewFromJson(json); + factory AdminPurgePostView.fromJson(Map json) => _$AdminPurgePostViewFromJson(json); } diff --git a/lib/src/v3/views/admin_purge_post_view.freezed.dart b/lib/src/v3/views/admin_purge_post_view.freezed.dart index c60d0189..b751685f 100644 --- a/lib/src/v3/views/admin_purge_post_view.freezed.dart +++ b/lib/src/v3/views/admin_purge_post_view.freezed.dart @@ -12,7 +12,8 @@ part of 'admin_purge_post_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); AdminPurgePostView _$AdminPurgePostViewFromJson(Map json) { return _AdminPurgePostView.fromJson(json); @@ -20,8 +21,7 @@ AdminPurgePostView _$AdminPurgePostViewFromJson(Map json) { /// @nodoc mixin _$AdminPurgePostView { - AdminPurgePost get adminPurgePost => - throw _privateConstructorUsedError; // v0.18.0 + AdminPurgePost get adminPurgePost => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; @@ -31,18 +31,14 @@ mixin _$AdminPurgePostView { /// Create a copy of AdminPurgePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $AdminPurgePostViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $AdminPurgePostViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $AdminPurgePostViewCopyWith<$Res> { - factory $AdminPurgePostViewCopyWith( - AdminPurgePostView value, $Res Function(AdminPurgePostView) then) = - _$AdminPurgePostViewCopyWithImpl<$Res, AdminPurgePostView>; + factory $AdminPurgePostViewCopyWith(AdminPurgePostView value, $Res Function(AdminPurgePostView) then) = _$AdminPurgePostViewCopyWithImpl<$Res, AdminPurgePostView>; @useResult - $Res call( - {AdminPurgePost adminPurgePost, Person? admin, Community community}); + $Res call({AdminPurgePost adminPurgePost, Person? admin, Community community}); $AdminPurgePostCopyWith<$Res> get adminPurgePost; $PersonCopyWith<$Res>? get admin; @@ -50,8 +46,7 @@ abstract class $AdminPurgePostViewCopyWith<$Res> { } /// @nodoc -class _$AdminPurgePostViewCopyWithImpl<$Res, $Val extends AdminPurgePostView> - implements $AdminPurgePostViewCopyWith<$Res> { +class _$AdminPurgePostViewCopyWithImpl<$Res, $Val extends AdminPurgePostView> implements $AdminPurgePostViewCopyWith<$Res> { _$AdminPurgePostViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -63,25 +58,27 @@ class _$AdminPurgePostViewCopyWithImpl<$Res, $Val extends AdminPurgePostView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgePost = null, - Object? admin = freezed, - Object? community = null, - }) { - return _then(_value.copyWith( - adminPurgePost: null == adminPurgePost - ? _value.adminPurgePost - : adminPurgePost // ignore: cast_nullable_to_non_nullable - as AdminPurgePost, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? adminPurgePost = null, Object? admin = freezed, Object? community = null}) { + return _then( + _value.copyWith( + adminPurgePost: + null == adminPurgePost + ? _value.adminPurgePost + : adminPurgePost // ignore: cast_nullable_to_non_nullable + as AdminPurgePost, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of AdminPurgePostView @@ -120,15 +117,11 @@ class _$AdminPurgePostViewCopyWithImpl<$Res, $Val extends AdminPurgePostView> } /// @nodoc -abstract class _$$AdminPurgePostViewImplCopyWith<$Res> - implements $AdminPurgePostViewCopyWith<$Res> { - factory _$$AdminPurgePostViewImplCopyWith(_$AdminPurgePostViewImpl value, - $Res Function(_$AdminPurgePostViewImpl) then) = - __$$AdminPurgePostViewImplCopyWithImpl<$Res>; +abstract class _$$AdminPurgePostViewImplCopyWith<$Res> implements $AdminPurgePostViewCopyWith<$Res> { + factory _$$AdminPurgePostViewImplCopyWith(_$AdminPurgePostViewImpl value, $Res Function(_$AdminPurgePostViewImpl) then) = __$$AdminPurgePostViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {AdminPurgePost adminPurgePost, Person? admin, Community community}); + $Res call({AdminPurgePost adminPurgePost, Person? admin, Community community}); @override $AdminPurgePostCopyWith<$Res> get adminPurgePost; @@ -139,36 +132,33 @@ abstract class _$$AdminPurgePostViewImplCopyWith<$Res> } /// @nodoc -class __$$AdminPurgePostViewImplCopyWithImpl<$Res> - extends _$AdminPurgePostViewCopyWithImpl<$Res, _$AdminPurgePostViewImpl> - implements _$$AdminPurgePostViewImplCopyWith<$Res> { - __$$AdminPurgePostViewImplCopyWithImpl(_$AdminPurgePostViewImpl _value, - $Res Function(_$AdminPurgePostViewImpl) _then) - : super(_value, _then); +class __$$AdminPurgePostViewImplCopyWithImpl<$Res> extends _$AdminPurgePostViewCopyWithImpl<$Res, _$AdminPurgePostViewImpl> implements _$$AdminPurgePostViewImplCopyWith<$Res> { + __$$AdminPurgePostViewImplCopyWithImpl(_$AdminPurgePostViewImpl _value, $Res Function(_$AdminPurgePostViewImpl) _then) : super(_value, _then); /// Create a copy of AdminPurgePostView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? adminPurgePost = null, - Object? admin = freezed, - Object? community = null, - }) { - return _then(_$AdminPurgePostViewImpl( - adminPurgePost: null == adminPurgePost - ? _value.adminPurgePost - : adminPurgePost // ignore: cast_nullable_to_non_nullable - as AdminPurgePost, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? adminPurgePost = null, Object? admin = freezed, Object? community = null}) { + return _then( + _$AdminPurgePostViewImpl( + adminPurgePost: + null == adminPurgePost + ? _value.adminPurgePost + : adminPurgePost // ignore: cast_nullable_to_non_nullable + as AdminPurgePost, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -176,19 +166,16 @@ class __$$AdminPurgePostViewImplCopyWithImpl<$Res> @modelSerde class _$AdminPurgePostViewImpl extends _AdminPurgePostView { - const _$AdminPurgePostViewImpl( - {required this.adminPurgePost, this.admin, required this.community}) - : super._(); + const _$AdminPurgePostViewImpl({required this.adminPurgePost, this.admin, required this.community}) : super._(); - factory _$AdminPurgePostViewImpl.fromJson(Map json) => - _$$AdminPurgePostViewImplFromJson(json); + factory _$AdminPurgePostViewImpl.fromJson(Map json) => _$$AdminPurgePostViewImplFromJson(json); @override final AdminPurgePost adminPurgePost; -// v0.18.0 + // v0.18.0 @override final Person? admin; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -202,44 +189,33 @@ class _$AdminPurgePostViewImpl extends _AdminPurgePostView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$AdminPurgePostViewImpl && - (identical(other.adminPurgePost, adminPurgePost) || - other.adminPurgePost == adminPurgePost) && + (identical(other.adminPurgePost, adminPurgePost) || other.adminPurgePost == adminPurgePost) && (identical(other.admin, admin) || other.admin == admin) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, adminPurgePost, admin, community); + int get hashCode => Object.hash(runtimeType, adminPurgePost, admin, community); /// Create a copy of AdminPurgePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$AdminPurgePostViewImplCopyWith<_$AdminPurgePostViewImpl> get copyWith => - __$$AdminPurgePostViewImplCopyWithImpl<_$AdminPurgePostViewImpl>( - this, _$identity); + _$$AdminPurgePostViewImplCopyWith<_$AdminPurgePostViewImpl> get copyWith => __$$AdminPurgePostViewImplCopyWithImpl<_$AdminPurgePostViewImpl>(this, _$identity); @override Map toJson() { - return _$$AdminPurgePostViewImplToJson( - this, - ); + return _$$AdminPurgePostViewImplToJson(this); } } abstract class _AdminPurgePostView extends AdminPurgePostView { - const factory _AdminPurgePostView( - {required final AdminPurgePost adminPurgePost, - final Person? admin, - required final Community community}) = _$AdminPurgePostViewImpl; + const factory _AdminPurgePostView({required final AdminPurgePost adminPurgePost, final Person? admin, required final Community community}) = _$AdminPurgePostViewImpl; const _AdminPurgePostView._() : super._(); - factory _AdminPurgePostView.fromJson(Map json) = - _$AdminPurgePostViewImpl.fromJson; + factory _AdminPurgePostView.fromJson(Map json) = _$AdminPurgePostViewImpl.fromJson; @override AdminPurgePost get adminPurgePost; // v0.18.0 @@ -252,6 +228,5 @@ abstract class _AdminPurgePostView extends AdminPurgePostView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$AdminPurgePostViewImplCopyWith<_$AdminPurgePostViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$AdminPurgePostViewImplCopyWith<_$AdminPurgePostViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/admin_purge_post_view.g.dart b/lib/src/v3/views/admin_purge_post_view.g.dart index 9560bf80..ee341916 100644 --- a/lib/src/v3/views/admin_purge_post_view.g.dart +++ b/lib/src/v3/views/admin_purge_post_view.g.dart @@ -6,21 +6,14 @@ part of 'admin_purge_post_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$AdminPurgePostViewImpl _$$AdminPurgePostViewImplFromJson( - Map json) => - _$AdminPurgePostViewImpl( - adminPurgePost: AdminPurgePost.fromJson( - json['admin_purge_post'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$AdminPurgePostViewImpl _$$AdminPurgePostViewImplFromJson(Map json) => _$AdminPurgePostViewImpl( + adminPurgePost: AdminPurgePost.fromJson(json['admin_purge_post'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$AdminPurgePostViewImplToJson( - _$AdminPurgePostViewImpl instance) => - { - 'admin_purge_post': instance.adminPurgePost.toJson(), - 'admin': instance.admin?.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$AdminPurgePostViewImplToJson(_$AdminPurgePostViewImpl instance) => { + 'admin_purge_post': instance.adminPurgePost.toJson(), + 'admin': instance.admin?.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/comment_reply_view.dart b/lib/src/v3/views/comment_reply_view.dart index a2a82e88..667e8a00 100644 --- a/lib/src/v3/views/comment_reply_view.dart +++ b/lib/src/v3/views/comment_reply_view.dart @@ -29,6 +29,5 @@ class CommentReplyView with _$CommentReplyView { }) = _CommentReplyView; const CommentReplyView._(); - factory CommentReplyView.fromJson(Map json) => - _$CommentReplyViewFromJson(json); + factory CommentReplyView.fromJson(Map json) => _$CommentReplyViewFromJson(json); } diff --git a/lib/src/v3/views/comment_reply_view.freezed.dart b/lib/src/v3/views/comment_reply_view.freezed.dart index 4ced0e2e..af3349f8 100644 --- a/lib/src/v3/views/comment_reply_view.freezed.dart +++ b/lib/src/v3/views/comment_reply_view.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_reply_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentReplyView _$CommentReplyViewFromJson(Map json) { return _CommentReplyView.fromJson(json); @@ -20,24 +21,18 @@ CommentReplyView _$CommentReplyViewFromJson(Map json) { /// @nodoc mixin _$CommentReplyView { - CommentReply get commentReply => - throw _privateConstructorUsedError; // v0.18.0 + CommentReply get commentReply => throw _privateConstructorUsedError; // v0.18.0 Comment get comment => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get recipient => throw _privateConstructorUsedError; // v0.18.0 CommentAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get bannedFromCommunity => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.0 (required) - SubscribedType get subscribed => - throw _privateConstructorUsedError; // v0.18.0 + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get bannedFromCommunity => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.0 (required) + SubscribedType get subscribed => throw _privateConstructorUsedError; // v0.18.0 bool get saved => throw _privateConstructorUsedError; // v0.18.0 bool get creatorBlocked => throw _privateConstructorUsedError; // v0.18.0 num? get myVote => throw _privateConstructorUsedError; @@ -48,32 +43,30 @@ mixin _$CommentReplyView { /// Create a copy of CommentReplyView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReplyViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReplyViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReplyViewCopyWith<$Res> { - factory $CommentReplyViewCopyWith( - CommentReplyView value, $Res Function(CommentReplyView) then) = - _$CommentReplyViewCopyWithImpl<$Res, CommentReplyView>; + factory $CommentReplyViewCopyWith(CommentReplyView value, $Res Function(CommentReplyView) then) = _$CommentReplyViewCopyWithImpl<$Res, CommentReplyView>; @useResult - $Res call( - {CommentReply commentReply, - Comment comment, - Person creator, - Post post, - Community community, - Person recipient, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - num? myVote}); + $Res call({ + CommentReply commentReply, + Comment comment, + Person creator, + Post post, + Community community, + Person recipient, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + num? myVote, + }); $CommentReplyCopyWith<$Res> get commentReply; $CommentCopyWith<$Res> get comment; @@ -85,8 +78,7 @@ abstract class $CommentReplyViewCopyWith<$Res> { } /// @nodoc -class _$CommentReplyViewCopyWithImpl<$Res, $Val extends CommentReplyView> - implements $CommentReplyViewCopyWith<$Res> { +class _$CommentReplyViewCopyWithImpl<$Res, $Val extends CommentReplyView> implements $CommentReplyViewCopyWith<$Res> { _$CommentReplyViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -115,68 +107,86 @@ class _$CommentReplyViewCopyWithImpl<$Res, $Val extends CommentReplyView> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_value.copyWith( - commentReply: null == commentReply - ? _value.commentReply - : commentReply // ignore: cast_nullable_to_non_nullable - as CommentReply, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - ) as $Val); + return _then( + _value.copyWith( + commentReply: + null == commentReply + ? _value.commentReply + : commentReply // ignore: cast_nullable_to_non_nullable + as CommentReply, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + ) + as $Val, + ); } /// Create a copy of CommentReplyView @@ -251,29 +261,27 @@ class _$CommentReplyViewCopyWithImpl<$Res, $Val extends CommentReplyView> } /// @nodoc -abstract class _$$CommentReplyViewImplCopyWith<$Res> - implements $CommentReplyViewCopyWith<$Res> { - factory _$$CommentReplyViewImplCopyWith(_$CommentReplyViewImpl value, - $Res Function(_$CommentReplyViewImpl) then) = - __$$CommentReplyViewImplCopyWithImpl<$Res>; +abstract class _$$CommentReplyViewImplCopyWith<$Res> implements $CommentReplyViewCopyWith<$Res> { + factory _$$CommentReplyViewImplCopyWith(_$CommentReplyViewImpl value, $Res Function(_$CommentReplyViewImpl) then) = __$$CommentReplyViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentReply commentReply, - Comment comment, - Person creator, - Post post, - Community community, - Person recipient, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - num? myVote}); + $Res call({ + CommentReply commentReply, + Comment comment, + Person creator, + Post post, + Community community, + Person recipient, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + num? myVote, + }); @override $CommentReplyCopyWith<$Res> get commentReply; @@ -292,12 +300,8 @@ abstract class _$$CommentReplyViewImplCopyWith<$Res> } /// @nodoc -class __$$CommentReplyViewImplCopyWithImpl<$Res> - extends _$CommentReplyViewCopyWithImpl<$Res, _$CommentReplyViewImpl> - implements _$$CommentReplyViewImplCopyWith<$Res> { - __$$CommentReplyViewImplCopyWithImpl(_$CommentReplyViewImpl _value, - $Res Function(_$CommentReplyViewImpl) _then) - : super(_value, _then); +class __$$CommentReplyViewImplCopyWithImpl<$Res> extends _$CommentReplyViewCopyWithImpl<$Res, _$CommentReplyViewImpl> implements _$$CommentReplyViewImplCopyWith<$Res> { + __$$CommentReplyViewImplCopyWithImpl(_$CommentReplyViewImpl _value, $Res Function(_$CommentReplyViewImpl) _then) : super(_value, _then); /// Create a copy of CommentReplyView /// with the given fields replaced by the non-null parameter values. @@ -320,68 +324,85 @@ class __$$CommentReplyViewImplCopyWithImpl<$Res> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_$CommentReplyViewImpl( - commentReply: null == commentReply - ? _value.commentReply - : commentReply // ignore: cast_nullable_to_non_nullable - as CommentReply, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - )); + return _then( + _$CommentReplyViewImpl( + commentReply: + null == commentReply + ? _value.commentReply + : commentReply // ignore: cast_nullable_to_non_nullable + as CommentReply, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + ), + ); } } @@ -389,69 +410,68 @@ class __$$CommentReplyViewImplCopyWithImpl<$Res> @modelSerde class _$CommentReplyViewImpl extends _CommentReplyView { - const _$CommentReplyViewImpl( - {required this.commentReply, - required this.comment, - required this.creator, - required this.post, - required this.community, - required this.recipient, - required this.counts, - required this.creatorBannedFromCommunity, - this.bannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - required this.subscribed, - required this.saved, - required this.creatorBlocked, - this.myVote}) - : super._(); - - factory _$CommentReplyViewImpl.fromJson(Map json) => - _$$CommentReplyViewImplFromJson(json); + const _$CommentReplyViewImpl({ + required this.commentReply, + required this.comment, + required this.creator, + required this.post, + required this.community, + required this.recipient, + required this.counts, + required this.creatorBannedFromCommunity, + this.bannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + required this.subscribed, + required this.saved, + required this.creatorBlocked, + this.myVote, + }) : super._(); + + factory _$CommentReplyViewImpl.fromJson(Map json) => _$$CommentReplyViewImplFromJson(json); @override final CommentReply commentReply; -// v0.18.0 + // v0.18.0 @override final Comment comment; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person recipient; -// v0.18.0 + // v0.18.0 @override final CommentAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? bannedFromCommunity; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsModerator; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? creatorIsAdmin; -// v0.19.0 (required) + // v0.19.0 (required) @override final SubscribedType subscribed; -// v0.18.0 + // v0.18.0 @override final bool saved; -// v0.18.0 + // v0.18.0 @override final bool creatorBlocked; -// v0.18.0 + // v0.18.0 @override final num? myVote; @@ -465,92 +485,78 @@ class _$CommentReplyViewImpl extends _CommentReplyView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentReplyViewImpl && - (identical(other.commentReply, commentReply) || - other.commentReply == commentReply) && + (identical(other.commentReply, commentReply) || other.commentReply == commentReply) && (identical(other.comment, comment) || other.comment == comment) && (identical(other.creator, creator) || other.creator == creator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && - (identical(other.recipient, recipient) || - other.recipient == recipient) && + (identical(other.community, community) || other.community == community) && + (identical(other.recipient, recipient) || other.recipient == recipient) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.bannedFromCommunity, bannedFromCommunity) || - other.bannedFromCommunity == bannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.bannedFromCommunity, bannedFromCommunity) || other.bannedFromCommunity == bannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && (identical(other.myVote, myVote) || other.myVote == myVote)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - commentReply, - comment, - creator, - post, - community, - recipient, - counts, - creatorBannedFromCommunity, - bannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - subscribed, - saved, - creatorBlocked, - myVote); + runtimeType, + commentReply, + comment, + creator, + post, + community, + recipient, + counts, + creatorBannedFromCommunity, + bannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + subscribed, + saved, + creatorBlocked, + myVote, + ); /// Create a copy of CommentReplyView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReplyViewImplCopyWith<_$CommentReplyViewImpl> get copyWith => - __$$CommentReplyViewImplCopyWithImpl<_$CommentReplyViewImpl>( - this, _$identity); + _$$CommentReplyViewImplCopyWith<_$CommentReplyViewImpl> get copyWith => __$$CommentReplyViewImplCopyWithImpl<_$CommentReplyViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReplyViewImplToJson( - this, - ); + return _$$CommentReplyViewImplToJson(this); } } abstract class _CommentReplyView extends CommentReplyView { - const factory _CommentReplyView( - {required final CommentReply commentReply, - required final Comment comment, - required final Person creator, - required final Post post, - required final Community community, - required final Person recipient, - required final CommentAggregates counts, - required final bool creatorBannedFromCommunity, - final bool? bannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - required final SubscribedType subscribed, - required final bool saved, - required final bool creatorBlocked, - final num? myVote}) = _$CommentReplyViewImpl; + const factory _CommentReplyView({ + required final CommentReply commentReply, + required final Comment comment, + required final Person creator, + required final Post post, + required final Community community, + required final Person recipient, + required final CommentAggregates counts, + required final bool creatorBannedFromCommunity, + final bool? bannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + required final SubscribedType subscribed, + required final bool saved, + required final bool creatorBlocked, + final num? myVote, + }) = _$CommentReplyViewImpl; const _CommentReplyView._() : super._(); - factory _CommentReplyView.fromJson(Map json) = - _$CommentReplyViewImpl.fromJson; + factory _CommentReplyView.fromJson(Map json) = _$CommentReplyViewImpl.fromJson; @override CommentReply get commentReply; // v0.18.0 @@ -587,6 +593,5 @@ abstract class _CommentReplyView extends CommentReplyView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReplyViewImplCopyWith<_$CommentReplyViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentReplyViewImplCopyWith<_$CommentReplyViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/comment_reply_view.g.dart b/lib/src/v3/views/comment_reply_view.g.dart index 9bb02967..01e3c6d5 100644 --- a/lib/src/v3/views/comment_reply_view.g.dart +++ b/lib/src/v3/views/comment_reply_view.g.dart @@ -6,44 +6,38 @@ part of 'comment_reply_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReplyViewImpl _$$CommentReplyViewImplFromJson( - Map json) => - _$CommentReplyViewImpl( - commentReply: - CommentReply.fromJson(json['comment_reply'] as Map), - comment: Comment.fromJson(json['comment'] as Map), - creator: Person.fromJson(json['creator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - recipient: Person.fromJson(json['recipient'] as Map), - counts: - CommentAggregates.fromJson(json['counts'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - bannedFromCommunity: json['banned_from_community'] as bool?, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - subscribed: SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool, - creatorBlocked: json['creator_blocked'] as bool, - myVote: json['my_vote'] as num?, - ); +_$CommentReplyViewImpl _$$CommentReplyViewImplFromJson(Map json) => _$CommentReplyViewImpl( + commentReply: CommentReply.fromJson(json['comment_reply'] as Map), + comment: Comment.fromJson(json['comment'] as Map), + creator: Person.fromJson(json['creator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), + recipient: Person.fromJson(json['recipient'] as Map), + counts: CommentAggregates.fromJson(json['counts'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + bannedFromCommunity: json['banned_from_community'] as bool?, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + subscribed: SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool, + creatorBlocked: json['creator_blocked'] as bool, + myVote: json['my_vote'] as num?, +); -Map _$$CommentReplyViewImplToJson( - _$CommentReplyViewImpl instance) => - { - 'comment_reply': instance.commentReply.toJson(), - 'comment': instance.comment.toJson(), - 'creator': instance.creator.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - 'recipient': instance.recipient.toJson(), - 'counts': instance.counts.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'banned_from_community': instance.bannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'subscribed': instance.subscribed.toJson(), - 'saved': instance.saved, - 'creator_blocked': instance.creatorBlocked, - 'my_vote': instance.myVote, - }; +Map _$$CommentReplyViewImplToJson(_$CommentReplyViewImpl instance) => { + 'comment_reply': instance.commentReply.toJson(), + 'comment': instance.comment.toJson(), + 'creator': instance.creator.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), + 'recipient': instance.recipient.toJson(), + 'counts': instance.counts.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'banned_from_community': instance.bannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'subscribed': instance.subscribed.toJson(), + 'saved': instance.saved, + 'creator_blocked': instance.creatorBlocked, + 'my_vote': instance.myVote, +}; diff --git a/lib/src/v3/views/comment_report_view.dart b/lib/src/v3/views/comment_report_view.dart index b88a42ec..17305b56 100644 --- a/lib/src/v3/views/comment_report_view.dart +++ b/lib/src/v3/views/comment_report_view.dart @@ -28,6 +28,5 @@ class CommentReportView with _$CommentReportView { }) = _CommentReportView; const CommentReportView._(); - factory CommentReportView.fromJson(Map json) => - _$CommentReportViewFromJson(json); + factory CommentReportView.fromJson(Map json) => _$CommentReportViewFromJson(json); } diff --git a/lib/src/v3/views/comment_report_view.freezed.dart b/lib/src/v3/views/comment_report_view.freezed.dart index f05cc994..8a8210b5 100644 --- a/lib/src/v3/views/comment_report_view.freezed.dart +++ b/lib/src/v3/views/comment_report_view.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_report_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentReportView _$CommentReportViewFromJson(Map json) { return _CommentReportView.fromJson(json); @@ -20,24 +21,18 @@ CommentReportView _$CommentReportViewFromJson(Map json) { /// @nodoc mixin _$CommentReportView { - CommentReport get commentReport => - throw _privateConstructorUsedError; // v0.18.0 + CommentReport get commentReport => throw _privateConstructorUsedError; // v0.18.0 Comment get comment => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Person get commentCreator => throw _privateConstructorUsedError; // v0.18.0 CommentAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorBlocked => - throw _privateConstructorUsedError; // v0.19.4 (required) - SubscribedType? get subscribed => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorBlocked => throw _privateConstructorUsedError; // v0.19.4 (required) + SubscribedType? get subscribed => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get saved => throw _privateConstructorUsedError; // v0.19.4 (required) num? get myVote => throw _privateConstructorUsedError; // v0.18.0 Person? get resolver => throw _privateConstructorUsedError; @@ -48,32 +43,30 @@ mixin _$CommentReportView { /// Create a copy of CommentReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentReportViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentReportViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentReportViewCopyWith<$Res> { - factory $CommentReportViewCopyWith( - CommentReportView value, $Res Function(CommentReportView) then) = - _$CommentReportViewCopyWithImpl<$Res, CommentReportView>; + factory $CommentReportViewCopyWith(CommentReportView value, $Res Function(CommentReportView) then) = _$CommentReportViewCopyWithImpl<$Res, CommentReportView>; @useResult - $Res call( - {CommentReport commentReport, - Comment comment, - Post post, - Community community, - Person creator, - Person commentCreator, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - bool? creatorBlocked, - SubscribedType? subscribed, - bool? saved, - num? myVote, - Person? resolver}); + $Res call({ + CommentReport commentReport, + Comment comment, + Post post, + Community community, + Person creator, + Person commentCreator, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + bool? creatorBlocked, + SubscribedType? subscribed, + bool? saved, + num? myVote, + Person? resolver, + }); $CommentReportCopyWith<$Res> get commentReport; $CommentCopyWith<$Res> get comment; @@ -86,8 +79,7 @@ abstract class $CommentReportViewCopyWith<$Res> { } /// @nodoc -class _$CommentReportViewCopyWithImpl<$Res, $Val extends CommentReportView> - implements $CommentReportViewCopyWith<$Res> { +class _$CommentReportViewCopyWithImpl<$Res, $Val extends CommentReportView> implements $CommentReportViewCopyWith<$Res> { _$CommentReportViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -116,68 +108,86 @@ class _$CommentReportViewCopyWithImpl<$Res, $Val extends CommentReportView> Object? myVote = freezed, Object? resolver = freezed, }) { - return _then(_value.copyWith( - commentReport: null == commentReport - ? _value.commentReport - : commentReport // ignore: cast_nullable_to_non_nullable - as CommentReport, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - commentCreator: null == commentCreator - ? _value.commentCreator - : commentCreator // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: freezed == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: freezed == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType?, - saved: freezed == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool?, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + return _then( + _value.copyWith( + commentReport: + null == commentReport + ? _value.commentReport + : commentReport // ignore: cast_nullable_to_non_nullable + as CommentReport, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + commentCreator: + null == commentCreator + ? _value.commentCreator + : commentCreator // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + freezed == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + freezed == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType?, + saved: + freezed == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool?, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of CommentReportView @@ -266,29 +276,27 @@ class _$CommentReportViewCopyWithImpl<$Res, $Val extends CommentReportView> } /// @nodoc -abstract class _$$CommentReportViewImplCopyWith<$Res> - implements $CommentReportViewCopyWith<$Res> { - factory _$$CommentReportViewImplCopyWith(_$CommentReportViewImpl value, - $Res Function(_$CommentReportViewImpl) then) = - __$$CommentReportViewImplCopyWithImpl<$Res>; +abstract class _$$CommentReportViewImplCopyWith<$Res> implements $CommentReportViewCopyWith<$Res> { + factory _$$CommentReportViewImplCopyWith(_$CommentReportViewImpl value, $Res Function(_$CommentReportViewImpl) then) = __$$CommentReportViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {CommentReport commentReport, - Comment comment, - Post post, - Community community, - Person creator, - Person commentCreator, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - bool? creatorBlocked, - SubscribedType? subscribed, - bool? saved, - num? myVote, - Person? resolver}); + $Res call({ + CommentReport commentReport, + Comment comment, + Post post, + Community community, + Person creator, + Person commentCreator, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + bool? creatorBlocked, + SubscribedType? subscribed, + bool? saved, + num? myVote, + Person? resolver, + }); @override $CommentReportCopyWith<$Res> get commentReport; @@ -309,12 +317,8 @@ abstract class _$$CommentReportViewImplCopyWith<$Res> } /// @nodoc -class __$$CommentReportViewImplCopyWithImpl<$Res> - extends _$CommentReportViewCopyWithImpl<$Res, _$CommentReportViewImpl> - implements _$$CommentReportViewImplCopyWith<$Res> { - __$$CommentReportViewImplCopyWithImpl(_$CommentReportViewImpl _value, - $Res Function(_$CommentReportViewImpl) _then) - : super(_value, _then); +class __$$CommentReportViewImplCopyWithImpl<$Res> extends _$CommentReportViewCopyWithImpl<$Res, _$CommentReportViewImpl> implements _$$CommentReportViewImplCopyWith<$Res> { + __$$CommentReportViewImplCopyWithImpl(_$CommentReportViewImpl _value, $Res Function(_$CommentReportViewImpl) _then) : super(_value, _then); /// Create a copy of CommentReportView /// with the given fields replaced by the non-null parameter values. @@ -337,68 +341,85 @@ class __$$CommentReportViewImplCopyWithImpl<$Res> Object? myVote = freezed, Object? resolver = freezed, }) { - return _then(_$CommentReportViewImpl( - commentReport: null == commentReport - ? _value.commentReport - : commentReport // ignore: cast_nullable_to_non_nullable - as CommentReport, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - commentCreator: null == commentCreator - ? _value.commentCreator - : commentCreator // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: freezed == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: freezed == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType?, - saved: freezed == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool?, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - )); + return _then( + _$CommentReportViewImpl( + commentReport: + null == commentReport + ? _value.commentReport + : commentReport // ignore: cast_nullable_to_non_nullable + as CommentReport, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + commentCreator: + null == commentCreator + ? _value.commentCreator + : commentCreator // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + freezed == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + freezed == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType?, + saved: + freezed == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool?, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -406,69 +427,68 @@ class __$$CommentReportViewImplCopyWithImpl<$Res> @modelSerde class _$CommentReportViewImpl extends _CommentReportView { - const _$CommentReportViewImpl( - {required this.commentReport, - required this.comment, - required this.post, - required this.community, - required this.creator, - required this.commentCreator, - required this.counts, - required this.creatorBannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - this.creatorBlocked, - this.subscribed, - this.saved, - this.myVote, - this.resolver}) - : super._(); - - factory _$CommentReportViewImpl.fromJson(Map json) => - _$$CommentReportViewImplFromJson(json); + const _$CommentReportViewImpl({ + required this.commentReport, + required this.comment, + required this.post, + required this.community, + required this.creator, + required this.commentCreator, + required this.counts, + required this.creatorBannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + this.creatorBlocked, + this.subscribed, + this.saved, + this.myVote, + this.resolver, + }) : super._(); + + factory _$CommentReportViewImpl.fromJson(Map json) => _$$CommentReportViewImplFromJson(json); @override final CommentReport commentReport; -// v0.18.0 + // v0.18.0 @override final Comment comment; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Person commentCreator; -// v0.18.0 + // v0.18.0 @override final CommentAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? creatorIsModerator; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsAdmin; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorBlocked; -// v0.19.4 (required) + // v0.19.4 (required) @override final SubscribedType? subscribed; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? saved; -// v0.19.4 (required) + // v0.19.4 (required) @override final num? myVote; -// v0.18.0 + // v0.18.0 @override final Person? resolver; @@ -482,92 +502,78 @@ class _$CommentReportViewImpl extends _CommentReportView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentReportViewImpl && - (identical(other.commentReport, commentReport) || - other.commentReport == commentReport) && + (identical(other.commentReport, commentReport) || other.commentReport == commentReport) && (identical(other.comment, comment) || other.comment == comment) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && + (identical(other.community, community) || other.community == community) && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.commentCreator, commentCreator) || - other.commentCreator == commentCreator) && + (identical(other.commentCreator, commentCreator) || other.commentCreator == commentCreator) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && (identical(other.myVote, myVote) || other.myVote == myVote) && - (identical(other.resolver, resolver) || - other.resolver == resolver)); + (identical(other.resolver, resolver) || other.resolver == resolver)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - commentReport, - comment, - post, - community, - creator, - commentCreator, - counts, - creatorBannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - creatorBlocked, - subscribed, - saved, - myVote, - resolver); + runtimeType, + commentReport, + comment, + post, + community, + creator, + commentCreator, + counts, + creatorBannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + creatorBlocked, + subscribed, + saved, + myVote, + resolver, + ); /// Create a copy of CommentReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentReportViewImplCopyWith<_$CommentReportViewImpl> get copyWith => - __$$CommentReportViewImplCopyWithImpl<_$CommentReportViewImpl>( - this, _$identity); + _$$CommentReportViewImplCopyWith<_$CommentReportViewImpl> get copyWith => __$$CommentReportViewImplCopyWithImpl<_$CommentReportViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommentReportViewImplToJson( - this, - ); + return _$$CommentReportViewImplToJson(this); } } abstract class _CommentReportView extends CommentReportView { - const factory _CommentReportView( - {required final CommentReport commentReport, - required final Comment comment, - required final Post post, - required final Community community, - required final Person creator, - required final Person commentCreator, - required final CommentAggregates counts, - required final bool creatorBannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - final bool? creatorBlocked, - final SubscribedType? subscribed, - final bool? saved, - final num? myVote, - final Person? resolver}) = _$CommentReportViewImpl; + const factory _CommentReportView({ + required final CommentReport commentReport, + required final Comment comment, + required final Post post, + required final Community community, + required final Person creator, + required final Person commentCreator, + required final CommentAggregates counts, + required final bool creatorBannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + final bool? creatorBlocked, + final SubscribedType? subscribed, + final bool? saved, + final num? myVote, + final Person? resolver, + }) = _$CommentReportViewImpl; const _CommentReportView._() : super._(); - factory _CommentReportView.fromJson(Map json) = - _$CommentReportViewImpl.fromJson; + factory _CommentReportView.fromJson(Map json) = _$CommentReportViewImpl.fromJson; @override CommentReport get commentReport; // v0.18.0 @@ -604,6 +610,5 @@ abstract class _CommentReportView extends CommentReportView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentReportViewImplCopyWith<_$CommentReportViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentReportViewImplCopyWith<_$CommentReportViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/comment_report_view.g.dart b/lib/src/v3/views/comment_report_view.g.dart index d7aa2095..0c0e1bd7 100644 --- a/lib/src/v3/views/comment_report_view.g.dart +++ b/lib/src/v3/views/comment_report_view.g.dart @@ -6,49 +6,38 @@ part of 'comment_report_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentReportViewImpl _$$CommentReportViewImplFromJson( - Map json) => - _$CommentReportViewImpl( - commentReport: CommentReport.fromJson( - json['comment_report'] as Map), - comment: Comment.fromJson(json['comment'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - creator: Person.fromJson(json['creator'] as Map), - commentCreator: - Person.fromJson(json['comment_creator'] as Map), - counts: - CommentAggregates.fromJson(json['counts'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - creatorBlocked: json['creator_blocked'] as bool?, - subscribed: json['subscribed'] == null - ? null - : SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool?, - myVote: json['my_vote'] as num?, - resolver: json['resolver'] == null - ? null - : Person.fromJson(json['resolver'] as Map), - ); +_$CommentReportViewImpl _$$CommentReportViewImplFromJson(Map json) => _$CommentReportViewImpl( + commentReport: CommentReport.fromJson(json['comment_report'] as Map), + comment: Comment.fromJson(json['comment'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), + creator: Person.fromJson(json['creator'] as Map), + commentCreator: Person.fromJson(json['comment_creator'] as Map), + counts: CommentAggregates.fromJson(json['counts'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + creatorBlocked: json['creator_blocked'] as bool?, + subscribed: json['subscribed'] == null ? null : SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool?, + myVote: json['my_vote'] as num?, + resolver: json['resolver'] == null ? null : Person.fromJson(json['resolver'] as Map), +); -Map _$$CommentReportViewImplToJson( - _$CommentReportViewImpl instance) => - { - 'comment_report': instance.commentReport.toJson(), - 'comment': instance.comment.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - 'creator': instance.creator.toJson(), - 'comment_creator': instance.commentCreator.toJson(), - 'counts': instance.counts.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'creator_blocked': instance.creatorBlocked, - 'subscribed': instance.subscribed?.toJson(), - 'saved': instance.saved, - 'my_vote': instance.myVote, - 'resolver': instance.resolver?.toJson(), - }; +Map _$$CommentReportViewImplToJson(_$CommentReportViewImpl instance) => { + 'comment_report': instance.commentReport.toJson(), + 'comment': instance.comment.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), + 'creator': instance.creator.toJson(), + 'comment_creator': instance.commentCreator.toJson(), + 'counts': instance.counts.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'creator_blocked': instance.creatorBlocked, + 'subscribed': instance.subscribed?.toJson(), + 'saved': instance.saved, + 'my_vote': instance.myVote, + 'resolver': instance.resolver?.toJson(), +}; diff --git a/lib/src/v3/views/comment_view.dart b/lib/src/v3/views/comment_view.dart index 44dcb599..149932e8 100644 --- a/lib/src/v3/views/comment_view.dart +++ b/lib/src/v3/views/comment_view.dart @@ -27,6 +27,5 @@ class CommentView with _$CommentView { }) = _CommentView; const CommentView._(); - factory CommentView.fromJson(Map json) => - _$CommentViewFromJson(json); + factory CommentView.fromJson(Map json) => _$CommentViewFromJson(json); } diff --git a/lib/src/v3/views/comment_view.freezed.dart b/lib/src/v3/views/comment_view.freezed.dart index b1963a57..b41138cd 100644 --- a/lib/src/v3/views/comment_view.freezed.dart +++ b/lib/src/v3/views/comment_view.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommentView _$CommentViewFromJson(Map json) { return _CommentView.fromJson(json); @@ -25,16 +26,11 @@ mixin _$CommentView { Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 CommentAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get bannedFromCommunity => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.0 (required) - SubscribedType get subscribed => - throw _privateConstructorUsedError; // v0.18.0 + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get bannedFromCommunity => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.0 (required) + SubscribedType get subscribed => throw _privateConstructorUsedError; // v0.18.0 bool get saved => throw _privateConstructorUsedError; // v0.18.0 bool get creatorBlocked => throw _privateConstructorUsedError; // v0.18.0 int? get myVote => throw _privateConstructorUsedError; @@ -45,30 +41,28 @@ mixin _$CommentView { /// Create a copy of CommentView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommentViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommentViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentViewCopyWith<$Res> { - factory $CommentViewCopyWith( - CommentView value, $Res Function(CommentView) then) = - _$CommentViewCopyWithImpl<$Res, CommentView>; + factory $CommentViewCopyWith(CommentView value, $Res Function(CommentView) then) = _$CommentViewCopyWithImpl<$Res, CommentView>; @useResult - $Res call( - {Comment comment, - Person creator, - Post post, - Community community, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - int? myVote}); + $Res call({ + Comment comment, + Person creator, + Post post, + Community community, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + int? myVote, + }); $CommentCopyWith<$Res> get comment; $PersonCopyWith<$Res> get creator; @@ -78,8 +72,7 @@ abstract class $CommentViewCopyWith<$Res> { } /// @nodoc -class _$CommentViewCopyWithImpl<$Res, $Val extends CommentView> - implements $CommentViewCopyWith<$Res> { +class _$CommentViewCopyWithImpl<$Res, $Val extends CommentView> implements $CommentViewCopyWith<$Res> { _$CommentViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -106,60 +99,76 @@ class _$CommentViewCopyWithImpl<$Res, $Val extends CommentView> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_value.copyWith( - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } /// Create a copy of CommentView @@ -214,27 +223,25 @@ class _$CommentViewCopyWithImpl<$Res, $Val extends CommentView> } /// @nodoc -abstract class _$$CommentViewImplCopyWith<$Res> - implements $CommentViewCopyWith<$Res> { - factory _$$CommentViewImplCopyWith( - _$CommentViewImpl value, $Res Function(_$CommentViewImpl) then) = - __$$CommentViewImplCopyWithImpl<$Res>; +abstract class _$$CommentViewImplCopyWith<$Res> implements $CommentViewCopyWith<$Res> { + factory _$$CommentViewImplCopyWith(_$CommentViewImpl value, $Res Function(_$CommentViewImpl) then) = __$$CommentViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {Comment comment, - Person creator, - Post post, - Community community, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - int? myVote}); + $Res call({ + Comment comment, + Person creator, + Post post, + Community community, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + int? myVote, + }); @override $CommentCopyWith<$Res> get comment; @@ -249,12 +256,8 @@ abstract class _$$CommentViewImplCopyWith<$Res> } /// @nodoc -class __$$CommentViewImplCopyWithImpl<$Res> - extends _$CommentViewCopyWithImpl<$Res, _$CommentViewImpl> - implements _$$CommentViewImplCopyWith<$Res> { - __$$CommentViewImplCopyWithImpl( - _$CommentViewImpl _value, $Res Function(_$CommentViewImpl) _then) - : super(_value, _then); +class __$$CommentViewImplCopyWithImpl<$Res> extends _$CommentViewCopyWithImpl<$Res, _$CommentViewImpl> implements _$$CommentViewImplCopyWith<$Res> { + __$$CommentViewImplCopyWithImpl(_$CommentViewImpl _value, $Res Function(_$CommentViewImpl) _then) : super(_value, _then); /// Create a copy of CommentView /// with the given fields replaced by the non-null parameter values. @@ -275,60 +278,75 @@ class __$$CommentViewImplCopyWithImpl<$Res> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_$CommentViewImpl( - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$CommentViewImpl( + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -336,61 +354,60 @@ class __$$CommentViewImplCopyWithImpl<$Res> @modelSerde class _$CommentViewImpl extends _CommentView { - const _$CommentViewImpl( - {required this.comment, - required this.creator, - required this.post, - required this.community, - required this.counts, - required this.creatorBannedFromCommunity, - this.bannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - required this.subscribed, - required this.saved, - required this.creatorBlocked, - this.myVote}) - : super._(); - - factory _$CommentViewImpl.fromJson(Map json) => - _$$CommentViewImplFromJson(json); + const _$CommentViewImpl({ + required this.comment, + required this.creator, + required this.post, + required this.community, + required this.counts, + required this.creatorBannedFromCommunity, + this.bannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + required this.subscribed, + required this.saved, + required this.creatorBlocked, + this.myVote, + }) : super._(); + + factory _$CommentViewImpl.fromJson(Map json) => _$$CommentViewImplFromJson(json); @override final Comment comment; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final CommentAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? bannedFromCommunity; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsModerator; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? creatorIsAdmin; -// v0.19.0 (required) + // v0.19.0 (required) @override final SubscribedType subscribed; -// v0.18.0 + // v0.18.0 @override final bool saved; -// v0.18.0 + // v0.18.0 @override final bool creatorBlocked; -// v0.18.0 + // v0.18.0 @override final int? myVote; @@ -407,80 +424,69 @@ class _$CommentViewImpl extends _CommentView { (identical(other.comment, comment) || other.comment == comment) && (identical(other.creator, creator) || other.creator == creator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && + (identical(other.community, community) || other.community == community) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.bannedFromCommunity, bannedFromCommunity) || - other.bannedFromCommunity == bannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.bannedFromCommunity, bannedFromCommunity) || other.bannedFromCommunity == bannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && (identical(other.myVote, myVote) || other.myVote == myVote)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - comment, - creator, - post, - community, - counts, - creatorBannedFromCommunity, - bannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - subscribed, - saved, - creatorBlocked, - myVote); + runtimeType, + comment, + creator, + post, + community, + counts, + creatorBannedFromCommunity, + bannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + subscribed, + saved, + creatorBlocked, + myVote, + ); /// Create a copy of CommentView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommentViewImplCopyWith<_$CommentViewImpl> get copyWith => - __$$CommentViewImplCopyWithImpl<_$CommentViewImpl>(this, _$identity); + _$$CommentViewImplCopyWith<_$CommentViewImpl> get copyWith => __$$CommentViewImplCopyWithImpl<_$CommentViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommentViewImplToJson( - this, - ); + return _$$CommentViewImplToJson(this); } } abstract class _CommentView extends CommentView { - const factory _CommentView( - {required final Comment comment, - required final Person creator, - required final Post post, - required final Community community, - required final CommentAggregates counts, - required final bool creatorBannedFromCommunity, - final bool? bannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - required final SubscribedType subscribed, - required final bool saved, - required final bool creatorBlocked, - final int? myVote}) = _$CommentViewImpl; + const factory _CommentView({ + required final Comment comment, + required final Person creator, + required final Post post, + required final Community community, + required final CommentAggregates counts, + required final bool creatorBannedFromCommunity, + final bool? bannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + required final SubscribedType subscribed, + required final bool saved, + required final bool creatorBlocked, + final int? myVote, + }) = _$CommentViewImpl; const _CommentView._() : super._(); - factory _CommentView.fromJson(Map json) = - _$CommentViewImpl.fromJson; + factory _CommentView.fromJson(Map json) = _$CommentViewImpl.fromJson; @override Comment get comment; // v0.18.0 @@ -513,6 +519,5 @@ abstract class _CommentView extends CommentView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommentViewImplCopyWith<_$CommentViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommentViewImplCopyWith<_$CommentViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/comment_view.g.dart b/lib/src/v3/views/comment_view.g.dart index b81c60d5..b8167c2b 100644 --- a/lib/src/v3/views/comment_view.g.dart +++ b/lib/src/v3/views/comment_view.g.dart @@ -6,37 +6,34 @@ part of 'comment_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommentViewImpl _$$CommentViewImplFromJson(Map json) => - _$CommentViewImpl( - comment: Comment.fromJson(json['comment'] as Map), - creator: Person.fromJson(json['creator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - counts: - CommentAggregates.fromJson(json['counts'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - bannedFromCommunity: json['banned_from_community'] as bool?, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - subscribed: SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool, - creatorBlocked: json['creator_blocked'] as bool, - myVote: (json['my_vote'] as num?)?.toInt(), - ); +_$CommentViewImpl _$$CommentViewImplFromJson(Map json) => _$CommentViewImpl( + comment: Comment.fromJson(json['comment'] as Map), + creator: Person.fromJson(json['creator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), + counts: CommentAggregates.fromJson(json['counts'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + bannedFromCommunity: json['banned_from_community'] as bool?, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + subscribed: SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool, + creatorBlocked: json['creator_blocked'] as bool, + myVote: (json['my_vote'] as num?)?.toInt(), +); -Map _$$CommentViewImplToJson(_$CommentViewImpl instance) => - { - 'comment': instance.comment.toJson(), - 'creator': instance.creator.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - 'counts': instance.counts.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'banned_from_community': instance.bannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'subscribed': instance.subscribed.toJson(), - 'saved': instance.saved, - 'creator_blocked': instance.creatorBlocked, - 'my_vote': instance.myVote, - }; +Map _$$CommentViewImplToJson(_$CommentViewImpl instance) => { + 'comment': instance.comment.toJson(), + 'creator': instance.creator.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), + 'counts': instance.counts.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'banned_from_community': instance.bannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'subscribed': instance.subscribed.toJson(), + 'saved': instance.saved, + 'creator_blocked': instance.creatorBlocked, + 'my_vote': instance.myVote, +}; diff --git a/lib/src/v3/views/community_block_view.dart b/lib/src/v3/views/community_block_view.dart index 893bfc7e..2298701a 100644 --- a/lib/src/v3/views/community_block_view.dart +++ b/lib/src/v3/views/community_block_view.dart @@ -15,6 +15,5 @@ class CommunityBlockView with _$CommunityBlockView { }) = _CommunityBlockView; const CommunityBlockView._(); - factory CommunityBlockView.fromJson(Map json) => - _$CommunityBlockViewFromJson(json); + factory CommunityBlockView.fromJson(Map json) => _$CommunityBlockViewFromJson(json); } diff --git a/lib/src/v3/views/community_block_view.freezed.dart b/lib/src/v3/views/community_block_view.freezed.dart index 02cdff33..135d797c 100644 --- a/lib/src/v3/views/community_block_view.freezed.dart +++ b/lib/src/v3/views/community_block_view.freezed.dart @@ -12,7 +12,8 @@ part of 'community_block_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommunityBlockView _$CommunityBlockViewFromJson(Map json) { return _CommunityBlockView.fromJson(json); @@ -29,15 +30,12 @@ mixin _$CommunityBlockView { /// Create a copy of CommunityBlockView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityBlockViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityBlockViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityBlockViewCopyWith<$Res> { - factory $CommunityBlockViewCopyWith( - CommunityBlockView value, $Res Function(CommunityBlockView) then) = - _$CommunityBlockViewCopyWithImpl<$Res, CommunityBlockView>; + factory $CommunityBlockViewCopyWith(CommunityBlockView value, $Res Function(CommunityBlockView) then) = _$CommunityBlockViewCopyWithImpl<$Res, CommunityBlockView>; @useResult $Res call({Person person, Community community}); @@ -46,8 +44,7 @@ abstract class $CommunityBlockViewCopyWith<$Res> { } /// @nodoc -class _$CommunityBlockViewCopyWithImpl<$Res, $Val extends CommunityBlockView> - implements $CommunityBlockViewCopyWith<$Res> { +class _$CommunityBlockViewCopyWithImpl<$Res, $Val extends CommunityBlockView> implements $CommunityBlockViewCopyWith<$Res> { _$CommunityBlockViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,20 +56,22 @@ class _$CommunityBlockViewCopyWithImpl<$Res, $Val extends CommunityBlockView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? community = null, - }) { - return _then(_value.copyWith( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? person = null, Object? community = null}) { + return _then( + _value.copyWith( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of CommunityBlockView @@ -97,11 +96,8 @@ class _$CommunityBlockViewCopyWithImpl<$Res, $Val extends CommunityBlockView> } /// @nodoc -abstract class _$$CommunityBlockViewImplCopyWith<$Res> - implements $CommunityBlockViewCopyWith<$Res> { - factory _$$CommunityBlockViewImplCopyWith(_$CommunityBlockViewImpl value, - $Res Function(_$CommunityBlockViewImpl) then) = - __$$CommunityBlockViewImplCopyWithImpl<$Res>; +abstract class _$$CommunityBlockViewImplCopyWith<$Res> implements $CommunityBlockViewCopyWith<$Res> { + factory _$$CommunityBlockViewImplCopyWith(_$CommunityBlockViewImpl value, $Res Function(_$CommunityBlockViewImpl) then) = __$$CommunityBlockViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person person, Community community}); @@ -113,31 +109,28 @@ abstract class _$$CommunityBlockViewImplCopyWith<$Res> } /// @nodoc -class __$$CommunityBlockViewImplCopyWithImpl<$Res> - extends _$CommunityBlockViewCopyWithImpl<$Res, _$CommunityBlockViewImpl> - implements _$$CommunityBlockViewImplCopyWith<$Res> { - __$$CommunityBlockViewImplCopyWithImpl(_$CommunityBlockViewImpl _value, - $Res Function(_$CommunityBlockViewImpl) _then) - : super(_value, _then); +class __$$CommunityBlockViewImplCopyWithImpl<$Res> extends _$CommunityBlockViewCopyWithImpl<$Res, _$CommunityBlockViewImpl> implements _$$CommunityBlockViewImplCopyWith<$Res> { + __$$CommunityBlockViewImplCopyWithImpl(_$CommunityBlockViewImpl _value, $Res Function(_$CommunityBlockViewImpl) _then) : super(_value, _then); /// Create a copy of CommunityBlockView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? community = null, - }) { - return _then(_$CommunityBlockViewImpl( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? person = null, Object? community = null}) { + return _then( + _$CommunityBlockViewImpl( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -145,16 +138,13 @@ class __$$CommunityBlockViewImplCopyWithImpl<$Res> @modelSerde class _$CommunityBlockViewImpl extends _CommunityBlockView { - const _$CommunityBlockViewImpl( - {required this.person, required this.community}) - : super._(); + const _$CommunityBlockViewImpl({required this.person, required this.community}) : super._(); - factory _$CommunityBlockViewImpl.fromJson(Map json) => - _$$CommunityBlockViewImplFromJson(json); + factory _$CommunityBlockViewImpl.fromJson(Map json) => _$$CommunityBlockViewImplFromJson(json); @override final Person person; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -169,8 +159,7 @@ class _$CommunityBlockViewImpl extends _CommunityBlockView { (other.runtimeType == runtimeType && other is _$CommunityBlockViewImpl && (identical(other.person, person) || other.person == person) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -182,26 +171,19 @@ class _$CommunityBlockViewImpl extends _CommunityBlockView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityBlockViewImplCopyWith<_$CommunityBlockViewImpl> get copyWith => - __$$CommunityBlockViewImplCopyWithImpl<_$CommunityBlockViewImpl>( - this, _$identity); + _$$CommunityBlockViewImplCopyWith<_$CommunityBlockViewImpl> get copyWith => __$$CommunityBlockViewImplCopyWithImpl<_$CommunityBlockViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityBlockViewImplToJson( - this, - ); + return _$$CommunityBlockViewImplToJson(this); } } abstract class _CommunityBlockView extends CommunityBlockView { - const factory _CommunityBlockView( - {required final Person person, - required final Community community}) = _$CommunityBlockViewImpl; + const factory _CommunityBlockView({required final Person person, required final Community community}) = _$CommunityBlockViewImpl; const _CommunityBlockView._() : super._(); - factory _CommunityBlockView.fromJson(Map json) = - _$CommunityBlockViewImpl.fromJson; + factory _CommunityBlockView.fromJson(Map json) = _$CommunityBlockViewImpl.fromJson; @override Person get person; // v0.18.0 @@ -212,6 +194,5 @@ abstract class _CommunityBlockView extends CommunityBlockView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityBlockViewImplCopyWith<_$CommunityBlockViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommunityBlockViewImplCopyWith<_$CommunityBlockViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/community_block_view.g.dart b/lib/src/v3/views/community_block_view.g.dart index 32bd3859..dd200b11 100644 --- a/lib/src/v3/views/community_block_view.g.dart +++ b/lib/src/v3/views/community_block_view.g.dart @@ -6,16 +6,7 @@ part of 'community_block_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityBlockViewImpl _$$CommunityBlockViewImplFromJson( - Map json) => - _$CommunityBlockViewImpl( - person: Person.fromJson(json['person'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$CommunityBlockViewImpl _$$CommunityBlockViewImplFromJson(Map json) => + _$CommunityBlockViewImpl(person: Person.fromJson(json['person'] as Map), community: Community.fromJson(json['community'] as Map)); -Map _$$CommunityBlockViewImplToJson( - _$CommunityBlockViewImpl instance) => - { - 'person': instance.person.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$CommunityBlockViewImplToJson(_$CommunityBlockViewImpl instance) => {'person': instance.person.toJson(), 'community': instance.community.toJson()}; diff --git a/lib/src/v3/views/community_follower_view.dart b/lib/src/v3/views/community_follower_view.dart index 0d81b429..040aa46c 100644 --- a/lib/src/v3/views/community_follower_view.dart +++ b/lib/src/v3/views/community_follower_view.dart @@ -15,6 +15,5 @@ class CommunityFollowerView with _$CommunityFollowerView { }) = _CommunityFollowerView; const CommunityFollowerView._(); - factory CommunityFollowerView.fromJson(Map json) => - _$CommunityFollowerViewFromJson(json); + factory CommunityFollowerView.fromJson(Map json) => _$CommunityFollowerViewFromJson(json); } diff --git a/lib/src/v3/views/community_follower_view.freezed.dart b/lib/src/v3/views/community_follower_view.freezed.dart index d6df94ae..6b619c64 100644 --- a/lib/src/v3/views/community_follower_view.freezed.dart +++ b/lib/src/v3/views/community_follower_view.freezed.dart @@ -12,10 +12,10 @@ part of 'community_follower_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -CommunityFollowerView _$CommunityFollowerViewFromJson( - Map json) { +CommunityFollowerView _$CommunityFollowerViewFromJson(Map json) { return _CommunityFollowerView.fromJson(json); } @@ -30,15 +30,12 @@ mixin _$CommunityFollowerView { /// Create a copy of CommunityFollowerView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityFollowerViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityFollowerViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityFollowerViewCopyWith<$Res> { - factory $CommunityFollowerViewCopyWith(CommunityFollowerView value, - $Res Function(CommunityFollowerView) then) = - _$CommunityFollowerViewCopyWithImpl<$Res, CommunityFollowerView>; + factory $CommunityFollowerViewCopyWith(CommunityFollowerView value, $Res Function(CommunityFollowerView) then) = _$CommunityFollowerViewCopyWithImpl<$Res, CommunityFollowerView>; @useResult $Res call({Community community, Person follower}); @@ -47,9 +44,7 @@ abstract class $CommunityFollowerViewCopyWith<$Res> { } /// @nodoc -class _$CommunityFollowerViewCopyWithImpl<$Res, - $Val extends CommunityFollowerView> - implements $CommunityFollowerViewCopyWith<$Res> { +class _$CommunityFollowerViewCopyWithImpl<$Res, $Val extends CommunityFollowerView> implements $CommunityFollowerViewCopyWith<$Res> { _$CommunityFollowerViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,20 +56,22 @@ class _$CommunityFollowerViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? follower = null, - }) { - return _then(_value.copyWith( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - follower: null == follower - ? _value.follower - : follower // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? community = null, Object? follower = null}) { + return _then( + _value.copyWith( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + follower: + null == follower + ? _value.follower + : follower // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of CommunityFollowerView @@ -99,12 +96,8 @@ class _$CommunityFollowerViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$CommunityFollowerViewImplCopyWith<$Res> - implements $CommunityFollowerViewCopyWith<$Res> { - factory _$$CommunityFollowerViewImplCopyWith( - _$CommunityFollowerViewImpl value, - $Res Function(_$CommunityFollowerViewImpl) then) = - __$$CommunityFollowerViewImplCopyWithImpl<$Res>; +abstract class _$$CommunityFollowerViewImplCopyWith<$Res> implements $CommunityFollowerViewCopyWith<$Res> { + factory _$$CommunityFollowerViewImplCopyWith(_$CommunityFollowerViewImpl value, $Res Function(_$CommunityFollowerViewImpl) then) = __$$CommunityFollowerViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Community community, Person follower}); @@ -116,32 +109,28 @@ abstract class _$$CommunityFollowerViewImplCopyWith<$Res> } /// @nodoc -class __$$CommunityFollowerViewImplCopyWithImpl<$Res> - extends _$CommunityFollowerViewCopyWithImpl<$Res, - _$CommunityFollowerViewImpl> - implements _$$CommunityFollowerViewImplCopyWith<$Res> { - __$$CommunityFollowerViewImplCopyWithImpl(_$CommunityFollowerViewImpl _value, - $Res Function(_$CommunityFollowerViewImpl) _then) - : super(_value, _then); +class __$$CommunityFollowerViewImplCopyWithImpl<$Res> extends _$CommunityFollowerViewCopyWithImpl<$Res, _$CommunityFollowerViewImpl> implements _$$CommunityFollowerViewImplCopyWith<$Res> { + __$$CommunityFollowerViewImplCopyWithImpl(_$CommunityFollowerViewImpl _value, $Res Function(_$CommunityFollowerViewImpl) _then) : super(_value, _then); /// Create a copy of CommunityFollowerView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? follower = null, - }) { - return _then(_$CommunityFollowerViewImpl( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - follower: null == follower - ? _value.follower - : follower // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? community = null, Object? follower = null}) { + return _then( + _$CommunityFollowerViewImpl( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + follower: + null == follower + ? _value.follower + : follower // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -149,16 +138,13 @@ class __$$CommunityFollowerViewImplCopyWithImpl<$Res> @modelSerde class _$CommunityFollowerViewImpl extends _CommunityFollowerView { - const _$CommunityFollowerViewImpl( - {required this.community, required this.follower}) - : super._(); + const _$CommunityFollowerViewImpl({required this.community, required this.follower}) : super._(); - factory _$CommunityFollowerViewImpl.fromJson(Map json) => - _$$CommunityFollowerViewImplFromJson(json); + factory _$CommunityFollowerViewImpl.fromJson(Map json) => _$$CommunityFollowerViewImplFromJson(json); @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person follower; @@ -172,10 +158,8 @@ class _$CommunityFollowerViewImpl extends _CommunityFollowerView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommunityFollowerViewImpl && - (identical(other.community, community) || - other.community == community) && - (identical(other.follower, follower) || - other.follower == follower)); + (identical(other.community, community) || other.community == community) && + (identical(other.follower, follower) || other.follower == follower)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -187,26 +171,19 @@ class _$CommunityFollowerViewImpl extends _CommunityFollowerView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityFollowerViewImplCopyWith<_$CommunityFollowerViewImpl> - get copyWith => __$$CommunityFollowerViewImplCopyWithImpl< - _$CommunityFollowerViewImpl>(this, _$identity); + _$$CommunityFollowerViewImplCopyWith<_$CommunityFollowerViewImpl> get copyWith => __$$CommunityFollowerViewImplCopyWithImpl<_$CommunityFollowerViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityFollowerViewImplToJson( - this, - ); + return _$$CommunityFollowerViewImplToJson(this); } } abstract class _CommunityFollowerView extends CommunityFollowerView { - const factory _CommunityFollowerView( - {required final Community community, - required final Person follower}) = _$CommunityFollowerViewImpl; + const factory _CommunityFollowerView({required final Community community, required final Person follower}) = _$CommunityFollowerViewImpl; const _CommunityFollowerView._() : super._(); - factory _CommunityFollowerView.fromJson(Map json) = - _$CommunityFollowerViewImpl.fromJson; + factory _CommunityFollowerView.fromJson(Map json) = _$CommunityFollowerViewImpl.fromJson; @override Community get community; // v0.18.0 @@ -217,6 +194,5 @@ abstract class _CommunityFollowerView extends CommunityFollowerView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityFollowerViewImplCopyWith<_$CommunityFollowerViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CommunityFollowerViewImplCopyWith<_$CommunityFollowerViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/community_follower_view.g.dart b/lib/src/v3/views/community_follower_view.g.dart index 23d5a4f6..d30c2240 100644 --- a/lib/src/v3/views/community_follower_view.g.dart +++ b/lib/src/v3/views/community_follower_view.g.dart @@ -6,16 +6,7 @@ part of 'community_follower_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityFollowerViewImpl _$$CommunityFollowerViewImplFromJson( - Map json) => - _$CommunityFollowerViewImpl( - community: Community.fromJson(json['community'] as Map), - follower: Person.fromJson(json['follower'] as Map), - ); +_$CommunityFollowerViewImpl _$$CommunityFollowerViewImplFromJson(Map json) => + _$CommunityFollowerViewImpl(community: Community.fromJson(json['community'] as Map), follower: Person.fromJson(json['follower'] as Map)); -Map _$$CommunityFollowerViewImplToJson( - _$CommunityFollowerViewImpl instance) => - { - 'community': instance.community.toJson(), - 'follower': instance.follower.toJson(), - }; +Map _$$CommunityFollowerViewImplToJson(_$CommunityFollowerViewImpl instance) => {'community': instance.community.toJson(), 'follower': instance.follower.toJson()}; diff --git a/lib/src/v3/views/community_moderator_view.dart b/lib/src/v3/views/community_moderator_view.dart index 299d0515..744bf58d 100644 --- a/lib/src/v3/views/community_moderator_view.dart +++ b/lib/src/v3/views/community_moderator_view.dart @@ -15,6 +15,5 @@ class CommunityModeratorView with _$CommunityModeratorView { }) = _CommunityModeratorView; const CommunityModeratorView._(); - factory CommunityModeratorView.fromJson(Map json) => - _$CommunityModeratorViewFromJson(json); + factory CommunityModeratorView.fromJson(Map json) => _$CommunityModeratorViewFromJson(json); } diff --git a/lib/src/v3/views/community_moderator_view.freezed.dart b/lib/src/v3/views/community_moderator_view.freezed.dart index a651e01c..651c9c40 100644 --- a/lib/src/v3/views/community_moderator_view.freezed.dart +++ b/lib/src/v3/views/community_moderator_view.freezed.dart @@ -12,10 +12,10 @@ part of 'community_moderator_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -CommunityModeratorView _$CommunityModeratorViewFromJson( - Map json) { +CommunityModeratorView _$CommunityModeratorViewFromJson(Map json) { return _CommunityModeratorView.fromJson(json); } @@ -30,15 +30,12 @@ mixin _$CommunityModeratorView { /// Create a copy of CommunityModeratorView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityModeratorViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityModeratorViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityModeratorViewCopyWith<$Res> { - factory $CommunityModeratorViewCopyWith(CommunityModeratorView value, - $Res Function(CommunityModeratorView) then) = - _$CommunityModeratorViewCopyWithImpl<$Res, CommunityModeratorView>; + factory $CommunityModeratorViewCopyWith(CommunityModeratorView value, $Res Function(CommunityModeratorView) then) = _$CommunityModeratorViewCopyWithImpl<$Res, CommunityModeratorView>; @useResult $Res call({Community community, Person moderator}); @@ -47,9 +44,7 @@ abstract class $CommunityModeratorViewCopyWith<$Res> { } /// @nodoc -class _$CommunityModeratorViewCopyWithImpl<$Res, - $Val extends CommunityModeratorView> - implements $CommunityModeratorViewCopyWith<$Res> { +class _$CommunityModeratorViewCopyWithImpl<$Res, $Val extends CommunityModeratorView> implements $CommunityModeratorViewCopyWith<$Res> { _$CommunityModeratorViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,20 +56,22 @@ class _$CommunityModeratorViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? moderator = null, - }) { - return _then(_value.copyWith( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moderator: null == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? community = null, Object? moderator = null}) { + return _then( + _value.copyWith( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moderator: + null == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of CommunityModeratorView @@ -99,12 +96,8 @@ class _$CommunityModeratorViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$CommunityModeratorViewImplCopyWith<$Res> - implements $CommunityModeratorViewCopyWith<$Res> { - factory _$$CommunityModeratorViewImplCopyWith( - _$CommunityModeratorViewImpl value, - $Res Function(_$CommunityModeratorViewImpl) then) = - __$$CommunityModeratorViewImplCopyWithImpl<$Res>; +abstract class _$$CommunityModeratorViewImplCopyWith<$Res> implements $CommunityModeratorViewCopyWith<$Res> { + factory _$$CommunityModeratorViewImplCopyWith(_$CommunityModeratorViewImpl value, $Res Function(_$CommunityModeratorViewImpl) then) = __$$CommunityModeratorViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Community community, Person moderator}); @@ -116,33 +109,28 @@ abstract class _$$CommunityModeratorViewImplCopyWith<$Res> } /// @nodoc -class __$$CommunityModeratorViewImplCopyWithImpl<$Res> - extends _$CommunityModeratorViewCopyWithImpl<$Res, - _$CommunityModeratorViewImpl> - implements _$$CommunityModeratorViewImplCopyWith<$Res> { - __$$CommunityModeratorViewImplCopyWithImpl( - _$CommunityModeratorViewImpl _value, - $Res Function(_$CommunityModeratorViewImpl) _then) - : super(_value, _then); +class __$$CommunityModeratorViewImplCopyWithImpl<$Res> extends _$CommunityModeratorViewCopyWithImpl<$Res, _$CommunityModeratorViewImpl> implements _$$CommunityModeratorViewImplCopyWith<$Res> { + __$$CommunityModeratorViewImplCopyWithImpl(_$CommunityModeratorViewImpl _value, $Res Function(_$CommunityModeratorViewImpl) _then) : super(_value, _then); /// Create a copy of CommunityModeratorView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? moderator = null, - }) { - return _then(_$CommunityModeratorViewImpl( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moderator: null == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? community = null, Object? moderator = null}) { + return _then( + _$CommunityModeratorViewImpl( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moderator: + null == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -150,16 +138,13 @@ class __$$CommunityModeratorViewImplCopyWithImpl<$Res> @modelSerde class _$CommunityModeratorViewImpl extends _CommunityModeratorView { - const _$CommunityModeratorViewImpl( - {required this.community, required this.moderator}) - : super._(); + const _$CommunityModeratorViewImpl({required this.community, required this.moderator}) : super._(); - factory _$CommunityModeratorViewImpl.fromJson(Map json) => - _$$CommunityModeratorViewImplFromJson(json); + factory _$CommunityModeratorViewImpl.fromJson(Map json) => _$$CommunityModeratorViewImplFromJson(json); @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person moderator; @@ -173,10 +158,8 @@ class _$CommunityModeratorViewImpl extends _CommunityModeratorView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommunityModeratorViewImpl && - (identical(other.community, community) || - other.community == community) && - (identical(other.moderator, moderator) || - other.moderator == moderator)); + (identical(other.community, community) || other.community == community) && + (identical(other.moderator, moderator) || other.moderator == moderator)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -188,26 +171,19 @@ class _$CommunityModeratorViewImpl extends _CommunityModeratorView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityModeratorViewImplCopyWith<_$CommunityModeratorViewImpl> - get copyWith => __$$CommunityModeratorViewImplCopyWithImpl< - _$CommunityModeratorViewImpl>(this, _$identity); + _$$CommunityModeratorViewImplCopyWith<_$CommunityModeratorViewImpl> get copyWith => __$$CommunityModeratorViewImplCopyWithImpl<_$CommunityModeratorViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityModeratorViewImplToJson( - this, - ); + return _$$CommunityModeratorViewImplToJson(this); } } abstract class _CommunityModeratorView extends CommunityModeratorView { - const factory _CommunityModeratorView( - {required final Community community, - required final Person moderator}) = _$CommunityModeratorViewImpl; + const factory _CommunityModeratorView({required final Community community, required final Person moderator}) = _$CommunityModeratorViewImpl; const _CommunityModeratorView._() : super._(); - factory _CommunityModeratorView.fromJson(Map json) = - _$CommunityModeratorViewImpl.fromJson; + factory _CommunityModeratorView.fromJson(Map json) = _$CommunityModeratorViewImpl.fromJson; @override Community get community; // v0.18.0 @@ -218,6 +194,5 @@ abstract class _CommunityModeratorView extends CommunityModeratorView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityModeratorViewImplCopyWith<_$CommunityModeratorViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$CommunityModeratorViewImplCopyWith<_$CommunityModeratorViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/community_moderator_view.g.dart b/lib/src/v3/views/community_moderator_view.g.dart index 040b0db9..c392bbf8 100644 --- a/lib/src/v3/views/community_moderator_view.g.dart +++ b/lib/src/v3/views/community_moderator_view.g.dart @@ -6,16 +6,10 @@ part of 'community_moderator_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityModeratorViewImpl _$$CommunityModeratorViewImplFromJson( - Map json) => - _$CommunityModeratorViewImpl( - community: Community.fromJson(json['community'] as Map), - moderator: Person.fromJson(json['moderator'] as Map), - ); +_$CommunityModeratorViewImpl _$$CommunityModeratorViewImplFromJson(Map json) => + _$CommunityModeratorViewImpl(community: Community.fromJson(json['community'] as Map), moderator: Person.fromJson(json['moderator'] as Map)); -Map _$$CommunityModeratorViewImplToJson( - _$CommunityModeratorViewImpl instance) => - { - 'community': instance.community.toJson(), - 'moderator': instance.moderator.toJson(), - }; +Map _$$CommunityModeratorViewImplToJson(_$CommunityModeratorViewImpl instance) => { + 'community': instance.community.toJson(), + 'moderator': instance.moderator.toJson(), +}; diff --git a/lib/src/v3/views/community_view.dart b/lib/src/v3/views/community_view.dart index cf81a935..8d80ed7b 100644 --- a/lib/src/v3/views/community_view.dart +++ b/lib/src/v3/views/community_view.dart @@ -19,6 +19,5 @@ class CommunityView with _$CommunityView { }) = _CommunityView; const CommunityView._(); - factory CommunityView.fromJson(Map json) => - _$CommunityViewFromJson(json); + factory CommunityView.fromJson(Map json) => _$CommunityViewFromJson(json); } diff --git a/lib/src/v3/views/community_view.freezed.dart b/lib/src/v3/views/community_view.freezed.dart index f8a0df81..78572079 100644 --- a/lib/src/v3/views/community_view.freezed.dart +++ b/lib/src/v3/views/community_view.freezed.dart @@ -12,7 +12,8 @@ part of 'community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CommunityView _$CommunityViewFromJson(Map json) { return _CommunityView.fromJson(json); @@ -21,11 +22,9 @@ CommunityView _$CommunityViewFromJson(Map json) { /// @nodoc mixin _$CommunityView { Community get community => throw _privateConstructorUsedError; // v0.18.0 - SubscribedType get subscribed => - throw _privateConstructorUsedError; // v0.18.0 + SubscribedType get subscribed => throw _privateConstructorUsedError; // v0.18.0 bool get blocked => throw _privateConstructorUsedError; // v0.18.0 - CommunityAggregates get counts => - throw _privateConstructorUsedError; // v0.18.0 + CommunityAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 bool? get bannedFromCommunity => throw _privateConstructorUsedError; /// Serializes this CommunityView to a JSON map. @@ -34,30 +33,21 @@ mixin _$CommunityView { /// Create a copy of CommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommunityViewCopyWith<$Res> { - factory $CommunityViewCopyWith( - CommunityView value, $Res Function(CommunityView) then) = - _$CommunityViewCopyWithImpl<$Res, CommunityView>; + factory $CommunityViewCopyWith(CommunityView value, $Res Function(CommunityView) then) = _$CommunityViewCopyWithImpl<$Res, CommunityView>; @useResult - $Res call( - {Community community, - SubscribedType subscribed, - bool blocked, - CommunityAggregates counts, - bool? bannedFromCommunity}); + $Res call({Community community, SubscribedType subscribed, bool blocked, CommunityAggregates counts, bool? bannedFromCommunity}); $CommunityCopyWith<$Res> get community; $CommunityAggregatesCopyWith<$Res> get counts; } /// @nodoc -class _$CommunityViewCopyWithImpl<$Res, $Val extends CommunityView> - implements $CommunityViewCopyWith<$Res> { +class _$CommunityViewCopyWithImpl<$Res, $Val extends CommunityView> implements $CommunityViewCopyWith<$Res> { _$CommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -69,35 +59,37 @@ class _$CommunityViewCopyWithImpl<$Res, $Val extends CommunityView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? subscribed = null, - Object? blocked = null, - Object? counts = null, - Object? bannedFromCommunity = freezed, - }) { - return _then(_value.copyWith( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommunityAggregates, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? community = null, Object? subscribed = null, Object? blocked = null, Object? counts = null, Object? bannedFromCommunity = freezed}) { + return _then( + _value.copyWith( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommunityAggregates, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } /// Create a copy of CommunityView @@ -122,19 +114,11 @@ class _$CommunityViewCopyWithImpl<$Res, $Val extends CommunityView> } /// @nodoc -abstract class _$$CommunityViewImplCopyWith<$Res> - implements $CommunityViewCopyWith<$Res> { - factory _$$CommunityViewImplCopyWith( - _$CommunityViewImpl value, $Res Function(_$CommunityViewImpl) then) = - __$$CommunityViewImplCopyWithImpl<$Res>; +abstract class _$$CommunityViewImplCopyWith<$Res> implements $CommunityViewCopyWith<$Res> { + factory _$$CommunityViewImplCopyWith(_$CommunityViewImpl value, $Res Function(_$CommunityViewImpl) then) = __$$CommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {Community community, - SubscribedType subscribed, - bool blocked, - CommunityAggregates counts, - bool? bannedFromCommunity}); + $Res call({Community community, SubscribedType subscribed, bool blocked, CommunityAggregates counts, bool? bannedFromCommunity}); @override $CommunityCopyWith<$Res> get community; @@ -143,46 +127,43 @@ abstract class _$$CommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$CommunityViewImplCopyWithImpl<$Res> - extends _$CommunityViewCopyWithImpl<$Res, _$CommunityViewImpl> - implements _$$CommunityViewImplCopyWith<$Res> { - __$$CommunityViewImplCopyWithImpl( - _$CommunityViewImpl _value, $Res Function(_$CommunityViewImpl) _then) - : super(_value, _then); +class __$$CommunityViewImplCopyWithImpl<$Res> extends _$CommunityViewCopyWithImpl<$Res, _$CommunityViewImpl> implements _$$CommunityViewImplCopyWith<$Res> { + __$$CommunityViewImplCopyWithImpl(_$CommunityViewImpl _value, $Res Function(_$CommunityViewImpl) _then) : super(_value, _then); /// Create a copy of CommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? community = null, - Object? subscribed = null, - Object? blocked = null, - Object? counts = null, - Object? bannedFromCommunity = freezed, - }) { - return _then(_$CommunityViewImpl( - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - blocked: null == blocked - ? _value.blocked - : blocked // ignore: cast_nullable_to_non_nullable - as bool, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommunityAggregates, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? community = null, Object? subscribed = null, Object? blocked = null, Object? counts = null, Object? bannedFromCommunity = freezed}) { + return _then( + _$CommunityViewImpl( + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + blocked: + null == blocked + ? _value.blocked + : blocked // ignore: cast_nullable_to_non_nullable + as bool, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommunityAggregates, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -190,29 +171,22 @@ class __$$CommunityViewImplCopyWithImpl<$Res> @modelSerde class _$CommunityViewImpl extends _CommunityView { - const _$CommunityViewImpl( - {required this.community, - required this.subscribed, - required this.blocked, - required this.counts, - this.bannedFromCommunity}) - : super._(); + const _$CommunityViewImpl({required this.community, required this.subscribed, required this.blocked, required this.counts, this.bannedFromCommunity}) : super._(); - factory _$CommunityViewImpl.fromJson(Map json) => - _$$CommunityViewImplFromJson(json); + factory _$CommunityViewImpl.fromJson(Map json) => _$$CommunityViewImplFromJson(json); @override final Community community; -// v0.18.0 + // v0.18.0 @override final SubscribedType subscribed; -// v0.18.0 + // v0.18.0 @override final bool blocked; -// v0.18.0 + // v0.18.0 @override final CommunityAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool? bannedFromCommunity; @@ -226,48 +200,41 @@ class _$CommunityViewImpl extends _CommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommunityViewImpl && - (identical(other.community, community) || - other.community == community) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.community, community) || other.community == community) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.blocked, blocked) || other.blocked == blocked) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.bannedFromCommunity, bannedFromCommunity) || - other.bannedFromCommunity == bannedFromCommunity)); + (identical(other.bannedFromCommunity, bannedFromCommunity) || other.bannedFromCommunity == bannedFromCommunity)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, community, subscribed, blocked, counts, bannedFromCommunity); + int get hashCode => Object.hash(runtimeType, community, subscribed, blocked, counts, bannedFromCommunity); /// Create a copy of CommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CommunityViewImplCopyWith<_$CommunityViewImpl> get copyWith => - __$$CommunityViewImplCopyWithImpl<_$CommunityViewImpl>(this, _$identity); + _$$CommunityViewImplCopyWith<_$CommunityViewImpl> get copyWith => __$$CommunityViewImplCopyWithImpl<_$CommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$CommunityViewImplToJson( - this, - ); + return _$$CommunityViewImplToJson(this); } } abstract class _CommunityView extends CommunityView { - const factory _CommunityView( - {required final Community community, - required final SubscribedType subscribed, - required final bool blocked, - required final CommunityAggregates counts, - final bool? bannedFromCommunity}) = _$CommunityViewImpl; + const factory _CommunityView({ + required final Community community, + required final SubscribedType subscribed, + required final bool blocked, + required final CommunityAggregates counts, + final bool? bannedFromCommunity, + }) = _$CommunityViewImpl; const _CommunityView._() : super._(); - factory _CommunityView.fromJson(Map json) = - _$CommunityViewImpl.fromJson; + factory _CommunityView.fromJson(Map json) = _$CommunityViewImpl.fromJson; @override Community get community; // v0.18.0 @@ -284,6 +251,5 @@ abstract class _CommunityView extends CommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CommunityViewImplCopyWith<_$CommunityViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CommunityViewImplCopyWith<_$CommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/community_view.g.dart b/lib/src/v3/views/community_view.g.dart index 2663ddd2..6cc8e23a 100644 --- a/lib/src/v3/views/community_view.g.dart +++ b/lib/src/v3/views/community_view.g.dart @@ -6,21 +6,18 @@ part of 'community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CommunityViewImpl _$$CommunityViewImplFromJson(Map json) => - _$CommunityViewImpl( - community: Community.fromJson(json['community'] as Map), - subscribed: SubscribedType.fromJson(json['subscribed'] as String), - blocked: json['blocked'] as bool, - counts: - CommunityAggregates.fromJson(json['counts'] as Map), - bannedFromCommunity: json['banned_from_community'] as bool?, - ); +_$CommunityViewImpl _$$CommunityViewImplFromJson(Map json) => _$CommunityViewImpl( + community: Community.fromJson(json['community'] as Map), + subscribed: SubscribedType.fromJson(json['subscribed'] as String), + blocked: json['blocked'] as bool, + counts: CommunityAggregates.fromJson(json['counts'] as Map), + bannedFromCommunity: json['banned_from_community'] as bool?, +); -Map _$$CommunityViewImplToJson(_$CommunityViewImpl instance) => - { - 'community': instance.community.toJson(), - 'subscribed': instance.subscribed.toJson(), - 'blocked': instance.blocked, - 'counts': instance.counts.toJson(), - 'banned_from_community': instance.bannedFromCommunity, - }; +Map _$$CommunityViewImplToJson(_$CommunityViewImpl instance) => { + 'community': instance.community.toJson(), + 'subscribed': instance.subscribed.toJson(), + 'blocked': instance.blocked, + 'counts': instance.counts.toJson(), + 'banned_from_community': instance.bannedFromCommunity, +}; diff --git a/lib/src/v3/views/custom_emoji_view.dart b/lib/src/v3/views/custom_emoji_view.dart index 7a8243c6..f5a544c4 100644 --- a/lib/src/v3/views/custom_emoji_view.dart +++ b/lib/src/v3/views/custom_emoji_view.dart @@ -15,6 +15,5 @@ class CustomEmojiView with _$CustomEmojiView { }) = _CustomEmojiView; const CustomEmojiView._(); - factory CustomEmojiView.fromJson(Map json) => - _$CustomEmojiViewFromJson(json); + factory CustomEmojiView.fromJson(Map json) => _$CustomEmojiViewFromJson(json); } diff --git a/lib/src/v3/views/custom_emoji_view.freezed.dart b/lib/src/v3/views/custom_emoji_view.freezed.dart index 0882a089..ab0d33bb 100644 --- a/lib/src/v3/views/custom_emoji_view.freezed.dart +++ b/lib/src/v3/views/custom_emoji_view.freezed.dart @@ -12,7 +12,8 @@ part of 'custom_emoji_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); CustomEmojiView _$CustomEmojiViewFromJson(Map json) { return _CustomEmojiView.fromJson(json); @@ -29,15 +30,12 @@ mixin _$CustomEmojiView { /// Create a copy of CustomEmojiView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $CustomEmojiViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $CustomEmojiViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $CustomEmojiViewCopyWith<$Res> { - factory $CustomEmojiViewCopyWith( - CustomEmojiView value, $Res Function(CustomEmojiView) then) = - _$CustomEmojiViewCopyWithImpl<$Res, CustomEmojiView>; + factory $CustomEmojiViewCopyWith(CustomEmojiView value, $Res Function(CustomEmojiView) then) = _$CustomEmojiViewCopyWithImpl<$Res, CustomEmojiView>; @useResult $Res call({CustomEmoji customEmoji, List keywords}); @@ -45,8 +43,7 @@ abstract class $CustomEmojiViewCopyWith<$Res> { } /// @nodoc -class _$CustomEmojiViewCopyWithImpl<$Res, $Val extends CustomEmojiView> - implements $CustomEmojiViewCopyWith<$Res> { +class _$CustomEmojiViewCopyWithImpl<$Res, $Val extends CustomEmojiView> implements $CustomEmojiViewCopyWith<$Res> { _$CustomEmojiViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -58,20 +55,22 @@ class _$CustomEmojiViewCopyWithImpl<$Res, $Val extends CustomEmojiView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? customEmoji = null, - Object? keywords = null, - }) { - return _then(_value.copyWith( - customEmoji: null == customEmoji - ? _value.customEmoji - : customEmoji // ignore: cast_nullable_to_non_nullable - as CustomEmoji, - keywords: null == keywords - ? _value.keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? customEmoji = null, Object? keywords = null}) { + return _then( + _value.copyWith( + customEmoji: + null == customEmoji + ? _value.customEmoji + : customEmoji // ignore: cast_nullable_to_non_nullable + as CustomEmoji, + keywords: + null == keywords + ? _value.keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of CustomEmojiView @@ -86,11 +85,8 @@ class _$CustomEmojiViewCopyWithImpl<$Res, $Val extends CustomEmojiView> } /// @nodoc -abstract class _$$CustomEmojiViewImplCopyWith<$Res> - implements $CustomEmojiViewCopyWith<$Res> { - factory _$$CustomEmojiViewImplCopyWith(_$CustomEmojiViewImpl value, - $Res Function(_$CustomEmojiViewImpl) then) = - __$$CustomEmojiViewImplCopyWithImpl<$Res>; +abstract class _$$CustomEmojiViewImplCopyWith<$Res> implements $CustomEmojiViewCopyWith<$Res> { + factory _$$CustomEmojiViewImplCopyWith(_$CustomEmojiViewImpl value, $Res Function(_$CustomEmojiViewImpl) then) = __$$CustomEmojiViewImplCopyWithImpl<$Res>; @override @useResult $Res call({CustomEmoji customEmoji, List keywords}); @@ -100,31 +96,28 @@ abstract class _$$CustomEmojiViewImplCopyWith<$Res> } /// @nodoc -class __$$CustomEmojiViewImplCopyWithImpl<$Res> - extends _$CustomEmojiViewCopyWithImpl<$Res, _$CustomEmojiViewImpl> - implements _$$CustomEmojiViewImplCopyWith<$Res> { - __$$CustomEmojiViewImplCopyWithImpl( - _$CustomEmojiViewImpl _value, $Res Function(_$CustomEmojiViewImpl) _then) - : super(_value, _then); +class __$$CustomEmojiViewImplCopyWithImpl<$Res> extends _$CustomEmojiViewCopyWithImpl<$Res, _$CustomEmojiViewImpl> implements _$$CustomEmojiViewImplCopyWith<$Res> { + __$$CustomEmojiViewImplCopyWithImpl(_$CustomEmojiViewImpl _value, $Res Function(_$CustomEmojiViewImpl) _then) : super(_value, _then); /// Create a copy of CustomEmojiView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? customEmoji = null, - Object? keywords = null, - }) { - return _then(_$CustomEmojiViewImpl( - customEmoji: null == customEmoji - ? _value.customEmoji - : customEmoji // ignore: cast_nullable_to_non_nullable - as CustomEmoji, - keywords: null == keywords - ? _value._keywords - : keywords // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? customEmoji = null, Object? keywords = null}) { + return _then( + _$CustomEmojiViewImpl( + customEmoji: + null == customEmoji + ? _value.customEmoji + : customEmoji // ignore: cast_nullable_to_non_nullable + as CustomEmoji, + keywords: + null == keywords + ? _value._keywords + : keywords // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -132,20 +125,15 @@ class __$$CustomEmojiViewImplCopyWithImpl<$Res> @modelSerde class _$CustomEmojiViewImpl extends _CustomEmojiView { - const _$CustomEmojiViewImpl( - {required this.customEmoji, - required final List keywords}) - : _keywords = keywords, - super._(); + const _$CustomEmojiViewImpl({required this.customEmoji, required final List keywords}) : _keywords = keywords, super._(); - factory _$CustomEmojiViewImpl.fromJson(Map json) => - _$$CustomEmojiViewImplFromJson(json); + factory _$CustomEmojiViewImpl.fromJson(Map json) => _$$CustomEmojiViewImplFromJson(json); @override final CustomEmoji customEmoji; -// v0.18.0 + // v0.18.0 final List _keywords; -// v0.18.0 + // v0.18.0 @override List get keywords { if (_keywords is EqualUnmodifiableListView) return _keywords; @@ -163,42 +151,32 @@ class _$CustomEmojiViewImpl extends _CustomEmojiView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CustomEmojiViewImpl && - (identical(other.customEmoji, customEmoji) || - other.customEmoji == customEmoji) && + (identical(other.customEmoji, customEmoji) || other.customEmoji == customEmoji) && const DeepCollectionEquality().equals(other._keywords, _keywords)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, customEmoji, const DeepCollectionEquality().hash(_keywords)); + int get hashCode => Object.hash(runtimeType, customEmoji, const DeepCollectionEquality().hash(_keywords)); /// Create a copy of CustomEmojiView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$CustomEmojiViewImplCopyWith<_$CustomEmojiViewImpl> get copyWith => - __$$CustomEmojiViewImplCopyWithImpl<_$CustomEmojiViewImpl>( - this, _$identity); + _$$CustomEmojiViewImplCopyWith<_$CustomEmojiViewImpl> get copyWith => __$$CustomEmojiViewImplCopyWithImpl<_$CustomEmojiViewImpl>(this, _$identity); @override Map toJson() { - return _$$CustomEmojiViewImplToJson( - this, - ); + return _$$CustomEmojiViewImplToJson(this); } } abstract class _CustomEmojiView extends CustomEmojiView { - const factory _CustomEmojiView( - {required final CustomEmoji customEmoji, - required final List keywords}) = - _$CustomEmojiViewImpl; + const factory _CustomEmojiView({required final CustomEmoji customEmoji, required final List keywords}) = _$CustomEmojiViewImpl; const _CustomEmojiView._() : super._(); - factory _CustomEmojiView.fromJson(Map json) = - _$CustomEmojiViewImpl.fromJson; + factory _CustomEmojiView.fromJson(Map json) = _$CustomEmojiViewImpl.fromJson; @override CustomEmoji get customEmoji; // v0.18.0 @@ -209,6 +187,5 @@ abstract class _CustomEmojiView extends CustomEmojiView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$CustomEmojiViewImplCopyWith<_$CustomEmojiViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$CustomEmojiViewImplCopyWith<_$CustomEmojiViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/custom_emoji_view.g.dart b/lib/src/v3/views/custom_emoji_view.g.dart index 0d18ab32..aef67109 100644 --- a/lib/src/v3/views/custom_emoji_view.g.dart +++ b/lib/src/v3/views/custom_emoji_view.g.dart @@ -6,19 +6,12 @@ part of 'custom_emoji_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$CustomEmojiViewImpl _$$CustomEmojiViewImplFromJson( - Map json) => - _$CustomEmojiViewImpl( - customEmoji: - CustomEmoji.fromJson(json['custom_emoji'] as Map), - keywords: (json['keywords'] as List) - .map((e) => CustomEmojiKeyword.fromJson(e as Map)) - .toList(), - ); +_$CustomEmojiViewImpl _$$CustomEmojiViewImplFromJson(Map json) => _$CustomEmojiViewImpl( + customEmoji: CustomEmoji.fromJson(json['custom_emoji'] as Map), + keywords: (json['keywords'] as List).map((e) => CustomEmojiKeyword.fromJson(e as Map)).toList(), +); -Map _$$CustomEmojiViewImplToJson( - _$CustomEmojiViewImpl instance) => - { - 'custom_emoji': instance.customEmoji.toJson(), - 'keywords': instance.keywords.map((e) => e.toJson()).toList(), - }; +Map _$$CustomEmojiViewImplToJson(_$CustomEmojiViewImpl instance) => { + 'custom_emoji': instance.customEmoji.toJson(), + 'keywords': instance.keywords.map((e) => e.toJson()).toList(), +}; diff --git a/lib/src/v3/views/instance_block_view.dart b/lib/src/v3/views/instance_block_view.dart index cf50cadb..d7309d93 100644 --- a/lib/src/v3/views/instance_block_view.dart +++ b/lib/src/v3/views/instance_block_view.dart @@ -16,6 +16,5 @@ class InstanceBlockView with _$InstanceBlockView { }) = _InstanceBlockView; const InstanceBlockView._(); - factory InstanceBlockView.fromJson(Map json) => - _$InstanceBlockViewFromJson(json); + factory InstanceBlockView.fromJson(Map json) => _$InstanceBlockViewFromJson(json); } diff --git a/lib/src/v3/views/instance_block_view.freezed.dart b/lib/src/v3/views/instance_block_view.freezed.dart index f1b43319..5ee4a4b5 100644 --- a/lib/src/v3/views/instance_block_view.freezed.dart +++ b/lib/src/v3/views/instance_block_view.freezed.dart @@ -12,7 +12,8 @@ part of 'instance_block_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); InstanceBlockView _$InstanceBlockViewFromJson(Map json) { return _InstanceBlockView.fromJson(json); @@ -21,8 +22,7 @@ InstanceBlockView _$InstanceBlockViewFromJson(Map json) { /// @nodoc mixin _$InstanceBlockView { Person get person => throw _privateConstructorUsedError; // v0.19.0 (required) - Instance get instance => - throw _privateConstructorUsedError; // v0.19.0 (required) + Instance get instance => throw _privateConstructorUsedError; // v0.19.0 (required) Site? get site => throw _privateConstructorUsedError; /// Serializes this InstanceBlockView to a JSON map. @@ -31,15 +31,12 @@ mixin _$InstanceBlockView { /// Create a copy of InstanceBlockView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $InstanceBlockViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $InstanceBlockViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $InstanceBlockViewCopyWith<$Res> { - factory $InstanceBlockViewCopyWith( - InstanceBlockView value, $Res Function(InstanceBlockView) then) = - _$InstanceBlockViewCopyWithImpl<$Res, InstanceBlockView>; + factory $InstanceBlockViewCopyWith(InstanceBlockView value, $Res Function(InstanceBlockView) then) = _$InstanceBlockViewCopyWithImpl<$Res, InstanceBlockView>; @useResult $Res call({Person person, Instance instance, Site? site}); @@ -49,8 +46,7 @@ abstract class $InstanceBlockViewCopyWith<$Res> { } /// @nodoc -class _$InstanceBlockViewCopyWithImpl<$Res, $Val extends InstanceBlockView> - implements $InstanceBlockViewCopyWith<$Res> { +class _$InstanceBlockViewCopyWithImpl<$Res, $Val extends InstanceBlockView> implements $InstanceBlockViewCopyWith<$Res> { _$InstanceBlockViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,25 +58,27 @@ class _$InstanceBlockViewCopyWithImpl<$Res, $Val extends InstanceBlockView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? instance = null, - Object? site = freezed, - }) { - return _then(_value.copyWith( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - instance: null == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as Instance, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - ) as $Val); + $Res call({Object? person = null, Object? instance = null, Object? site = freezed}) { + return _then( + _value.copyWith( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + instance: + null == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as Instance, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + ) + as $Val, + ); } /// Create a copy of InstanceBlockView @@ -119,11 +117,8 @@ class _$InstanceBlockViewCopyWithImpl<$Res, $Val extends InstanceBlockView> } /// @nodoc -abstract class _$$InstanceBlockViewImplCopyWith<$Res> - implements $InstanceBlockViewCopyWith<$Res> { - factory _$$InstanceBlockViewImplCopyWith(_$InstanceBlockViewImpl value, - $Res Function(_$InstanceBlockViewImpl) then) = - __$$InstanceBlockViewImplCopyWithImpl<$Res>; +abstract class _$$InstanceBlockViewImplCopyWith<$Res> implements $InstanceBlockViewCopyWith<$Res> { + factory _$$InstanceBlockViewImplCopyWith(_$InstanceBlockViewImpl value, $Res Function(_$InstanceBlockViewImpl) then) = __$$InstanceBlockViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person person, Instance instance, Site? site}); @@ -137,36 +132,33 @@ abstract class _$$InstanceBlockViewImplCopyWith<$Res> } /// @nodoc -class __$$InstanceBlockViewImplCopyWithImpl<$Res> - extends _$InstanceBlockViewCopyWithImpl<$Res, _$InstanceBlockViewImpl> - implements _$$InstanceBlockViewImplCopyWith<$Res> { - __$$InstanceBlockViewImplCopyWithImpl(_$InstanceBlockViewImpl _value, - $Res Function(_$InstanceBlockViewImpl) _then) - : super(_value, _then); +class __$$InstanceBlockViewImplCopyWithImpl<$Res> extends _$InstanceBlockViewCopyWithImpl<$Res, _$InstanceBlockViewImpl> implements _$$InstanceBlockViewImplCopyWith<$Res> { + __$$InstanceBlockViewImplCopyWithImpl(_$InstanceBlockViewImpl _value, $Res Function(_$InstanceBlockViewImpl) _then) : super(_value, _then); /// Create a copy of InstanceBlockView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? instance = null, - Object? site = freezed, - }) { - return _then(_$InstanceBlockViewImpl( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - instance: null == instance - ? _value.instance - : instance // ignore: cast_nullable_to_non_nullable - as Instance, - site: freezed == site - ? _value.site - : site // ignore: cast_nullable_to_non_nullable - as Site?, - )); + $Res call({Object? person = null, Object? instance = null, Object? site = freezed}) { + return _then( + _$InstanceBlockViewImpl( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + instance: + null == instance + ? _value.instance + : instance // ignore: cast_nullable_to_non_nullable + as Instance, + site: + freezed == site + ? _value.site + : site // ignore: cast_nullable_to_non_nullable + as Site?, + ), + ); } } @@ -174,19 +166,16 @@ class __$$InstanceBlockViewImplCopyWithImpl<$Res> @modelSerde class _$InstanceBlockViewImpl extends _InstanceBlockView { - const _$InstanceBlockViewImpl( - {required this.person, required this.instance, this.site}) - : super._(); + const _$InstanceBlockViewImpl({required this.person, required this.instance, this.site}) : super._(); - factory _$InstanceBlockViewImpl.fromJson(Map json) => - _$$InstanceBlockViewImplFromJson(json); + factory _$InstanceBlockViewImpl.fromJson(Map json) => _$$InstanceBlockViewImplFromJson(json); @override final Person person; -// v0.19.0 (required) + // v0.19.0 (required) @override final Instance instance; -// v0.19.0 (required) + // v0.19.0 (required) @override final Site? site; @@ -201,8 +190,7 @@ class _$InstanceBlockViewImpl extends _InstanceBlockView { (other.runtimeType == runtimeType && other is _$InstanceBlockViewImpl && (identical(other.person, person) || other.person == person) && - (identical(other.instance, instance) || - other.instance == instance) && + (identical(other.instance, instance) || other.instance == instance) && (identical(other.site, site) || other.site == site)); } @@ -215,27 +203,19 @@ class _$InstanceBlockViewImpl extends _InstanceBlockView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$InstanceBlockViewImplCopyWith<_$InstanceBlockViewImpl> get copyWith => - __$$InstanceBlockViewImplCopyWithImpl<_$InstanceBlockViewImpl>( - this, _$identity); + _$$InstanceBlockViewImplCopyWith<_$InstanceBlockViewImpl> get copyWith => __$$InstanceBlockViewImplCopyWithImpl<_$InstanceBlockViewImpl>(this, _$identity); @override Map toJson() { - return _$$InstanceBlockViewImplToJson( - this, - ); + return _$$InstanceBlockViewImplToJson(this); } } abstract class _InstanceBlockView extends InstanceBlockView { - const factory _InstanceBlockView( - {required final Person person, - required final Instance instance, - final Site? site}) = _$InstanceBlockViewImpl; + const factory _InstanceBlockView({required final Person person, required final Instance instance, final Site? site}) = _$InstanceBlockViewImpl; const _InstanceBlockView._() : super._(); - factory _InstanceBlockView.fromJson(Map json) = - _$InstanceBlockViewImpl.fromJson; + factory _InstanceBlockView.fromJson(Map json) = _$InstanceBlockViewImpl.fromJson; @override Person get person; // v0.19.0 (required) @@ -248,6 +228,5 @@ abstract class _InstanceBlockView extends InstanceBlockView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$InstanceBlockViewImplCopyWith<_$InstanceBlockViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$InstanceBlockViewImplCopyWith<_$InstanceBlockViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/instance_block_view.g.dart b/lib/src/v3/views/instance_block_view.g.dart index f10d5002..fa1d6920 100644 --- a/lib/src/v3/views/instance_block_view.g.dart +++ b/lib/src/v3/views/instance_block_view.g.dart @@ -6,20 +6,14 @@ part of 'instance_block_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$InstanceBlockViewImpl _$$InstanceBlockViewImplFromJson( - Map json) => - _$InstanceBlockViewImpl( - person: Person.fromJson(json['person'] as Map), - instance: Instance.fromJson(json['instance'] as Map), - site: json['site'] == null - ? null - : Site.fromJson(json['site'] as Map), - ); +_$InstanceBlockViewImpl _$$InstanceBlockViewImplFromJson(Map json) => _$InstanceBlockViewImpl( + person: Person.fromJson(json['person'] as Map), + instance: Instance.fromJson(json['instance'] as Map), + site: json['site'] == null ? null : Site.fromJson(json['site'] as Map), +); -Map _$$InstanceBlockViewImplToJson( - _$InstanceBlockViewImpl instance) => - { - 'person': instance.person.toJson(), - 'instance': instance.instance.toJson(), - 'site': instance.site?.toJson(), - }; +Map _$$InstanceBlockViewImplToJson(_$InstanceBlockViewImpl instance) => { + 'person': instance.person.toJson(), + 'instance': instance.instance.toJson(), + 'site': instance.site?.toJson(), +}; diff --git a/lib/src/v3/views/local_user_view.dart b/lib/src/v3/views/local_user_view.dart index 2d8c0eee..480dbaed 100644 --- a/lib/src/v3/views/local_user_view.dart +++ b/lib/src/v3/views/local_user_view.dart @@ -17,6 +17,5 @@ class LocalUserView with _$LocalUserView { }) = _LocalUserView; const LocalUserView._(); - factory LocalUserView.fromJson(Map json) => - _$LocalUserViewFromJson(json); + factory LocalUserView.fromJson(Map json) => _$LocalUserViewFromJson(json); } diff --git a/lib/src/v3/views/local_user_view.freezed.dart b/lib/src/v3/views/local_user_view.freezed.dart index 762515b9..3fef5f5a 100644 --- a/lib/src/v3/views/local_user_view.freezed.dart +++ b/lib/src/v3/views/local_user_view.freezed.dart @@ -12,7 +12,8 @@ part of 'local_user_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); LocalUserView _$LocalUserViewFromJson(Map json) { return _LocalUserView.fromJson(json); @@ -21,8 +22,7 @@ LocalUserView _$LocalUserViewFromJson(Map json) { /// @nodoc mixin _$LocalUserView { LocalUser get localUser => throw _privateConstructorUsedError; // v0.18.0 - LocalUserVoteDisplayMode? get localUserVoteDisplayMode => - throw _privateConstructorUsedError; // v0.19.4 (required) + LocalUserVoteDisplayMode? get localUserVoteDisplayMode => throw _privateConstructorUsedError; // v0.19.4 (required) Person get person => throw _privateConstructorUsedError; // v0.18.0 PersonAggregates get counts => throw _privateConstructorUsedError; @@ -32,21 +32,14 @@ mixin _$LocalUserView { /// Create a copy of LocalUserView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $LocalUserViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $LocalUserViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $LocalUserViewCopyWith<$Res> { - factory $LocalUserViewCopyWith( - LocalUserView value, $Res Function(LocalUserView) then) = - _$LocalUserViewCopyWithImpl<$Res, LocalUserView>; + factory $LocalUserViewCopyWith(LocalUserView value, $Res Function(LocalUserView) then) = _$LocalUserViewCopyWithImpl<$Res, LocalUserView>; @useResult - $Res call( - {LocalUser localUser, - LocalUserVoteDisplayMode? localUserVoteDisplayMode, - Person person, - PersonAggregates counts}); + $Res call({LocalUser localUser, LocalUserVoteDisplayMode? localUserVoteDisplayMode, Person person, PersonAggregates counts}); $LocalUserCopyWith<$Res> get localUser; $LocalUserVoteDisplayModeCopyWith<$Res>? get localUserVoteDisplayMode; @@ -55,8 +48,7 @@ abstract class $LocalUserViewCopyWith<$Res> { } /// @nodoc -class _$LocalUserViewCopyWithImpl<$Res, $Val extends LocalUserView> - implements $LocalUserViewCopyWith<$Res> { +class _$LocalUserViewCopyWithImpl<$Res, $Val extends LocalUserView> implements $LocalUserViewCopyWith<$Res> { _$LocalUserViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,30 +60,32 @@ class _$LocalUserViewCopyWithImpl<$Res, $Val extends LocalUserView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUser = null, - Object? localUserVoteDisplayMode = freezed, - Object? person = null, - Object? counts = null, - }) { - return _then(_value.copyWith( - localUser: null == localUser - ? _value.localUser - : localUser // ignore: cast_nullable_to_non_nullable - as LocalUser, - localUserVoteDisplayMode: freezed == localUserVoteDisplayMode - ? _value.localUserVoteDisplayMode - : localUserVoteDisplayMode // ignore: cast_nullable_to_non_nullable - as LocalUserVoteDisplayMode?, - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PersonAggregates, - ) as $Val); + $Res call({Object? localUser = null, Object? localUserVoteDisplayMode = freezed, Object? person = null, Object? counts = null}) { + return _then( + _value.copyWith( + localUser: + null == localUser + ? _value.localUser + : localUser // ignore: cast_nullable_to_non_nullable + as LocalUser, + localUserVoteDisplayMode: + freezed == localUserVoteDisplayMode + ? _value.localUserVoteDisplayMode + : localUserVoteDisplayMode // ignore: cast_nullable_to_non_nullable + as LocalUserVoteDisplayMode?, + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PersonAggregates, + ) + as $Val, + ); } /// Create a copy of LocalUserView @@ -113,8 +107,7 @@ class _$LocalUserViewCopyWithImpl<$Res, $Val extends LocalUserView> return null; } - return $LocalUserVoteDisplayModeCopyWith<$Res>( - _value.localUserVoteDisplayMode!, (value) { + return $LocalUserVoteDisplayModeCopyWith<$Res>(_value.localUserVoteDisplayMode!, (value) { return _then(_value.copyWith(localUserVoteDisplayMode: value) as $Val); }); } @@ -141,18 +134,11 @@ class _$LocalUserViewCopyWithImpl<$Res, $Val extends LocalUserView> } /// @nodoc -abstract class _$$LocalUserViewImplCopyWith<$Res> - implements $LocalUserViewCopyWith<$Res> { - factory _$$LocalUserViewImplCopyWith( - _$LocalUserViewImpl value, $Res Function(_$LocalUserViewImpl) then) = - __$$LocalUserViewImplCopyWithImpl<$Res>; +abstract class _$$LocalUserViewImplCopyWith<$Res> implements $LocalUserViewCopyWith<$Res> { + factory _$$LocalUserViewImplCopyWith(_$LocalUserViewImpl value, $Res Function(_$LocalUserViewImpl) then) = __$$LocalUserViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {LocalUser localUser, - LocalUserVoteDisplayMode? localUserVoteDisplayMode, - Person person, - PersonAggregates counts}); + $Res call({LocalUser localUser, LocalUserVoteDisplayMode? localUserVoteDisplayMode, Person person, PersonAggregates counts}); @override $LocalUserCopyWith<$Res> get localUser; @@ -165,41 +151,38 @@ abstract class _$$LocalUserViewImplCopyWith<$Res> } /// @nodoc -class __$$LocalUserViewImplCopyWithImpl<$Res> - extends _$LocalUserViewCopyWithImpl<$Res, _$LocalUserViewImpl> - implements _$$LocalUserViewImplCopyWith<$Res> { - __$$LocalUserViewImplCopyWithImpl( - _$LocalUserViewImpl _value, $Res Function(_$LocalUserViewImpl) _then) - : super(_value, _then); +class __$$LocalUserViewImplCopyWithImpl<$Res> extends _$LocalUserViewCopyWithImpl<$Res, _$LocalUserViewImpl> implements _$$LocalUserViewImplCopyWith<$Res> { + __$$LocalUserViewImplCopyWithImpl(_$LocalUserViewImpl _value, $Res Function(_$LocalUserViewImpl) _then) : super(_value, _then); /// Create a copy of LocalUserView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? localUser = null, - Object? localUserVoteDisplayMode = freezed, - Object? person = null, - Object? counts = null, - }) { - return _then(_$LocalUserViewImpl( - localUser: null == localUser - ? _value.localUser - : localUser // ignore: cast_nullable_to_non_nullable - as LocalUser, - localUserVoteDisplayMode: freezed == localUserVoteDisplayMode - ? _value.localUserVoteDisplayMode - : localUserVoteDisplayMode // ignore: cast_nullable_to_non_nullable - as LocalUserVoteDisplayMode?, - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PersonAggregates, - )); + $Res call({Object? localUser = null, Object? localUserVoteDisplayMode = freezed, Object? person = null, Object? counts = null}) { + return _then( + _$LocalUserViewImpl( + localUser: + null == localUser + ? _value.localUser + : localUser // ignore: cast_nullable_to_non_nullable + as LocalUser, + localUserVoteDisplayMode: + freezed == localUserVoteDisplayMode + ? _value.localUserVoteDisplayMode + : localUserVoteDisplayMode // ignore: cast_nullable_to_non_nullable + as LocalUserVoteDisplayMode?, + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PersonAggregates, + ), + ); } } @@ -207,25 +190,19 @@ class __$$LocalUserViewImplCopyWithImpl<$Res> @modelSerde class _$LocalUserViewImpl extends _LocalUserView { - const _$LocalUserViewImpl( - {required this.localUser, - this.localUserVoteDisplayMode, - required this.person, - required this.counts}) - : super._(); + const _$LocalUserViewImpl({required this.localUser, this.localUserVoteDisplayMode, required this.person, required this.counts}) : super._(); - factory _$LocalUserViewImpl.fromJson(Map json) => - _$$LocalUserViewImplFromJson(json); + factory _$LocalUserViewImpl.fromJson(Map json) => _$$LocalUserViewImplFromJson(json); @override final LocalUser localUser; -// v0.18.0 + // v0.18.0 @override final LocalUserVoteDisplayMode? localUserVoteDisplayMode; -// v0.19.4 (required) + // v0.19.4 (required) @override final Person person; -// v0.18.0 + // v0.18.0 @override final PersonAggregates counts; @@ -239,46 +216,35 @@ class _$LocalUserViewImpl extends _LocalUserView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LocalUserViewImpl && - (identical(other.localUser, localUser) || - other.localUser == localUser) && - (identical( - other.localUserVoteDisplayMode, localUserVoteDisplayMode) || - other.localUserVoteDisplayMode == localUserVoteDisplayMode) && + (identical(other.localUser, localUser) || other.localUser == localUser) && + (identical(other.localUserVoteDisplayMode, localUserVoteDisplayMode) || other.localUserVoteDisplayMode == localUserVoteDisplayMode) && (identical(other.person, person) || other.person == person) && (identical(other.counts, counts) || other.counts == counts)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, localUser, localUserVoteDisplayMode, person, counts); + int get hashCode => Object.hash(runtimeType, localUser, localUserVoteDisplayMode, person, counts); /// Create a copy of LocalUserView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$LocalUserViewImplCopyWith<_$LocalUserViewImpl> get copyWith => - __$$LocalUserViewImplCopyWithImpl<_$LocalUserViewImpl>(this, _$identity); + _$$LocalUserViewImplCopyWith<_$LocalUserViewImpl> get copyWith => __$$LocalUserViewImplCopyWithImpl<_$LocalUserViewImpl>(this, _$identity); @override Map toJson() { - return _$$LocalUserViewImplToJson( - this, - ); + return _$$LocalUserViewImplToJson(this); } } abstract class _LocalUserView extends LocalUserView { - const factory _LocalUserView( - {required final LocalUser localUser, - final LocalUserVoteDisplayMode? localUserVoteDisplayMode, - required final Person person, - required final PersonAggregates counts}) = _$LocalUserViewImpl; + const factory _LocalUserView({required final LocalUser localUser, final LocalUserVoteDisplayMode? localUserVoteDisplayMode, required final Person person, required final PersonAggregates counts}) = + _$LocalUserViewImpl; const _LocalUserView._() : super._(); - factory _LocalUserView.fromJson(Map json) = - _$LocalUserViewImpl.fromJson; + factory _LocalUserView.fromJson(Map json) = _$LocalUserViewImpl.fromJson; @override LocalUser get localUser; // v0.18.0 @@ -293,6 +259,5 @@ abstract class _LocalUserView extends LocalUserView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$LocalUserViewImplCopyWith<_$LocalUserViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$LocalUserViewImplCopyWith<_$LocalUserViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/local_user_view.g.dart b/lib/src/v3/views/local_user_view.g.dart index a4082699..38412a66 100644 --- a/lib/src/v3/views/local_user_view.g.dart +++ b/lib/src/v3/views/local_user_view.g.dart @@ -6,22 +6,16 @@ part of 'local_user_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$LocalUserViewImpl _$$LocalUserViewImplFromJson(Map json) => - _$LocalUserViewImpl( - localUser: LocalUser.fromJson(json['local_user'] as Map), - localUserVoteDisplayMode: json['local_user_vote_display_mode'] == null - ? null - : LocalUserVoteDisplayMode.fromJson( - json['local_user_vote_display_mode'] as Map), - person: Person.fromJson(json['person'] as Map), - counts: PersonAggregates.fromJson(json['counts'] as Map), - ); +_$LocalUserViewImpl _$$LocalUserViewImplFromJson(Map json) => _$LocalUserViewImpl( + localUser: LocalUser.fromJson(json['local_user'] as Map), + localUserVoteDisplayMode: json['local_user_vote_display_mode'] == null ? null : LocalUserVoteDisplayMode.fromJson(json['local_user_vote_display_mode'] as Map), + person: Person.fromJson(json['person'] as Map), + counts: PersonAggregates.fromJson(json['counts'] as Map), +); -Map _$$LocalUserViewImplToJson(_$LocalUserViewImpl instance) => - { - 'local_user': instance.localUser.toJson(), - 'local_user_vote_display_mode': - instance.localUserVoteDisplayMode?.toJson(), - 'person': instance.person.toJson(), - 'counts': instance.counts.toJson(), - }; +Map _$$LocalUserViewImplToJson(_$LocalUserViewImpl instance) => { + 'local_user': instance.localUser.toJson(), + 'local_user_vote_display_mode': instance.localUserVoteDisplayMode?.toJson(), + 'person': instance.person.toJson(), + 'counts': instance.counts.toJson(), +}; diff --git a/lib/src/v3/views/mod_add_community_view.dart b/lib/src/v3/views/mod_add_community_view.dart index 9011cbe4..5aca5ac6 100644 --- a/lib/src/v3/views/mod_add_community_view.dart +++ b/lib/src/v3/views/mod_add_community_view.dart @@ -17,6 +17,5 @@ class ModAddCommunityView with _$ModAddCommunityView { }) = _ModAddCommunityView; const ModAddCommunityView._(); - factory ModAddCommunityView.fromJson(Map json) => - _$ModAddCommunityViewFromJson(json); + factory ModAddCommunityView.fromJson(Map json) => _$ModAddCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/mod_add_community_view.freezed.dart b/lib/src/v3/views/mod_add_community_view.freezed.dart index 122d9091..6f0053d9 100644 --- a/lib/src/v3/views/mod_add_community_view.freezed.dart +++ b/lib/src/v3/views/mod_add_community_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_add_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModAddCommunityView _$ModAddCommunityViewFromJson(Map json) { return _ModAddCommunityView.fromJson(json); @@ -20,8 +21,7 @@ ModAddCommunityView _$ModAddCommunityViewFromJson(Map json) { /// @nodoc mixin _$ModAddCommunityView { - ModAddCommunity get modAddCommunity => - throw _privateConstructorUsedError; // v0.18.0 + ModAddCommunity get modAddCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get moddedPerson => throw _privateConstructorUsedError; @@ -32,21 +32,14 @@ mixin _$ModAddCommunityView { /// Create a copy of ModAddCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModAddCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModAddCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModAddCommunityViewCopyWith<$Res> { - factory $ModAddCommunityViewCopyWith( - ModAddCommunityView value, $Res Function(ModAddCommunityView) then) = - _$ModAddCommunityViewCopyWithImpl<$Res, ModAddCommunityView>; + factory $ModAddCommunityViewCopyWith(ModAddCommunityView value, $Res Function(ModAddCommunityView) then) = _$ModAddCommunityViewCopyWithImpl<$Res, ModAddCommunityView>; @useResult - $Res call( - {ModAddCommunity modAddCommunity, - Person? moderator, - Community community, - Person moddedPerson}); + $Res call({ModAddCommunity modAddCommunity, Person? moderator, Community community, Person moddedPerson}); $ModAddCommunityCopyWith<$Res> get modAddCommunity; $PersonCopyWith<$Res>? get moderator; @@ -55,8 +48,7 @@ abstract class $ModAddCommunityViewCopyWith<$Res> { } /// @nodoc -class _$ModAddCommunityViewCopyWithImpl<$Res, $Val extends ModAddCommunityView> - implements $ModAddCommunityViewCopyWith<$Res> { +class _$ModAddCommunityViewCopyWithImpl<$Res, $Val extends ModAddCommunityView> implements $ModAddCommunityViewCopyWith<$Res> { _$ModAddCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,30 +60,32 @@ class _$ModAddCommunityViewCopyWithImpl<$Res, $Val extends ModAddCommunityView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modAddCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? moddedPerson = null, - }) { - return _then(_value.copyWith( - modAddCommunity: null == modAddCommunity - ? _value.modAddCommunity - : modAddCommunity // ignore: cast_nullable_to_non_nullable - as ModAddCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? modAddCommunity = null, Object? moderator = freezed, Object? community = null, Object? moddedPerson = null}) { + return _then( + _value.copyWith( + modAddCommunity: + null == modAddCommunity + ? _value.modAddCommunity + : modAddCommunity // ignore: cast_nullable_to_non_nullable + as ModAddCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of ModAddCommunityView @@ -140,18 +134,11 @@ class _$ModAddCommunityViewCopyWithImpl<$Res, $Val extends ModAddCommunityView> } /// @nodoc -abstract class _$$ModAddCommunityViewImplCopyWith<$Res> - implements $ModAddCommunityViewCopyWith<$Res> { - factory _$$ModAddCommunityViewImplCopyWith(_$ModAddCommunityViewImpl value, - $Res Function(_$ModAddCommunityViewImpl) then) = - __$$ModAddCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$ModAddCommunityViewImplCopyWith<$Res> implements $ModAddCommunityViewCopyWith<$Res> { + factory _$$ModAddCommunityViewImplCopyWith(_$ModAddCommunityViewImpl value, $Res Function(_$ModAddCommunityViewImpl) then) = __$$ModAddCommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModAddCommunity modAddCommunity, - Person? moderator, - Community community, - Person moddedPerson}); + $Res call({ModAddCommunity modAddCommunity, Person? moderator, Community community, Person moddedPerson}); @override $ModAddCommunityCopyWith<$Res> get modAddCommunity; @@ -164,41 +151,38 @@ abstract class _$$ModAddCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$ModAddCommunityViewImplCopyWithImpl<$Res> - extends _$ModAddCommunityViewCopyWithImpl<$Res, _$ModAddCommunityViewImpl> - implements _$$ModAddCommunityViewImplCopyWith<$Res> { - __$$ModAddCommunityViewImplCopyWithImpl(_$ModAddCommunityViewImpl _value, - $Res Function(_$ModAddCommunityViewImpl) _then) - : super(_value, _then); +class __$$ModAddCommunityViewImplCopyWithImpl<$Res> extends _$ModAddCommunityViewCopyWithImpl<$Res, _$ModAddCommunityViewImpl> implements _$$ModAddCommunityViewImplCopyWith<$Res> { + __$$ModAddCommunityViewImplCopyWithImpl(_$ModAddCommunityViewImpl _value, $Res Function(_$ModAddCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of ModAddCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modAddCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? moddedPerson = null, - }) { - return _then(_$ModAddCommunityViewImpl( - modAddCommunity: null == modAddCommunity - ? _value.modAddCommunity - : modAddCommunity // ignore: cast_nullable_to_non_nullable - as ModAddCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? modAddCommunity = null, Object? moderator = freezed, Object? community = null, Object? moddedPerson = null}) { + return _then( + _$ModAddCommunityViewImpl( + modAddCommunity: + null == modAddCommunity + ? _value.modAddCommunity + : modAddCommunity // ignore: cast_nullable_to_non_nullable + as ModAddCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -206,25 +190,19 @@ class __$$ModAddCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$ModAddCommunityViewImpl extends _ModAddCommunityView { - const _$ModAddCommunityViewImpl( - {required this.modAddCommunity, - this.moderator, - required this.community, - required this.moddedPerson}) - : super._(); + const _$ModAddCommunityViewImpl({required this.modAddCommunity, this.moderator, required this.community, required this.moddedPerson}) : super._(); - factory _$ModAddCommunityViewImpl.fromJson(Map json) => - _$$ModAddCommunityViewImplFromJson(json); + factory _$ModAddCommunityViewImpl.fromJson(Map json) => _$$ModAddCommunityViewImplFromJson(json); @override final ModAddCommunity modAddCommunity; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person moddedPerson; @@ -238,48 +216,35 @@ class _$ModAddCommunityViewImpl extends _ModAddCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModAddCommunityViewImpl && - (identical(other.modAddCommunity, modAddCommunity) || - other.modAddCommunity == modAddCommunity) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.community, community) || - other.community == community) && - (identical(other.moddedPerson, moddedPerson) || - other.moddedPerson == moddedPerson)); + (identical(other.modAddCommunity, modAddCommunity) || other.modAddCommunity == modAddCommunity) && + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.community, community) || other.community == community) && + (identical(other.moddedPerson, moddedPerson) || other.moddedPerson == moddedPerson)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, modAddCommunity, moderator, community, moddedPerson); + int get hashCode => Object.hash(runtimeType, modAddCommunity, moderator, community, moddedPerson); /// Create a copy of ModAddCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModAddCommunityViewImplCopyWith<_$ModAddCommunityViewImpl> get copyWith => - __$$ModAddCommunityViewImplCopyWithImpl<_$ModAddCommunityViewImpl>( - this, _$identity); + _$$ModAddCommunityViewImplCopyWith<_$ModAddCommunityViewImpl> get copyWith => __$$ModAddCommunityViewImplCopyWithImpl<_$ModAddCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModAddCommunityViewImplToJson( - this, - ); + return _$$ModAddCommunityViewImplToJson(this); } } abstract class _ModAddCommunityView extends ModAddCommunityView { - const factory _ModAddCommunityView( - {required final ModAddCommunity modAddCommunity, - final Person? moderator, - required final Community community, - required final Person moddedPerson}) = _$ModAddCommunityViewImpl; + const factory _ModAddCommunityView({required final ModAddCommunity modAddCommunity, final Person? moderator, required final Community community, required final Person moddedPerson}) = + _$ModAddCommunityViewImpl; const _ModAddCommunityView._() : super._(); - factory _ModAddCommunityView.fromJson(Map json) = - _$ModAddCommunityViewImpl.fromJson; + factory _ModAddCommunityView.fromJson(Map json) = _$ModAddCommunityViewImpl.fromJson; @override ModAddCommunity get modAddCommunity; // v0.18.0 @@ -294,6 +259,5 @@ abstract class _ModAddCommunityView extends ModAddCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModAddCommunityViewImplCopyWith<_$ModAddCommunityViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModAddCommunityViewImplCopyWith<_$ModAddCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_add_community_view.g.dart b/lib/src/v3/views/mod_add_community_view.g.dart index 343abf45..59815e1e 100644 --- a/lib/src/v3/views/mod_add_community_view.g.dart +++ b/lib/src/v3/views/mod_add_community_view.g.dart @@ -6,24 +6,16 @@ part of 'mod_add_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModAddCommunityViewImpl _$$ModAddCommunityViewImplFromJson( - Map json) => - _$ModAddCommunityViewImpl( - modAddCommunity: ModAddCommunity.fromJson( - json['mod_add_community'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - community: Community.fromJson(json['community'] as Map), - moddedPerson: - Person.fromJson(json['modded_person'] as Map), - ); +_$ModAddCommunityViewImpl _$$ModAddCommunityViewImplFromJson(Map json) => _$ModAddCommunityViewImpl( + modAddCommunity: ModAddCommunity.fromJson(json['mod_add_community'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + community: Community.fromJson(json['community'] as Map), + moddedPerson: Person.fromJson(json['modded_person'] as Map), +); -Map _$$ModAddCommunityViewImplToJson( - _$ModAddCommunityViewImpl instance) => - { - 'mod_add_community': instance.modAddCommunity.toJson(), - 'moderator': instance.moderator?.toJson(), - 'community': instance.community.toJson(), - 'modded_person': instance.moddedPerson.toJson(), - }; +Map _$$ModAddCommunityViewImplToJson(_$ModAddCommunityViewImpl instance) => { + 'mod_add_community': instance.modAddCommunity.toJson(), + 'moderator': instance.moderator?.toJson(), + 'community': instance.community.toJson(), + 'modded_person': instance.moddedPerson.toJson(), +}; diff --git a/lib/src/v3/views/mod_add_view.dart b/lib/src/v3/views/mod_add_view.dart index 6bd1d555..a95ea52d 100644 --- a/lib/src/v3/views/mod_add_view.dart +++ b/lib/src/v3/views/mod_add_view.dart @@ -16,6 +16,5 @@ class ModAddView with _$ModAddView { }) = _ModAddView; const ModAddView._(); - factory ModAddView.fromJson(Map json) => - _$ModAddViewFromJson(json); + factory ModAddView.fromJson(Map json) => _$ModAddViewFromJson(json); } diff --git a/lib/src/v3/views/mod_add_view.freezed.dart b/lib/src/v3/views/mod_add_view.freezed.dart index 68f60202..6d1e003b 100644 --- a/lib/src/v3/views/mod_add_view.freezed.dart +++ b/lib/src/v3/views/mod_add_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_add_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModAddView _$ModAddViewFromJson(Map json) { return _ModAddView.fromJson(json); @@ -30,15 +31,12 @@ mixin _$ModAddView { /// Create a copy of ModAddView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModAddViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModAddViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModAddViewCopyWith<$Res> { - factory $ModAddViewCopyWith( - ModAddView value, $Res Function(ModAddView) then) = - _$ModAddViewCopyWithImpl<$Res, ModAddView>; + factory $ModAddViewCopyWith(ModAddView value, $Res Function(ModAddView) then) = _$ModAddViewCopyWithImpl<$Res, ModAddView>; @useResult $Res call({ModAdd modAdd, Person? moderator, Person moddedPerson}); @@ -48,8 +46,7 @@ abstract class $ModAddViewCopyWith<$Res> { } /// @nodoc -class _$ModAddViewCopyWithImpl<$Res, $Val extends ModAddView> - implements $ModAddViewCopyWith<$Res> { +class _$ModAddViewCopyWithImpl<$Res, $Val extends ModAddView> implements $ModAddViewCopyWith<$Res> { _$ModAddViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,25 +58,27 @@ class _$ModAddViewCopyWithImpl<$Res, $Val extends ModAddView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modAdd = null, - Object? moderator = freezed, - Object? moddedPerson = null, - }) { - return _then(_value.copyWith( - modAdd: null == modAdd - ? _value.modAdd - : modAdd // ignore: cast_nullable_to_non_nullable - as ModAdd, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? modAdd = null, Object? moderator = freezed, Object? moddedPerson = null}) { + return _then( + _value.copyWith( + modAdd: + null == modAdd + ? _value.modAdd + : modAdd // ignore: cast_nullable_to_non_nullable + as ModAdd, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of ModAddView @@ -118,11 +117,8 @@ class _$ModAddViewCopyWithImpl<$Res, $Val extends ModAddView> } /// @nodoc -abstract class _$$ModAddViewImplCopyWith<$Res> - implements $ModAddViewCopyWith<$Res> { - factory _$$ModAddViewImplCopyWith( - _$ModAddViewImpl value, $Res Function(_$ModAddViewImpl) then) = - __$$ModAddViewImplCopyWithImpl<$Res>; +abstract class _$$ModAddViewImplCopyWith<$Res> implements $ModAddViewCopyWith<$Res> { + factory _$$ModAddViewImplCopyWith(_$ModAddViewImpl value, $Res Function(_$ModAddViewImpl) then) = __$$ModAddViewImplCopyWithImpl<$Res>; @override @useResult $Res call({ModAdd modAdd, Person? moderator, Person moddedPerson}); @@ -136,36 +132,33 @@ abstract class _$$ModAddViewImplCopyWith<$Res> } /// @nodoc -class __$$ModAddViewImplCopyWithImpl<$Res> - extends _$ModAddViewCopyWithImpl<$Res, _$ModAddViewImpl> - implements _$$ModAddViewImplCopyWith<$Res> { - __$$ModAddViewImplCopyWithImpl( - _$ModAddViewImpl _value, $Res Function(_$ModAddViewImpl) _then) - : super(_value, _then); +class __$$ModAddViewImplCopyWithImpl<$Res> extends _$ModAddViewCopyWithImpl<$Res, _$ModAddViewImpl> implements _$$ModAddViewImplCopyWith<$Res> { + __$$ModAddViewImplCopyWithImpl(_$ModAddViewImpl _value, $Res Function(_$ModAddViewImpl) _then) : super(_value, _then); /// Create a copy of ModAddView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modAdd = null, - Object? moderator = freezed, - Object? moddedPerson = null, - }) { - return _then(_$ModAddViewImpl( - modAdd: null == modAdd - ? _value.modAdd - : modAdd // ignore: cast_nullable_to_non_nullable - as ModAdd, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? modAdd = null, Object? moderator = freezed, Object? moddedPerson = null}) { + return _then( + _$ModAddViewImpl( + modAdd: + null == modAdd + ? _value.modAdd + : modAdd // ignore: cast_nullable_to_non_nullable + as ModAdd, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -173,19 +166,16 @@ class __$$ModAddViewImplCopyWithImpl<$Res> @modelSerde class _$ModAddViewImpl extends _ModAddView { - const _$ModAddViewImpl( - {required this.modAdd, this.moderator, required this.moddedPerson}) - : super._(); + const _$ModAddViewImpl({required this.modAdd, this.moderator, required this.moddedPerson}) : super._(); - factory _$ModAddViewImpl.fromJson(Map json) => - _$$ModAddViewImplFromJson(json); + factory _$ModAddViewImpl.fromJson(Map json) => _$$ModAddViewImplFromJson(json); @override final ModAdd modAdd; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Person moddedPerson; @@ -200,10 +190,8 @@ class _$ModAddViewImpl extends _ModAddView { (other.runtimeType == runtimeType && other is _$ModAddViewImpl && (identical(other.modAdd, modAdd) || other.modAdd == modAdd) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.moddedPerson, moddedPerson) || - other.moddedPerson == moddedPerson)); + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.moddedPerson, moddedPerson) || other.moddedPerson == moddedPerson)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -215,26 +203,19 @@ class _$ModAddViewImpl extends _ModAddView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModAddViewImplCopyWith<_$ModAddViewImpl> get copyWith => - __$$ModAddViewImplCopyWithImpl<_$ModAddViewImpl>(this, _$identity); + _$$ModAddViewImplCopyWith<_$ModAddViewImpl> get copyWith => __$$ModAddViewImplCopyWithImpl<_$ModAddViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModAddViewImplToJson( - this, - ); + return _$$ModAddViewImplToJson(this); } } abstract class _ModAddView extends ModAddView { - const factory _ModAddView( - {required final ModAdd modAdd, - final Person? moderator, - required final Person moddedPerson}) = _$ModAddViewImpl; + const factory _ModAddView({required final ModAdd modAdd, final Person? moderator, required final Person moddedPerson}) = _$ModAddViewImpl; const _ModAddView._() : super._(); - factory _ModAddView.fromJson(Map json) = - _$ModAddViewImpl.fromJson; + factory _ModAddView.fromJson(Map json) = _$ModAddViewImpl.fromJson; @override ModAdd get modAdd; // v0.18.0 @@ -247,6 +228,5 @@ abstract class _ModAddView extends ModAddView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModAddViewImplCopyWith<_$ModAddViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModAddViewImplCopyWith<_$ModAddViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_add_view.g.dart b/lib/src/v3/views/mod_add_view.g.dart index aba6bd2d..405b4bcd 100644 --- a/lib/src/v3/views/mod_add_view.g.dart +++ b/lib/src/v3/views/mod_add_view.g.dart @@ -6,19 +6,14 @@ part of 'mod_add_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModAddViewImpl _$$ModAddViewImplFromJson(Map json) => - _$ModAddViewImpl( - modAdd: ModAdd.fromJson(json['mod_add'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - moddedPerson: - Person.fromJson(json['modded_person'] as Map), - ); +_$ModAddViewImpl _$$ModAddViewImplFromJson(Map json) => _$ModAddViewImpl( + modAdd: ModAdd.fromJson(json['mod_add'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + moddedPerson: Person.fromJson(json['modded_person'] as Map), +); -Map _$$ModAddViewImplToJson(_$ModAddViewImpl instance) => - { - 'mod_add': instance.modAdd.toJson(), - 'moderator': instance.moderator?.toJson(), - 'modded_person': instance.moddedPerson.toJson(), - }; +Map _$$ModAddViewImplToJson(_$ModAddViewImpl instance) => { + 'mod_add': instance.modAdd.toJson(), + 'moderator': instance.moderator?.toJson(), + 'modded_person': instance.moddedPerson.toJson(), +}; diff --git a/lib/src/v3/views/mod_ban_from_community_view.dart b/lib/src/v3/views/mod_ban_from_community_view.dart index bb0bd904..16f335f5 100644 --- a/lib/src/v3/views/mod_ban_from_community_view.dart +++ b/lib/src/v3/views/mod_ban_from_community_view.dart @@ -17,6 +17,5 @@ class ModBanFromCommunityView with _$ModBanFromCommunityView { }) = _ModBanFromCommunityView; const ModBanFromCommunityView._(); - factory ModBanFromCommunityView.fromJson(Map json) => - _$ModBanFromCommunityViewFromJson(json); + factory ModBanFromCommunityView.fromJson(Map json) => _$ModBanFromCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/mod_ban_from_community_view.freezed.dart b/lib/src/v3/views/mod_ban_from_community_view.freezed.dart index 014d500f..02710cd4 100644 --- a/lib/src/v3/views/mod_ban_from_community_view.freezed.dart +++ b/lib/src/v3/views/mod_ban_from_community_view.freezed.dart @@ -12,17 +12,16 @@ part of 'mod_ban_from_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ModBanFromCommunityView _$ModBanFromCommunityViewFromJson( - Map json) { +ModBanFromCommunityView _$ModBanFromCommunityViewFromJson(Map json) { return _ModBanFromCommunityView.fromJson(json); } /// @nodoc mixin _$ModBanFromCommunityView { - ModBanFromCommunity get modBanFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 + ModBanFromCommunity get modBanFromCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get bannedPerson => throw _privateConstructorUsedError; @@ -33,21 +32,14 @@ mixin _$ModBanFromCommunityView { /// Create a copy of ModBanFromCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModBanFromCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModBanFromCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModBanFromCommunityViewCopyWith<$Res> { - factory $ModBanFromCommunityViewCopyWith(ModBanFromCommunityView value, - $Res Function(ModBanFromCommunityView) then) = - _$ModBanFromCommunityViewCopyWithImpl<$Res, ModBanFromCommunityView>; + factory $ModBanFromCommunityViewCopyWith(ModBanFromCommunityView value, $Res Function(ModBanFromCommunityView) then) = _$ModBanFromCommunityViewCopyWithImpl<$Res, ModBanFromCommunityView>; @useResult - $Res call( - {ModBanFromCommunity modBanFromCommunity, - Person? moderator, - Community community, - Person bannedPerson}); + $Res call({ModBanFromCommunity modBanFromCommunity, Person? moderator, Community community, Person bannedPerson}); $ModBanFromCommunityCopyWith<$Res> get modBanFromCommunity; $PersonCopyWith<$Res>? get moderator; @@ -56,9 +48,7 @@ abstract class $ModBanFromCommunityViewCopyWith<$Res> { } /// @nodoc -class _$ModBanFromCommunityViewCopyWithImpl<$Res, - $Val extends ModBanFromCommunityView> - implements $ModBanFromCommunityViewCopyWith<$Res> { +class _$ModBanFromCommunityViewCopyWithImpl<$Res, $Val extends ModBanFromCommunityView> implements $ModBanFromCommunityViewCopyWith<$Res> { _$ModBanFromCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -70,30 +60,32 @@ class _$ModBanFromCommunityViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modBanFromCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? bannedPerson = null, - }) { - return _then(_value.copyWith( - modBanFromCommunity: null == modBanFromCommunity - ? _value.modBanFromCommunity - : modBanFromCommunity // ignore: cast_nullable_to_non_nullable - as ModBanFromCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - bannedPerson: null == bannedPerson - ? _value.bannedPerson - : bannedPerson // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? modBanFromCommunity = null, Object? moderator = freezed, Object? community = null, Object? bannedPerson = null}) { + return _then( + _value.copyWith( + modBanFromCommunity: + null == modBanFromCommunity + ? _value.modBanFromCommunity + : modBanFromCommunity // ignore: cast_nullable_to_non_nullable + as ModBanFromCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + bannedPerson: + null == bannedPerson + ? _value.bannedPerson + : bannedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of ModBanFromCommunityView @@ -101,8 +93,7 @@ class _$ModBanFromCommunityViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $ModBanFromCommunityCopyWith<$Res> get modBanFromCommunity { - return $ModBanFromCommunityCopyWith<$Res>(_value.modBanFromCommunity, - (value) { + return $ModBanFromCommunityCopyWith<$Res>(_value.modBanFromCommunity, (value) { return _then(_value.copyWith(modBanFromCommunity: value) as $Val); }); } @@ -143,19 +134,11 @@ class _$ModBanFromCommunityViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ModBanFromCommunityViewImplCopyWith<$Res> - implements $ModBanFromCommunityViewCopyWith<$Res> { - factory _$$ModBanFromCommunityViewImplCopyWith( - _$ModBanFromCommunityViewImpl value, - $Res Function(_$ModBanFromCommunityViewImpl) then) = - __$$ModBanFromCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$ModBanFromCommunityViewImplCopyWith<$Res> implements $ModBanFromCommunityViewCopyWith<$Res> { + factory _$$ModBanFromCommunityViewImplCopyWith(_$ModBanFromCommunityViewImpl value, $Res Function(_$ModBanFromCommunityViewImpl) then) = __$$ModBanFromCommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModBanFromCommunity modBanFromCommunity, - Person? moderator, - Community community, - Person bannedPerson}); + $Res call({ModBanFromCommunity modBanFromCommunity, Person? moderator, Community community, Person bannedPerson}); @override $ModBanFromCommunityCopyWith<$Res> get modBanFromCommunity; @@ -168,43 +151,38 @@ abstract class _$$ModBanFromCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$ModBanFromCommunityViewImplCopyWithImpl<$Res> - extends _$ModBanFromCommunityViewCopyWithImpl<$Res, - _$ModBanFromCommunityViewImpl> - implements _$$ModBanFromCommunityViewImplCopyWith<$Res> { - __$$ModBanFromCommunityViewImplCopyWithImpl( - _$ModBanFromCommunityViewImpl _value, - $Res Function(_$ModBanFromCommunityViewImpl) _then) - : super(_value, _then); +class __$$ModBanFromCommunityViewImplCopyWithImpl<$Res> extends _$ModBanFromCommunityViewCopyWithImpl<$Res, _$ModBanFromCommunityViewImpl> implements _$$ModBanFromCommunityViewImplCopyWith<$Res> { + __$$ModBanFromCommunityViewImplCopyWithImpl(_$ModBanFromCommunityViewImpl _value, $Res Function(_$ModBanFromCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of ModBanFromCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modBanFromCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? bannedPerson = null, - }) { - return _then(_$ModBanFromCommunityViewImpl( - modBanFromCommunity: null == modBanFromCommunity - ? _value.modBanFromCommunity - : modBanFromCommunity // ignore: cast_nullable_to_non_nullable - as ModBanFromCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - bannedPerson: null == bannedPerson - ? _value.bannedPerson - : bannedPerson // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? modBanFromCommunity = null, Object? moderator = freezed, Object? community = null, Object? bannedPerson = null}) { + return _then( + _$ModBanFromCommunityViewImpl( + modBanFromCommunity: + null == modBanFromCommunity + ? _value.modBanFromCommunity + : modBanFromCommunity // ignore: cast_nullable_to_non_nullable + as ModBanFromCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + bannedPerson: + null == bannedPerson + ? _value.bannedPerson + : bannedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -212,25 +190,19 @@ class __$$ModBanFromCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$ModBanFromCommunityViewImpl extends _ModBanFromCommunityView { - const _$ModBanFromCommunityViewImpl( - {required this.modBanFromCommunity, - this.moderator, - required this.community, - required this.bannedPerson}) - : super._(); + const _$ModBanFromCommunityViewImpl({required this.modBanFromCommunity, this.moderator, required this.community, required this.bannedPerson}) : super._(); - factory _$ModBanFromCommunityViewImpl.fromJson(Map json) => - _$$ModBanFromCommunityViewImplFromJson(json); + factory _$ModBanFromCommunityViewImpl.fromJson(Map json) => _$$ModBanFromCommunityViewImplFromJson(json); @override final ModBanFromCommunity modBanFromCommunity; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person bannedPerson; @@ -244,48 +216,35 @@ class _$ModBanFromCommunityViewImpl extends _ModBanFromCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModBanFromCommunityViewImpl && - (identical(other.modBanFromCommunity, modBanFromCommunity) || - other.modBanFromCommunity == modBanFromCommunity) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.community, community) || - other.community == community) && - (identical(other.bannedPerson, bannedPerson) || - other.bannedPerson == bannedPerson)); + (identical(other.modBanFromCommunity, modBanFromCommunity) || other.modBanFromCommunity == modBanFromCommunity) && + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.community, community) || other.community == community) && + (identical(other.bannedPerson, bannedPerson) || other.bannedPerson == bannedPerson)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, modBanFromCommunity, moderator, community, bannedPerson); + int get hashCode => Object.hash(runtimeType, modBanFromCommunity, moderator, community, bannedPerson); /// Create a copy of ModBanFromCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModBanFromCommunityViewImplCopyWith<_$ModBanFromCommunityViewImpl> - get copyWith => __$$ModBanFromCommunityViewImplCopyWithImpl< - _$ModBanFromCommunityViewImpl>(this, _$identity); + _$$ModBanFromCommunityViewImplCopyWith<_$ModBanFromCommunityViewImpl> get copyWith => __$$ModBanFromCommunityViewImplCopyWithImpl<_$ModBanFromCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModBanFromCommunityViewImplToJson( - this, - ); + return _$$ModBanFromCommunityViewImplToJson(this); } } abstract class _ModBanFromCommunityView extends ModBanFromCommunityView { - const factory _ModBanFromCommunityView( - {required final ModBanFromCommunity modBanFromCommunity, - final Person? moderator, - required final Community community, - required final Person bannedPerson}) = _$ModBanFromCommunityViewImpl; + const factory _ModBanFromCommunityView({required final ModBanFromCommunity modBanFromCommunity, final Person? moderator, required final Community community, required final Person bannedPerson}) = + _$ModBanFromCommunityViewImpl; const _ModBanFromCommunityView._() : super._(); - factory _ModBanFromCommunityView.fromJson(Map json) = - _$ModBanFromCommunityViewImpl.fromJson; + factory _ModBanFromCommunityView.fromJson(Map json) = _$ModBanFromCommunityViewImpl.fromJson; @override ModBanFromCommunity get modBanFromCommunity; // v0.18.0 @@ -300,6 +259,5 @@ abstract class _ModBanFromCommunityView extends ModBanFromCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModBanFromCommunityViewImplCopyWith<_$ModBanFromCommunityViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModBanFromCommunityViewImplCopyWith<_$ModBanFromCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_ban_from_community_view.g.dart b/lib/src/v3/views/mod_ban_from_community_view.g.dart index df04acf8..14e0b4d0 100644 --- a/lib/src/v3/views/mod_ban_from_community_view.g.dart +++ b/lib/src/v3/views/mod_ban_from_community_view.g.dart @@ -6,24 +6,16 @@ part of 'mod_ban_from_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModBanFromCommunityViewImpl _$$ModBanFromCommunityViewImplFromJson( - Map json) => - _$ModBanFromCommunityViewImpl( - modBanFromCommunity: ModBanFromCommunity.fromJson( - json['mod_ban_from_community'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - community: Community.fromJson(json['community'] as Map), - bannedPerson: - Person.fromJson(json['banned_person'] as Map), - ); +_$ModBanFromCommunityViewImpl _$$ModBanFromCommunityViewImplFromJson(Map json) => _$ModBanFromCommunityViewImpl( + modBanFromCommunity: ModBanFromCommunity.fromJson(json['mod_ban_from_community'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + community: Community.fromJson(json['community'] as Map), + bannedPerson: Person.fromJson(json['banned_person'] as Map), +); -Map _$$ModBanFromCommunityViewImplToJson( - _$ModBanFromCommunityViewImpl instance) => - { - 'mod_ban_from_community': instance.modBanFromCommunity.toJson(), - 'moderator': instance.moderator?.toJson(), - 'community': instance.community.toJson(), - 'banned_person': instance.bannedPerson.toJson(), - }; +Map _$$ModBanFromCommunityViewImplToJson(_$ModBanFromCommunityViewImpl instance) => { + 'mod_ban_from_community': instance.modBanFromCommunity.toJson(), + 'moderator': instance.moderator?.toJson(), + 'community': instance.community.toJson(), + 'banned_person': instance.bannedPerson.toJson(), +}; diff --git a/lib/src/v3/views/mod_ban_view.dart b/lib/src/v3/views/mod_ban_view.dart index 0ae77d24..174423c5 100644 --- a/lib/src/v3/views/mod_ban_view.dart +++ b/lib/src/v3/views/mod_ban_view.dart @@ -16,6 +16,5 @@ class ModBanView with _$ModBanView { }) = _ModBanView; const ModBanView._(); - factory ModBanView.fromJson(Map json) => - _$ModBanViewFromJson(json); + factory ModBanView.fromJson(Map json) => _$ModBanViewFromJson(json); } diff --git a/lib/src/v3/views/mod_ban_view.freezed.dart b/lib/src/v3/views/mod_ban_view.freezed.dart index 9a5aa97c..00cdb978 100644 --- a/lib/src/v3/views/mod_ban_view.freezed.dart +++ b/lib/src/v3/views/mod_ban_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_ban_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModBanView _$ModBanViewFromJson(Map json) { return _ModBanView.fromJson(json); @@ -30,15 +31,12 @@ mixin _$ModBanView { /// Create a copy of ModBanView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModBanViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModBanViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModBanViewCopyWith<$Res> { - factory $ModBanViewCopyWith( - ModBanView value, $Res Function(ModBanView) then) = - _$ModBanViewCopyWithImpl<$Res, ModBanView>; + factory $ModBanViewCopyWith(ModBanView value, $Res Function(ModBanView) then) = _$ModBanViewCopyWithImpl<$Res, ModBanView>; @useResult $Res call({ModBan modBan, Person? moderator, Person bannedPerson}); @@ -48,8 +46,7 @@ abstract class $ModBanViewCopyWith<$Res> { } /// @nodoc -class _$ModBanViewCopyWithImpl<$Res, $Val extends ModBanView> - implements $ModBanViewCopyWith<$Res> { +class _$ModBanViewCopyWithImpl<$Res, $Val extends ModBanView> implements $ModBanViewCopyWith<$Res> { _$ModBanViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -61,25 +58,27 @@ class _$ModBanViewCopyWithImpl<$Res, $Val extends ModBanView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modBan = null, - Object? moderator = freezed, - Object? bannedPerson = null, - }) { - return _then(_value.copyWith( - modBan: null == modBan - ? _value.modBan - : modBan // ignore: cast_nullable_to_non_nullable - as ModBan, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - bannedPerson: null == bannedPerson - ? _value.bannedPerson - : bannedPerson // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? modBan = null, Object? moderator = freezed, Object? bannedPerson = null}) { + return _then( + _value.copyWith( + modBan: + null == modBan + ? _value.modBan + : modBan // ignore: cast_nullable_to_non_nullable + as ModBan, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + bannedPerson: + null == bannedPerson + ? _value.bannedPerson + : bannedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of ModBanView @@ -118,11 +117,8 @@ class _$ModBanViewCopyWithImpl<$Res, $Val extends ModBanView> } /// @nodoc -abstract class _$$ModBanViewImplCopyWith<$Res> - implements $ModBanViewCopyWith<$Res> { - factory _$$ModBanViewImplCopyWith( - _$ModBanViewImpl value, $Res Function(_$ModBanViewImpl) then) = - __$$ModBanViewImplCopyWithImpl<$Res>; +abstract class _$$ModBanViewImplCopyWith<$Res> implements $ModBanViewCopyWith<$Res> { + factory _$$ModBanViewImplCopyWith(_$ModBanViewImpl value, $Res Function(_$ModBanViewImpl) then) = __$$ModBanViewImplCopyWithImpl<$Res>; @override @useResult $Res call({ModBan modBan, Person? moderator, Person bannedPerson}); @@ -136,36 +132,33 @@ abstract class _$$ModBanViewImplCopyWith<$Res> } /// @nodoc -class __$$ModBanViewImplCopyWithImpl<$Res> - extends _$ModBanViewCopyWithImpl<$Res, _$ModBanViewImpl> - implements _$$ModBanViewImplCopyWith<$Res> { - __$$ModBanViewImplCopyWithImpl( - _$ModBanViewImpl _value, $Res Function(_$ModBanViewImpl) _then) - : super(_value, _then); +class __$$ModBanViewImplCopyWithImpl<$Res> extends _$ModBanViewCopyWithImpl<$Res, _$ModBanViewImpl> implements _$$ModBanViewImplCopyWith<$Res> { + __$$ModBanViewImplCopyWithImpl(_$ModBanViewImpl _value, $Res Function(_$ModBanViewImpl) _then) : super(_value, _then); /// Create a copy of ModBanView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modBan = null, - Object? moderator = freezed, - Object? bannedPerson = null, - }) { - return _then(_$ModBanViewImpl( - modBan: null == modBan - ? _value.modBan - : modBan // ignore: cast_nullable_to_non_nullable - as ModBan, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - bannedPerson: null == bannedPerson - ? _value.bannedPerson - : bannedPerson // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? modBan = null, Object? moderator = freezed, Object? bannedPerson = null}) { + return _then( + _$ModBanViewImpl( + modBan: + null == modBan + ? _value.modBan + : modBan // ignore: cast_nullable_to_non_nullable + as ModBan, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + bannedPerson: + null == bannedPerson + ? _value.bannedPerson + : bannedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -173,19 +166,16 @@ class __$$ModBanViewImplCopyWithImpl<$Res> @modelSerde class _$ModBanViewImpl extends _ModBanView { - const _$ModBanViewImpl( - {required this.modBan, this.moderator, required this.bannedPerson}) - : super._(); + const _$ModBanViewImpl({required this.modBan, this.moderator, required this.bannedPerson}) : super._(); - factory _$ModBanViewImpl.fromJson(Map json) => - _$$ModBanViewImplFromJson(json); + factory _$ModBanViewImpl.fromJson(Map json) => _$$ModBanViewImplFromJson(json); @override final ModBan modBan; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Person bannedPerson; @@ -200,10 +190,8 @@ class _$ModBanViewImpl extends _ModBanView { (other.runtimeType == runtimeType && other is _$ModBanViewImpl && (identical(other.modBan, modBan) || other.modBan == modBan) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.bannedPerson, bannedPerson) || - other.bannedPerson == bannedPerson)); + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.bannedPerson, bannedPerson) || other.bannedPerson == bannedPerson)); } @JsonKey(includeFromJson: false, includeToJson: false) @@ -215,26 +203,19 @@ class _$ModBanViewImpl extends _ModBanView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModBanViewImplCopyWith<_$ModBanViewImpl> get copyWith => - __$$ModBanViewImplCopyWithImpl<_$ModBanViewImpl>(this, _$identity); + _$$ModBanViewImplCopyWith<_$ModBanViewImpl> get copyWith => __$$ModBanViewImplCopyWithImpl<_$ModBanViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModBanViewImplToJson( - this, - ); + return _$$ModBanViewImplToJson(this); } } abstract class _ModBanView extends ModBanView { - const factory _ModBanView( - {required final ModBan modBan, - final Person? moderator, - required final Person bannedPerson}) = _$ModBanViewImpl; + const factory _ModBanView({required final ModBan modBan, final Person? moderator, required final Person bannedPerson}) = _$ModBanViewImpl; const _ModBanView._() : super._(); - factory _ModBanView.fromJson(Map json) = - _$ModBanViewImpl.fromJson; + factory _ModBanView.fromJson(Map json) = _$ModBanViewImpl.fromJson; @override ModBan get modBan; // v0.18.0 @@ -247,6 +228,5 @@ abstract class _ModBanView extends ModBanView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModBanViewImplCopyWith<_$ModBanViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModBanViewImplCopyWith<_$ModBanViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_ban_view.g.dart b/lib/src/v3/views/mod_ban_view.g.dart index fe955712..9690e540 100644 --- a/lib/src/v3/views/mod_ban_view.g.dart +++ b/lib/src/v3/views/mod_ban_view.g.dart @@ -6,19 +6,14 @@ part of 'mod_ban_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModBanViewImpl _$$ModBanViewImplFromJson(Map json) => - _$ModBanViewImpl( - modBan: ModBan.fromJson(json['mod_ban'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - bannedPerson: - Person.fromJson(json['banned_person'] as Map), - ); +_$ModBanViewImpl _$$ModBanViewImplFromJson(Map json) => _$ModBanViewImpl( + modBan: ModBan.fromJson(json['mod_ban'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + bannedPerson: Person.fromJson(json['banned_person'] as Map), +); -Map _$$ModBanViewImplToJson(_$ModBanViewImpl instance) => - { - 'mod_ban': instance.modBan.toJson(), - 'moderator': instance.moderator?.toJson(), - 'banned_person': instance.bannedPerson.toJson(), - }; +Map _$$ModBanViewImplToJson(_$ModBanViewImpl instance) => { + 'mod_ban': instance.modBan.toJson(), + 'moderator': instance.moderator?.toJson(), + 'banned_person': instance.bannedPerson.toJson(), +}; diff --git a/lib/src/v3/views/mod_feature_post_view.dart b/lib/src/v3/views/mod_feature_post_view.dart index 3189a292..97dd4ff2 100644 --- a/lib/src/v3/views/mod_feature_post_view.dart +++ b/lib/src/v3/views/mod_feature_post_view.dart @@ -17,6 +17,5 @@ class ModFeaturePostView with _$ModFeaturePostView { }) = _ModFeaturePostView; const ModFeaturePostView._(); - factory ModFeaturePostView.fromJson(Map json) => - _$ModFeaturePostViewFromJson(json); + factory ModFeaturePostView.fromJson(Map json) => _$ModFeaturePostViewFromJson(json); } diff --git a/lib/src/v3/views/mod_feature_post_view.freezed.dart b/lib/src/v3/views/mod_feature_post_view.freezed.dart index f6edef89..724cf17a 100644 --- a/lib/src/v3/views/mod_feature_post_view.freezed.dart +++ b/lib/src/v3/views/mod_feature_post_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_feature_post_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModFeaturePostView _$ModFeaturePostViewFromJson(Map json) { return _ModFeaturePostView.fromJson(json); @@ -20,8 +21,7 @@ ModFeaturePostView _$ModFeaturePostViewFromJson(Map json) { /// @nodoc mixin _$ModFeaturePostView { - ModFeaturePost get modFeaturePost => - throw _privateConstructorUsedError; // v0.18.0 + ModFeaturePost get modFeaturePost => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; @@ -32,21 +32,14 @@ mixin _$ModFeaturePostView { /// Create a copy of ModFeaturePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModFeaturePostViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModFeaturePostViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModFeaturePostViewCopyWith<$Res> { - factory $ModFeaturePostViewCopyWith( - ModFeaturePostView value, $Res Function(ModFeaturePostView) then) = - _$ModFeaturePostViewCopyWithImpl<$Res, ModFeaturePostView>; + factory $ModFeaturePostViewCopyWith(ModFeaturePostView value, $Res Function(ModFeaturePostView) then) = _$ModFeaturePostViewCopyWithImpl<$Res, ModFeaturePostView>; @useResult - $Res call( - {ModFeaturePost modFeaturePost, - Person? moderator, - Post post, - Community community}); + $Res call({ModFeaturePost modFeaturePost, Person? moderator, Post post, Community community}); $ModFeaturePostCopyWith<$Res> get modFeaturePost; $PersonCopyWith<$Res>? get moderator; @@ -55,8 +48,7 @@ abstract class $ModFeaturePostViewCopyWith<$Res> { } /// @nodoc -class _$ModFeaturePostViewCopyWithImpl<$Res, $Val extends ModFeaturePostView> - implements $ModFeaturePostViewCopyWith<$Res> { +class _$ModFeaturePostViewCopyWithImpl<$Res, $Val extends ModFeaturePostView> implements $ModFeaturePostViewCopyWith<$Res> { _$ModFeaturePostViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,30 +60,32 @@ class _$ModFeaturePostViewCopyWithImpl<$Res, $Val extends ModFeaturePostView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modFeaturePost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_value.copyWith( - modFeaturePost: null == modFeaturePost - ? _value.modFeaturePost - : modFeaturePost // ignore: cast_nullable_to_non_nullable - as ModFeaturePost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modFeaturePost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _value.copyWith( + modFeaturePost: + null == modFeaturePost + ? _value.modFeaturePost + : modFeaturePost // ignore: cast_nullable_to_non_nullable + as ModFeaturePost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModFeaturePostView @@ -140,18 +134,11 @@ class _$ModFeaturePostViewCopyWithImpl<$Res, $Val extends ModFeaturePostView> } /// @nodoc -abstract class _$$ModFeaturePostViewImplCopyWith<$Res> - implements $ModFeaturePostViewCopyWith<$Res> { - factory _$$ModFeaturePostViewImplCopyWith(_$ModFeaturePostViewImpl value, - $Res Function(_$ModFeaturePostViewImpl) then) = - __$$ModFeaturePostViewImplCopyWithImpl<$Res>; +abstract class _$$ModFeaturePostViewImplCopyWith<$Res> implements $ModFeaturePostViewCopyWith<$Res> { + factory _$$ModFeaturePostViewImplCopyWith(_$ModFeaturePostViewImpl value, $Res Function(_$ModFeaturePostViewImpl) then) = __$$ModFeaturePostViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModFeaturePost modFeaturePost, - Person? moderator, - Post post, - Community community}); + $Res call({ModFeaturePost modFeaturePost, Person? moderator, Post post, Community community}); @override $ModFeaturePostCopyWith<$Res> get modFeaturePost; @@ -164,41 +151,38 @@ abstract class _$$ModFeaturePostViewImplCopyWith<$Res> } /// @nodoc -class __$$ModFeaturePostViewImplCopyWithImpl<$Res> - extends _$ModFeaturePostViewCopyWithImpl<$Res, _$ModFeaturePostViewImpl> - implements _$$ModFeaturePostViewImplCopyWith<$Res> { - __$$ModFeaturePostViewImplCopyWithImpl(_$ModFeaturePostViewImpl _value, - $Res Function(_$ModFeaturePostViewImpl) _then) - : super(_value, _then); +class __$$ModFeaturePostViewImplCopyWithImpl<$Res> extends _$ModFeaturePostViewCopyWithImpl<$Res, _$ModFeaturePostViewImpl> implements _$$ModFeaturePostViewImplCopyWith<$Res> { + __$$ModFeaturePostViewImplCopyWithImpl(_$ModFeaturePostViewImpl _value, $Res Function(_$ModFeaturePostViewImpl) _then) : super(_value, _then); /// Create a copy of ModFeaturePostView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modFeaturePost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_$ModFeaturePostViewImpl( - modFeaturePost: null == modFeaturePost - ? _value.modFeaturePost - : modFeaturePost // ignore: cast_nullable_to_non_nullable - as ModFeaturePost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modFeaturePost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _$ModFeaturePostViewImpl( + modFeaturePost: + null == modFeaturePost + ? _value.modFeaturePost + : modFeaturePost // ignore: cast_nullable_to_non_nullable + as ModFeaturePost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -206,25 +190,19 @@ class __$$ModFeaturePostViewImplCopyWithImpl<$Res> @modelSerde class _$ModFeaturePostViewImpl extends _ModFeaturePostView { - const _$ModFeaturePostViewImpl( - {required this.modFeaturePost, - this.moderator, - required this.post, - required this.community}) - : super._(); + const _$ModFeaturePostViewImpl({required this.modFeaturePost, this.moderator, required this.post, required this.community}) : super._(); - factory _$ModFeaturePostViewImpl.fromJson(Map json) => - _$$ModFeaturePostViewImplFromJson(json); + factory _$ModFeaturePostViewImpl.fromJson(Map json) => _$$ModFeaturePostViewImplFromJson(json); @override final ModFeaturePost modFeaturePost; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -238,47 +216,34 @@ class _$ModFeaturePostViewImpl extends _ModFeaturePostView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModFeaturePostViewImpl && - (identical(other.modFeaturePost, modFeaturePost) || - other.modFeaturePost == modFeaturePost) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && + (identical(other.modFeaturePost, modFeaturePost) || other.modFeaturePost == modFeaturePost) && + (identical(other.moderator, moderator) || other.moderator == moderator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, modFeaturePost, moderator, post, community); + int get hashCode => Object.hash(runtimeType, modFeaturePost, moderator, post, community); /// Create a copy of ModFeaturePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModFeaturePostViewImplCopyWith<_$ModFeaturePostViewImpl> get copyWith => - __$$ModFeaturePostViewImplCopyWithImpl<_$ModFeaturePostViewImpl>( - this, _$identity); + _$$ModFeaturePostViewImplCopyWith<_$ModFeaturePostViewImpl> get copyWith => __$$ModFeaturePostViewImplCopyWithImpl<_$ModFeaturePostViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModFeaturePostViewImplToJson( - this, - ); + return _$$ModFeaturePostViewImplToJson(this); } } abstract class _ModFeaturePostView extends ModFeaturePostView { - const factory _ModFeaturePostView( - {required final ModFeaturePost modFeaturePost, - final Person? moderator, - required final Post post, - required final Community community}) = _$ModFeaturePostViewImpl; + const factory _ModFeaturePostView({required final ModFeaturePost modFeaturePost, final Person? moderator, required final Post post, required final Community community}) = _$ModFeaturePostViewImpl; const _ModFeaturePostView._() : super._(); - factory _ModFeaturePostView.fromJson(Map json) = - _$ModFeaturePostViewImpl.fromJson; + factory _ModFeaturePostView.fromJson(Map json) = _$ModFeaturePostViewImpl.fromJson; @override ModFeaturePost get modFeaturePost; // v0.18.0 @@ -293,6 +258,5 @@ abstract class _ModFeaturePostView extends ModFeaturePostView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModFeaturePostViewImplCopyWith<_$ModFeaturePostViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModFeaturePostViewImplCopyWith<_$ModFeaturePostViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_feature_post_view.g.dart b/lib/src/v3/views/mod_feature_post_view.g.dart index 471d5bdd..f525df7d 100644 --- a/lib/src/v3/views/mod_feature_post_view.g.dart +++ b/lib/src/v3/views/mod_feature_post_view.g.dart @@ -6,23 +6,16 @@ part of 'mod_feature_post_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModFeaturePostViewImpl _$$ModFeaturePostViewImplFromJson( - Map json) => - _$ModFeaturePostViewImpl( - modFeaturePost: ModFeaturePost.fromJson( - json['mod_feature_post'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModFeaturePostViewImpl _$$ModFeaturePostViewImplFromJson(Map json) => _$ModFeaturePostViewImpl( + modFeaturePost: ModFeaturePost.fromJson(json['mod_feature_post'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModFeaturePostViewImplToJson( - _$ModFeaturePostViewImpl instance) => - { - 'mod_feature_post': instance.modFeaturePost.toJson(), - 'moderator': instance.moderator?.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModFeaturePostViewImplToJson(_$ModFeaturePostViewImpl instance) => { + 'mod_feature_post': instance.modFeaturePost.toJson(), + 'moderator': instance.moderator?.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_hide_community_view.dart b/lib/src/v3/views/mod_hide_community_view.dart index 0c809521..44489d61 100644 --- a/lib/src/v3/views/mod_hide_community_view.dart +++ b/lib/src/v3/views/mod_hide_community_view.dart @@ -16,6 +16,5 @@ class ModHideCommunityView with _$ModHideCommunityView { }) = _ModHideCommunityView; const ModHideCommunityView._(); - factory ModHideCommunityView.fromJson(Map json) => - _$ModHideCommunityViewFromJson(json); + factory ModHideCommunityView.fromJson(Map json) => _$ModHideCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/mod_hide_community_view.freezed.dart b/lib/src/v3/views/mod_hide_community_view.freezed.dart index afaa025b..99f850d7 100644 --- a/lib/src/v3/views/mod_hide_community_view.freezed.dart +++ b/lib/src/v3/views/mod_hide_community_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_hide_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModHideCommunityView _$ModHideCommunityViewFromJson(Map json) { return _ModHideCommunityView.fromJson(json); @@ -20,8 +21,7 @@ ModHideCommunityView _$ModHideCommunityViewFromJson(Map json) { /// @nodoc mixin _$ModHideCommunityView { - ModHideCommunity get modHideCommunity => - throw _privateConstructorUsedError; // v0.18.0 + ModHideCommunity get modHideCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; @@ -31,18 +31,14 @@ mixin _$ModHideCommunityView { /// Create a copy of ModHideCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModHideCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModHideCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModHideCommunityViewCopyWith<$Res> { - factory $ModHideCommunityViewCopyWith(ModHideCommunityView value, - $Res Function(ModHideCommunityView) then) = - _$ModHideCommunityViewCopyWithImpl<$Res, ModHideCommunityView>; + factory $ModHideCommunityViewCopyWith(ModHideCommunityView value, $Res Function(ModHideCommunityView) then) = _$ModHideCommunityViewCopyWithImpl<$Res, ModHideCommunityView>; @useResult - $Res call( - {ModHideCommunity modHideCommunity, Person? admin, Community community}); + $Res call({ModHideCommunity modHideCommunity, Person? admin, Community community}); $ModHideCommunityCopyWith<$Res> get modHideCommunity; $PersonCopyWith<$Res>? get admin; @@ -50,9 +46,7 @@ abstract class $ModHideCommunityViewCopyWith<$Res> { } /// @nodoc -class _$ModHideCommunityViewCopyWithImpl<$Res, - $Val extends ModHideCommunityView> - implements $ModHideCommunityViewCopyWith<$Res> { +class _$ModHideCommunityViewCopyWithImpl<$Res, $Val extends ModHideCommunityView> implements $ModHideCommunityViewCopyWith<$Res> { _$ModHideCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -64,25 +58,27 @@ class _$ModHideCommunityViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modHideCommunity = null, - Object? admin = freezed, - Object? community = null, - }) { - return _then(_value.copyWith( - modHideCommunity: null == modHideCommunity - ? _value.modHideCommunity - : modHideCommunity // ignore: cast_nullable_to_non_nullable - as ModHideCommunity, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modHideCommunity = null, Object? admin = freezed, Object? community = null}) { + return _then( + _value.copyWith( + modHideCommunity: + null == modHideCommunity + ? _value.modHideCommunity + : modHideCommunity // ignore: cast_nullable_to_non_nullable + as ModHideCommunity, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModHideCommunityView @@ -121,15 +117,11 @@ class _$ModHideCommunityViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ModHideCommunityViewImplCopyWith<$Res> - implements $ModHideCommunityViewCopyWith<$Res> { - factory _$$ModHideCommunityViewImplCopyWith(_$ModHideCommunityViewImpl value, - $Res Function(_$ModHideCommunityViewImpl) then) = - __$$ModHideCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$ModHideCommunityViewImplCopyWith<$Res> implements $ModHideCommunityViewCopyWith<$Res> { + factory _$$ModHideCommunityViewImplCopyWith(_$ModHideCommunityViewImpl value, $Res Function(_$ModHideCommunityViewImpl) then) = __$$ModHideCommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModHideCommunity modHideCommunity, Person? admin, Community community}); + $Res call({ModHideCommunity modHideCommunity, Person? admin, Community community}); @override $ModHideCommunityCopyWith<$Res> get modHideCommunity; @@ -140,36 +132,33 @@ abstract class _$$ModHideCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$ModHideCommunityViewImplCopyWithImpl<$Res> - extends _$ModHideCommunityViewCopyWithImpl<$Res, _$ModHideCommunityViewImpl> - implements _$$ModHideCommunityViewImplCopyWith<$Res> { - __$$ModHideCommunityViewImplCopyWithImpl(_$ModHideCommunityViewImpl _value, - $Res Function(_$ModHideCommunityViewImpl) _then) - : super(_value, _then); +class __$$ModHideCommunityViewImplCopyWithImpl<$Res> extends _$ModHideCommunityViewCopyWithImpl<$Res, _$ModHideCommunityViewImpl> implements _$$ModHideCommunityViewImplCopyWith<$Res> { + __$$ModHideCommunityViewImplCopyWithImpl(_$ModHideCommunityViewImpl _value, $Res Function(_$ModHideCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of ModHideCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modHideCommunity = null, - Object? admin = freezed, - Object? community = null, - }) { - return _then(_$ModHideCommunityViewImpl( - modHideCommunity: null == modHideCommunity - ? _value.modHideCommunity - : modHideCommunity // ignore: cast_nullable_to_non_nullable - as ModHideCommunity, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modHideCommunity = null, Object? admin = freezed, Object? community = null}) { + return _then( + _$ModHideCommunityViewImpl( + modHideCommunity: + null == modHideCommunity + ? _value.modHideCommunity + : modHideCommunity // ignore: cast_nullable_to_non_nullable + as ModHideCommunity, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -177,19 +166,16 @@ class __$$ModHideCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$ModHideCommunityViewImpl extends _ModHideCommunityView { - const _$ModHideCommunityViewImpl( - {required this.modHideCommunity, this.admin, required this.community}) - : super._(); + const _$ModHideCommunityViewImpl({required this.modHideCommunity, this.admin, required this.community}) : super._(); - factory _$ModHideCommunityViewImpl.fromJson(Map json) => - _$$ModHideCommunityViewImplFromJson(json); + factory _$ModHideCommunityViewImpl.fromJson(Map json) => _$$ModHideCommunityViewImplFromJson(json); @override final ModHideCommunity modHideCommunity; -// v0.18.0 + // v0.18.0 @override final Person? admin; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -203,45 +189,33 @@ class _$ModHideCommunityViewImpl extends _ModHideCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModHideCommunityViewImpl && - (identical(other.modHideCommunity, modHideCommunity) || - other.modHideCommunity == modHideCommunity) && + (identical(other.modHideCommunity, modHideCommunity) || other.modHideCommunity == modHideCommunity) && (identical(other.admin, admin) || other.admin == admin) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, modHideCommunity, admin, community); + int get hashCode => Object.hash(runtimeType, modHideCommunity, admin, community); /// Create a copy of ModHideCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModHideCommunityViewImplCopyWith<_$ModHideCommunityViewImpl> - get copyWith => - __$$ModHideCommunityViewImplCopyWithImpl<_$ModHideCommunityViewImpl>( - this, _$identity); + _$$ModHideCommunityViewImplCopyWith<_$ModHideCommunityViewImpl> get copyWith => __$$ModHideCommunityViewImplCopyWithImpl<_$ModHideCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModHideCommunityViewImplToJson( - this, - ); + return _$$ModHideCommunityViewImplToJson(this); } } abstract class _ModHideCommunityView extends ModHideCommunityView { - const factory _ModHideCommunityView( - {required final ModHideCommunity modHideCommunity, - final Person? admin, - required final Community community}) = _$ModHideCommunityViewImpl; + const factory _ModHideCommunityView({required final ModHideCommunity modHideCommunity, final Person? admin, required final Community community}) = _$ModHideCommunityViewImpl; const _ModHideCommunityView._() : super._(); - factory _ModHideCommunityView.fromJson(Map json) = - _$ModHideCommunityViewImpl.fromJson; + factory _ModHideCommunityView.fromJson(Map json) = _$ModHideCommunityViewImpl.fromJson; @override ModHideCommunity get modHideCommunity; // v0.18.0 @@ -254,6 +228,5 @@ abstract class _ModHideCommunityView extends ModHideCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModHideCommunityViewImplCopyWith<_$ModHideCommunityViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModHideCommunityViewImplCopyWith<_$ModHideCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_hide_community_view.g.dart b/lib/src/v3/views/mod_hide_community_view.g.dart index e3a04be3..dd2413b0 100644 --- a/lib/src/v3/views/mod_hide_community_view.g.dart +++ b/lib/src/v3/views/mod_hide_community_view.g.dart @@ -6,21 +6,14 @@ part of 'mod_hide_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModHideCommunityViewImpl _$$ModHideCommunityViewImplFromJson( - Map json) => - _$ModHideCommunityViewImpl( - modHideCommunity: ModHideCommunity.fromJson( - json['mod_hide_community'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModHideCommunityViewImpl _$$ModHideCommunityViewImplFromJson(Map json) => _$ModHideCommunityViewImpl( + modHideCommunity: ModHideCommunity.fromJson(json['mod_hide_community'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModHideCommunityViewImplToJson( - _$ModHideCommunityViewImpl instance) => - { - 'mod_hide_community': instance.modHideCommunity.toJson(), - 'admin': instance.admin?.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModHideCommunityViewImplToJson(_$ModHideCommunityViewImpl instance) => { + 'mod_hide_community': instance.modHideCommunity.toJson(), + 'admin': instance.admin?.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_lock_post_view.dart b/lib/src/v3/views/mod_lock_post_view.dart index f94fc582..8b12f225 100644 --- a/lib/src/v3/views/mod_lock_post_view.dart +++ b/lib/src/v3/views/mod_lock_post_view.dart @@ -17,6 +17,5 @@ class ModLockPostView with _$ModLockPostView { }) = _ModLockPostView; const ModLockPostView._(); - factory ModLockPostView.fromJson(Map json) => - _$ModLockPostViewFromJson(json); + factory ModLockPostView.fromJson(Map json) => _$ModLockPostViewFromJson(json); } diff --git a/lib/src/v3/views/mod_lock_post_view.freezed.dart b/lib/src/v3/views/mod_lock_post_view.freezed.dart index 69ac7d61..b3169eb7 100644 --- a/lib/src/v3/views/mod_lock_post_view.freezed.dart +++ b/lib/src/v3/views/mod_lock_post_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_lock_post_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModLockPostView _$ModLockPostViewFromJson(Map json) { return _ModLockPostView.fromJson(json); @@ -31,21 +32,14 @@ mixin _$ModLockPostView { /// Create a copy of ModLockPostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModLockPostViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModLockPostViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModLockPostViewCopyWith<$Res> { - factory $ModLockPostViewCopyWith( - ModLockPostView value, $Res Function(ModLockPostView) then) = - _$ModLockPostViewCopyWithImpl<$Res, ModLockPostView>; + factory $ModLockPostViewCopyWith(ModLockPostView value, $Res Function(ModLockPostView) then) = _$ModLockPostViewCopyWithImpl<$Res, ModLockPostView>; @useResult - $Res call( - {ModLockPost modLockPost, - Person? moderator, - Post post, - Community community}); + $Res call({ModLockPost modLockPost, Person? moderator, Post post, Community community}); $ModLockPostCopyWith<$Res> get modLockPost; $PersonCopyWith<$Res>? get moderator; @@ -54,8 +48,7 @@ abstract class $ModLockPostViewCopyWith<$Res> { } /// @nodoc -class _$ModLockPostViewCopyWithImpl<$Res, $Val extends ModLockPostView> - implements $ModLockPostViewCopyWith<$Res> { +class _$ModLockPostViewCopyWithImpl<$Res, $Val extends ModLockPostView> implements $ModLockPostViewCopyWith<$Res> { _$ModLockPostViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,30 +60,32 @@ class _$ModLockPostViewCopyWithImpl<$Res, $Val extends ModLockPostView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modLockPost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_value.copyWith( - modLockPost: null == modLockPost - ? _value.modLockPost - : modLockPost // ignore: cast_nullable_to_non_nullable - as ModLockPost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modLockPost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _value.copyWith( + modLockPost: + null == modLockPost + ? _value.modLockPost + : modLockPost // ignore: cast_nullable_to_non_nullable + as ModLockPost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModLockPostView @@ -139,18 +134,11 @@ class _$ModLockPostViewCopyWithImpl<$Res, $Val extends ModLockPostView> } /// @nodoc -abstract class _$$ModLockPostViewImplCopyWith<$Res> - implements $ModLockPostViewCopyWith<$Res> { - factory _$$ModLockPostViewImplCopyWith(_$ModLockPostViewImpl value, - $Res Function(_$ModLockPostViewImpl) then) = - __$$ModLockPostViewImplCopyWithImpl<$Res>; +abstract class _$$ModLockPostViewImplCopyWith<$Res> implements $ModLockPostViewCopyWith<$Res> { + factory _$$ModLockPostViewImplCopyWith(_$ModLockPostViewImpl value, $Res Function(_$ModLockPostViewImpl) then) = __$$ModLockPostViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModLockPost modLockPost, - Person? moderator, - Post post, - Community community}); + $Res call({ModLockPost modLockPost, Person? moderator, Post post, Community community}); @override $ModLockPostCopyWith<$Res> get modLockPost; @@ -163,41 +151,38 @@ abstract class _$$ModLockPostViewImplCopyWith<$Res> } /// @nodoc -class __$$ModLockPostViewImplCopyWithImpl<$Res> - extends _$ModLockPostViewCopyWithImpl<$Res, _$ModLockPostViewImpl> - implements _$$ModLockPostViewImplCopyWith<$Res> { - __$$ModLockPostViewImplCopyWithImpl( - _$ModLockPostViewImpl _value, $Res Function(_$ModLockPostViewImpl) _then) - : super(_value, _then); +class __$$ModLockPostViewImplCopyWithImpl<$Res> extends _$ModLockPostViewCopyWithImpl<$Res, _$ModLockPostViewImpl> implements _$$ModLockPostViewImplCopyWith<$Res> { + __$$ModLockPostViewImplCopyWithImpl(_$ModLockPostViewImpl _value, $Res Function(_$ModLockPostViewImpl) _then) : super(_value, _then); /// Create a copy of ModLockPostView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modLockPost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_$ModLockPostViewImpl( - modLockPost: null == modLockPost - ? _value.modLockPost - : modLockPost // ignore: cast_nullable_to_non_nullable - as ModLockPost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modLockPost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _$ModLockPostViewImpl( + modLockPost: + null == modLockPost + ? _value.modLockPost + : modLockPost // ignore: cast_nullable_to_non_nullable + as ModLockPost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -205,25 +190,19 @@ class __$$ModLockPostViewImplCopyWithImpl<$Res> @modelSerde class _$ModLockPostViewImpl extends _ModLockPostView { - const _$ModLockPostViewImpl( - {required this.modLockPost, - this.moderator, - required this.post, - required this.community}) - : super._(); + const _$ModLockPostViewImpl({required this.modLockPost, this.moderator, required this.post, required this.community}) : super._(); - factory _$ModLockPostViewImpl.fromJson(Map json) => - _$$ModLockPostViewImplFromJson(json); + factory _$ModLockPostViewImpl.fromJson(Map json) => _$$ModLockPostViewImplFromJson(json); @override final ModLockPost modLockPost; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -237,47 +216,34 @@ class _$ModLockPostViewImpl extends _ModLockPostView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModLockPostViewImpl && - (identical(other.modLockPost, modLockPost) || - other.modLockPost == modLockPost) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && + (identical(other.modLockPost, modLockPost) || other.modLockPost == modLockPost) && + (identical(other.moderator, moderator) || other.moderator == moderator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, modLockPost, moderator, post, community); + int get hashCode => Object.hash(runtimeType, modLockPost, moderator, post, community); /// Create a copy of ModLockPostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModLockPostViewImplCopyWith<_$ModLockPostViewImpl> get copyWith => - __$$ModLockPostViewImplCopyWithImpl<_$ModLockPostViewImpl>( - this, _$identity); + _$$ModLockPostViewImplCopyWith<_$ModLockPostViewImpl> get copyWith => __$$ModLockPostViewImplCopyWithImpl<_$ModLockPostViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModLockPostViewImplToJson( - this, - ); + return _$$ModLockPostViewImplToJson(this); } } abstract class _ModLockPostView extends ModLockPostView { - const factory _ModLockPostView( - {required final ModLockPost modLockPost, - final Person? moderator, - required final Post post, - required final Community community}) = _$ModLockPostViewImpl; + const factory _ModLockPostView({required final ModLockPost modLockPost, final Person? moderator, required final Post post, required final Community community}) = _$ModLockPostViewImpl; const _ModLockPostView._() : super._(); - factory _ModLockPostView.fromJson(Map json) = - _$ModLockPostViewImpl.fromJson; + factory _ModLockPostView.fromJson(Map json) = _$ModLockPostViewImpl.fromJson; @override ModLockPost get modLockPost; // v0.18.0 @@ -292,6 +258,5 @@ abstract class _ModLockPostView extends ModLockPostView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModLockPostViewImplCopyWith<_$ModLockPostViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModLockPostViewImplCopyWith<_$ModLockPostViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_lock_post_view.g.dart b/lib/src/v3/views/mod_lock_post_view.g.dart index 518ba8dc..10075edc 100644 --- a/lib/src/v3/views/mod_lock_post_view.g.dart +++ b/lib/src/v3/views/mod_lock_post_view.g.dart @@ -6,23 +6,16 @@ part of 'mod_lock_post_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModLockPostViewImpl _$$ModLockPostViewImplFromJson( - Map json) => - _$ModLockPostViewImpl( - modLockPost: - ModLockPost.fromJson(json['mod_lock_post'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModLockPostViewImpl _$$ModLockPostViewImplFromJson(Map json) => _$ModLockPostViewImpl( + modLockPost: ModLockPost.fromJson(json['mod_lock_post'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModLockPostViewImplToJson( - _$ModLockPostViewImpl instance) => - { - 'mod_lock_post': instance.modLockPost.toJson(), - 'moderator': instance.moderator?.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModLockPostViewImplToJson(_$ModLockPostViewImpl instance) => { + 'mod_lock_post': instance.modLockPost.toJson(), + 'moderator': instance.moderator?.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_remove_comment_view.dart b/lib/src/v3/views/mod_remove_comment_view.dart index 78839dfa..dd96930e 100644 --- a/lib/src/v3/views/mod_remove_comment_view.dart +++ b/lib/src/v3/views/mod_remove_comment_view.dart @@ -19,6 +19,5 @@ class ModRemoveCommentView with _$ModRemoveCommentView { }) = _ModRemoveCommentView; const ModRemoveCommentView._(); - factory ModRemoveCommentView.fromJson(Map json) => - _$ModRemoveCommentViewFromJson(json); + factory ModRemoveCommentView.fromJson(Map json) => _$ModRemoveCommentViewFromJson(json); } diff --git a/lib/src/v3/views/mod_remove_comment_view.freezed.dart b/lib/src/v3/views/mod_remove_comment_view.freezed.dart index 00f9af20..12a81455 100644 --- a/lib/src/v3/views/mod_remove_comment_view.freezed.dart +++ b/lib/src/v3/views/mod_remove_comment_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_remove_comment_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModRemoveCommentView _$ModRemoveCommentViewFromJson(Map json) { return _ModRemoveCommentView.fromJson(json); @@ -20,8 +21,7 @@ ModRemoveCommentView _$ModRemoveCommentViewFromJson(Map json) { /// @nodoc mixin _$ModRemoveCommentView { - ModRemoveComment get modRemoveComment => - throw _privateConstructorUsedError; // v0.18.0 + ModRemoveComment get modRemoveComment => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Comment get comment => throw _privateConstructorUsedError; // v0.18.0 Person get commenter => throw _privateConstructorUsedError; // v0.18.0 @@ -34,23 +34,14 @@ mixin _$ModRemoveCommentView { /// Create a copy of ModRemoveCommentView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemoveCommentViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemoveCommentViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemoveCommentViewCopyWith<$Res> { - factory $ModRemoveCommentViewCopyWith(ModRemoveCommentView value, - $Res Function(ModRemoveCommentView) then) = - _$ModRemoveCommentViewCopyWithImpl<$Res, ModRemoveCommentView>; + factory $ModRemoveCommentViewCopyWith(ModRemoveCommentView value, $Res Function(ModRemoveCommentView) then) = _$ModRemoveCommentViewCopyWithImpl<$Res, ModRemoveCommentView>; @useResult - $Res call( - {ModRemoveComment modRemoveComment, - Person? moderator, - Comment comment, - Person commenter, - Post post, - Community community}); + $Res call({ModRemoveComment modRemoveComment, Person? moderator, Comment comment, Person commenter, Post post, Community community}); $ModRemoveCommentCopyWith<$Res> get modRemoveComment; $PersonCopyWith<$Res>? get moderator; @@ -61,9 +52,7 @@ abstract class $ModRemoveCommentViewCopyWith<$Res> { } /// @nodoc -class _$ModRemoveCommentViewCopyWithImpl<$Res, - $Val extends ModRemoveCommentView> - implements $ModRemoveCommentViewCopyWith<$Res> { +class _$ModRemoveCommentViewCopyWithImpl<$Res, $Val extends ModRemoveCommentView> implements $ModRemoveCommentViewCopyWith<$Res> { _$ModRemoveCommentViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -75,40 +64,42 @@ class _$ModRemoveCommentViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemoveComment = null, - Object? moderator = freezed, - Object? comment = null, - Object? commenter = null, - Object? post = null, - Object? community = null, - }) { - return _then(_value.copyWith( - modRemoveComment: null == modRemoveComment - ? _value.modRemoveComment - : modRemoveComment // ignore: cast_nullable_to_non_nullable - as ModRemoveComment, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - commenter: null == commenter - ? _value.commenter - : commenter // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modRemoveComment = null, Object? moderator = freezed, Object? comment = null, Object? commenter = null, Object? post = null, Object? community = null}) { + return _then( + _value.copyWith( + modRemoveComment: + null == modRemoveComment + ? _value.modRemoveComment + : modRemoveComment // ignore: cast_nullable_to_non_nullable + as ModRemoveComment, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + commenter: + null == commenter + ? _value.commenter + : commenter // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModRemoveCommentView @@ -177,20 +168,11 @@ class _$ModRemoveCommentViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ModRemoveCommentViewImplCopyWith<$Res> - implements $ModRemoveCommentViewCopyWith<$Res> { - factory _$$ModRemoveCommentViewImplCopyWith(_$ModRemoveCommentViewImpl value, - $Res Function(_$ModRemoveCommentViewImpl) then) = - __$$ModRemoveCommentViewImplCopyWithImpl<$Res>; +abstract class _$$ModRemoveCommentViewImplCopyWith<$Res> implements $ModRemoveCommentViewCopyWith<$Res> { + factory _$$ModRemoveCommentViewImplCopyWith(_$ModRemoveCommentViewImpl value, $Res Function(_$ModRemoveCommentViewImpl) then) = __$$ModRemoveCommentViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModRemoveComment modRemoveComment, - Person? moderator, - Comment comment, - Person commenter, - Post post, - Community community}); + $Res call({ModRemoveComment modRemoveComment, Person? moderator, Comment comment, Person commenter, Post post, Community community}); @override $ModRemoveCommentCopyWith<$Res> get modRemoveComment; @@ -207,51 +189,48 @@ abstract class _$$ModRemoveCommentViewImplCopyWith<$Res> } /// @nodoc -class __$$ModRemoveCommentViewImplCopyWithImpl<$Res> - extends _$ModRemoveCommentViewCopyWithImpl<$Res, _$ModRemoveCommentViewImpl> - implements _$$ModRemoveCommentViewImplCopyWith<$Res> { - __$$ModRemoveCommentViewImplCopyWithImpl(_$ModRemoveCommentViewImpl _value, - $Res Function(_$ModRemoveCommentViewImpl) _then) - : super(_value, _then); +class __$$ModRemoveCommentViewImplCopyWithImpl<$Res> extends _$ModRemoveCommentViewCopyWithImpl<$Res, _$ModRemoveCommentViewImpl> implements _$$ModRemoveCommentViewImplCopyWith<$Res> { + __$$ModRemoveCommentViewImplCopyWithImpl(_$ModRemoveCommentViewImpl _value, $Res Function(_$ModRemoveCommentViewImpl) _then) : super(_value, _then); /// Create a copy of ModRemoveCommentView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemoveComment = null, - Object? moderator = freezed, - Object? comment = null, - Object? commenter = null, - Object? post = null, - Object? community = null, - }) { - return _then(_$ModRemoveCommentViewImpl( - modRemoveComment: null == modRemoveComment - ? _value.modRemoveComment - : modRemoveComment // ignore: cast_nullable_to_non_nullable - as ModRemoveComment, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - commenter: null == commenter - ? _value.commenter - : commenter // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modRemoveComment = null, Object? moderator = freezed, Object? comment = null, Object? commenter = null, Object? post = null, Object? community = null}) { + return _then( + _$ModRemoveCommentViewImpl( + modRemoveComment: + null == modRemoveComment + ? _value.modRemoveComment + : modRemoveComment // ignore: cast_nullable_to_non_nullable + as ModRemoveComment, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + commenter: + null == commenter + ? _value.commenter + : commenter // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -259,33 +238,25 @@ class __$$ModRemoveCommentViewImplCopyWithImpl<$Res> @modelSerde class _$ModRemoveCommentViewImpl extends _ModRemoveCommentView { - const _$ModRemoveCommentViewImpl( - {required this.modRemoveComment, - this.moderator, - required this.comment, - required this.commenter, - required this.post, - required this.community}) - : super._(); + const _$ModRemoveCommentViewImpl({required this.modRemoveComment, this.moderator, required this.comment, required this.commenter, required this.post, required this.community}) : super._(); - factory _$ModRemoveCommentViewImpl.fromJson(Map json) => - _$$ModRemoveCommentViewImplFromJson(json); + factory _$ModRemoveCommentViewImpl.fromJson(Map json) => _$$ModRemoveCommentViewImplFromJson(json); @override final ModRemoveComment modRemoveComment; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Comment comment; -// v0.18.0 + // v0.18.0 @override final Person commenter; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -299,53 +270,43 @@ class _$ModRemoveCommentViewImpl extends _ModRemoveCommentView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModRemoveCommentViewImpl && - (identical(other.modRemoveComment, modRemoveComment) || - other.modRemoveComment == modRemoveComment) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && + (identical(other.modRemoveComment, modRemoveComment) || other.modRemoveComment == modRemoveComment) && + (identical(other.moderator, moderator) || other.moderator == moderator) && (identical(other.comment, comment) || other.comment == comment) && - (identical(other.commenter, commenter) || - other.commenter == commenter) && + (identical(other.commenter, commenter) || other.commenter == commenter) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, modRemoveComment, moderator, - comment, commenter, post, community); + int get hashCode => Object.hash(runtimeType, modRemoveComment, moderator, comment, commenter, post, community); /// Create a copy of ModRemoveCommentView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemoveCommentViewImplCopyWith<_$ModRemoveCommentViewImpl> - get copyWith => - __$$ModRemoveCommentViewImplCopyWithImpl<_$ModRemoveCommentViewImpl>( - this, _$identity); + _$$ModRemoveCommentViewImplCopyWith<_$ModRemoveCommentViewImpl> get copyWith => __$$ModRemoveCommentViewImplCopyWithImpl<_$ModRemoveCommentViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemoveCommentViewImplToJson( - this, - ); + return _$$ModRemoveCommentViewImplToJson(this); } } abstract class _ModRemoveCommentView extends ModRemoveCommentView { - const factory _ModRemoveCommentView( - {required final ModRemoveComment modRemoveComment, - final Person? moderator, - required final Comment comment, - required final Person commenter, - required final Post post, - required final Community community}) = _$ModRemoveCommentViewImpl; + const factory _ModRemoveCommentView({ + required final ModRemoveComment modRemoveComment, + final Person? moderator, + required final Comment comment, + required final Person commenter, + required final Post post, + required final Community community, + }) = _$ModRemoveCommentViewImpl; const _ModRemoveCommentView._() : super._(); - factory _ModRemoveCommentView.fromJson(Map json) = - _$ModRemoveCommentViewImpl.fromJson; + factory _ModRemoveCommentView.fromJson(Map json) = _$ModRemoveCommentViewImpl.fromJson; @override ModRemoveComment get modRemoveComment; // v0.18.0 @@ -364,6 +325,5 @@ abstract class _ModRemoveCommentView extends ModRemoveCommentView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemoveCommentViewImplCopyWith<_$ModRemoveCommentViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModRemoveCommentViewImplCopyWith<_$ModRemoveCommentViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_remove_comment_view.g.dart b/lib/src/v3/views/mod_remove_comment_view.g.dart index a11b0219..443e5b72 100644 --- a/lib/src/v3/views/mod_remove_comment_view.g.dart +++ b/lib/src/v3/views/mod_remove_comment_view.g.dart @@ -6,27 +6,20 @@ part of 'mod_remove_comment_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemoveCommentViewImpl _$$ModRemoveCommentViewImplFromJson( - Map json) => - _$ModRemoveCommentViewImpl( - modRemoveComment: ModRemoveComment.fromJson( - json['mod_remove_comment'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - comment: Comment.fromJson(json['comment'] as Map), - commenter: Person.fromJson(json['commenter'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModRemoveCommentViewImpl _$$ModRemoveCommentViewImplFromJson(Map json) => _$ModRemoveCommentViewImpl( + modRemoveComment: ModRemoveComment.fromJson(json['mod_remove_comment'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + comment: Comment.fromJson(json['comment'] as Map), + commenter: Person.fromJson(json['commenter'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModRemoveCommentViewImplToJson( - _$ModRemoveCommentViewImpl instance) => - { - 'mod_remove_comment': instance.modRemoveComment.toJson(), - 'moderator': instance.moderator?.toJson(), - 'comment': instance.comment.toJson(), - 'commenter': instance.commenter.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModRemoveCommentViewImplToJson(_$ModRemoveCommentViewImpl instance) => { + 'mod_remove_comment': instance.modRemoveComment.toJson(), + 'moderator': instance.moderator?.toJson(), + 'comment': instance.comment.toJson(), + 'commenter': instance.commenter.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_remove_community_view.dart b/lib/src/v3/views/mod_remove_community_view.dart index 04149c0d..91fa064d 100644 --- a/lib/src/v3/views/mod_remove_community_view.dart +++ b/lib/src/v3/views/mod_remove_community_view.dart @@ -16,6 +16,5 @@ class ModRemoveCommunityView with _$ModRemoveCommunityView { }) = _ModRemoveCommunityView; const ModRemoveCommunityView._(); - factory ModRemoveCommunityView.fromJson(Map json) => - _$ModRemoveCommunityViewFromJson(json); + factory ModRemoveCommunityView.fromJson(Map json) => _$ModRemoveCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/mod_remove_community_view.freezed.dart b/lib/src/v3/views/mod_remove_community_view.freezed.dart index aba8457a..e910fd40 100644 --- a/lib/src/v3/views/mod_remove_community_view.freezed.dart +++ b/lib/src/v3/views/mod_remove_community_view.freezed.dart @@ -12,17 +12,16 @@ part of 'mod_remove_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ModRemoveCommunityView _$ModRemoveCommunityViewFromJson( - Map json) { +ModRemoveCommunityView _$ModRemoveCommunityViewFromJson(Map json) { return _ModRemoveCommunityView.fromJson(json); } /// @nodoc mixin _$ModRemoveCommunityView { - ModRemoveCommunity get modRemoveCommunity => - throw _privateConstructorUsedError; // v0.18.0 + ModRemoveCommunity get modRemoveCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; @@ -32,20 +31,14 @@ mixin _$ModRemoveCommunityView { /// Create a copy of ModRemoveCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemoveCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemoveCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemoveCommunityViewCopyWith<$Res> { - factory $ModRemoveCommunityViewCopyWith(ModRemoveCommunityView value, - $Res Function(ModRemoveCommunityView) then) = - _$ModRemoveCommunityViewCopyWithImpl<$Res, ModRemoveCommunityView>; + factory $ModRemoveCommunityViewCopyWith(ModRemoveCommunityView value, $Res Function(ModRemoveCommunityView) then) = _$ModRemoveCommunityViewCopyWithImpl<$Res, ModRemoveCommunityView>; @useResult - $Res call( - {ModRemoveCommunity modRemoveCommunity, - Person? moderator, - Community community}); + $Res call({ModRemoveCommunity modRemoveCommunity, Person? moderator, Community community}); $ModRemoveCommunityCopyWith<$Res> get modRemoveCommunity; $PersonCopyWith<$Res>? get moderator; @@ -53,9 +46,7 @@ abstract class $ModRemoveCommunityViewCopyWith<$Res> { } /// @nodoc -class _$ModRemoveCommunityViewCopyWithImpl<$Res, - $Val extends ModRemoveCommunityView> - implements $ModRemoveCommunityViewCopyWith<$Res> { +class _$ModRemoveCommunityViewCopyWithImpl<$Res, $Val extends ModRemoveCommunityView> implements $ModRemoveCommunityViewCopyWith<$Res> { _$ModRemoveCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -67,25 +58,27 @@ class _$ModRemoveCommunityViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemoveCommunity = null, - Object? moderator = freezed, - Object? community = null, - }) { - return _then(_value.copyWith( - modRemoveCommunity: null == modRemoveCommunity - ? _value.modRemoveCommunity - : modRemoveCommunity // ignore: cast_nullable_to_non_nullable - as ModRemoveCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modRemoveCommunity = null, Object? moderator = freezed, Object? community = null}) { + return _then( + _value.copyWith( + modRemoveCommunity: + null == modRemoveCommunity + ? _value.modRemoveCommunity + : modRemoveCommunity // ignore: cast_nullable_to_non_nullable + as ModRemoveCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModRemoveCommunityView @@ -93,8 +86,7 @@ class _$ModRemoveCommunityViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $ModRemoveCommunityCopyWith<$Res> get modRemoveCommunity { - return $ModRemoveCommunityCopyWith<$Res>(_value.modRemoveCommunity, - (value) { + return $ModRemoveCommunityCopyWith<$Res>(_value.modRemoveCommunity, (value) { return _then(_value.copyWith(modRemoveCommunity: value) as $Val); }); } @@ -125,18 +117,11 @@ class _$ModRemoveCommunityViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ModRemoveCommunityViewImplCopyWith<$Res> - implements $ModRemoveCommunityViewCopyWith<$Res> { - factory _$$ModRemoveCommunityViewImplCopyWith( - _$ModRemoveCommunityViewImpl value, - $Res Function(_$ModRemoveCommunityViewImpl) then) = - __$$ModRemoveCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$ModRemoveCommunityViewImplCopyWith<$Res> implements $ModRemoveCommunityViewCopyWith<$Res> { + factory _$$ModRemoveCommunityViewImplCopyWith(_$ModRemoveCommunityViewImpl value, $Res Function(_$ModRemoveCommunityViewImpl) then) = __$$ModRemoveCommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModRemoveCommunity modRemoveCommunity, - Person? moderator, - Community community}); + $Res call({ModRemoveCommunity modRemoveCommunity, Person? moderator, Community community}); @override $ModRemoveCommunityCopyWith<$Res> get modRemoveCommunity; @@ -147,38 +132,33 @@ abstract class _$$ModRemoveCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$ModRemoveCommunityViewImplCopyWithImpl<$Res> - extends _$ModRemoveCommunityViewCopyWithImpl<$Res, - _$ModRemoveCommunityViewImpl> - implements _$$ModRemoveCommunityViewImplCopyWith<$Res> { - __$$ModRemoveCommunityViewImplCopyWithImpl( - _$ModRemoveCommunityViewImpl _value, - $Res Function(_$ModRemoveCommunityViewImpl) _then) - : super(_value, _then); +class __$$ModRemoveCommunityViewImplCopyWithImpl<$Res> extends _$ModRemoveCommunityViewCopyWithImpl<$Res, _$ModRemoveCommunityViewImpl> implements _$$ModRemoveCommunityViewImplCopyWith<$Res> { + __$$ModRemoveCommunityViewImplCopyWithImpl(_$ModRemoveCommunityViewImpl _value, $Res Function(_$ModRemoveCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of ModRemoveCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemoveCommunity = null, - Object? moderator = freezed, - Object? community = null, - }) { - return _then(_$ModRemoveCommunityViewImpl( - modRemoveCommunity: null == modRemoveCommunity - ? _value.modRemoveCommunity - : modRemoveCommunity // ignore: cast_nullable_to_non_nullable - as ModRemoveCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modRemoveCommunity = null, Object? moderator = freezed, Object? community = null}) { + return _then( + _$ModRemoveCommunityViewImpl( + modRemoveCommunity: + null == modRemoveCommunity + ? _value.modRemoveCommunity + : modRemoveCommunity // ignore: cast_nullable_to_non_nullable + as ModRemoveCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -186,21 +166,16 @@ class __$$ModRemoveCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$ModRemoveCommunityViewImpl extends _ModRemoveCommunityView { - const _$ModRemoveCommunityViewImpl( - {required this.modRemoveCommunity, - this.moderator, - required this.community}) - : super._(); + const _$ModRemoveCommunityViewImpl({required this.modRemoveCommunity, this.moderator, required this.community}) : super._(); - factory _$ModRemoveCommunityViewImpl.fromJson(Map json) => - _$$ModRemoveCommunityViewImplFromJson(json); + factory _$ModRemoveCommunityViewImpl.fromJson(Map json) => _$$ModRemoveCommunityViewImplFromJson(json); @override final ModRemoveCommunity modRemoveCommunity; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -214,45 +189,33 @@ class _$ModRemoveCommunityViewImpl extends _ModRemoveCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModRemoveCommunityViewImpl && - (identical(other.modRemoveCommunity, modRemoveCommunity) || - other.modRemoveCommunity == modRemoveCommunity) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.community, community) || - other.community == community)); + (identical(other.modRemoveCommunity, modRemoveCommunity) || other.modRemoveCommunity == modRemoveCommunity) && + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, modRemoveCommunity, moderator, community); + int get hashCode => Object.hash(runtimeType, modRemoveCommunity, moderator, community); /// Create a copy of ModRemoveCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemoveCommunityViewImplCopyWith<_$ModRemoveCommunityViewImpl> - get copyWith => __$$ModRemoveCommunityViewImplCopyWithImpl< - _$ModRemoveCommunityViewImpl>(this, _$identity); + _$$ModRemoveCommunityViewImplCopyWith<_$ModRemoveCommunityViewImpl> get copyWith => __$$ModRemoveCommunityViewImplCopyWithImpl<_$ModRemoveCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemoveCommunityViewImplToJson( - this, - ); + return _$$ModRemoveCommunityViewImplToJson(this); } } abstract class _ModRemoveCommunityView extends ModRemoveCommunityView { - const factory _ModRemoveCommunityView( - {required final ModRemoveCommunity modRemoveCommunity, - final Person? moderator, - required final Community community}) = _$ModRemoveCommunityViewImpl; + const factory _ModRemoveCommunityView({required final ModRemoveCommunity modRemoveCommunity, final Person? moderator, required final Community community}) = _$ModRemoveCommunityViewImpl; const _ModRemoveCommunityView._() : super._(); - factory _ModRemoveCommunityView.fromJson(Map json) = - _$ModRemoveCommunityViewImpl.fromJson; + factory _ModRemoveCommunityView.fromJson(Map json) = _$ModRemoveCommunityViewImpl.fromJson; @override ModRemoveCommunity get modRemoveCommunity; // v0.18.0 @@ -265,6 +228,5 @@ abstract class _ModRemoveCommunityView extends ModRemoveCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemoveCommunityViewImplCopyWith<_$ModRemoveCommunityViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModRemoveCommunityViewImplCopyWith<_$ModRemoveCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_remove_community_view.g.dart b/lib/src/v3/views/mod_remove_community_view.g.dart index 6119ced4..ca6f0b84 100644 --- a/lib/src/v3/views/mod_remove_community_view.g.dart +++ b/lib/src/v3/views/mod_remove_community_view.g.dart @@ -6,21 +6,14 @@ part of 'mod_remove_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemoveCommunityViewImpl _$$ModRemoveCommunityViewImplFromJson( - Map json) => - _$ModRemoveCommunityViewImpl( - modRemoveCommunity: ModRemoveCommunity.fromJson( - json['mod_remove_community'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModRemoveCommunityViewImpl _$$ModRemoveCommunityViewImplFromJson(Map json) => _$ModRemoveCommunityViewImpl( + modRemoveCommunity: ModRemoveCommunity.fromJson(json['mod_remove_community'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModRemoveCommunityViewImplToJson( - _$ModRemoveCommunityViewImpl instance) => - { - 'mod_remove_community': instance.modRemoveCommunity.toJson(), - 'moderator': instance.moderator?.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModRemoveCommunityViewImplToJson(_$ModRemoveCommunityViewImpl instance) => { + 'mod_remove_community': instance.modRemoveCommunity.toJson(), + 'moderator': instance.moderator?.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_remove_post_view.dart b/lib/src/v3/views/mod_remove_post_view.dart index 45f92804..e18c3906 100644 --- a/lib/src/v3/views/mod_remove_post_view.dart +++ b/lib/src/v3/views/mod_remove_post_view.dart @@ -17,6 +17,5 @@ class ModRemovePostView with _$ModRemovePostView { }) = _ModRemovePostView; const ModRemovePostView._(); - factory ModRemovePostView.fromJson(Map json) => - _$ModRemovePostViewFromJson(json); + factory ModRemovePostView.fromJson(Map json) => _$ModRemovePostViewFromJson(json); } diff --git a/lib/src/v3/views/mod_remove_post_view.freezed.dart b/lib/src/v3/views/mod_remove_post_view.freezed.dart index b3941409..6fc25458 100644 --- a/lib/src/v3/views/mod_remove_post_view.freezed.dart +++ b/lib/src/v3/views/mod_remove_post_view.freezed.dart @@ -12,7 +12,8 @@ part of 'mod_remove_post_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); ModRemovePostView _$ModRemovePostViewFromJson(Map json) { return _ModRemovePostView.fromJson(json); @@ -20,8 +21,7 @@ ModRemovePostView _$ModRemovePostViewFromJson(Map json) { /// @nodoc mixin _$ModRemovePostView { - ModRemovePost get modRemovePost => - throw _privateConstructorUsedError; // v0.18.0 + ModRemovePost get modRemovePost => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; @@ -32,21 +32,14 @@ mixin _$ModRemovePostView { /// Create a copy of ModRemovePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModRemovePostViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModRemovePostViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModRemovePostViewCopyWith<$Res> { - factory $ModRemovePostViewCopyWith( - ModRemovePostView value, $Res Function(ModRemovePostView) then) = - _$ModRemovePostViewCopyWithImpl<$Res, ModRemovePostView>; + factory $ModRemovePostViewCopyWith(ModRemovePostView value, $Res Function(ModRemovePostView) then) = _$ModRemovePostViewCopyWithImpl<$Res, ModRemovePostView>; @useResult - $Res call( - {ModRemovePost modRemovePost, - Person? moderator, - Post post, - Community community}); + $Res call({ModRemovePost modRemovePost, Person? moderator, Post post, Community community}); $ModRemovePostCopyWith<$Res> get modRemovePost; $PersonCopyWith<$Res>? get moderator; @@ -55,8 +48,7 @@ abstract class $ModRemovePostViewCopyWith<$Res> { } /// @nodoc -class _$ModRemovePostViewCopyWithImpl<$Res, $Val extends ModRemovePostView> - implements $ModRemovePostViewCopyWith<$Res> { +class _$ModRemovePostViewCopyWithImpl<$Res, $Val extends ModRemovePostView> implements $ModRemovePostViewCopyWith<$Res> { _$ModRemovePostViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -68,30 +60,32 @@ class _$ModRemovePostViewCopyWithImpl<$Res, $Val extends ModRemovePostView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemovePost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_value.copyWith( - modRemovePost: null == modRemovePost - ? _value.modRemovePost - : modRemovePost // ignore: cast_nullable_to_non_nullable - as ModRemovePost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - ) as $Val); + $Res call({Object? modRemovePost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _value.copyWith( + modRemovePost: + null == modRemovePost + ? _value.modRemovePost + : modRemovePost // ignore: cast_nullable_to_non_nullable + as ModRemovePost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ) + as $Val, + ); } /// Create a copy of ModRemovePostView @@ -140,18 +134,11 @@ class _$ModRemovePostViewCopyWithImpl<$Res, $Val extends ModRemovePostView> } /// @nodoc -abstract class _$$ModRemovePostViewImplCopyWith<$Res> - implements $ModRemovePostViewCopyWith<$Res> { - factory _$$ModRemovePostViewImplCopyWith(_$ModRemovePostViewImpl value, - $Res Function(_$ModRemovePostViewImpl) then) = - __$$ModRemovePostViewImplCopyWithImpl<$Res>; +abstract class _$$ModRemovePostViewImplCopyWith<$Res> implements $ModRemovePostViewCopyWith<$Res> { + factory _$$ModRemovePostViewImplCopyWith(_$ModRemovePostViewImpl value, $Res Function(_$ModRemovePostViewImpl) then) = __$$ModRemovePostViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModRemovePost modRemovePost, - Person? moderator, - Post post, - Community community}); + $Res call({ModRemovePost modRemovePost, Person? moderator, Post post, Community community}); @override $ModRemovePostCopyWith<$Res> get modRemovePost; @@ -164,41 +151,38 @@ abstract class _$$ModRemovePostViewImplCopyWith<$Res> } /// @nodoc -class __$$ModRemovePostViewImplCopyWithImpl<$Res> - extends _$ModRemovePostViewCopyWithImpl<$Res, _$ModRemovePostViewImpl> - implements _$$ModRemovePostViewImplCopyWith<$Res> { - __$$ModRemovePostViewImplCopyWithImpl(_$ModRemovePostViewImpl _value, - $Res Function(_$ModRemovePostViewImpl) _then) - : super(_value, _then); +class __$$ModRemovePostViewImplCopyWithImpl<$Res> extends _$ModRemovePostViewCopyWithImpl<$Res, _$ModRemovePostViewImpl> implements _$$ModRemovePostViewImplCopyWith<$Res> { + __$$ModRemovePostViewImplCopyWithImpl(_$ModRemovePostViewImpl _value, $Res Function(_$ModRemovePostViewImpl) _then) : super(_value, _then); /// Create a copy of ModRemovePostView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modRemovePost = null, - Object? moderator = freezed, - Object? post = null, - Object? community = null, - }) { - return _then(_$ModRemovePostViewImpl( - modRemovePost: null == modRemovePost - ? _value.modRemovePost - : modRemovePost // ignore: cast_nullable_to_non_nullable - as ModRemovePost, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - )); + $Res call({Object? modRemovePost = null, Object? moderator = freezed, Object? post = null, Object? community = null}) { + return _then( + _$ModRemovePostViewImpl( + modRemovePost: + null == modRemovePost + ? _value.modRemovePost + : modRemovePost // ignore: cast_nullable_to_non_nullable + as ModRemovePost, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + ), + ); } } @@ -206,25 +190,19 @@ class __$$ModRemovePostViewImplCopyWithImpl<$Res> @modelSerde class _$ModRemovePostViewImpl extends _ModRemovePostView { - const _$ModRemovePostViewImpl( - {required this.modRemovePost, - this.moderator, - required this.post, - required this.community}) - : super._(); + const _$ModRemovePostViewImpl({required this.modRemovePost, this.moderator, required this.post, required this.community}) : super._(); - factory _$ModRemovePostViewImpl.fromJson(Map json) => - _$$ModRemovePostViewImplFromJson(json); + factory _$ModRemovePostViewImpl.fromJson(Map json) => _$$ModRemovePostViewImplFromJson(json); @override final ModRemovePost modRemovePost; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; @@ -238,47 +216,34 @@ class _$ModRemovePostViewImpl extends _ModRemovePostView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModRemovePostViewImpl && - (identical(other.modRemovePost, modRemovePost) || - other.modRemovePost == modRemovePost) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && + (identical(other.modRemovePost, modRemovePost) || other.modRemovePost == modRemovePost) && + (identical(other.moderator, moderator) || other.moderator == moderator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community)); + (identical(other.community, community) || other.community == community)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, modRemovePost, moderator, post, community); + int get hashCode => Object.hash(runtimeType, modRemovePost, moderator, post, community); /// Create a copy of ModRemovePostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModRemovePostViewImplCopyWith<_$ModRemovePostViewImpl> get copyWith => - __$$ModRemovePostViewImplCopyWithImpl<_$ModRemovePostViewImpl>( - this, _$identity); + _$$ModRemovePostViewImplCopyWith<_$ModRemovePostViewImpl> get copyWith => __$$ModRemovePostViewImplCopyWithImpl<_$ModRemovePostViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModRemovePostViewImplToJson( - this, - ); + return _$$ModRemovePostViewImplToJson(this); } } abstract class _ModRemovePostView extends ModRemovePostView { - const factory _ModRemovePostView( - {required final ModRemovePost modRemovePost, - final Person? moderator, - required final Post post, - required final Community community}) = _$ModRemovePostViewImpl; + const factory _ModRemovePostView({required final ModRemovePost modRemovePost, final Person? moderator, required final Post post, required final Community community}) = _$ModRemovePostViewImpl; const _ModRemovePostView._() : super._(); - factory _ModRemovePostView.fromJson(Map json) = - _$ModRemovePostViewImpl.fromJson; + factory _ModRemovePostView.fromJson(Map json) = _$ModRemovePostViewImpl.fromJson; @override ModRemovePost get modRemovePost; // v0.18.0 @@ -293,6 +258,5 @@ abstract class _ModRemovePostView extends ModRemovePostView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModRemovePostViewImplCopyWith<_$ModRemovePostViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$ModRemovePostViewImplCopyWith<_$ModRemovePostViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_remove_post_view.g.dart b/lib/src/v3/views/mod_remove_post_view.g.dart index 0f271f7a..a0cccbeb 100644 --- a/lib/src/v3/views/mod_remove_post_view.g.dart +++ b/lib/src/v3/views/mod_remove_post_view.g.dart @@ -6,23 +6,16 @@ part of 'mod_remove_post_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModRemovePostViewImpl _$$ModRemovePostViewImplFromJson( - Map json) => - _$ModRemovePostViewImpl( - modRemovePost: ModRemovePost.fromJson( - json['mod_remove_post'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - ); +_$ModRemovePostViewImpl _$$ModRemovePostViewImplFromJson(Map json) => _$ModRemovePostViewImpl( + modRemovePost: ModRemovePost.fromJson(json['mod_remove_post'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), +); -Map _$$ModRemovePostViewImplToJson( - _$ModRemovePostViewImpl instance) => - { - 'mod_remove_post': instance.modRemovePost.toJson(), - 'moderator': instance.moderator?.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - }; +Map _$$ModRemovePostViewImplToJson(_$ModRemovePostViewImpl instance) => { + 'mod_remove_post': instance.modRemovePost.toJson(), + 'moderator': instance.moderator?.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), +}; diff --git a/lib/src/v3/views/mod_transfer_community_view.dart b/lib/src/v3/views/mod_transfer_community_view.dart index 2c78ec2b..f9334a39 100644 --- a/lib/src/v3/views/mod_transfer_community_view.dart +++ b/lib/src/v3/views/mod_transfer_community_view.dart @@ -17,6 +17,5 @@ class ModTransferCommunityView with _$ModTransferCommunityView { }) = _ModTransferCommunityView; const ModTransferCommunityView._(); - factory ModTransferCommunityView.fromJson(Map json) => - _$ModTransferCommunityViewFromJson(json); + factory ModTransferCommunityView.fromJson(Map json) => _$ModTransferCommunityViewFromJson(json); } diff --git a/lib/src/v3/views/mod_transfer_community_view.freezed.dart b/lib/src/v3/views/mod_transfer_community_view.freezed.dart index 861810c5..b3f4d225 100644 --- a/lib/src/v3/views/mod_transfer_community_view.freezed.dart +++ b/lib/src/v3/views/mod_transfer_community_view.freezed.dart @@ -12,17 +12,16 @@ part of 'mod_transfer_community_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -ModTransferCommunityView _$ModTransferCommunityViewFromJson( - Map json) { +ModTransferCommunityView _$ModTransferCommunityViewFromJson(Map json) { return _ModTransferCommunityView.fromJson(json); } /// @nodoc mixin _$ModTransferCommunityView { - ModTransferCommunity get modTransferCommunity => - throw _privateConstructorUsedError; // v0.18.0 + ModTransferCommunity get modTransferCommunity => throw _privateConstructorUsedError; // v0.18.0 Person? get moderator => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get moddedPerson => throw _privateConstructorUsedError; @@ -33,21 +32,14 @@ mixin _$ModTransferCommunityView { /// Create a copy of ModTransferCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $ModTransferCommunityViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $ModTransferCommunityViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ModTransferCommunityViewCopyWith<$Res> { - factory $ModTransferCommunityViewCopyWith(ModTransferCommunityView value, - $Res Function(ModTransferCommunityView) then) = - _$ModTransferCommunityViewCopyWithImpl<$Res, ModTransferCommunityView>; + factory $ModTransferCommunityViewCopyWith(ModTransferCommunityView value, $Res Function(ModTransferCommunityView) then) = _$ModTransferCommunityViewCopyWithImpl<$Res, ModTransferCommunityView>; @useResult - $Res call( - {ModTransferCommunity modTransferCommunity, - Person? moderator, - Community community, - Person moddedPerson}); + $Res call({ModTransferCommunity modTransferCommunity, Person? moderator, Community community, Person moddedPerson}); $ModTransferCommunityCopyWith<$Res> get modTransferCommunity; $PersonCopyWith<$Res>? get moderator; @@ -56,9 +48,7 @@ abstract class $ModTransferCommunityViewCopyWith<$Res> { } /// @nodoc -class _$ModTransferCommunityViewCopyWithImpl<$Res, - $Val extends ModTransferCommunityView> - implements $ModTransferCommunityViewCopyWith<$Res> { +class _$ModTransferCommunityViewCopyWithImpl<$Res, $Val extends ModTransferCommunityView> implements $ModTransferCommunityViewCopyWith<$Res> { _$ModTransferCommunityViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -70,30 +60,32 @@ class _$ModTransferCommunityViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modTransferCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? moddedPerson = null, - }) { - return _then(_value.copyWith( - modTransferCommunity: null == modTransferCommunity - ? _value.modTransferCommunity - : modTransferCommunity // ignore: cast_nullable_to_non_nullable - as ModTransferCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? modTransferCommunity = null, Object? moderator = freezed, Object? community = null, Object? moddedPerson = null}) { + return _then( + _value.copyWith( + modTransferCommunity: + null == modTransferCommunity + ? _value.modTransferCommunity + : modTransferCommunity // ignore: cast_nullable_to_non_nullable + as ModTransferCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of ModTransferCommunityView @@ -101,8 +93,7 @@ class _$ModTransferCommunityViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $ModTransferCommunityCopyWith<$Res> get modTransferCommunity { - return $ModTransferCommunityCopyWith<$Res>(_value.modTransferCommunity, - (value) { + return $ModTransferCommunityCopyWith<$Res>(_value.modTransferCommunity, (value) { return _then(_value.copyWith(modTransferCommunity: value) as $Val); }); } @@ -143,19 +134,11 @@ class _$ModTransferCommunityViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$ModTransferCommunityViewImplCopyWith<$Res> - implements $ModTransferCommunityViewCopyWith<$Res> { - factory _$$ModTransferCommunityViewImplCopyWith( - _$ModTransferCommunityViewImpl value, - $Res Function(_$ModTransferCommunityViewImpl) then) = - __$$ModTransferCommunityViewImplCopyWithImpl<$Res>; +abstract class _$$ModTransferCommunityViewImplCopyWith<$Res> implements $ModTransferCommunityViewCopyWith<$Res> { + factory _$$ModTransferCommunityViewImplCopyWith(_$ModTransferCommunityViewImpl value, $Res Function(_$ModTransferCommunityViewImpl) then) = __$$ModTransferCommunityViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {ModTransferCommunity modTransferCommunity, - Person? moderator, - Community community, - Person moddedPerson}); + $Res call({ModTransferCommunity modTransferCommunity, Person? moderator, Community community, Person moddedPerson}); @override $ModTransferCommunityCopyWith<$Res> get modTransferCommunity; @@ -168,43 +151,38 @@ abstract class _$$ModTransferCommunityViewImplCopyWith<$Res> } /// @nodoc -class __$$ModTransferCommunityViewImplCopyWithImpl<$Res> - extends _$ModTransferCommunityViewCopyWithImpl<$Res, - _$ModTransferCommunityViewImpl> - implements _$$ModTransferCommunityViewImplCopyWith<$Res> { - __$$ModTransferCommunityViewImplCopyWithImpl( - _$ModTransferCommunityViewImpl _value, - $Res Function(_$ModTransferCommunityViewImpl) _then) - : super(_value, _then); +class __$$ModTransferCommunityViewImplCopyWithImpl<$Res> extends _$ModTransferCommunityViewCopyWithImpl<$Res, _$ModTransferCommunityViewImpl> implements _$$ModTransferCommunityViewImplCopyWith<$Res> { + __$$ModTransferCommunityViewImplCopyWithImpl(_$ModTransferCommunityViewImpl _value, $Res Function(_$ModTransferCommunityViewImpl) _then) : super(_value, _then); /// Create a copy of ModTransferCommunityView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? modTransferCommunity = null, - Object? moderator = freezed, - Object? community = null, - Object? moddedPerson = null, - }) { - return _then(_$ModTransferCommunityViewImpl( - modTransferCommunity: null == modTransferCommunity - ? _value.modTransferCommunity - : modTransferCommunity // ignore: cast_nullable_to_non_nullable - as ModTransferCommunity, - moderator: freezed == moderator - ? _value.moderator - : moderator // ignore: cast_nullable_to_non_nullable - as Person?, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - moddedPerson: null == moddedPerson - ? _value.moddedPerson - : moddedPerson // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? modTransferCommunity = null, Object? moderator = freezed, Object? community = null, Object? moddedPerson = null}) { + return _then( + _$ModTransferCommunityViewImpl( + modTransferCommunity: + null == modTransferCommunity + ? _value.modTransferCommunity + : modTransferCommunity // ignore: cast_nullable_to_non_nullable + as ModTransferCommunity, + moderator: + freezed == moderator + ? _value.moderator + : moderator // ignore: cast_nullable_to_non_nullable + as Person?, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + moddedPerson: + null == moddedPerson + ? _value.moddedPerson + : moddedPerson // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -212,25 +190,19 @@ class __$$ModTransferCommunityViewImplCopyWithImpl<$Res> @modelSerde class _$ModTransferCommunityViewImpl extends _ModTransferCommunityView { - const _$ModTransferCommunityViewImpl( - {required this.modTransferCommunity, - this.moderator, - required this.community, - required this.moddedPerson}) - : super._(); + const _$ModTransferCommunityViewImpl({required this.modTransferCommunity, this.moderator, required this.community, required this.moddedPerson}) : super._(); - factory _$ModTransferCommunityViewImpl.fromJson(Map json) => - _$$ModTransferCommunityViewImplFromJson(json); + factory _$ModTransferCommunityViewImpl.fromJson(Map json) => _$$ModTransferCommunityViewImplFromJson(json); @override final ModTransferCommunity modTransferCommunity; -// v0.18.0 + // v0.18.0 @override final Person? moderator; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person moddedPerson; @@ -244,48 +216,35 @@ class _$ModTransferCommunityViewImpl extends _ModTransferCommunityView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ModTransferCommunityViewImpl && - (identical(other.modTransferCommunity, modTransferCommunity) || - other.modTransferCommunity == modTransferCommunity) && - (identical(other.moderator, moderator) || - other.moderator == moderator) && - (identical(other.community, community) || - other.community == community) && - (identical(other.moddedPerson, moddedPerson) || - other.moddedPerson == moddedPerson)); + (identical(other.modTransferCommunity, modTransferCommunity) || other.modTransferCommunity == modTransferCommunity) && + (identical(other.moderator, moderator) || other.moderator == moderator) && + (identical(other.community, community) || other.community == community) && + (identical(other.moddedPerson, moddedPerson) || other.moddedPerson == moddedPerson)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, modTransferCommunity, moderator, community, moddedPerson); + int get hashCode => Object.hash(runtimeType, modTransferCommunity, moderator, community, moddedPerson); /// Create a copy of ModTransferCommunityView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$ModTransferCommunityViewImplCopyWith<_$ModTransferCommunityViewImpl> - get copyWith => __$$ModTransferCommunityViewImplCopyWithImpl< - _$ModTransferCommunityViewImpl>(this, _$identity); + _$$ModTransferCommunityViewImplCopyWith<_$ModTransferCommunityViewImpl> get copyWith => __$$ModTransferCommunityViewImplCopyWithImpl<_$ModTransferCommunityViewImpl>(this, _$identity); @override Map toJson() { - return _$$ModTransferCommunityViewImplToJson( - this, - ); + return _$$ModTransferCommunityViewImplToJson(this); } } abstract class _ModTransferCommunityView extends ModTransferCommunityView { - const factory _ModTransferCommunityView( - {required final ModTransferCommunity modTransferCommunity, - final Person? moderator, - required final Community community, - required final Person moddedPerson}) = _$ModTransferCommunityViewImpl; + const factory _ModTransferCommunityView({required final ModTransferCommunity modTransferCommunity, final Person? moderator, required final Community community, required final Person moddedPerson}) = + _$ModTransferCommunityViewImpl; const _ModTransferCommunityView._() : super._(); - factory _ModTransferCommunityView.fromJson(Map json) = - _$ModTransferCommunityViewImpl.fromJson; + factory _ModTransferCommunityView.fromJson(Map json) = _$ModTransferCommunityViewImpl.fromJson; @override ModTransferCommunity get modTransferCommunity; // v0.18.0 @@ -300,6 +259,5 @@ abstract class _ModTransferCommunityView extends ModTransferCommunityView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$ModTransferCommunityViewImplCopyWith<_$ModTransferCommunityViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$ModTransferCommunityViewImplCopyWith<_$ModTransferCommunityViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/mod_transfer_community_view.g.dart b/lib/src/v3/views/mod_transfer_community_view.g.dart index c86302c8..39fe124d 100644 --- a/lib/src/v3/views/mod_transfer_community_view.g.dart +++ b/lib/src/v3/views/mod_transfer_community_view.g.dart @@ -6,24 +6,16 @@ part of 'mod_transfer_community_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ModTransferCommunityViewImpl _$$ModTransferCommunityViewImplFromJson( - Map json) => - _$ModTransferCommunityViewImpl( - modTransferCommunity: ModTransferCommunity.fromJson( - json['mod_transfer_community'] as Map), - moderator: json['moderator'] == null - ? null - : Person.fromJson(json['moderator'] as Map), - community: Community.fromJson(json['community'] as Map), - moddedPerson: - Person.fromJson(json['modded_person'] as Map), - ); +_$ModTransferCommunityViewImpl _$$ModTransferCommunityViewImplFromJson(Map json) => _$ModTransferCommunityViewImpl( + modTransferCommunity: ModTransferCommunity.fromJson(json['mod_transfer_community'] as Map), + moderator: json['moderator'] == null ? null : Person.fromJson(json['moderator'] as Map), + community: Community.fromJson(json['community'] as Map), + moddedPerson: Person.fromJson(json['modded_person'] as Map), +); -Map _$$ModTransferCommunityViewImplToJson( - _$ModTransferCommunityViewImpl instance) => - { - 'mod_transfer_community': instance.modTransferCommunity.toJson(), - 'moderator': instance.moderator?.toJson(), - 'community': instance.community.toJson(), - 'modded_person': instance.moddedPerson.toJson(), - }; +Map _$$ModTransferCommunityViewImplToJson(_$ModTransferCommunityViewImpl instance) => { + 'mod_transfer_community': instance.modTransferCommunity.toJson(), + 'moderator': instance.moderator?.toJson(), + 'community': instance.community.toJson(), + 'modded_person': instance.moddedPerson.toJson(), +}; diff --git a/lib/src/v3/views/person_block_view.dart b/lib/src/v3/views/person_block_view.dart index d53b25cf..c73cda53 100644 --- a/lib/src/v3/views/person_block_view.dart +++ b/lib/src/v3/views/person_block_view.dart @@ -15,6 +15,5 @@ class PersonBlockView with _$PersonBlockView { }) = _PersonBlockView; const PersonBlockView._(); - factory PersonBlockView.fromJson(Map json) => - _$PersonBlockViewFromJson(json); + factory PersonBlockView.fromJson(Map json) => _$PersonBlockViewFromJson(json); } diff --git a/lib/src/v3/views/person_block_view.freezed.dart b/lib/src/v3/views/person_block_view.freezed.dart index d4857147..4952c895 100644 --- a/lib/src/v3/views/person_block_view.freezed.dart +++ b/lib/src/v3/views/person_block_view.freezed.dart @@ -12,7 +12,8 @@ part of 'person_block_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PersonBlockView _$PersonBlockViewFromJson(Map json) { return _PersonBlockView.fromJson(json); @@ -29,15 +30,12 @@ mixin _$PersonBlockView { /// Create a copy of PersonBlockView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonBlockViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonBlockViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonBlockViewCopyWith<$Res> { - factory $PersonBlockViewCopyWith( - PersonBlockView value, $Res Function(PersonBlockView) then) = - _$PersonBlockViewCopyWithImpl<$Res, PersonBlockView>; + factory $PersonBlockViewCopyWith(PersonBlockView value, $Res Function(PersonBlockView) then) = _$PersonBlockViewCopyWithImpl<$Res, PersonBlockView>; @useResult $Res call({Person person, Person target}); @@ -46,8 +44,7 @@ abstract class $PersonBlockViewCopyWith<$Res> { } /// @nodoc -class _$PersonBlockViewCopyWithImpl<$Res, $Val extends PersonBlockView> - implements $PersonBlockViewCopyWith<$Res> { +class _$PersonBlockViewCopyWithImpl<$Res, $Val extends PersonBlockView> implements $PersonBlockViewCopyWith<$Res> { _$PersonBlockViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -59,20 +56,22 @@ class _$PersonBlockViewCopyWithImpl<$Res, $Val extends PersonBlockView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? target = null, - }) { - return _then(_value.copyWith( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - target: null == target - ? _value.target - : target // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? person = null, Object? target = null}) { + return _then( + _value.copyWith( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + target: + null == target + ? _value.target + : target // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of PersonBlockView @@ -97,11 +96,8 @@ class _$PersonBlockViewCopyWithImpl<$Res, $Val extends PersonBlockView> } /// @nodoc -abstract class _$$PersonBlockViewImplCopyWith<$Res> - implements $PersonBlockViewCopyWith<$Res> { - factory _$$PersonBlockViewImplCopyWith(_$PersonBlockViewImpl value, - $Res Function(_$PersonBlockViewImpl) then) = - __$$PersonBlockViewImplCopyWithImpl<$Res>; +abstract class _$$PersonBlockViewImplCopyWith<$Res> implements $PersonBlockViewCopyWith<$Res> { + factory _$$PersonBlockViewImplCopyWith(_$PersonBlockViewImpl value, $Res Function(_$PersonBlockViewImpl) then) = __$$PersonBlockViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person person, Person target}); @@ -113,31 +109,28 @@ abstract class _$$PersonBlockViewImplCopyWith<$Res> } /// @nodoc -class __$$PersonBlockViewImplCopyWithImpl<$Res> - extends _$PersonBlockViewCopyWithImpl<$Res, _$PersonBlockViewImpl> - implements _$$PersonBlockViewImplCopyWith<$Res> { - __$$PersonBlockViewImplCopyWithImpl( - _$PersonBlockViewImpl _value, $Res Function(_$PersonBlockViewImpl) _then) - : super(_value, _then); +class __$$PersonBlockViewImplCopyWithImpl<$Res> extends _$PersonBlockViewCopyWithImpl<$Res, _$PersonBlockViewImpl> implements _$$PersonBlockViewImplCopyWith<$Res> { + __$$PersonBlockViewImplCopyWithImpl(_$PersonBlockViewImpl _value, $Res Function(_$PersonBlockViewImpl) _then) : super(_value, _then); /// Create a copy of PersonBlockView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? target = null, - }) { - return _then(_$PersonBlockViewImpl( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - target: null == target - ? _value.target - : target // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? person = null, Object? target = null}) { + return _then( + _$PersonBlockViewImpl( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + target: + null == target + ? _value.target + : target // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -145,15 +138,13 @@ class __$$PersonBlockViewImplCopyWithImpl<$Res> @modelSerde class _$PersonBlockViewImpl extends _PersonBlockView { - const _$PersonBlockViewImpl({required this.person, required this.target}) - : super._(); + const _$PersonBlockViewImpl({required this.person, required this.target}) : super._(); - factory _$PersonBlockViewImpl.fromJson(Map json) => - _$$PersonBlockViewImplFromJson(json); + factory _$PersonBlockViewImpl.fromJson(Map json) => _$$PersonBlockViewImplFromJson(json); @override final Person person; -// v0.18.0 + // v0.18.0 @override final Person target; @@ -180,26 +171,19 @@ class _$PersonBlockViewImpl extends _PersonBlockView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonBlockViewImplCopyWith<_$PersonBlockViewImpl> get copyWith => - __$$PersonBlockViewImplCopyWithImpl<_$PersonBlockViewImpl>( - this, _$identity); + _$$PersonBlockViewImplCopyWith<_$PersonBlockViewImpl> get copyWith => __$$PersonBlockViewImplCopyWithImpl<_$PersonBlockViewImpl>(this, _$identity); @override Map toJson() { - return _$$PersonBlockViewImplToJson( - this, - ); + return _$$PersonBlockViewImplToJson(this); } } abstract class _PersonBlockView extends PersonBlockView { - const factory _PersonBlockView( - {required final Person person, - required final Person target}) = _$PersonBlockViewImpl; + const factory _PersonBlockView({required final Person person, required final Person target}) = _$PersonBlockViewImpl; const _PersonBlockView._() : super._(); - factory _PersonBlockView.fromJson(Map json) = - _$PersonBlockViewImpl.fromJson; + factory _PersonBlockView.fromJson(Map json) = _$PersonBlockViewImpl.fromJson; @override Person get person; // v0.18.0 @@ -210,6 +194,5 @@ abstract class _PersonBlockView extends PersonBlockView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonBlockViewImplCopyWith<_$PersonBlockViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonBlockViewImplCopyWith<_$PersonBlockViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/person_block_view.g.dart b/lib/src/v3/views/person_block_view.g.dart index 732dd431..c4b2dbe6 100644 --- a/lib/src/v3/views/person_block_view.g.dart +++ b/lib/src/v3/views/person_block_view.g.dart @@ -6,16 +6,7 @@ part of 'person_block_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PersonBlockViewImpl _$$PersonBlockViewImplFromJson( - Map json) => - _$PersonBlockViewImpl( - person: Person.fromJson(json['person'] as Map), - target: Person.fromJson(json['target'] as Map), - ); +_$PersonBlockViewImpl _$$PersonBlockViewImplFromJson(Map json) => + _$PersonBlockViewImpl(person: Person.fromJson(json['person'] as Map), target: Person.fromJson(json['target'] as Map)); -Map _$$PersonBlockViewImplToJson( - _$PersonBlockViewImpl instance) => - { - 'person': instance.person.toJson(), - 'target': instance.target.toJson(), - }; +Map _$$PersonBlockViewImplToJson(_$PersonBlockViewImpl instance) => {'person': instance.person.toJson(), 'target': instance.target.toJson()}; diff --git a/lib/src/v3/views/person_mention_view.dart b/lib/src/v3/views/person_mention_view.dart index 3b96a61a..41fbf28b 100644 --- a/lib/src/v3/views/person_mention_view.dart +++ b/lib/src/v3/views/person_mention_view.dart @@ -29,6 +29,5 @@ class PersonMentionView with _$PersonMentionView { }) = _PersonMentionView; const PersonMentionView._(); - factory PersonMentionView.fromJson(Map json) => - _$PersonMentionViewFromJson(json); + factory PersonMentionView.fromJson(Map json) => _$PersonMentionViewFromJson(json); } diff --git a/lib/src/v3/views/person_mention_view.freezed.dart b/lib/src/v3/views/person_mention_view.freezed.dart index 32557f6b..536b9726 100644 --- a/lib/src/v3/views/person_mention_view.freezed.dart +++ b/lib/src/v3/views/person_mention_view.freezed.dart @@ -12,7 +12,8 @@ part of 'person_mention_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PersonMentionView _$PersonMentionViewFromJson(Map json) { return _PersonMentionView.fromJson(json); @@ -20,24 +21,18 @@ PersonMentionView _$PersonMentionViewFromJson(Map json) { /// @nodoc mixin _$PersonMentionView { - PersonMention get personMention => - throw _privateConstructorUsedError; // v0.18.0 + PersonMention get personMention => throw _privateConstructorUsedError; // v0.18.0 Comment get comment => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Post get post => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get recipient => throw _privateConstructorUsedError; // v0.18.0 CommentAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get bannedFromCommunity => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.0 (required) - SubscribedType get subscribed => - throw _privateConstructorUsedError; // v0.18.0 + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get bannedFromCommunity => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.0 (required) + SubscribedType get subscribed => throw _privateConstructorUsedError; // v0.18.0 bool get saved => throw _privateConstructorUsedError; // v0.18.0 bool get creatorBlocked => throw _privateConstructorUsedError; // v0.18.0 int? get myVote => throw _privateConstructorUsedError; @@ -48,32 +43,30 @@ mixin _$PersonMentionView { /// Create a copy of PersonMentionView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonMentionViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonMentionViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonMentionViewCopyWith<$Res> { - factory $PersonMentionViewCopyWith( - PersonMentionView value, $Res Function(PersonMentionView) then) = - _$PersonMentionViewCopyWithImpl<$Res, PersonMentionView>; + factory $PersonMentionViewCopyWith(PersonMentionView value, $Res Function(PersonMentionView) then) = _$PersonMentionViewCopyWithImpl<$Res, PersonMentionView>; @useResult - $Res call( - {PersonMention personMention, - Comment comment, - Person creator, - Post post, - Community community, - Person recipient, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - int? myVote}); + $Res call({ + PersonMention personMention, + Comment comment, + Person creator, + Post post, + Community community, + Person recipient, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + int? myVote, + }); $PersonMentionCopyWith<$Res> get personMention; $CommentCopyWith<$Res> get comment; @@ -85,8 +78,7 @@ abstract class $PersonMentionViewCopyWith<$Res> { } /// @nodoc -class _$PersonMentionViewCopyWithImpl<$Res, $Val extends PersonMentionView> - implements $PersonMentionViewCopyWith<$Res> { +class _$PersonMentionViewCopyWithImpl<$Res, $Val extends PersonMentionView> implements $PersonMentionViewCopyWith<$Res> { _$PersonMentionViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -115,68 +107,86 @@ class _$PersonMentionViewCopyWithImpl<$Res, $Val extends PersonMentionView> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_value.copyWith( - personMention: null == personMention - ? _value.personMention - : personMention // ignore: cast_nullable_to_non_nullable - as PersonMention, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + personMention: + null == personMention + ? _value.personMention + : personMention // ignore: cast_nullable_to_non_nullable + as PersonMention, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } /// Create a copy of PersonMentionView @@ -251,29 +261,27 @@ class _$PersonMentionViewCopyWithImpl<$Res, $Val extends PersonMentionView> } /// @nodoc -abstract class _$$PersonMentionViewImplCopyWith<$Res> - implements $PersonMentionViewCopyWith<$Res> { - factory _$$PersonMentionViewImplCopyWith(_$PersonMentionViewImpl value, - $Res Function(_$PersonMentionViewImpl) then) = - __$$PersonMentionViewImplCopyWithImpl<$Res>; +abstract class _$$PersonMentionViewImplCopyWith<$Res> implements $PersonMentionViewCopyWith<$Res> { + factory _$$PersonMentionViewImplCopyWith(_$PersonMentionViewImpl value, $Res Function(_$PersonMentionViewImpl) then) = __$$PersonMentionViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {PersonMention personMention, - Comment comment, - Person creator, - Post post, - Community community, - Person recipient, - CommentAggregates counts, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType subscribed, - bool saved, - bool creatorBlocked, - int? myVote}); + $Res call({ + PersonMention personMention, + Comment comment, + Person creator, + Post post, + Community community, + Person recipient, + CommentAggregates counts, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType subscribed, + bool saved, + bool creatorBlocked, + int? myVote, + }); @override $PersonMentionCopyWith<$Res> get personMention; @@ -292,12 +300,8 @@ abstract class _$$PersonMentionViewImplCopyWith<$Res> } /// @nodoc -class __$$PersonMentionViewImplCopyWithImpl<$Res> - extends _$PersonMentionViewCopyWithImpl<$Res, _$PersonMentionViewImpl> - implements _$$PersonMentionViewImplCopyWith<$Res> { - __$$PersonMentionViewImplCopyWithImpl(_$PersonMentionViewImpl _value, - $Res Function(_$PersonMentionViewImpl) _then) - : super(_value, _then); +class __$$PersonMentionViewImplCopyWithImpl<$Res> extends _$PersonMentionViewCopyWithImpl<$Res, _$PersonMentionViewImpl> implements _$$PersonMentionViewImplCopyWith<$Res> { + __$$PersonMentionViewImplCopyWithImpl(_$PersonMentionViewImpl _value, $Res Function(_$PersonMentionViewImpl) _then) : super(_value, _then); /// Create a copy of PersonMentionView /// with the given fields replaced by the non-null parameter values. @@ -320,68 +324,85 @@ class __$$PersonMentionViewImplCopyWithImpl<$Res> Object? creatorBlocked = null, Object? myVote = freezed, }) { - return _then(_$PersonMentionViewImpl( - personMention: null == personMention - ? _value.personMention - : personMention // ignore: cast_nullable_to_non_nullable - as PersonMention, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as Comment, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as CommentAggregates, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$PersonMentionViewImpl( + personMention: + null == personMention + ? _value.personMention + : personMention // ignore: cast_nullable_to_non_nullable + as PersonMention, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as Comment, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as CommentAggregates, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } @@ -389,69 +410,68 @@ class __$$PersonMentionViewImplCopyWithImpl<$Res> @modelSerde class _$PersonMentionViewImpl extends _PersonMentionView { - const _$PersonMentionViewImpl( - {required this.personMention, - required this.comment, - required this.creator, - required this.post, - required this.community, - required this.recipient, - required this.counts, - required this.creatorBannedFromCommunity, - this.bannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - required this.subscribed, - required this.saved, - required this.creatorBlocked, - this.myVote}) - : super._(); - - factory _$PersonMentionViewImpl.fromJson(Map json) => - _$$PersonMentionViewImplFromJson(json); + const _$PersonMentionViewImpl({ + required this.personMention, + required this.comment, + required this.creator, + required this.post, + required this.community, + required this.recipient, + required this.counts, + required this.creatorBannedFromCommunity, + this.bannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + required this.subscribed, + required this.saved, + required this.creatorBlocked, + this.myVote, + }) : super._(); + + factory _$PersonMentionViewImpl.fromJson(Map json) => _$$PersonMentionViewImplFromJson(json); @override final PersonMention personMention; -// v0.18.0 + // v0.18.0 @override final Comment comment; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person recipient; -// v0.18.0 + // v0.18.0 @override final CommentAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? bannedFromCommunity; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsModerator; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? creatorIsAdmin; -// v0.19.0 (required) + // v0.19.0 (required) @override final SubscribedType subscribed; -// v0.18.0 + // v0.18.0 @override final bool saved; -// v0.18.0 + // v0.18.0 @override final bool creatorBlocked; -// v0.18.0 + // v0.18.0 @override final int? myVote; @@ -465,92 +485,78 @@ class _$PersonMentionViewImpl extends _PersonMentionView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PersonMentionViewImpl && - (identical(other.personMention, personMention) || - other.personMention == personMention) && + (identical(other.personMention, personMention) || other.personMention == personMention) && (identical(other.comment, comment) || other.comment == comment) && (identical(other.creator, creator) || other.creator == creator) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && - (identical(other.recipient, recipient) || - other.recipient == recipient) && + (identical(other.community, community) || other.community == community) && + (identical(other.recipient, recipient) || other.recipient == recipient) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.bannedFromCommunity, bannedFromCommunity) || - other.bannedFromCommunity == bannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.bannedFromCommunity, bannedFromCommunity) || other.bannedFromCommunity == bannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && (identical(other.myVote, myVote) || other.myVote == myVote)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - personMention, - comment, - creator, - post, - community, - recipient, - counts, - creatorBannedFromCommunity, - bannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - subscribed, - saved, - creatorBlocked, - myVote); + runtimeType, + personMention, + comment, + creator, + post, + community, + recipient, + counts, + creatorBannedFromCommunity, + bannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + subscribed, + saved, + creatorBlocked, + myVote, + ); /// Create a copy of PersonMentionView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonMentionViewImplCopyWith<_$PersonMentionViewImpl> get copyWith => - __$$PersonMentionViewImplCopyWithImpl<_$PersonMentionViewImpl>( - this, _$identity); + _$$PersonMentionViewImplCopyWith<_$PersonMentionViewImpl> get copyWith => __$$PersonMentionViewImplCopyWithImpl<_$PersonMentionViewImpl>(this, _$identity); @override Map toJson() { - return _$$PersonMentionViewImplToJson( - this, - ); + return _$$PersonMentionViewImplToJson(this); } } abstract class _PersonMentionView extends PersonMentionView { - const factory _PersonMentionView( - {required final PersonMention personMention, - required final Comment comment, - required final Person creator, - required final Post post, - required final Community community, - required final Person recipient, - required final CommentAggregates counts, - required final bool creatorBannedFromCommunity, - final bool? bannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - required final SubscribedType subscribed, - required final bool saved, - required final bool creatorBlocked, - final int? myVote}) = _$PersonMentionViewImpl; + const factory _PersonMentionView({ + required final PersonMention personMention, + required final Comment comment, + required final Person creator, + required final Post post, + required final Community community, + required final Person recipient, + required final CommentAggregates counts, + required final bool creatorBannedFromCommunity, + final bool? bannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + required final SubscribedType subscribed, + required final bool saved, + required final bool creatorBlocked, + final int? myVote, + }) = _$PersonMentionViewImpl; const _PersonMentionView._() : super._(); - factory _PersonMentionView.fromJson(Map json) = - _$PersonMentionViewImpl.fromJson; + factory _PersonMentionView.fromJson(Map json) = _$PersonMentionViewImpl.fromJson; @override PersonMention get personMention; // v0.18.0 @@ -587,6 +593,5 @@ abstract class _PersonMentionView extends PersonMentionView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonMentionViewImplCopyWith<_$PersonMentionViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonMentionViewImplCopyWith<_$PersonMentionViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/person_mention_view.g.dart b/lib/src/v3/views/person_mention_view.g.dart index 634b3315..843e3076 100644 --- a/lib/src/v3/views/person_mention_view.g.dart +++ b/lib/src/v3/views/person_mention_view.g.dart @@ -6,44 +6,38 @@ part of 'person_mention_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PersonMentionViewImpl _$$PersonMentionViewImplFromJson( - Map json) => - _$PersonMentionViewImpl( - personMention: PersonMention.fromJson( - json['person_mention'] as Map), - comment: Comment.fromJson(json['comment'] as Map), - creator: Person.fromJson(json['creator'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - recipient: Person.fromJson(json['recipient'] as Map), - counts: - CommentAggregates.fromJson(json['counts'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - bannedFromCommunity: json['banned_from_community'] as bool?, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - subscribed: SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool, - creatorBlocked: json['creator_blocked'] as bool, - myVote: (json['my_vote'] as num?)?.toInt(), - ); +_$PersonMentionViewImpl _$$PersonMentionViewImplFromJson(Map json) => _$PersonMentionViewImpl( + personMention: PersonMention.fromJson(json['person_mention'] as Map), + comment: Comment.fromJson(json['comment'] as Map), + creator: Person.fromJson(json['creator'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), + recipient: Person.fromJson(json['recipient'] as Map), + counts: CommentAggregates.fromJson(json['counts'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + bannedFromCommunity: json['banned_from_community'] as bool?, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + subscribed: SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool, + creatorBlocked: json['creator_blocked'] as bool, + myVote: (json['my_vote'] as num?)?.toInt(), +); -Map _$$PersonMentionViewImplToJson( - _$PersonMentionViewImpl instance) => - { - 'person_mention': instance.personMention.toJson(), - 'comment': instance.comment.toJson(), - 'creator': instance.creator.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - 'recipient': instance.recipient.toJson(), - 'counts': instance.counts.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'banned_from_community': instance.bannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'subscribed': instance.subscribed.toJson(), - 'saved': instance.saved, - 'creator_blocked': instance.creatorBlocked, - 'my_vote': instance.myVote, - }; +Map _$$PersonMentionViewImplToJson(_$PersonMentionViewImpl instance) => { + 'person_mention': instance.personMention.toJson(), + 'comment': instance.comment.toJson(), + 'creator': instance.creator.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), + 'recipient': instance.recipient.toJson(), + 'counts': instance.counts.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'banned_from_community': instance.bannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'subscribed': instance.subscribed.toJson(), + 'saved': instance.saved, + 'creator_blocked': instance.creatorBlocked, + 'my_vote': instance.myVote, +}; diff --git a/lib/src/v3/views/person_view.dart b/lib/src/v3/views/person_view.dart index 84ce42af..03feeefa 100644 --- a/lib/src/v3/views/person_view.dart +++ b/lib/src/v3/views/person_view.dart @@ -16,6 +16,5 @@ class PersonView with _$PersonView { }) = _PersonView; const PersonView._(); - factory PersonView.fromJson(Map json) => - _$PersonViewFromJson(json); + factory PersonView.fromJson(Map json) => _$PersonViewFromJson(json); } diff --git a/lib/src/v3/views/person_view.freezed.dart b/lib/src/v3/views/person_view.freezed.dart index 3b8de476..e52bf288 100644 --- a/lib/src/v3/views/person_view.freezed.dart +++ b/lib/src/v3/views/person_view.freezed.dart @@ -12,7 +12,8 @@ part of 'person_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PersonView _$PersonViewFromJson(Map json) { return _PersonView.fromJson(json); @@ -30,15 +31,12 @@ mixin _$PersonView { /// Create a copy of PersonView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PersonViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PersonViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PersonViewCopyWith<$Res> { - factory $PersonViewCopyWith( - PersonView value, $Res Function(PersonView) then) = - _$PersonViewCopyWithImpl<$Res, PersonView>; + factory $PersonViewCopyWith(PersonView value, $Res Function(PersonView) then) = _$PersonViewCopyWithImpl<$Res, PersonView>; @useResult $Res call({Person person, PersonAggregates counts, bool? isAdmin}); @@ -47,8 +45,7 @@ abstract class $PersonViewCopyWith<$Res> { } /// @nodoc -class _$PersonViewCopyWithImpl<$Res, $Val extends PersonView> - implements $PersonViewCopyWith<$Res> { +class _$PersonViewCopyWithImpl<$Res, $Val extends PersonView> implements $PersonViewCopyWith<$Res> { _$PersonViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,25 +57,27 @@ class _$PersonViewCopyWithImpl<$Res, $Val extends PersonView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? counts = null, - Object? isAdmin = freezed, - }) { - return _then(_value.copyWith( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PersonAggregates, - isAdmin: freezed == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + $Res call({Object? person = null, Object? counts = null, Object? isAdmin = freezed}) { + return _then( + _value.copyWith( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PersonAggregates, + isAdmin: + freezed == isAdmin + ? _value.isAdmin + : isAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } /// Create a copy of PersonView @@ -103,11 +102,8 @@ class _$PersonViewCopyWithImpl<$Res, $Val extends PersonView> } /// @nodoc -abstract class _$$PersonViewImplCopyWith<$Res> - implements $PersonViewCopyWith<$Res> { - factory _$$PersonViewImplCopyWith( - _$PersonViewImpl value, $Res Function(_$PersonViewImpl) then) = - __$$PersonViewImplCopyWithImpl<$Res>; +abstract class _$$PersonViewImplCopyWith<$Res> implements $PersonViewCopyWith<$Res> { + factory _$$PersonViewImplCopyWith(_$PersonViewImpl value, $Res Function(_$PersonViewImpl) then) = __$$PersonViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person person, PersonAggregates counts, bool? isAdmin}); @@ -119,36 +115,33 @@ abstract class _$$PersonViewImplCopyWith<$Res> } /// @nodoc -class __$$PersonViewImplCopyWithImpl<$Res> - extends _$PersonViewCopyWithImpl<$Res, _$PersonViewImpl> - implements _$$PersonViewImplCopyWith<$Res> { - __$$PersonViewImplCopyWithImpl( - _$PersonViewImpl _value, $Res Function(_$PersonViewImpl) _then) - : super(_value, _then); +class __$$PersonViewImplCopyWithImpl<$Res> extends _$PersonViewCopyWithImpl<$Res, _$PersonViewImpl> implements _$$PersonViewImplCopyWith<$Res> { + __$$PersonViewImplCopyWithImpl(_$PersonViewImpl _value, $Res Function(_$PersonViewImpl) _then) : super(_value, _then); /// Create a copy of PersonView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? person = null, - Object? counts = null, - Object? isAdmin = freezed, - }) { - return _then(_$PersonViewImpl( - person: null == person - ? _value.person - : person // ignore: cast_nullable_to_non_nullable - as Person, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PersonAggregates, - isAdmin: freezed == isAdmin - ? _value.isAdmin - : isAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - )); + $Res call({Object? person = null, Object? counts = null, Object? isAdmin = freezed}) { + return _then( + _$PersonViewImpl( + person: + null == person + ? _value.person + : person // ignore: cast_nullable_to_non_nullable + as Person, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PersonAggregates, + isAdmin: + freezed == isAdmin + ? _value.isAdmin + : isAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } @@ -156,19 +149,16 @@ class __$$PersonViewImplCopyWithImpl<$Res> @modelSerde class _$PersonViewImpl extends _PersonView { - const _$PersonViewImpl( - {required this.person, required this.counts, this.isAdmin}) - : super._(); + const _$PersonViewImpl({required this.person, required this.counts, this.isAdmin}) : super._(); - factory _$PersonViewImpl.fromJson(Map json) => - _$$PersonViewImplFromJson(json); + factory _$PersonViewImpl.fromJson(Map json) => _$$PersonViewImplFromJson(json); @override final Person person; -// v0.18.0 + // v0.18.0 @override final PersonAggregates counts; -// v0.18.0 + // v0.18.0 @override final bool? isAdmin; @@ -196,26 +186,19 @@ class _$PersonViewImpl extends _PersonView { @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PersonViewImplCopyWith<_$PersonViewImpl> get copyWith => - __$$PersonViewImplCopyWithImpl<_$PersonViewImpl>(this, _$identity); + _$$PersonViewImplCopyWith<_$PersonViewImpl> get copyWith => __$$PersonViewImplCopyWithImpl<_$PersonViewImpl>(this, _$identity); @override Map toJson() { - return _$$PersonViewImplToJson( - this, - ); + return _$$PersonViewImplToJson(this); } } abstract class _PersonView extends PersonView { - const factory _PersonView( - {required final Person person, - required final PersonAggregates counts, - final bool? isAdmin}) = _$PersonViewImpl; + const factory _PersonView({required final Person person, required final PersonAggregates counts, final bool? isAdmin}) = _$PersonViewImpl; const _PersonView._() : super._(); - factory _PersonView.fromJson(Map json) = - _$PersonViewImpl.fromJson; + factory _PersonView.fromJson(Map json) = _$PersonViewImpl.fromJson; @override Person get person; // v0.18.0 @@ -228,6 +211,5 @@ abstract class _PersonView extends PersonView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PersonViewImplCopyWith<_$PersonViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PersonViewImplCopyWith<_$PersonViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/person_view.g.dart b/lib/src/v3/views/person_view.g.dart index cb30a7fe..db5789ef 100644 --- a/lib/src/v3/views/person_view.g.dart +++ b/lib/src/v3/views/person_view.g.dart @@ -7,15 +7,6 @@ part of 'person_view.dart'; // ************************************************************************** _$PersonViewImpl _$$PersonViewImplFromJson(Map json) => - _$PersonViewImpl( - person: Person.fromJson(json['person'] as Map), - counts: PersonAggregates.fromJson(json['counts'] as Map), - isAdmin: json['is_admin'] as bool?, - ); + _$PersonViewImpl(person: Person.fromJson(json['person'] as Map), counts: PersonAggregates.fromJson(json['counts'] as Map), isAdmin: json['is_admin'] as bool?); -Map _$$PersonViewImplToJson(_$PersonViewImpl instance) => - { - 'person': instance.person.toJson(), - 'counts': instance.counts.toJson(), - 'is_admin': instance.isAdmin, - }; +Map _$$PersonViewImplToJson(_$PersonViewImpl instance) => {'person': instance.person.toJson(), 'counts': instance.counts.toJson(), 'is_admin': instance.isAdmin}; diff --git a/lib/src/v3/views/post_report_view.dart b/lib/src/v3/views/post_report_view.dart index 693983e8..bcf391b0 100644 --- a/lib/src/v3/views/post_report_view.dart +++ b/lib/src/v3/views/post_report_view.dart @@ -30,6 +30,5 @@ class PostReportView with _$PostReportView { }) = _PostReportView; const PostReportView._(); - factory PostReportView.fromJson(Map json) => - _$PostReportViewFromJson(json); + factory PostReportView.fromJson(Map json) => _$PostReportViewFromJson(json); } diff --git a/lib/src/v3/views/post_report_view.freezed.dart b/lib/src/v3/views/post_report_view.freezed.dart index ea92182c..e30036d0 100644 --- a/lib/src/v3/views/post_report_view.freezed.dart +++ b/lib/src/v3/views/post_report_view.freezed.dart @@ -12,7 +12,8 @@ part of 'post_report_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostReportView _$PostReportViewFromJson(Map json) { return _PostReportView.fromJson(json); @@ -25,22 +26,16 @@ mixin _$PostReportView { Community get community => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Person get postCreator => throw _privateConstructorUsedError; // v0.18.0 - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.4 (required) - SubscribedType? get subscribed => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.4 (required) + SubscribedType? get subscribed => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get saved => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get read => throw _privateConstructorUsedError; // v0.19.4 (required) bool? get hidden => throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorBlocked => - throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorBlocked => throw _privateConstructorUsedError; // v0.19.4 (required) num? get myVote => throw _privateConstructorUsedError; // v0.18.0 - int? get unreadComments => - throw _privateConstructorUsedError; // v0.19.4 (required) + int? get unreadComments => throw _privateConstructorUsedError; // v0.19.4 (required) PostAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 Person? get resolver => throw _privateConstructorUsedError; @@ -50,34 +45,32 @@ mixin _$PostReportView { /// Create a copy of PostReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostReportViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostReportViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostReportViewCopyWith<$Res> { - factory $PostReportViewCopyWith( - PostReportView value, $Res Function(PostReportView) then) = - _$PostReportViewCopyWithImpl<$Res, PostReportView>; + factory $PostReportViewCopyWith(PostReportView value, $Res Function(PostReportView) then) = _$PostReportViewCopyWithImpl<$Res, PostReportView>; @useResult - $Res call( - {PostReport postReport, - Post post, - Community community, - Person creator, - Person postCreator, - bool creatorBannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType? subscribed, - bool? saved, - bool? read, - bool? hidden, - bool? creatorBlocked, - num? myVote, - int? unreadComments, - PostAggregates counts, - Person? resolver}); + $Res call({ + PostReport postReport, + Post post, + Community community, + Person creator, + Person postCreator, + bool creatorBannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType? subscribed, + bool? saved, + bool? read, + bool? hidden, + bool? creatorBlocked, + num? myVote, + int? unreadComments, + PostAggregates counts, + Person? resolver, + }); $PostReportCopyWith<$Res> get postReport; $PostCopyWith<$Res> get post; @@ -89,8 +82,7 @@ abstract class $PostReportViewCopyWith<$Res> { } /// @nodoc -class _$PostReportViewCopyWithImpl<$Res, $Val extends PostReportView> - implements $PostReportViewCopyWith<$Res> { +class _$PostReportViewCopyWithImpl<$Res, $Val extends PostReportView> implements $PostReportViewCopyWith<$Res> { _$PostReportViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -121,76 +113,96 @@ class _$PostReportViewCopyWithImpl<$Res, $Val extends PostReportView> Object? counts = null, Object? resolver = freezed, }) { - return _then(_value.copyWith( - postReport: null == postReport - ? _value.postReport - : postReport // ignore: cast_nullable_to_non_nullable - as PostReport, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - postCreator: null == postCreator - ? _value.postCreator - : postCreator // ignore: cast_nullable_to_non_nullable - as Person, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: freezed == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType?, - saved: freezed == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool?, - read: freezed == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool?, - hidden: freezed == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: freezed == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - unreadComments: freezed == unreadComments - ? _value.unreadComments - : unreadComments // ignore: cast_nullable_to_non_nullable - as int?, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PostAggregates, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + return _then( + _value.copyWith( + postReport: + null == postReport + ? _value.postReport + : postReport // ignore: cast_nullable_to_non_nullable + as PostReport, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + postCreator: + null == postCreator + ? _value.postCreator + : postCreator // ignore: cast_nullable_to_non_nullable + as Person, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + freezed == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType?, + saved: + freezed == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool?, + read: + freezed == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool?, + hidden: + freezed == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + freezed == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool?, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + unreadComments: + freezed == unreadComments + ? _value.unreadComments + : unreadComments // ignore: cast_nullable_to_non_nullable + as int?, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PostAggregates, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of PostReportView @@ -269,31 +281,29 @@ class _$PostReportViewCopyWithImpl<$Res, $Val extends PostReportView> } /// @nodoc -abstract class _$$PostReportViewImplCopyWith<$Res> - implements $PostReportViewCopyWith<$Res> { - factory _$$PostReportViewImplCopyWith(_$PostReportViewImpl value, - $Res Function(_$PostReportViewImpl) then) = - __$$PostReportViewImplCopyWithImpl<$Res>; +abstract class _$$PostReportViewImplCopyWith<$Res> implements $PostReportViewCopyWith<$Res> { + factory _$$PostReportViewImplCopyWith(_$PostReportViewImpl value, $Res Function(_$PostReportViewImpl) then) = __$$PostReportViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {PostReport postReport, - Post post, - Community community, - Person creator, - Person postCreator, - bool creatorBannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - SubscribedType? subscribed, - bool? saved, - bool? read, - bool? hidden, - bool? creatorBlocked, - num? myVote, - int? unreadComments, - PostAggregates counts, - Person? resolver}); + $Res call({ + PostReport postReport, + Post post, + Community community, + Person creator, + Person postCreator, + bool creatorBannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + SubscribedType? subscribed, + bool? saved, + bool? read, + bool? hidden, + bool? creatorBlocked, + num? myVote, + int? unreadComments, + PostAggregates counts, + Person? resolver, + }); @override $PostReportCopyWith<$Res> get postReport; @@ -312,12 +322,8 @@ abstract class _$$PostReportViewImplCopyWith<$Res> } /// @nodoc -class __$$PostReportViewImplCopyWithImpl<$Res> - extends _$PostReportViewCopyWithImpl<$Res, _$PostReportViewImpl> - implements _$$PostReportViewImplCopyWith<$Res> { - __$$PostReportViewImplCopyWithImpl( - _$PostReportViewImpl _value, $Res Function(_$PostReportViewImpl) _then) - : super(_value, _then); +class __$$PostReportViewImplCopyWithImpl<$Res> extends _$PostReportViewCopyWithImpl<$Res, _$PostReportViewImpl> implements _$$PostReportViewImplCopyWith<$Res> { + __$$PostReportViewImplCopyWithImpl(_$PostReportViewImpl _value, $Res Function(_$PostReportViewImpl) _then) : super(_value, _then); /// Create a copy of PostReportView /// with the given fields replaced by the non-null parameter values. @@ -342,76 +348,95 @@ class __$$PostReportViewImplCopyWithImpl<$Res> Object? counts = null, Object? resolver = freezed, }) { - return _then(_$PostReportViewImpl( - postReport: null == postReport - ? _value.postReport - : postReport // ignore: cast_nullable_to_non_nullable - as PostReport, - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - postCreator: null == postCreator - ? _value.postCreator - : postCreator // ignore: cast_nullable_to_non_nullable - as Person, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - subscribed: freezed == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType?, - saved: freezed == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool?, - read: freezed == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool?, - hidden: freezed == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: freezed == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool?, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as num?, - unreadComments: freezed == unreadComments - ? _value.unreadComments - : unreadComments // ignore: cast_nullable_to_non_nullable - as int?, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PostAggregates, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - )); + return _then( + _$PostReportViewImpl( + postReport: + null == postReport + ? _value.postReport + : postReport // ignore: cast_nullable_to_non_nullable + as PostReport, + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + postCreator: + null == postCreator + ? _value.postCreator + : postCreator // ignore: cast_nullable_to_non_nullable + as Person, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + subscribed: + freezed == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType?, + saved: + freezed == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool?, + read: + freezed == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool?, + hidden: + freezed == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + freezed == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool?, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as num?, + unreadComments: + freezed == unreadComments + ? _value.unreadComments + : unreadComments // ignore: cast_nullable_to_non_nullable + as int?, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PostAggregates, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -419,77 +444,76 @@ class __$$PostReportViewImplCopyWithImpl<$Res> @modelSerde class _$PostReportViewImpl extends _PostReportView { - const _$PostReportViewImpl( - {required this.postReport, - required this.post, - required this.community, - required this.creator, - required this.postCreator, - required this.creatorBannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - this.subscribed, - this.saved, - this.read, - this.hidden, - this.creatorBlocked, - this.myVote, - this.unreadComments, - required this.counts, - this.resolver}) - : super._(); - - factory _$PostReportViewImpl.fromJson(Map json) => - _$$PostReportViewImplFromJson(json); + const _$PostReportViewImpl({ + required this.postReport, + required this.post, + required this.community, + required this.creator, + required this.postCreator, + required this.creatorBannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + this.subscribed, + this.saved, + this.read, + this.hidden, + this.creatorBlocked, + this.myVote, + this.unreadComments, + required this.counts, + this.resolver, + }) : super._(); + + factory _$PostReportViewImpl.fromJson(Map json) => _$$PostReportViewImplFromJson(json); @override final PostReport postReport; -// v0.18.0 + // v0.18.0 @override final Post post; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Person postCreator; -// v0.18.0 + // v0.18.0 @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? creatorIsModerator; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsAdmin; -// v0.19.4 (required) + // v0.19.4 (required) @override final SubscribedType? subscribed; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? saved; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? read; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? hidden; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorBlocked; -// v0.19.4 (required) + // v0.19.4 (required) @override final num? myVote; -// v0.18.0 + // v0.18.0 @override final int? unreadComments; -// v0.19.4 (required) + // v0.19.4 (required) @override final PostAggregates counts; -// v0.18.0 + // v0.18.0 @override final Person? resolver; @@ -503,99 +527,84 @@ class _$PostReportViewImpl extends _PostReportView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PostReportViewImpl && - (identical(other.postReport, postReport) || - other.postReport == postReport) && + (identical(other.postReport, postReport) || other.postReport == postReport) && (identical(other.post, post) || other.post == post) && - (identical(other.community, community) || - other.community == community) && + (identical(other.community, community) || other.community == community) && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.postCreator, postCreator) || - other.postCreator == postCreator) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.postCreator, postCreator) || other.postCreator == postCreator) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && (identical(other.read, read) || other.read == read) && (identical(other.hidden, hidden) || other.hidden == hidden) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && (identical(other.myVote, myVote) || other.myVote == myVote) && - (identical(other.unreadComments, unreadComments) || - other.unreadComments == unreadComments) && + (identical(other.unreadComments, unreadComments) || other.unreadComments == unreadComments) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.resolver, resolver) || - other.resolver == resolver)); + (identical(other.resolver, resolver) || other.resolver == resolver)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - postReport, - post, - community, - creator, - postCreator, - creatorBannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - subscribed, - saved, - read, - hidden, - creatorBlocked, - myVote, - unreadComments, - counts, - resolver); + runtimeType, + postReport, + post, + community, + creator, + postCreator, + creatorBannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + subscribed, + saved, + read, + hidden, + creatorBlocked, + myVote, + unreadComments, + counts, + resolver, + ); /// Create a copy of PostReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostReportViewImplCopyWith<_$PostReportViewImpl> get copyWith => - __$$PostReportViewImplCopyWithImpl<_$PostReportViewImpl>( - this, _$identity); + _$$PostReportViewImplCopyWith<_$PostReportViewImpl> get copyWith => __$$PostReportViewImplCopyWithImpl<_$PostReportViewImpl>(this, _$identity); @override Map toJson() { - return _$$PostReportViewImplToJson( - this, - ); + return _$$PostReportViewImplToJson(this); } } abstract class _PostReportView extends PostReportView { - const factory _PostReportView( - {required final PostReport postReport, - required final Post post, - required final Community community, - required final Person creator, - required final Person postCreator, - required final bool creatorBannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - final SubscribedType? subscribed, - final bool? saved, - final bool? read, - final bool? hidden, - final bool? creatorBlocked, - final num? myVote, - final int? unreadComments, - required final PostAggregates counts, - final Person? resolver}) = _$PostReportViewImpl; + const factory _PostReportView({ + required final PostReport postReport, + required final Post post, + required final Community community, + required final Person creator, + required final Person postCreator, + required final bool creatorBannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + final SubscribedType? subscribed, + final bool? saved, + final bool? read, + final bool? hidden, + final bool? creatorBlocked, + final num? myVote, + final int? unreadComments, + required final PostAggregates counts, + final Person? resolver, + }) = _$PostReportViewImpl; const _PostReportView._() : super._(); - factory _PostReportView.fromJson(Map json) = - _$PostReportViewImpl.fromJson; + factory _PostReportView.fromJson(Map json) = _$PostReportViewImpl.fromJson; @override PostReport get postReport; // v0.18.0 @@ -636,6 +645,5 @@ abstract class _PostReportView extends PostReportView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostReportViewImplCopyWith<_$PostReportViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostReportViewImplCopyWith<_$PostReportViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/post_report_view.g.dart b/lib/src/v3/views/post_report_view.g.dart index e5e51e6a..b1a85a67 100644 --- a/lib/src/v3/views/post_report_view.g.dart +++ b/lib/src/v3/views/post_report_view.g.dart @@ -6,51 +6,42 @@ part of 'post_report_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostReportViewImpl _$$PostReportViewImplFromJson(Map json) => - _$PostReportViewImpl( - postReport: - PostReport.fromJson(json['post_report'] as Map), - post: Post.fromJson(json['post'] as Map), - community: Community.fromJson(json['community'] as Map), - creator: Person.fromJson(json['creator'] as Map), - postCreator: - Person.fromJson(json['post_creator'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - subscribed: json['subscribed'] == null - ? null - : SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool?, - read: json['read'] as bool?, - hidden: json['hidden'] as bool?, - creatorBlocked: json['creator_blocked'] as bool?, - myVote: json['my_vote'] as num?, - unreadComments: (json['unread_comments'] as num?)?.toInt(), - counts: PostAggregates.fromJson(json['counts'] as Map), - resolver: json['resolver'] == null - ? null - : Person.fromJson(json['resolver'] as Map), - ); +_$PostReportViewImpl _$$PostReportViewImplFromJson(Map json) => _$PostReportViewImpl( + postReport: PostReport.fromJson(json['post_report'] as Map), + post: Post.fromJson(json['post'] as Map), + community: Community.fromJson(json['community'] as Map), + creator: Person.fromJson(json['creator'] as Map), + postCreator: Person.fromJson(json['post_creator'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + subscribed: json['subscribed'] == null ? null : SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool?, + read: json['read'] as bool?, + hidden: json['hidden'] as bool?, + creatorBlocked: json['creator_blocked'] as bool?, + myVote: json['my_vote'] as num?, + unreadComments: (json['unread_comments'] as num?)?.toInt(), + counts: PostAggregates.fromJson(json['counts'] as Map), + resolver: json['resolver'] == null ? null : Person.fromJson(json['resolver'] as Map), +); -Map _$$PostReportViewImplToJson( - _$PostReportViewImpl instance) => - { - 'post_report': instance.postReport.toJson(), - 'post': instance.post.toJson(), - 'community': instance.community.toJson(), - 'creator': instance.creator.toJson(), - 'post_creator': instance.postCreator.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'subscribed': instance.subscribed?.toJson(), - 'saved': instance.saved, - 'read': instance.read, - 'hidden': instance.hidden, - 'creator_blocked': instance.creatorBlocked, - 'my_vote': instance.myVote, - 'unread_comments': instance.unreadComments, - 'counts': instance.counts.toJson(), - 'resolver': instance.resolver?.toJson(), - }; +Map _$$PostReportViewImplToJson(_$PostReportViewImpl instance) => { + 'post_report': instance.postReport.toJson(), + 'post': instance.post.toJson(), + 'community': instance.community.toJson(), + 'creator': instance.creator.toJson(), + 'post_creator': instance.postCreator.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'subscribed': instance.subscribed?.toJson(), + 'saved': instance.saved, + 'read': instance.read, + 'hidden': instance.hidden, + 'creator_blocked': instance.creatorBlocked, + 'my_vote': instance.myVote, + 'unread_comments': instance.unreadComments, + 'counts': instance.counts.toJson(), + 'resolver': instance.resolver?.toJson(), +}; diff --git a/lib/src/v3/views/post_view.dart b/lib/src/v3/views/post_view.dart index 52cad2ad..37c2b08c 100644 --- a/lib/src/v3/views/post_view.dart +++ b/lib/src/v3/views/post_view.dart @@ -30,6 +30,5 @@ class PostView with _$PostView { }) = _PostView; const PostView._(); - factory PostView.fromJson(Map json) => - _$PostViewFromJson(json); + factory PostView.fromJson(Map json) => _$PostViewFromJson(json); } diff --git a/lib/src/v3/views/post_view.freezed.dart b/lib/src/v3/views/post_view.freezed.dart index 6263bba4..670b1f0f 100644 --- a/lib/src/v3/views/post_view.freezed.dart +++ b/lib/src/v3/views/post_view.freezed.dart @@ -12,7 +12,8 @@ part of 'post_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PostView _$PostViewFromJson(Map json) { return _PostView.fromJson(json); @@ -23,19 +24,13 @@ mixin _$PostView { Post get post => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Community get community => throw _privateConstructorUsedError; // v0.18.0 - ImageDetails? get imageDetails => - throw _privateConstructorUsedError; // v0.19.6 (optional) - bool get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.18.0 - bool? get bannedFromCommunity => - throw _privateConstructorUsedError; // v0.19.4 (required) - bool? get creatorIsModerator => - throw _privateConstructorUsedError; // v0.19.0 (required) - bool? get creatorIsAdmin => - throw _privateConstructorUsedError; // v0.19.0 (required) + ImageDetails? get imageDetails => throw _privateConstructorUsedError; // v0.19.6 (optional) + bool get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.18.0 + bool? get bannedFromCommunity => throw _privateConstructorUsedError; // v0.19.4 (required) + bool? get creatorIsModerator => throw _privateConstructorUsedError; // v0.19.0 (required) + bool? get creatorIsAdmin => throw _privateConstructorUsedError; // v0.19.0 (required) PostAggregates get counts => throw _privateConstructorUsedError; // v0.18.0 - SubscribedType get subscribed => - throw _privateConstructorUsedError; // v0.18.0 + SubscribedType get subscribed => throw _privateConstructorUsedError; // v0.18.0 bool get saved => throw _privateConstructorUsedError; // v0.18.0 bool get read => throw _privateConstructorUsedError; // v0.18.0 bool? get hidden => throw _privateConstructorUsedError; // v0.19.4 (required) @@ -49,32 +44,31 @@ mixin _$PostView { /// Create a copy of PostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PostViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PostViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PostViewCopyWith<$Res> { - factory $PostViewCopyWith(PostView value, $Res Function(PostView) then) = - _$PostViewCopyWithImpl<$Res, PostView>; + factory $PostViewCopyWith(PostView value, $Res Function(PostView) then) = _$PostViewCopyWithImpl<$Res, PostView>; @useResult - $Res call( - {Post post, - Person creator, - Community community, - ImageDetails? imageDetails, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - PostAggregates counts, - SubscribedType subscribed, - bool saved, - bool read, - bool? hidden, - bool creatorBlocked, - int? myVote, - int unreadComments}); + $Res call({ + Post post, + Person creator, + Community community, + ImageDetails? imageDetails, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + PostAggregates counts, + SubscribedType subscribed, + bool saved, + bool read, + bool? hidden, + bool creatorBlocked, + int? myVote, + int unreadComments, + }); $PostCopyWith<$Res> get post; $PersonCopyWith<$Res> get creator; @@ -84,8 +78,7 @@ abstract class $PostViewCopyWith<$Res> { } /// @nodoc -class _$PostViewCopyWithImpl<$Res, $Val extends PostView> - implements $PostViewCopyWith<$Res> { +class _$PostViewCopyWithImpl<$Res, $Val extends PostView> implements $PostViewCopyWith<$Res> { _$PostViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -115,72 +108,91 @@ class _$PostViewCopyWithImpl<$Res, $Val extends PostView> Object? myVote = freezed, Object? unreadComments = null, }) { - return _then(_value.copyWith( - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - imageDetails: freezed == imageDetails - ? _value.imageDetails - : imageDetails // ignore: cast_nullable_to_non_nullable - as ImageDetails?, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PostAggregates, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - hidden: freezed == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - unreadComments: null == unreadComments - ? _value.unreadComments - : unreadComments // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + imageDetails: + freezed == imageDetails + ? _value.imageDetails + : imageDetails // ignore: cast_nullable_to_non_nullable + as ImageDetails?, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PostAggregates, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + hidden: + freezed == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + unreadComments: + null == unreadComments + ? _value.unreadComments + : unreadComments // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } /// Create a copy of PostView @@ -239,30 +251,28 @@ class _$PostViewCopyWithImpl<$Res, $Val extends PostView> } /// @nodoc -abstract class _$$PostViewImplCopyWith<$Res> - implements $PostViewCopyWith<$Res> { - factory _$$PostViewImplCopyWith( - _$PostViewImpl value, $Res Function(_$PostViewImpl) then) = - __$$PostViewImplCopyWithImpl<$Res>; +abstract class _$$PostViewImplCopyWith<$Res> implements $PostViewCopyWith<$Res> { + factory _$$PostViewImplCopyWith(_$PostViewImpl value, $Res Function(_$PostViewImpl) then) = __$$PostViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {Post post, - Person creator, - Community community, - ImageDetails? imageDetails, - bool creatorBannedFromCommunity, - bool? bannedFromCommunity, - bool? creatorIsModerator, - bool? creatorIsAdmin, - PostAggregates counts, - SubscribedType subscribed, - bool saved, - bool read, - bool? hidden, - bool creatorBlocked, - int? myVote, - int unreadComments}); + $Res call({ + Post post, + Person creator, + Community community, + ImageDetails? imageDetails, + bool creatorBannedFromCommunity, + bool? bannedFromCommunity, + bool? creatorIsModerator, + bool? creatorIsAdmin, + PostAggregates counts, + SubscribedType subscribed, + bool saved, + bool read, + bool? hidden, + bool creatorBlocked, + int? myVote, + int unreadComments, + }); @override $PostCopyWith<$Res> get post; @@ -277,12 +287,8 @@ abstract class _$$PostViewImplCopyWith<$Res> } /// @nodoc -class __$$PostViewImplCopyWithImpl<$Res> - extends _$PostViewCopyWithImpl<$Res, _$PostViewImpl> - implements _$$PostViewImplCopyWith<$Res> { - __$$PostViewImplCopyWithImpl( - _$PostViewImpl _value, $Res Function(_$PostViewImpl) _then) - : super(_value, _then); +class __$$PostViewImplCopyWithImpl<$Res> extends _$PostViewCopyWithImpl<$Res, _$PostViewImpl> implements _$$PostViewImplCopyWith<$Res> { + __$$PostViewImplCopyWithImpl(_$PostViewImpl _value, $Res Function(_$PostViewImpl) _then) : super(_value, _then); /// Create a copy of PostView /// with the given fields replaced by the non-null parameter values. @@ -306,72 +312,90 @@ class __$$PostViewImplCopyWithImpl<$Res> Object? myVote = freezed, Object? unreadComments = null, }) { - return _then(_$PostViewImpl( - post: null == post - ? _value.post - : post // ignore: cast_nullable_to_non_nullable - as Post, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - community: null == community - ? _value.community - : community // ignore: cast_nullable_to_non_nullable - as Community, - imageDetails: freezed == imageDetails - ? _value.imageDetails - : imageDetails // ignore: cast_nullable_to_non_nullable - as ImageDetails?, - creatorBannedFromCommunity: null == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool, - bannedFromCommunity: freezed == bannedFromCommunity - ? _value.bannedFromCommunity - : bannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsModerator: freezed == creatorIsModerator - ? _value.creatorIsModerator - : creatorIsModerator // ignore: cast_nullable_to_non_nullable - as bool?, - creatorIsAdmin: freezed == creatorIsAdmin - ? _value.creatorIsAdmin - : creatorIsAdmin // ignore: cast_nullable_to_non_nullable - as bool?, - counts: null == counts - ? _value.counts - : counts // ignore: cast_nullable_to_non_nullable - as PostAggregates, - subscribed: null == subscribed - ? _value.subscribed - : subscribed // ignore: cast_nullable_to_non_nullable - as SubscribedType, - saved: null == saved - ? _value.saved - : saved // ignore: cast_nullable_to_non_nullable - as bool, - read: null == read - ? _value.read - : read // ignore: cast_nullable_to_non_nullable - as bool, - hidden: freezed == hidden - ? _value.hidden - : hidden // ignore: cast_nullable_to_non_nullable - as bool?, - creatorBlocked: null == creatorBlocked - ? _value.creatorBlocked - : creatorBlocked // ignore: cast_nullable_to_non_nullable - as bool, - myVote: freezed == myVote - ? _value.myVote - : myVote // ignore: cast_nullable_to_non_nullable - as int?, - unreadComments: null == unreadComments - ? _value.unreadComments - : unreadComments // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$PostViewImpl( + post: + null == post + ? _value.post + : post // ignore: cast_nullable_to_non_nullable + as Post, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + community: + null == community + ? _value.community + : community // ignore: cast_nullable_to_non_nullable + as Community, + imageDetails: + freezed == imageDetails + ? _value.imageDetails + : imageDetails // ignore: cast_nullable_to_non_nullable + as ImageDetails?, + creatorBannedFromCommunity: + null == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool, + bannedFromCommunity: + freezed == bannedFromCommunity + ? _value.bannedFromCommunity + : bannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsModerator: + freezed == creatorIsModerator + ? _value.creatorIsModerator + : creatorIsModerator // ignore: cast_nullable_to_non_nullable + as bool?, + creatorIsAdmin: + freezed == creatorIsAdmin + ? _value.creatorIsAdmin + : creatorIsAdmin // ignore: cast_nullable_to_non_nullable + as bool?, + counts: + null == counts + ? _value.counts + : counts // ignore: cast_nullable_to_non_nullable + as PostAggregates, + subscribed: + null == subscribed + ? _value.subscribed + : subscribed // ignore: cast_nullable_to_non_nullable + as SubscribedType, + saved: + null == saved + ? _value.saved + : saved // ignore: cast_nullable_to_non_nullable + as bool, + read: + null == read + ? _value.read + : read // ignore: cast_nullable_to_non_nullable + as bool, + hidden: + freezed == hidden + ? _value.hidden + : hidden // ignore: cast_nullable_to_non_nullable + as bool?, + creatorBlocked: + null == creatorBlocked + ? _value.creatorBlocked + : creatorBlocked // ignore: cast_nullable_to_non_nullable + as bool, + myVote: + freezed == myVote + ? _value.myVote + : myVote // ignore: cast_nullable_to_non_nullable + as int?, + unreadComments: + null == unreadComments + ? _value.unreadComments + : unreadComments // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -379,73 +403,72 @@ class __$$PostViewImplCopyWithImpl<$Res> @modelSerde class _$PostViewImpl extends _PostView { - const _$PostViewImpl( - {required this.post, - required this.creator, - required this.community, - this.imageDetails, - required this.creatorBannedFromCommunity, - this.bannedFromCommunity, - this.creatorIsModerator, - this.creatorIsAdmin, - required this.counts, - required this.subscribed, - required this.saved, - required this.read, - this.hidden, - required this.creatorBlocked, - this.myVote, - required this.unreadComments}) - : super._(); - - factory _$PostViewImpl.fromJson(Map json) => - _$$PostViewImplFromJson(json); + const _$PostViewImpl({ + required this.post, + required this.creator, + required this.community, + this.imageDetails, + required this.creatorBannedFromCommunity, + this.bannedFromCommunity, + this.creatorIsModerator, + this.creatorIsAdmin, + required this.counts, + required this.subscribed, + required this.saved, + required this.read, + this.hidden, + required this.creatorBlocked, + this.myVote, + required this.unreadComments, + }) : super._(); + + factory _$PostViewImpl.fromJson(Map json) => _$$PostViewImplFromJson(json); @override final Post post; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Community community; -// v0.18.0 + // v0.18.0 @override final ImageDetails? imageDetails; -// v0.19.6 (optional) + // v0.19.6 (optional) @override final bool creatorBannedFromCommunity; -// v0.18.0 + // v0.18.0 @override final bool? bannedFromCommunity; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool? creatorIsModerator; -// v0.19.0 (required) + // v0.19.0 (required) @override final bool? creatorIsAdmin; -// v0.19.0 (required) + // v0.19.0 (required) @override final PostAggregates counts; -// v0.18.0 + // v0.18.0 @override final SubscribedType subscribed; -// v0.18.0 + // v0.18.0 @override final bool saved; -// v0.18.0 + // v0.18.0 @override final bool read; -// v0.18.0 + // v0.18.0 @override final bool? hidden; -// v0.19.4 (required) + // v0.19.4 (required) @override final bool creatorBlocked; -// v0.18.0 + // v0.18.0 @override final int? myVote; -// v0.18.0 + // v0.18.0 @override final int unreadComments; @@ -461,92 +484,79 @@ class _$PostViewImpl extends _PostView { other is _$PostViewImpl && (identical(other.post, post) || other.post == post) && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.community, community) || - other.community == community) && - (identical(other.imageDetails, imageDetails) || - other.imageDetails == imageDetails) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && - (identical(other.bannedFromCommunity, bannedFromCommunity) || - other.bannedFromCommunity == bannedFromCommunity) && - (identical(other.creatorIsModerator, creatorIsModerator) || - other.creatorIsModerator == creatorIsModerator) && - (identical(other.creatorIsAdmin, creatorIsAdmin) || - other.creatorIsAdmin == creatorIsAdmin) && + (identical(other.community, community) || other.community == community) && + (identical(other.imageDetails, imageDetails) || other.imageDetails == imageDetails) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && + (identical(other.bannedFromCommunity, bannedFromCommunity) || other.bannedFromCommunity == bannedFromCommunity) && + (identical(other.creatorIsModerator, creatorIsModerator) || other.creatorIsModerator == creatorIsModerator) && + (identical(other.creatorIsAdmin, creatorIsAdmin) || other.creatorIsAdmin == creatorIsAdmin) && (identical(other.counts, counts) || other.counts == counts) && - (identical(other.subscribed, subscribed) || - other.subscribed == subscribed) && + (identical(other.subscribed, subscribed) || other.subscribed == subscribed) && (identical(other.saved, saved) || other.saved == saved) && (identical(other.read, read) || other.read == read) && (identical(other.hidden, hidden) || other.hidden == hidden) && - (identical(other.creatorBlocked, creatorBlocked) || - other.creatorBlocked == creatorBlocked) && + (identical(other.creatorBlocked, creatorBlocked) || other.creatorBlocked == creatorBlocked) && (identical(other.myVote, myVote) || other.myVote == myVote) && - (identical(other.unreadComments, unreadComments) || - other.unreadComments == unreadComments)); + (identical(other.unreadComments, unreadComments) || other.unreadComments == unreadComments)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - post, - creator, - community, - imageDetails, - creatorBannedFromCommunity, - bannedFromCommunity, - creatorIsModerator, - creatorIsAdmin, - counts, - subscribed, - saved, - read, - hidden, - creatorBlocked, - myVote, - unreadComments); + runtimeType, + post, + creator, + community, + imageDetails, + creatorBannedFromCommunity, + bannedFromCommunity, + creatorIsModerator, + creatorIsAdmin, + counts, + subscribed, + saved, + read, + hidden, + creatorBlocked, + myVote, + unreadComments, + ); /// Create a copy of PostView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PostViewImplCopyWith<_$PostViewImpl> get copyWith => - __$$PostViewImplCopyWithImpl<_$PostViewImpl>(this, _$identity); + _$$PostViewImplCopyWith<_$PostViewImpl> get copyWith => __$$PostViewImplCopyWithImpl<_$PostViewImpl>(this, _$identity); @override Map toJson() { - return _$$PostViewImplToJson( - this, - ); + return _$$PostViewImplToJson(this); } } abstract class _PostView extends PostView { - const factory _PostView( - {required final Post post, - required final Person creator, - required final Community community, - final ImageDetails? imageDetails, - required final bool creatorBannedFromCommunity, - final bool? bannedFromCommunity, - final bool? creatorIsModerator, - final bool? creatorIsAdmin, - required final PostAggregates counts, - required final SubscribedType subscribed, - required final bool saved, - required final bool read, - final bool? hidden, - required final bool creatorBlocked, - final int? myVote, - required final int unreadComments}) = _$PostViewImpl; + const factory _PostView({ + required final Post post, + required final Person creator, + required final Community community, + final ImageDetails? imageDetails, + required final bool creatorBannedFromCommunity, + final bool? bannedFromCommunity, + final bool? creatorIsModerator, + final bool? creatorIsAdmin, + required final PostAggregates counts, + required final SubscribedType subscribed, + required final bool saved, + required final bool read, + final bool? hidden, + required final bool creatorBlocked, + final int? myVote, + required final int unreadComments, + }) = _$PostViewImpl; const _PostView._() : super._(); - factory _PostView.fromJson(Map json) = - _$PostViewImpl.fromJson; + factory _PostView.fromJson(Map json) = _$PostViewImpl.fromJson; @override Post get post; // v0.18.0 @@ -585,6 +595,5 @@ abstract class _PostView extends PostView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PostViewImplCopyWith<_$PostViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PostViewImplCopyWith<_$PostViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/post_view.g.dart b/lib/src/v3/views/post_view.g.dart index d95e8271..2a4c724f 100644 --- a/lib/src/v3/views/post_view.g.dart +++ b/lib/src/v3/views/post_view.g.dart @@ -6,45 +6,40 @@ part of 'post_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PostViewImpl _$$PostViewImplFromJson(Map json) => - _$PostViewImpl( - post: Post.fromJson(json['post'] as Map), - creator: Person.fromJson(json['creator'] as Map), - community: Community.fromJson(json['community'] as Map), - imageDetails: json['image_details'] == null - ? null - : ImageDetails.fromJson( - json['image_details'] as Map), - creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, - bannedFromCommunity: json['banned_from_community'] as bool?, - creatorIsModerator: json['creator_is_moderator'] as bool?, - creatorIsAdmin: json['creator_is_admin'] as bool?, - counts: PostAggregates.fromJson(json['counts'] as Map), - subscribed: SubscribedType.fromJson(json['subscribed'] as String), - saved: json['saved'] as bool, - read: json['read'] as bool, - hidden: json['hidden'] as bool?, - creatorBlocked: json['creator_blocked'] as bool, - myVote: (json['my_vote'] as num?)?.toInt(), - unreadComments: (json['unread_comments'] as num).toInt(), - ); +_$PostViewImpl _$$PostViewImplFromJson(Map json) => _$PostViewImpl( + post: Post.fromJson(json['post'] as Map), + creator: Person.fromJson(json['creator'] as Map), + community: Community.fromJson(json['community'] as Map), + imageDetails: json['image_details'] == null ? null : ImageDetails.fromJson(json['image_details'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool, + bannedFromCommunity: json['banned_from_community'] as bool?, + creatorIsModerator: json['creator_is_moderator'] as bool?, + creatorIsAdmin: json['creator_is_admin'] as bool?, + counts: PostAggregates.fromJson(json['counts'] as Map), + subscribed: SubscribedType.fromJson(json['subscribed'] as String), + saved: json['saved'] as bool, + read: json['read'] as bool, + hidden: json['hidden'] as bool?, + creatorBlocked: json['creator_blocked'] as bool, + myVote: (json['my_vote'] as num?)?.toInt(), + unreadComments: (json['unread_comments'] as num).toInt(), +); -Map _$$PostViewImplToJson(_$PostViewImpl instance) => - { - 'post': instance.post.toJson(), - 'creator': instance.creator.toJson(), - 'community': instance.community.toJson(), - 'image_details': instance.imageDetails?.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'banned_from_community': instance.bannedFromCommunity, - 'creator_is_moderator': instance.creatorIsModerator, - 'creator_is_admin': instance.creatorIsAdmin, - 'counts': instance.counts.toJson(), - 'subscribed': instance.subscribed.toJson(), - 'saved': instance.saved, - 'read': instance.read, - 'hidden': instance.hidden, - 'creator_blocked': instance.creatorBlocked, - 'my_vote': instance.myVote, - 'unread_comments': instance.unreadComments, - }; +Map _$$PostViewImplToJson(_$PostViewImpl instance) => { + 'post': instance.post.toJson(), + 'creator': instance.creator.toJson(), + 'community': instance.community.toJson(), + 'image_details': instance.imageDetails?.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'banned_from_community': instance.bannedFromCommunity, + 'creator_is_moderator': instance.creatorIsModerator, + 'creator_is_admin': instance.creatorIsAdmin, + 'counts': instance.counts.toJson(), + 'subscribed': instance.subscribed.toJson(), + 'saved': instance.saved, + 'read': instance.read, + 'hidden': instance.hidden, + 'creator_blocked': instance.creatorBlocked, + 'my_vote': instance.myVote, + 'unread_comments': instance.unreadComments, +}; diff --git a/lib/src/v3/views/private_message_report_view.dart b/lib/src/v3/views/private_message_report_view.dart index 7af624de..f6b01694 100644 --- a/lib/src/v3/views/private_message_report_view.dart +++ b/lib/src/v3/views/private_message_report_view.dart @@ -18,6 +18,5 @@ class PrivateMessageReportView with _$PrivateMessageReportView { }) = _PrivateMessageReportView; const PrivateMessageReportView._(); - factory PrivateMessageReportView.fromJson(Map json) => - _$PrivateMessageReportViewFromJson(json); + factory PrivateMessageReportView.fromJson(Map json) => _$PrivateMessageReportViewFromJson(json); } diff --git a/lib/src/v3/views/private_message_report_view.freezed.dart b/lib/src/v3/views/private_message_report_view.freezed.dart index f8bade92..2304f55e 100644 --- a/lib/src/v3/views/private_message_report_view.freezed.dart +++ b/lib/src/v3/views/private_message_report_view.freezed.dart @@ -12,21 +12,18 @@ part of 'private_message_report_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -PrivateMessageReportView _$PrivateMessageReportViewFromJson( - Map json) { +PrivateMessageReportView _$PrivateMessageReportViewFromJson(Map json) { return _PrivateMessageReportView.fromJson(json); } /// @nodoc mixin _$PrivateMessageReportView { - PrivateMessageReport get privateMessageReport => - throw _privateConstructorUsedError; // v0.18.0 - PrivateMessage get privateMessage => - throw _privateConstructorUsedError; // v0.18.0 - Person get privateMessageCreator => - throw _privateConstructorUsedError; // v0.18.0 + PrivateMessageReport get privateMessageReport => throw _privateConstructorUsedError; // v0.18.0 + PrivateMessage get privateMessage => throw _privateConstructorUsedError; // v0.18.0 + Person get privateMessageCreator => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Person? get resolver => throw _privateConstructorUsedError; @@ -36,22 +33,14 @@ mixin _$PrivateMessageReportView { /// Create a copy of PrivateMessageReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageReportViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessageReportViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageReportViewCopyWith<$Res> { - factory $PrivateMessageReportViewCopyWith(PrivateMessageReportView value, - $Res Function(PrivateMessageReportView) then) = - _$PrivateMessageReportViewCopyWithImpl<$Res, PrivateMessageReportView>; + factory $PrivateMessageReportViewCopyWith(PrivateMessageReportView value, $Res Function(PrivateMessageReportView) then) = _$PrivateMessageReportViewCopyWithImpl<$Res, PrivateMessageReportView>; @useResult - $Res call( - {PrivateMessageReport privateMessageReport, - PrivateMessage privateMessage, - Person privateMessageCreator, - Person creator, - Person? resolver}); + $Res call({PrivateMessageReport privateMessageReport, PrivateMessage privateMessage, Person privateMessageCreator, Person creator, Person? resolver}); $PrivateMessageReportCopyWith<$Res> get privateMessageReport; $PrivateMessageCopyWith<$Res> get privateMessage; @@ -61,9 +50,7 @@ abstract class $PrivateMessageReportViewCopyWith<$Res> { } /// @nodoc -class _$PrivateMessageReportViewCopyWithImpl<$Res, - $Val extends PrivateMessageReportView> - implements $PrivateMessageReportViewCopyWith<$Res> { +class _$PrivateMessageReportViewCopyWithImpl<$Res, $Val extends PrivateMessageReportView> implements $PrivateMessageReportViewCopyWith<$Res> { _$PrivateMessageReportViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -75,35 +62,37 @@ class _$PrivateMessageReportViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReport = null, - Object? privateMessage = null, - Object? privateMessageCreator = null, - Object? creator = null, - Object? resolver = freezed, - }) { - return _then(_value.copyWith( - privateMessageReport: null == privateMessageReport - ? _value.privateMessageReport - : privateMessageReport // ignore: cast_nullable_to_non_nullable - as PrivateMessageReport, - privateMessage: null == privateMessage - ? _value.privateMessage - : privateMessage // ignore: cast_nullable_to_non_nullable - as PrivateMessage, - privateMessageCreator: null == privateMessageCreator - ? _value.privateMessageCreator - : privateMessageCreator // ignore: cast_nullable_to_non_nullable - as Person, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + $Res call({Object? privateMessageReport = null, Object? privateMessage = null, Object? privateMessageCreator = null, Object? creator = null, Object? resolver = freezed}) { + return _then( + _value.copyWith( + privateMessageReport: + null == privateMessageReport + ? _value.privateMessageReport + : privateMessageReport // ignore: cast_nullable_to_non_nullable + as PrivateMessageReport, + privateMessage: + null == privateMessage + ? _value.privateMessage + : privateMessage // ignore: cast_nullable_to_non_nullable + as PrivateMessage, + privateMessageCreator: + null == privateMessageCreator + ? _value.privateMessageCreator + : privateMessageCreator // ignore: cast_nullable_to_non_nullable + as Person, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of PrivateMessageReportView @@ -111,8 +100,7 @@ class _$PrivateMessageReportViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $PrivateMessageReportCopyWith<$Res> get privateMessageReport { - return $PrivateMessageReportCopyWith<$Res>(_value.privateMessageReport, - (value) { + return $PrivateMessageReportCopyWith<$Res>(_value.privateMessageReport, (value) { return _then(_value.copyWith(privateMessageReport: value) as $Val); }); } @@ -163,20 +151,11 @@ class _$PrivateMessageReportViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$PrivateMessageReportViewImplCopyWith<$Res> - implements $PrivateMessageReportViewCopyWith<$Res> { - factory _$$PrivateMessageReportViewImplCopyWith( - _$PrivateMessageReportViewImpl value, - $Res Function(_$PrivateMessageReportViewImpl) then) = - __$$PrivateMessageReportViewImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessageReportViewImplCopyWith<$Res> implements $PrivateMessageReportViewCopyWith<$Res> { + factory _$$PrivateMessageReportViewImplCopyWith(_$PrivateMessageReportViewImpl value, $Res Function(_$PrivateMessageReportViewImpl) then) = __$$PrivateMessageReportViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {PrivateMessageReport privateMessageReport, - PrivateMessage privateMessage, - Person privateMessageCreator, - Person creator, - Person? resolver}); + $Res call({PrivateMessageReport privateMessageReport, PrivateMessage privateMessage, Person privateMessageCreator, Person creator, Person? resolver}); @override $PrivateMessageReportCopyWith<$Res> get privateMessageReport; @@ -191,48 +170,43 @@ abstract class _$$PrivateMessageReportViewImplCopyWith<$Res> } /// @nodoc -class __$$PrivateMessageReportViewImplCopyWithImpl<$Res> - extends _$PrivateMessageReportViewCopyWithImpl<$Res, - _$PrivateMessageReportViewImpl> - implements _$$PrivateMessageReportViewImplCopyWith<$Res> { - __$$PrivateMessageReportViewImplCopyWithImpl( - _$PrivateMessageReportViewImpl _value, - $Res Function(_$PrivateMessageReportViewImpl) _then) - : super(_value, _then); +class __$$PrivateMessageReportViewImplCopyWithImpl<$Res> extends _$PrivateMessageReportViewCopyWithImpl<$Res, _$PrivateMessageReportViewImpl> implements _$$PrivateMessageReportViewImplCopyWith<$Res> { + __$$PrivateMessageReportViewImplCopyWithImpl(_$PrivateMessageReportViewImpl _value, $Res Function(_$PrivateMessageReportViewImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessageReportView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessageReport = null, - Object? privateMessage = null, - Object? privateMessageCreator = null, - Object? creator = null, - Object? resolver = freezed, - }) { - return _then(_$PrivateMessageReportViewImpl( - privateMessageReport: null == privateMessageReport - ? _value.privateMessageReport - : privateMessageReport // ignore: cast_nullable_to_non_nullable - as PrivateMessageReport, - privateMessage: null == privateMessage - ? _value.privateMessage - : privateMessage // ignore: cast_nullable_to_non_nullable - as PrivateMessage, - privateMessageCreator: null == privateMessageCreator - ? _value.privateMessageCreator - : privateMessageCreator // ignore: cast_nullable_to_non_nullable - as Person, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - resolver: freezed == resolver - ? _value.resolver - : resolver // ignore: cast_nullable_to_non_nullable - as Person?, - )); + $Res call({Object? privateMessageReport = null, Object? privateMessage = null, Object? privateMessageCreator = null, Object? creator = null, Object? resolver = freezed}) { + return _then( + _$PrivateMessageReportViewImpl( + privateMessageReport: + null == privateMessageReport + ? _value.privateMessageReport + : privateMessageReport // ignore: cast_nullable_to_non_nullable + as PrivateMessageReport, + privateMessage: + null == privateMessage + ? _value.privateMessage + : privateMessage // ignore: cast_nullable_to_non_nullable + as PrivateMessage, + privateMessageCreator: + null == privateMessageCreator + ? _value.privateMessageCreator + : privateMessageCreator // ignore: cast_nullable_to_non_nullable + as Person, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + resolver: + freezed == resolver + ? _value.resolver + : resolver // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -240,29 +214,22 @@ class __$$PrivateMessageReportViewImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageReportViewImpl extends _PrivateMessageReportView { - const _$PrivateMessageReportViewImpl( - {required this.privateMessageReport, - required this.privateMessage, - required this.privateMessageCreator, - required this.creator, - this.resolver}) - : super._(); + const _$PrivateMessageReportViewImpl({required this.privateMessageReport, required this.privateMessage, required this.privateMessageCreator, required this.creator, this.resolver}) : super._(); - factory _$PrivateMessageReportViewImpl.fromJson(Map json) => - _$$PrivateMessageReportViewImplFromJson(json); + factory _$PrivateMessageReportViewImpl.fromJson(Map json) => _$$PrivateMessageReportViewImplFromJson(json); @override final PrivateMessageReport privateMessageReport; -// v0.18.0 + // v0.18.0 @override final PrivateMessage privateMessage; -// v0.18.0 + // v0.18.0 @override final Person privateMessageCreator; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Person? resolver; @@ -276,50 +243,41 @@ class _$PrivateMessageReportViewImpl extends _PrivateMessageReportView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PrivateMessageReportViewImpl && - (identical(other.privateMessageReport, privateMessageReport) || - other.privateMessageReport == privateMessageReport) && - (identical(other.privateMessage, privateMessage) || - other.privateMessage == privateMessage) && - (identical(other.privateMessageCreator, privateMessageCreator) || - other.privateMessageCreator == privateMessageCreator) && + (identical(other.privateMessageReport, privateMessageReport) || other.privateMessageReport == privateMessageReport) && + (identical(other.privateMessage, privateMessage) || other.privateMessage == privateMessage) && + (identical(other.privateMessageCreator, privateMessageCreator) || other.privateMessageCreator == privateMessageCreator) && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.resolver, resolver) || - other.resolver == resolver)); + (identical(other.resolver, resolver) || other.resolver == resolver)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, privateMessageReport, - privateMessage, privateMessageCreator, creator, resolver); + int get hashCode => Object.hash(runtimeType, privateMessageReport, privateMessage, privateMessageCreator, creator, resolver); /// Create a copy of PrivateMessageReportView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageReportViewImplCopyWith<_$PrivateMessageReportViewImpl> - get copyWith => __$$PrivateMessageReportViewImplCopyWithImpl< - _$PrivateMessageReportViewImpl>(this, _$identity); + _$$PrivateMessageReportViewImplCopyWith<_$PrivateMessageReportViewImpl> get copyWith => __$$PrivateMessageReportViewImplCopyWithImpl<_$PrivateMessageReportViewImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageReportViewImplToJson( - this, - ); + return _$$PrivateMessageReportViewImplToJson(this); } } abstract class _PrivateMessageReportView extends PrivateMessageReportView { - const factory _PrivateMessageReportView( - {required final PrivateMessageReport privateMessageReport, - required final PrivateMessage privateMessage, - required final Person privateMessageCreator, - required final Person creator, - final Person? resolver}) = _$PrivateMessageReportViewImpl; + const factory _PrivateMessageReportView({ + required final PrivateMessageReport privateMessageReport, + required final PrivateMessage privateMessage, + required final Person privateMessageCreator, + required final Person creator, + final Person? resolver, + }) = _$PrivateMessageReportViewImpl; const _PrivateMessageReportView._() : super._(); - factory _PrivateMessageReportView.fromJson(Map json) = - _$PrivateMessageReportViewImpl.fromJson; + factory _PrivateMessageReportView.fromJson(Map json) = _$PrivateMessageReportViewImpl.fromJson; @override PrivateMessageReport get privateMessageReport; // v0.18.0 @@ -336,6 +294,5 @@ abstract class _PrivateMessageReportView extends PrivateMessageReportView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageReportViewImplCopyWith<_$PrivateMessageReportViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$PrivateMessageReportViewImplCopyWith<_$PrivateMessageReportViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/private_message_report_view.g.dart b/lib/src/v3/views/private_message_report_view.g.dart index b3beb407..8e729c7c 100644 --- a/lib/src/v3/views/private_message_report_view.g.dart +++ b/lib/src/v3/views/private_message_report_view.g.dart @@ -6,27 +6,18 @@ part of 'private_message_report_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageReportViewImpl _$$PrivateMessageReportViewImplFromJson( - Map json) => - _$PrivateMessageReportViewImpl( - privateMessageReport: PrivateMessageReport.fromJson( - json['private_message_report'] as Map), - privateMessage: PrivateMessage.fromJson( - json['private_message'] as Map), - privateMessageCreator: Person.fromJson( - json['private_message_creator'] as Map), - creator: Person.fromJson(json['creator'] as Map), - resolver: json['resolver'] == null - ? null - : Person.fromJson(json['resolver'] as Map), - ); +_$PrivateMessageReportViewImpl _$$PrivateMessageReportViewImplFromJson(Map json) => _$PrivateMessageReportViewImpl( + privateMessageReport: PrivateMessageReport.fromJson(json['private_message_report'] as Map), + privateMessage: PrivateMessage.fromJson(json['private_message'] as Map), + privateMessageCreator: Person.fromJson(json['private_message_creator'] as Map), + creator: Person.fromJson(json['creator'] as Map), + resolver: json['resolver'] == null ? null : Person.fromJson(json['resolver'] as Map), +); -Map _$$PrivateMessageReportViewImplToJson( - _$PrivateMessageReportViewImpl instance) => - { - 'private_message_report': instance.privateMessageReport.toJson(), - 'private_message': instance.privateMessage.toJson(), - 'private_message_creator': instance.privateMessageCreator.toJson(), - 'creator': instance.creator.toJson(), - 'resolver': instance.resolver?.toJson(), - }; +Map _$$PrivateMessageReportViewImplToJson(_$PrivateMessageReportViewImpl instance) => { + 'private_message_report': instance.privateMessageReport.toJson(), + 'private_message': instance.privateMessage.toJson(), + 'private_message_creator': instance.privateMessageCreator.toJson(), + 'creator': instance.creator.toJson(), + 'resolver': instance.resolver?.toJson(), +}; diff --git a/lib/src/v3/views/private_message_view.dart b/lib/src/v3/views/private_message_view.dart index 269753b3..701b638e 100644 --- a/lib/src/v3/views/private_message_view.dart +++ b/lib/src/v3/views/private_message_view.dart @@ -16,6 +16,5 @@ class PrivateMessageView with _$PrivateMessageView { }) = _PrivateMessageView; const PrivateMessageView._(); - factory PrivateMessageView.fromJson(Map json) => - _$PrivateMessageViewFromJson(json); + factory PrivateMessageView.fromJson(Map json) => _$PrivateMessageViewFromJson(json); } diff --git a/lib/src/v3/views/private_message_view.freezed.dart b/lib/src/v3/views/private_message_view.freezed.dart index db94b0fd..480fac30 100644 --- a/lib/src/v3/views/private_message_view.freezed.dart +++ b/lib/src/v3/views/private_message_view.freezed.dart @@ -12,7 +12,8 @@ part of 'private_message_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); PrivateMessageView _$PrivateMessageViewFromJson(Map json) { return _PrivateMessageView.fromJson(json); @@ -20,8 +21,7 @@ PrivateMessageView _$PrivateMessageViewFromJson(Map json) { /// @nodoc mixin _$PrivateMessageView { - PrivateMessage get privateMessage => - throw _privateConstructorUsedError; // v0.18.0 + PrivateMessage get privateMessage => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Person get recipient => throw _privateConstructorUsedError; @@ -31,15 +31,12 @@ mixin _$PrivateMessageView { /// Create a copy of PrivateMessageView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $PrivateMessageViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $PrivateMessageViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $PrivateMessageViewCopyWith<$Res> { - factory $PrivateMessageViewCopyWith( - PrivateMessageView value, $Res Function(PrivateMessageView) then) = - _$PrivateMessageViewCopyWithImpl<$Res, PrivateMessageView>; + factory $PrivateMessageViewCopyWith(PrivateMessageView value, $Res Function(PrivateMessageView) then) = _$PrivateMessageViewCopyWithImpl<$Res, PrivateMessageView>; @useResult $Res call({PrivateMessage privateMessage, Person creator, Person recipient}); @@ -49,8 +46,7 @@ abstract class $PrivateMessageViewCopyWith<$Res> { } /// @nodoc -class _$PrivateMessageViewCopyWithImpl<$Res, $Val extends PrivateMessageView> - implements $PrivateMessageViewCopyWith<$Res> { +class _$PrivateMessageViewCopyWithImpl<$Res, $Val extends PrivateMessageView> implements $PrivateMessageViewCopyWith<$Res> { _$PrivateMessageViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -62,25 +58,27 @@ class _$PrivateMessageViewCopyWithImpl<$Res, $Val extends PrivateMessageView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessage = null, - Object? creator = null, - Object? recipient = null, - }) { - return _then(_value.copyWith( - privateMessage: null == privateMessage - ? _value.privateMessage - : privateMessage // ignore: cast_nullable_to_non_nullable - as PrivateMessage, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - ) as $Val); + $Res call({Object? privateMessage = null, Object? creator = null, Object? recipient = null}) { + return _then( + _value.copyWith( + privateMessage: + null == privateMessage + ? _value.privateMessage + : privateMessage // ignore: cast_nullable_to_non_nullable + as PrivateMessage, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + ) + as $Val, + ); } /// Create a copy of PrivateMessageView @@ -115,11 +113,8 @@ class _$PrivateMessageViewCopyWithImpl<$Res, $Val extends PrivateMessageView> } /// @nodoc -abstract class _$$PrivateMessageViewImplCopyWith<$Res> - implements $PrivateMessageViewCopyWith<$Res> { - factory _$$PrivateMessageViewImplCopyWith(_$PrivateMessageViewImpl value, - $Res Function(_$PrivateMessageViewImpl) then) = - __$$PrivateMessageViewImplCopyWithImpl<$Res>; +abstract class _$$PrivateMessageViewImplCopyWith<$Res> implements $PrivateMessageViewCopyWith<$Res> { + factory _$$PrivateMessageViewImplCopyWith(_$PrivateMessageViewImpl value, $Res Function(_$PrivateMessageViewImpl) then) = __$$PrivateMessageViewImplCopyWithImpl<$Res>; @override @useResult $Res call({PrivateMessage privateMessage, Person creator, Person recipient}); @@ -133,36 +128,33 @@ abstract class _$$PrivateMessageViewImplCopyWith<$Res> } /// @nodoc -class __$$PrivateMessageViewImplCopyWithImpl<$Res> - extends _$PrivateMessageViewCopyWithImpl<$Res, _$PrivateMessageViewImpl> - implements _$$PrivateMessageViewImplCopyWith<$Res> { - __$$PrivateMessageViewImplCopyWithImpl(_$PrivateMessageViewImpl _value, - $Res Function(_$PrivateMessageViewImpl) _then) - : super(_value, _then); +class __$$PrivateMessageViewImplCopyWithImpl<$Res> extends _$PrivateMessageViewCopyWithImpl<$Res, _$PrivateMessageViewImpl> implements _$$PrivateMessageViewImplCopyWith<$Res> { + __$$PrivateMessageViewImplCopyWithImpl(_$PrivateMessageViewImpl _value, $Res Function(_$PrivateMessageViewImpl) _then) : super(_value, _then); /// Create a copy of PrivateMessageView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? privateMessage = null, - Object? creator = null, - Object? recipient = null, - }) { - return _then(_$PrivateMessageViewImpl( - privateMessage: null == privateMessage - ? _value.privateMessage - : privateMessage // ignore: cast_nullable_to_non_nullable - as PrivateMessage, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - recipient: null == recipient - ? _value.recipient - : recipient // ignore: cast_nullable_to_non_nullable - as Person, - )); + $Res call({Object? privateMessage = null, Object? creator = null, Object? recipient = null}) { + return _then( + _$PrivateMessageViewImpl( + privateMessage: + null == privateMessage + ? _value.privateMessage + : privateMessage // ignore: cast_nullable_to_non_nullable + as PrivateMessage, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + recipient: + null == recipient + ? _value.recipient + : recipient // ignore: cast_nullable_to_non_nullable + as Person, + ), + ); } } @@ -170,21 +162,16 @@ class __$$PrivateMessageViewImplCopyWithImpl<$Res> @modelSerde class _$PrivateMessageViewImpl extends _PrivateMessageView { - const _$PrivateMessageViewImpl( - {required this.privateMessage, - required this.creator, - required this.recipient}) - : super._(); + const _$PrivateMessageViewImpl({required this.privateMessage, required this.creator, required this.recipient}) : super._(); - factory _$PrivateMessageViewImpl.fromJson(Map json) => - _$$PrivateMessageViewImplFromJson(json); + factory _$PrivateMessageViewImpl.fromJson(Map json) => _$$PrivateMessageViewImplFromJson(json); @override final PrivateMessage privateMessage; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Person recipient; @@ -198,44 +185,33 @@ class _$PrivateMessageViewImpl extends _PrivateMessageView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PrivateMessageViewImpl && - (identical(other.privateMessage, privateMessage) || - other.privateMessage == privateMessage) && + (identical(other.privateMessage, privateMessage) || other.privateMessage == privateMessage) && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.recipient, recipient) || - other.recipient == recipient)); + (identical(other.recipient, recipient) || other.recipient == recipient)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, privateMessage, creator, recipient); + int get hashCode => Object.hash(runtimeType, privateMessage, creator, recipient); /// Create a copy of PrivateMessageView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$PrivateMessageViewImplCopyWith<_$PrivateMessageViewImpl> get copyWith => - __$$PrivateMessageViewImplCopyWithImpl<_$PrivateMessageViewImpl>( - this, _$identity); + _$$PrivateMessageViewImplCopyWith<_$PrivateMessageViewImpl> get copyWith => __$$PrivateMessageViewImplCopyWithImpl<_$PrivateMessageViewImpl>(this, _$identity); @override Map toJson() { - return _$$PrivateMessageViewImplToJson( - this, - ); + return _$$PrivateMessageViewImplToJson(this); } } abstract class _PrivateMessageView extends PrivateMessageView { - const factory _PrivateMessageView( - {required final PrivateMessage privateMessage, - required final Person creator, - required final Person recipient}) = _$PrivateMessageViewImpl; + const factory _PrivateMessageView({required final PrivateMessage privateMessage, required final Person creator, required final Person recipient}) = _$PrivateMessageViewImpl; const _PrivateMessageView._() : super._(); - factory _PrivateMessageView.fromJson(Map json) = - _$PrivateMessageViewImpl.fromJson; + factory _PrivateMessageView.fromJson(Map json) = _$PrivateMessageViewImpl.fromJson; @override PrivateMessage get privateMessage; // v0.18.0 @@ -248,6 +224,5 @@ abstract class _PrivateMessageView extends PrivateMessageView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$PrivateMessageViewImplCopyWith<_$PrivateMessageViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$PrivateMessageViewImplCopyWith<_$PrivateMessageViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/private_message_view.g.dart b/lib/src/v3/views/private_message_view.g.dart index 9e28e3cc..9c3ecd59 100644 --- a/lib/src/v3/views/private_message_view.g.dart +++ b/lib/src/v3/views/private_message_view.g.dart @@ -6,19 +6,14 @@ part of 'private_message_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$PrivateMessageViewImpl _$$PrivateMessageViewImplFromJson( - Map json) => - _$PrivateMessageViewImpl( - privateMessage: PrivateMessage.fromJson( - json['private_message'] as Map), - creator: Person.fromJson(json['creator'] as Map), - recipient: Person.fromJson(json['recipient'] as Map), - ); +_$PrivateMessageViewImpl _$$PrivateMessageViewImplFromJson(Map json) => _$PrivateMessageViewImpl( + privateMessage: PrivateMessage.fromJson(json['private_message'] as Map), + creator: Person.fromJson(json['creator'] as Map), + recipient: Person.fromJson(json['recipient'] as Map), +); -Map _$$PrivateMessageViewImplToJson( - _$PrivateMessageViewImpl instance) => - { - 'private_message': instance.privateMessage.toJson(), - 'creator': instance.creator.toJson(), - 'recipient': instance.recipient.toJson(), - }; +Map _$$PrivateMessageViewImplToJson(_$PrivateMessageViewImpl instance) => { + 'private_message': instance.privateMessage.toJson(), + 'creator': instance.creator.toJson(), + 'recipient': instance.recipient.toJson(), +}; diff --git a/lib/src/v3/views/registration_application_view.dart b/lib/src/v3/views/registration_application_view.dart index 45b99498..f7176e94 100644 --- a/lib/src/v3/views/registration_application_view.dart +++ b/lib/src/v3/views/registration_application_view.dart @@ -17,6 +17,5 @@ class RegistrationApplicationView with _$RegistrationApplicationView { }) = _RegistrationApplicationView; const RegistrationApplicationView._(); - factory RegistrationApplicationView.fromJson(Map json) => - _$RegistrationApplicationViewFromJson(json); + factory RegistrationApplicationView.fromJson(Map json) => _$RegistrationApplicationViewFromJson(json); } diff --git a/lib/src/v3/views/registration_application_view.freezed.dart b/lib/src/v3/views/registration_application_view.freezed.dart index 4f0816ee..4eebf244 100644 --- a/lib/src/v3/views/registration_application_view.freezed.dart +++ b/lib/src/v3/views/registration_application_view.freezed.dart @@ -12,19 +12,17 @@ part of 'registration_application_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); -RegistrationApplicationView _$RegistrationApplicationViewFromJson( - Map json) { +RegistrationApplicationView _$RegistrationApplicationViewFromJson(Map json) { return _RegistrationApplicationView.fromJson(json); } /// @nodoc mixin _$RegistrationApplicationView { - RegistrationApplication get registrationApplication => - throw _privateConstructorUsedError; // v0.18.0 - LocalUser get creatorLocalUser => - throw _privateConstructorUsedError; // v0.18.0 + RegistrationApplication get registrationApplication => throw _privateConstructorUsedError; // v0.18.0 + LocalUser get creatorLocalUser => throw _privateConstructorUsedError; // v0.18.0 Person get creator => throw _privateConstructorUsedError; // v0.18.0 Person? get admin => throw _privateConstructorUsedError; @@ -34,23 +32,15 @@ mixin _$RegistrationApplicationView { /// Create a copy of RegistrationApplicationView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $RegistrationApplicationViewCopyWith - get copyWith => throw _privateConstructorUsedError; + $RegistrationApplicationViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $RegistrationApplicationViewCopyWith<$Res> { - factory $RegistrationApplicationViewCopyWith( - RegistrationApplicationView value, - $Res Function(RegistrationApplicationView) then) = - _$RegistrationApplicationViewCopyWithImpl<$Res, - RegistrationApplicationView>; + factory $RegistrationApplicationViewCopyWith(RegistrationApplicationView value, $Res Function(RegistrationApplicationView) then) = + _$RegistrationApplicationViewCopyWithImpl<$Res, RegistrationApplicationView>; @useResult - $Res call( - {RegistrationApplication registrationApplication, - LocalUser creatorLocalUser, - Person creator, - Person? admin}); + $Res call({RegistrationApplication registrationApplication, LocalUser creatorLocalUser, Person creator, Person? admin}); $RegistrationApplicationCopyWith<$Res> get registrationApplication; $LocalUserCopyWith<$Res> get creatorLocalUser; @@ -59,9 +49,7 @@ abstract class $RegistrationApplicationViewCopyWith<$Res> { } /// @nodoc -class _$RegistrationApplicationViewCopyWithImpl<$Res, - $Val extends RegistrationApplicationView> - implements $RegistrationApplicationViewCopyWith<$Res> { +class _$RegistrationApplicationViewCopyWithImpl<$Res, $Val extends RegistrationApplicationView> implements $RegistrationApplicationViewCopyWith<$Res> { _$RegistrationApplicationViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -73,30 +61,32 @@ class _$RegistrationApplicationViewCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplication = null, - Object? creatorLocalUser = null, - Object? creator = null, - Object? admin = freezed, - }) { - return _then(_value.copyWith( - registrationApplication: null == registrationApplication - ? _value.registrationApplication - : registrationApplication // ignore: cast_nullable_to_non_nullable - as RegistrationApplication, - creatorLocalUser: null == creatorLocalUser - ? _value.creatorLocalUser - : creatorLocalUser // ignore: cast_nullable_to_non_nullable - as LocalUser, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - ) as $Val); + $Res call({Object? registrationApplication = null, Object? creatorLocalUser = null, Object? creator = null, Object? admin = freezed}) { + return _then( + _value.copyWith( + registrationApplication: + null == registrationApplication + ? _value.registrationApplication + : registrationApplication // ignore: cast_nullable_to_non_nullable + as RegistrationApplication, + creatorLocalUser: + null == creatorLocalUser + ? _value.creatorLocalUser + : creatorLocalUser // ignore: cast_nullable_to_non_nullable + as LocalUser, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ) + as $Val, + ); } /// Create a copy of RegistrationApplicationView @@ -104,8 +94,7 @@ class _$RegistrationApplicationViewCopyWithImpl<$Res, @override @pragma('vm:prefer-inline') $RegistrationApplicationCopyWith<$Res> get registrationApplication { - return $RegistrationApplicationCopyWith<$Res>( - _value.registrationApplication, (value) { + return $RegistrationApplicationCopyWith<$Res>(_value.registrationApplication, (value) { return _then(_value.copyWith(registrationApplication: value) as $Val); }); } @@ -146,19 +135,12 @@ class _$RegistrationApplicationViewCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RegistrationApplicationViewImplCopyWith<$Res> - implements $RegistrationApplicationViewCopyWith<$Res> { - factory _$$RegistrationApplicationViewImplCopyWith( - _$RegistrationApplicationViewImpl value, - $Res Function(_$RegistrationApplicationViewImpl) then) = +abstract class _$$RegistrationApplicationViewImplCopyWith<$Res> implements $RegistrationApplicationViewCopyWith<$Res> { + factory _$$RegistrationApplicationViewImplCopyWith(_$RegistrationApplicationViewImpl value, $Res Function(_$RegistrationApplicationViewImpl) then) = __$$RegistrationApplicationViewImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {RegistrationApplication registrationApplication, - LocalUser creatorLocalUser, - Person creator, - Person? admin}); + $Res call({RegistrationApplication registrationApplication, LocalUser creatorLocalUser, Person creator, Person? admin}); @override $RegistrationApplicationCopyWith<$Res> get registrationApplication; @@ -171,43 +153,39 @@ abstract class _$$RegistrationApplicationViewImplCopyWith<$Res> } /// @nodoc -class __$$RegistrationApplicationViewImplCopyWithImpl<$Res> - extends _$RegistrationApplicationViewCopyWithImpl<$Res, - _$RegistrationApplicationViewImpl> +class __$$RegistrationApplicationViewImplCopyWithImpl<$Res> extends _$RegistrationApplicationViewCopyWithImpl<$Res, _$RegistrationApplicationViewImpl> implements _$$RegistrationApplicationViewImplCopyWith<$Res> { - __$$RegistrationApplicationViewImplCopyWithImpl( - _$RegistrationApplicationViewImpl _value, - $Res Function(_$RegistrationApplicationViewImpl) _then) - : super(_value, _then); + __$$RegistrationApplicationViewImplCopyWithImpl(_$RegistrationApplicationViewImpl _value, $Res Function(_$RegistrationApplicationViewImpl) _then) : super(_value, _then); /// Create a copy of RegistrationApplicationView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? registrationApplication = null, - Object? creatorLocalUser = null, - Object? creator = null, - Object? admin = freezed, - }) { - return _then(_$RegistrationApplicationViewImpl( - registrationApplication: null == registrationApplication - ? _value.registrationApplication - : registrationApplication // ignore: cast_nullable_to_non_nullable - as RegistrationApplication, - creatorLocalUser: null == creatorLocalUser - ? _value.creatorLocalUser - : creatorLocalUser // ignore: cast_nullable_to_non_nullable - as LocalUser, - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - admin: freezed == admin - ? _value.admin - : admin // ignore: cast_nullable_to_non_nullable - as Person?, - )); + $Res call({Object? registrationApplication = null, Object? creatorLocalUser = null, Object? creator = null, Object? admin = freezed}) { + return _then( + _$RegistrationApplicationViewImpl( + registrationApplication: + null == registrationApplication + ? _value.registrationApplication + : registrationApplication // ignore: cast_nullable_to_non_nullable + as RegistrationApplication, + creatorLocalUser: + null == creatorLocalUser + ? _value.creatorLocalUser + : creatorLocalUser // ignore: cast_nullable_to_non_nullable + as LocalUser, + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + admin: + freezed == admin + ? _value.admin + : admin // ignore: cast_nullable_to_non_nullable + as Person?, + ), + ); } } @@ -215,26 +193,19 @@ class __$$RegistrationApplicationViewImplCopyWithImpl<$Res> @modelSerde class _$RegistrationApplicationViewImpl extends _RegistrationApplicationView { - const _$RegistrationApplicationViewImpl( - {required this.registrationApplication, - required this.creatorLocalUser, - required this.creator, - this.admin}) - : super._(); + const _$RegistrationApplicationViewImpl({required this.registrationApplication, required this.creatorLocalUser, required this.creator, this.admin}) : super._(); - factory _$RegistrationApplicationViewImpl.fromJson( - Map json) => - _$$RegistrationApplicationViewImplFromJson(json); + factory _$RegistrationApplicationViewImpl.fromJson(Map json) => _$$RegistrationApplicationViewImplFromJson(json); @override final RegistrationApplication registrationApplication; -// v0.18.0 + // v0.18.0 @override final LocalUser creatorLocalUser; -// v0.18.0 + // v0.18.0 @override final Person creator; -// v0.18.0 + // v0.18.0 @override final Person? admin; @@ -248,48 +219,39 @@ class _$RegistrationApplicationViewImpl extends _RegistrationApplicationView { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RegistrationApplicationViewImpl && - (identical( - other.registrationApplication, registrationApplication) || - other.registrationApplication == registrationApplication) && - (identical(other.creatorLocalUser, creatorLocalUser) || - other.creatorLocalUser == creatorLocalUser) && + (identical(other.registrationApplication, registrationApplication) || other.registrationApplication == registrationApplication) && + (identical(other.creatorLocalUser, creatorLocalUser) || other.creatorLocalUser == creatorLocalUser) && (identical(other.creator, creator) || other.creator == creator) && (identical(other.admin, admin) || other.admin == admin)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash( - runtimeType, registrationApplication, creatorLocalUser, creator, admin); + int get hashCode => Object.hash(runtimeType, registrationApplication, creatorLocalUser, creator, admin); /// Create a copy of RegistrationApplicationView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$RegistrationApplicationViewImplCopyWith<_$RegistrationApplicationViewImpl> - get copyWith => __$$RegistrationApplicationViewImplCopyWithImpl< - _$RegistrationApplicationViewImpl>(this, _$identity); + _$$RegistrationApplicationViewImplCopyWith<_$RegistrationApplicationViewImpl> get copyWith => __$$RegistrationApplicationViewImplCopyWithImpl<_$RegistrationApplicationViewImpl>(this, _$identity); @override Map toJson() { - return _$$RegistrationApplicationViewImplToJson( - this, - ); + return _$$RegistrationApplicationViewImplToJson(this); } } -abstract class _RegistrationApplicationView - extends RegistrationApplicationView { - const factory _RegistrationApplicationView( - {required final RegistrationApplication registrationApplication, - required final LocalUser creatorLocalUser, - required final Person creator, - final Person? admin}) = _$RegistrationApplicationViewImpl; +abstract class _RegistrationApplicationView extends RegistrationApplicationView { + const factory _RegistrationApplicationView({ + required final RegistrationApplication registrationApplication, + required final LocalUser creatorLocalUser, + required final Person creator, + final Person? admin, + }) = _$RegistrationApplicationViewImpl; const _RegistrationApplicationView._() : super._(); - factory _RegistrationApplicationView.fromJson(Map json) = - _$RegistrationApplicationViewImpl.fromJson; + factory _RegistrationApplicationView.fromJson(Map json) = _$RegistrationApplicationViewImpl.fromJson; @override RegistrationApplication get registrationApplication; // v0.18.0 @@ -304,6 +266,5 @@ abstract class _RegistrationApplicationView /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$RegistrationApplicationViewImplCopyWith<_$RegistrationApplicationViewImpl> - get copyWith => throw _privateConstructorUsedError; + _$$RegistrationApplicationViewImplCopyWith<_$RegistrationApplicationViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/registration_application_view.g.dart b/lib/src/v3/views/registration_application_view.g.dart index a64a526c..125e75b1 100644 --- a/lib/src/v3/views/registration_application_view.g.dart +++ b/lib/src/v3/views/registration_application_view.g.dart @@ -6,24 +6,16 @@ part of 'registration_application_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$RegistrationApplicationViewImpl _$$RegistrationApplicationViewImplFromJson( - Map json) => - _$RegistrationApplicationViewImpl( - registrationApplication: RegistrationApplication.fromJson( - json['registration_application'] as Map), - creatorLocalUser: LocalUser.fromJson( - json['creator_local_user'] as Map), - creator: Person.fromJson(json['creator'] as Map), - admin: json['admin'] == null - ? null - : Person.fromJson(json['admin'] as Map), - ); +_$RegistrationApplicationViewImpl _$$RegistrationApplicationViewImplFromJson(Map json) => _$RegistrationApplicationViewImpl( + registrationApplication: RegistrationApplication.fromJson(json['registration_application'] as Map), + creatorLocalUser: LocalUser.fromJson(json['creator_local_user'] as Map), + creator: Person.fromJson(json['creator'] as Map), + admin: json['admin'] == null ? null : Person.fromJson(json['admin'] as Map), +); -Map _$$RegistrationApplicationViewImplToJson( - _$RegistrationApplicationViewImpl instance) => - { - 'registration_application': instance.registrationApplication.toJson(), - 'creator_local_user': instance.creatorLocalUser.toJson(), - 'creator': instance.creator.toJson(), - 'admin': instance.admin?.toJson(), - }; +Map _$$RegistrationApplicationViewImplToJson(_$RegistrationApplicationViewImpl instance) => { + 'registration_application': instance.registrationApplication.toJson(), + 'creator_local_user': instance.creatorLocalUser.toJson(), + 'creator': instance.creator.toJson(), + 'admin': instance.admin?.toJson(), +}; diff --git a/lib/src/v3/views/vote_view.dart b/lib/src/v3/views/vote_view.dart index 99b253b6..6459ffe1 100644 --- a/lib/src/v3/views/vote_view.dart +++ b/lib/src/v3/views/vote_view.dart @@ -16,6 +16,5 @@ class VoteView with _$VoteView { }) = _VoteView; const VoteView._(); - factory VoteView.fromJson(Map json) => - _$VoteViewFromJson(json); + factory VoteView.fromJson(Map json) => _$VoteViewFromJson(json); } diff --git a/lib/src/v3/views/vote_view.freezed.dart b/lib/src/v3/views/vote_view.freezed.dart index 3dffdf21..55100b00 100644 --- a/lib/src/v3/views/vote_view.freezed.dart +++ b/lib/src/v3/views/vote_view.freezed.dart @@ -12,7 +12,8 @@ part of 'vote_view.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models', +); VoteView _$VoteViewFromJson(Map json) { return _VoteView.fromJson(json); @@ -20,10 +21,8 @@ VoteView _$VoteViewFromJson(Map json) { /// @nodoc mixin _$VoteView { - Person get creator => - throw _privateConstructorUsedError; // v0.19.2 (required) - bool? get creatorBannedFromCommunity => - throw _privateConstructorUsedError; // v0.19.4 (required) + Person get creator => throw _privateConstructorUsedError; // v0.19.2 (required) + bool? get creatorBannedFromCommunity => throw _privateConstructorUsedError; // v0.19.4 (required) int get score => throw _privateConstructorUsedError; /// Serializes this VoteView to a JSON map. @@ -32,14 +31,12 @@ mixin _$VoteView { /// Create a copy of VoteView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) - $VoteViewCopyWith get copyWith => - throw _privateConstructorUsedError; + $VoteViewCopyWith get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $VoteViewCopyWith<$Res> { - factory $VoteViewCopyWith(VoteView value, $Res Function(VoteView) then) = - _$VoteViewCopyWithImpl<$Res, VoteView>; + factory $VoteViewCopyWith(VoteView value, $Res Function(VoteView) then) = _$VoteViewCopyWithImpl<$Res, VoteView>; @useResult $Res call({Person creator, bool? creatorBannedFromCommunity, int score}); @@ -47,8 +44,7 @@ abstract class $VoteViewCopyWith<$Res> { } /// @nodoc -class _$VoteViewCopyWithImpl<$Res, $Val extends VoteView> - implements $VoteViewCopyWith<$Res> { +class _$VoteViewCopyWithImpl<$Res, $Val extends VoteView> implements $VoteViewCopyWith<$Res> { _$VoteViewCopyWithImpl(this._value, this._then); // ignore: unused_field @@ -60,25 +56,27 @@ class _$VoteViewCopyWithImpl<$Res, $Val extends VoteView> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? creator = null, - Object? creatorBannedFromCommunity = freezed, - Object? score = null, - }) { - return _then(_value.copyWith( - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - creatorBannedFromCommunity: freezed == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? creator = null, Object? creatorBannedFromCommunity = freezed, Object? score = null}) { + return _then( + _value.copyWith( + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + creatorBannedFromCommunity: + freezed == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } /// Create a copy of VoteView @@ -93,11 +91,8 @@ class _$VoteViewCopyWithImpl<$Res, $Val extends VoteView> } /// @nodoc -abstract class _$$VoteViewImplCopyWith<$Res> - implements $VoteViewCopyWith<$Res> { - factory _$$VoteViewImplCopyWith( - _$VoteViewImpl value, $Res Function(_$VoteViewImpl) then) = - __$$VoteViewImplCopyWithImpl<$Res>; +abstract class _$$VoteViewImplCopyWith<$Res> implements $VoteViewCopyWith<$Res> { + factory _$$VoteViewImplCopyWith(_$VoteViewImpl value, $Res Function(_$VoteViewImpl) then) = __$$VoteViewImplCopyWithImpl<$Res>; @override @useResult $Res call({Person creator, bool? creatorBannedFromCommunity, int score}); @@ -107,36 +102,33 @@ abstract class _$$VoteViewImplCopyWith<$Res> } /// @nodoc -class __$$VoteViewImplCopyWithImpl<$Res> - extends _$VoteViewCopyWithImpl<$Res, _$VoteViewImpl> - implements _$$VoteViewImplCopyWith<$Res> { - __$$VoteViewImplCopyWithImpl( - _$VoteViewImpl _value, $Res Function(_$VoteViewImpl) _then) - : super(_value, _then); +class __$$VoteViewImplCopyWithImpl<$Res> extends _$VoteViewCopyWithImpl<$Res, _$VoteViewImpl> implements _$$VoteViewImplCopyWith<$Res> { + __$$VoteViewImplCopyWithImpl(_$VoteViewImpl _value, $Res Function(_$VoteViewImpl) _then) : super(_value, _then); /// Create a copy of VoteView /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? creator = null, - Object? creatorBannedFromCommunity = freezed, - Object? score = null, - }) { - return _then(_$VoteViewImpl( - creator: null == creator - ? _value.creator - : creator // ignore: cast_nullable_to_non_nullable - as Person, - creatorBannedFromCommunity: freezed == creatorBannedFromCommunity - ? _value.creatorBannedFromCommunity - : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable - as bool?, - score: null == score - ? _value.score - : score // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? creator = null, Object? creatorBannedFromCommunity = freezed, Object? score = null}) { + return _then( + _$VoteViewImpl( + creator: + null == creator + ? _value.creator + : creator // ignore: cast_nullable_to_non_nullable + as Person, + creatorBannedFromCommunity: + freezed == creatorBannedFromCommunity + ? _value.creatorBannedFromCommunity + : creatorBannedFromCommunity // ignore: cast_nullable_to_non_nullable + as bool?, + score: + null == score + ? _value.score + : score // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -144,21 +136,16 @@ class __$$VoteViewImplCopyWithImpl<$Res> @modelSerde class _$VoteViewImpl extends _VoteView { - const _$VoteViewImpl( - {required this.creator, - this.creatorBannedFromCommunity, - required this.score}) - : super._(); + const _$VoteViewImpl({required this.creator, this.creatorBannedFromCommunity, required this.score}) : super._(); - factory _$VoteViewImpl.fromJson(Map json) => - _$$VoteViewImplFromJson(json); + factory _$VoteViewImpl.fromJson(Map json) => _$$VoteViewImplFromJson(json); @override final Person creator; -// v0.19.2 (required) + // v0.19.2 (required) @override final bool? creatorBannedFromCommunity; -// v0.19.4 (required) + // v0.19.4 (required) @override final int score; @@ -173,43 +160,32 @@ class _$VoteViewImpl extends _VoteView { (other.runtimeType == runtimeType && other is _$VoteViewImpl && (identical(other.creator, creator) || other.creator == creator) && - (identical(other.creatorBannedFromCommunity, - creatorBannedFromCommunity) || - other.creatorBannedFromCommunity == - creatorBannedFromCommunity) && + (identical(other.creatorBannedFromCommunity, creatorBannedFromCommunity) || other.creatorBannedFromCommunity == creatorBannedFromCommunity) && (identical(other.score, score) || other.score == score)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, creator, creatorBannedFromCommunity, score); + int get hashCode => Object.hash(runtimeType, creator, creatorBannedFromCommunity, score); /// Create a copy of VoteView /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) @override @pragma('vm:prefer-inline') - _$$VoteViewImplCopyWith<_$VoteViewImpl> get copyWith => - __$$VoteViewImplCopyWithImpl<_$VoteViewImpl>(this, _$identity); + _$$VoteViewImplCopyWith<_$VoteViewImpl> get copyWith => __$$VoteViewImplCopyWithImpl<_$VoteViewImpl>(this, _$identity); @override Map toJson() { - return _$$VoteViewImplToJson( - this, - ); + return _$$VoteViewImplToJson(this); } } abstract class _VoteView extends VoteView { - const factory _VoteView( - {required final Person creator, - final bool? creatorBannedFromCommunity, - required final int score}) = _$VoteViewImpl; + const factory _VoteView({required final Person creator, final bool? creatorBannedFromCommunity, required final int score}) = _$VoteViewImpl; const _VoteView._() : super._(); - factory _VoteView.fromJson(Map json) = - _$VoteViewImpl.fromJson; + factory _VoteView.fromJson(Map json) = _$VoteViewImpl.fromJson; @override Person get creator; // v0.19.2 (required) @@ -222,6 +198,5 @@ abstract class _VoteView extends VoteView { /// with the given fields replaced by the non-null parameter values. @override @JsonKey(includeFromJson: false, includeToJson: false) - _$$VoteViewImplCopyWith<_$VoteViewImpl> get copyWith => - throw _privateConstructorUsedError; + _$$VoteViewImplCopyWith<_$VoteViewImpl> get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/src/v3/views/vote_view.g.dart b/lib/src/v3/views/vote_view.g.dart index fb9b1761..75513b6d 100644 --- a/lib/src/v3/views/vote_view.g.dart +++ b/lib/src/v3/views/vote_view.g.dart @@ -6,17 +6,14 @@ part of 'vote_view.dart'; // JsonSerializableGenerator // ************************************************************************** -_$VoteViewImpl _$$VoteViewImplFromJson(Map json) => - _$VoteViewImpl( - creator: Person.fromJson(json['creator'] as Map), - creatorBannedFromCommunity: - json['creator_banned_from_community'] as bool?, - score: (json['score'] as num).toInt(), - ); +_$VoteViewImpl _$$VoteViewImplFromJson(Map json) => _$VoteViewImpl( + creator: Person.fromJson(json['creator'] as Map), + creatorBannedFromCommunity: json['creator_banned_from_community'] as bool?, + score: (json['score'] as num).toInt(), +); -Map _$$VoteViewImplToJson(_$VoteViewImpl instance) => - { - 'creator': instance.creator.toJson(), - 'creator_banned_from_community': instance.creatorBannedFromCommunity, - 'score': instance.score, - }; +Map _$$VoteViewImplToJson(_$VoteViewImpl instance) => { + 'creator': instance.creator.toJson(), + 'creator_banned_from_community': instance.creatorBannedFromCommunity, + 'score': instance.score, +}; From 9d38cdde486df29c0087f6b4d7d03f9ae21d50d3 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Mon, 17 Feb 2025 00:21:58 -0800 Subject: [PATCH 3/6] chore: pin freezed and json_serializable versions --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 08ad73ba..73e65a49 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: dev_dependencies: build_runner: ^2.4.15 - freezed: ^2.5.8 - json_serializable: ^6.9.4 + freezed: 2.5.8 + json_serializable: 6.9.4 lints: ^5.1.1 test: ^1.25.15 \ No newline at end of file From f2b1c51c7cf0e35e95b5db5c938e584f7b1c01c2 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Mon, 17 Feb 2025 00:49:30 -0800 Subject: [PATCH 4/6] chore: add invalid_annotation_target to analysis options --- analysis_options.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/analysis_options.yaml b/analysis_options.yaml index 8fdbd4d8..447771e3 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -26,6 +26,10 @@ include: package:lints/recommended.yaml formatter: page_width: 200 +analyzer: + errors: + invalid_annotation_target: ignore + # For more information about the core and recommended set of lints, see # https://dart.dev/go/core-lints From 938af5e8d2caff101c3b43bb1a14bcc4ed7312d5 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Mon, 17 Feb 2025 00:53:13 -0800 Subject: [PATCH 5/6] chore: ignore info and warnings when running dart analyze --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ad058f0..5b186724 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: run: dart format --set-exit-if-changed --output none . - name: Run lints - run: dart analyze --fatal-warnings --fatal-infos + run: dart analyze --no-fatal-infos --no-fatal-warning From 48bc368dfcf1d9bb37ff758ca371952a95d07633 Mon Sep 17 00:00:00 2001 From: Hamlet Jiang Su Date: Mon, 17 Feb 2025 00:55:06 -0800 Subject: [PATCH 6/6] chore: ignore info and warnings when running dart analyze --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b186724..bd6c4386 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,4 +24,4 @@ jobs: run: dart format --set-exit-if-changed --output none . - name: Run lints - run: dart analyze --no-fatal-infos --no-fatal-warning + run: dart analyze --no-fatal-warnings