// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.8.0.

// ignore_for_file: unused_import, unused_element, unnecessary_import, duplicate_ignore, invalid_use_of_internal_member, annotate_overrides, non_constant_identifier_names, curly_braces_in_flow_control_structures, prefer_const_literals_to_create_immutables, unused_field

import 'api/cache/cache_util.dart';
import 'api/cache/file_cache.dart';
import 'api/cache/music_cache.dart';
import 'api/init.dart';
import 'api/log.dart';
import 'api/music_api/fns.dart';
import 'api/music_api/mirror.dart';
import 'api/music_api/plugin_fn.dart';
import 'api/music_api/wrapper.dart';
import 'api/types/config.dart';
import 'api/types/external_api.dart';
import 'api/types/playinfo.dart';
import 'api/types/version.dart';
import 'api/utils/crypto.dart';
import 'api/utils/database.dart';
import 'api/utils/http_helper.dart';
import 'api/utils/path_util.dart';
import 'dart:async';
import 'dart:convert';
import 'frb_generated.dart';
import 'frb_generated.io.dart'
    if (dart.library.js_interop) 'frb_generated.web.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';

/// Main entrypoint of the Rust API
class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {
  @internal
  static final instance = RustLib._();

  RustLib._();

  /// Initialize flutter_rust_bridge
  static Future<void> init({
    RustLibApi? api,
    BaseHandler? handler,
    ExternalLibrary? externalLibrary,
  }) async {
    await instance.initImpl(
      api: api,
      handler: handler,
      externalLibrary: externalLibrary,
    );
  }

  /// Initialize flutter_rust_bridge in mock mode.
  /// No libraries for FFI are loaded.
  static void initMock({
    required RustLibApi api,
  }) {
    instance.initMockImpl(
      api: api,
    );
  }

  /// Dispose flutter_rust_bridge
  ///
  /// The call to this function is optional, since flutter_rust_bridge (and everything else)
  /// is automatically disposed when the app stops.
  static void dispose() => instance.disposeImpl();

  @override
  ApiImplConstructor<RustLibApiImpl, RustLibWire> get apiImplConstructor =>
      RustLibApiImpl.new;

  @override
  WireConstructor<RustLibWire> get wireConstructor =>
      RustLibWire.fromExternalLibrary;

  @override
  Future<void> executeRustInitializers() async {
    await api.crateApiInitInit();
    await api.crateApiLogInit();
  }

  @override
  ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig =>
      kDefaultExternalLibraryLoaderConfig;

  @override
  String get codegenVersion => '2.8.0';

  @override
  int get rustContentHash => 1258401814;

  static const kDefaultExternalLibraryLoaderConfig =
      ExternalLibraryLoaderConfig(
    stem: 'rust_lib_app_rhyme',
    ioDirectory: 'rust/target/release/',
    webPrefix: 'pkg/',
  );
}

abstract class RustLibApi extends BaseApi {
  Future<void> crateApiMusicApiWrapperMusicDataJsonWrapperApplyToDb(
      {required MusicDataJsonWrapper that,
      PlatformInt64? playlistId,
      PlatformInt64? playlistCollectionId});

  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromDatabase();

  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromJson(
          {required String json});

  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromMusicAggregators(
          {required List<MusicAggregator> musicAggregators});

  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromPlaylists(
          {required List<Playlist> playlists});

  Future<MusicDataType> crateApiMusicApiWrapperMusicDataJsonWrapperGetType(
      {required MusicDataJsonWrapper that});

  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperLoadFrom(
          {required String path});

  Future<void> crateApiMusicApiWrapperMusicDataJsonWrapperSaveTo(
      {required MusicDataJsonWrapper that, required String path});

  Future<String> crateApiMusicApiWrapperMusicDataJsonWrapperToJson(
      {required MusicDataJsonWrapper that});

  Future<String> crateApiCacheFileCacheCacheFileFromContent(
      {required String documentFolder,
      required String content,
      required String cacheFolder,
      required String filename,
      String? customCacheRoot});

  Future<String> crateApiCacheFileCacheCacheFileFromUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot});

  Future<void> crateApiCacheMusicCacheCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists,
      required PlayInfo playinfo,
      String? lyric});

  Future<Release?> crateApiTypesVersionCheckUpdate(
      {required String currentVersion});

  Future<void> crateApiMusicApiFnsClearDb();

  Future<void> crateApiMusicApiFnsCloseDb();

  Future<Config> crateApiTypesConfigConfigDefault();

  String crateApiTypesConfigConfigGetSqlUrl(
      {required Config that, required String documentFolder});

  String crateApiTypesConfigConfigGetStorageFolder(
      {required Config that, required String documentFolder});

  Future<Config> crateApiTypesConfigConfigLoad(
      {required String documentFolder});

  Future<void> crateApiTypesConfigConfigSave(
      {required Config that, required String documentFolder});

  Future<void> crateApiCacheCacheUtilDeleteCacheData(
      {required String documentPath, String? customCacheRoot});

  Future<void> crateApiCacheFileCacheDeleteCacheFileWithUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot});

  Future<void> crateApiCacheMusicCacheDeleteMusicCache(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists});

  Future<ExternalApiConfig?>
      crateApiTypesExternalApiExternalApiConfigFetchUpdate(
          {required ExternalApiConfig that});

  Future<ExternalApiConfig> crateApiTypesExternalApiExternalApiConfigFromPath(
      {required String path,
      required String documentFolder,
      String? customCacheRoot});

  Future<ExternalApiConfig> crateApiTypesExternalApiExternalApiConfigFromUrl(
      {required String url,
      required String documentFolder,
      String? customCacheRoot});

  Future<String> crateApiCacheFileCacheGenHash({required String str});

  Future<String> crateApiUtilsPathUtilGetApprhymeDir(
      {required String documentDir});

  String? crateApiCacheFileCacheGetCacheFileFromUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot});

  Future<(PlayInfo?, String?)> crateApiCacheMusicCacheGetCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists});

  Future<String> crateApiUtilsPathUtilGetLogDir({required String documentDir});

  Future<Release> crateApiTypesVersionGetRelease();

  Future<bool> crateApiCacheMusicCacheHasCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists});

  Future<void> crateApiInitInit();

  Future<void> crateApiLogInit();

  Future<Config> crateApiInitInitBackend({required String documentFolder});

  Future<void> crateApiLogLoggerDebug(
      {required Logger that, required String message});

  Future<void> crateApiLogLoggerError(
      {required Logger that, required String message});

  Future<void> crateApiLogLoggerInfo(
      {required Logger that, required String message});

  Future<Logger> crateApiLogLoggerNew(
      {required String logDir,
      required LogLevel maxLevel,
      required BigInt maxLogSize,
      required BigInt maxLogFiles});

  Future<void> crateApiLogLoggerWarn(
      {required Logger that, required String message});

  Future<void> crateApiCacheCacheUtilMoveCacheData(
      {required String documentPath,
      String? oldCustomCacheRoot,
      required String newCustomCacheRoot});

  Future<void> crateApiMusicApiMirrorMusicAggregatorChangeDefaultServerInDb(
      {required MusicAggregator that, required MusicServer server});

  Future<void> crateApiMusicApiMirrorMusicAggregatorClearUnused();

  Future<void> crateApiMusicApiMirrorMusicAggregatorDelFromDb(
      {required MusicAggregator that});

  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorMusicAggregatorFetchArtistMusicAggregators(
          {required MusicServer server,
          required String artistId,
          required int page,
          required int limit});

  Future<MusicAggregator>
      crateApiMusicApiMirrorMusicAggregatorFetchServerOnline(
          {required MusicAggregator that, required List<MusicServer> servers});

  Future<MusicAggregator> crateApiMusicApiMirrorMusicAggregatorFromMusic(
      {required Music music});

  String crateApiMusicApiMirrorMusicAggregatorIdentity(
      {required MusicAggregator that});

  Future<void> crateApiMusicApiMirrorMusicAggregatorSaveToDb(
      {required MusicAggregator that});

  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorMusicAggregatorSearchOnline(
          {required List<MusicAggregator> aggs,
          required List<MusicServer> servers,
          required String content,
          required int page,
          required int size});

  Future<void> crateApiMusicApiMirrorMusicAggregatorUpdateOrderToDb(
      {required MusicAggregator that, required PlatformInt64 playlistId});

  Future<(Playlist?, List<MusicAggregator>)>
      crateApiMusicApiMirrorMusicGetAlbum(
          {required Music that, required int page, required int limit});

  String? crateApiMusicApiMirrorMusicGetCover(
      {required Music that, required int size});

  Future<String> crateApiMusicApiMirrorMusicGetLyric({required Music that});

  Future<void> crateApiMusicApiMirrorMusicInsertToDb({required Music that});

  Future<List<Music>> crateApiMusicApiMirrorMusicSearchOnline(
      {required List<MusicServer> servers,
      required String content,
      required int page,
      required int size});

  List<MusicServer> crateApiMusicApiMirrorMusicServerAll();

  BigInt crateApiMusicApiMirrorMusicServerLength();

  String crateApiMusicApiMirrorMusicServerToString({required MusicServer that});

  Future<String> crateApiMusicApiPluginFnMusicToJson(
      {required Music music, required Quality quality});

  Future<Music> crateApiMusicApiMirrorMusicUpdateToDb({required Music that});

  Future<void> crateApiMusicApiMirrorPlaylistAddAggsToDb(
      {required Playlist that, required List<MusicAggregator> musicAggs});

  Future<void> crateApiMusicApiMirrorPlaylistCollectionDeleteFromDb(
      {required PlaylistCollection that});

  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionFindInDb(
      {required PlatformInt64 id});

  Future<List<PlaylistCollection>>
      crateApiMusicApiMirrorPlaylistCollectionGetFormDb();

  Future<List<Playlist>>
      crateApiMusicApiMirrorPlaylistCollectionGetPlaylistsFromDb(
          {required PlaylistCollection that});

  Future<PlatformInt64> crateApiMusicApiMirrorPlaylistCollectionInsertToDb(
      {required PlaylistCollection that});

  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionNew(
      {required String name});

  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionUpdateToDb(
      {required PlaylistCollection that});

  Future<void> crateApiMusicApiMirrorPlaylistDelFromDb(
      {required Playlist that});

  Future<void> crateApiMusicApiMirrorPlaylistDelMusicAgg(
      {required Playlist that, required String musicAggIdentity});

  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistFetchArtistAlbums(
      {required MusicServer server,
      required String artistId,
      required int page,
      required int limit});

  Future<List<MusicAggregator>> crateApiMusicApiMirrorPlaylistFetchMusicsOnline(
      {required Playlist that, required int page, required int limit});

  Future<Playlist?> crateApiMusicApiMirrorPlaylistFindInDb(
      {required PlatformInt64 id});

  String? crateApiMusicApiMirrorPlaylistGetCover(
      {required Playlist that, required int size});

  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistGetFromDb();

  Future<Playlist> crateApiMusicApiMirrorPlaylistGetFromShare(
      {required String share});

  Future<List<MusicAggregator>> crateApiMusicApiMirrorPlaylistGetMusicsFromDb(
      {required Playlist that});

  Future<PlatformInt64> crateApiMusicApiMirrorPlaylistInsertToDb(
      {required Playlist that, required PlatformInt64 collectionId});

  Future<Playlist> crateApiMusicApiMirrorPlaylistNew(
      {required String name,
      String? summary,
      String? cover,
      required List<PlayListSubscription> subscriptions});

  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistSearchOnline(
      {required List<MusicServer> servers,
      required String content,
      required int page,
      required int size});

  Future<PlaylistUpdateSubscriptionResult>
      crateApiMusicApiMirrorPlaylistUpdateSubscription(
          {required Playlist that});

  Future<Playlist> crateApiMusicApiMirrorPlaylistUpdateToDb(
      {required Playlist that});

  Future<QualityConfig> crateApiTypesConfigQualityConfigDefault();

  Future<String> crateApiUtilsCryptoRc4DecryptFromBase64(
      {required String key, required String input});

  Future<String> crateApiUtilsCryptoRc4EncryptToBase64(
      {required String key, required String input});

  Future<void> crateApiMusicApiFnsReinitDb();

  Future<void> crateApiLogSaveLog(
      {required String documentDir, required String outputDir});

  Future<String> crateApiUtilsHttpHelperSendRequest(
      {required String method,
      required Map<String, String> headers,
      required String url,
      required String payload});

  Future<List<ServerMusicChartCollection>>
      crateApiMusicApiMirrorServerMusicChartCollectionGetMusicChartCollection();

  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorServerMusicChartCollectionGetMusicsFromChart(
          {required MusicServer server,
          required String id,
          required int page,
          required int limit});

  Future<List<ServerPlaylistTagCollection>>
      crateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistTags();

  Future<List<Playlist>>
      crateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistsFromTag(
          {required MusicServer server,
          required String tagId,
          required TagPlaylistOrder order,
          required int page,
          required int limit});

  Future<void> crateApiMusicApiFnsSetDb({required String databaseUrl});

  Future<StorageConfig> crateApiTypesConfigStorageConfigDefault();

  Future<UpdateConfig> crateApiTypesConfigUpdateConfigDefault();

  Future<String> crateApiUtilsPathUtilUrlEncodeSpecialChars(
      {required String input});

  Future<void> crateApiUtilsDatabaseVerifySqliteUrl(
      {required String sqliteUrl});

  WindowConfig crateApiTypesConfigWindowConfigDefault();

  RustArcIncrementStrongCountFnType
      get rust_arc_increment_strong_count_MusicDataJsonWrapper;

  RustArcDecrementStrongCountFnType
      get rust_arc_decrement_strong_count_MusicDataJsonWrapper;

  CrossPlatformFinalizerArg
      get rust_arc_decrement_strong_count_MusicDataJsonWrapperPtr;
}

class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi {
  RustLibApiImpl({
    required super.handler,
    required super.wire,
    required super.generalizedFrbRustBinding,
    required super.portManager,
  });

  @override
  Future<void> crateApiMusicApiWrapperMusicDataJsonWrapperApplyToDb(
      {required MusicDataJsonWrapper that,
      PlatformInt64? playlistId,
      PlatformInt64? playlistCollectionId}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
            that, serializer);
        sse_encode_opt_box_autoadd_i_64(playlistId, serializer);
        sse_encode_opt_box_autoadd_i_64(playlistCollectionId, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 1, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperApplyToDbConstMeta,
      argValues: [that, playlistId, playlistCollectionId],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperApplyToDbConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_apply_to_db",
            argNames: ["that", "playlistId", "playlistCollectionId"],
          );

  @override
  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromDatabase() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 2, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiWrapperMusicDataJsonWrapperFromDatabaseConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperFromDatabaseConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_from_database",
            argNames: [],
          );

  @override
  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromJson(
          {required String json}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(json, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 3, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperFromJsonConstMeta,
      argValues: [json],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperFromJsonConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_from_json",
            argNames: ["json"],
          );

  @override
  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromMusicAggregators(
          {required List<MusicAggregator> musicAggregators}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_list_music_aggregator(musicAggregators, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 4, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiWrapperMusicDataJsonWrapperFromMusicAggregatorsConstMeta,
      argValues: [musicAggregators],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperFromMusicAggregatorsConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_from_music_aggregators",
            argNames: ["musicAggregators"],
          );

  @override
  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperFromPlaylists(
          {required List<Playlist> playlists}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_list_playlist(playlists, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 5, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiWrapperMusicDataJsonWrapperFromPlaylistsConstMeta,
      argValues: [playlists],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperFromPlaylistsConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_from_playlists",
            argNames: ["playlists"],
          );

  @override
  Future<MusicDataType> crateApiMusicApiWrapperMusicDataJsonWrapperGetType(
      {required MusicDataJsonWrapper that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
            that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 6, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_music_data_type,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperGetTypeConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperGetTypeConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_get_type",
            argNames: ["that"],
          );

  @override
  Future<MusicDataJsonWrapper>
      crateApiMusicApiWrapperMusicDataJsonWrapperLoadFrom(
          {required String path}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(path, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 7, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperLoadFromConstMeta,
      argValues: [path],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperLoadFromConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_load_from",
            argNames: ["path"],
          );

  @override
  Future<void> crateApiMusicApiWrapperMusicDataJsonWrapperSaveTo(
      {required MusicDataJsonWrapper that, required String path}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
            that, serializer);
        sse_encode_String(path, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 8, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperSaveToConstMeta,
      argValues: [that, path],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperSaveToConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_save_to",
            argNames: ["that", "path"],
          );

  @override
  Future<String> crateApiMusicApiWrapperMusicDataJsonWrapperToJson(
      {required MusicDataJsonWrapper that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
            that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 9, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiWrapperMusicDataJsonWrapperToJsonConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiWrapperMusicDataJsonWrapperToJsonConstMeta =>
          const TaskConstMeta(
            debugName: "MusicDataJsonWrapper_to_json",
            argNames: ["that"],
          );

  @override
  Future<String> crateApiCacheFileCacheCacheFileFromContent(
      {required String documentFolder,
      required String content,
      required String cacheFolder,
      required String filename,
      String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_String(content, serializer);
        sse_encode_String(cacheFolder, serializer);
        sse_encode_String(filename, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 10, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheFileCacheCacheFileFromContentConstMeta,
      argValues: [
        documentFolder,
        content,
        cacheFolder,
        filename,
        customCacheRoot
      ],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheFileCacheCacheFileFromContentConstMeta =>
      const TaskConstMeta(
        debugName: "cache_file_from_content",
        argNames: [
          "documentFolder",
          "content",
          "cacheFolder",
          "filename",
          "customCacheRoot"
        ],
      );

  @override
  Future<String> crateApiCacheFileCacheCacheFileFromUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_String(uri, serializer);
        sse_encode_String(cacheFolder, serializer);
        sse_encode_opt_String(filename, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 11, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheFileCacheCacheFileFromUriConstMeta,
      argValues: [documentFolder, uri, cacheFolder, filename, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheFileCacheCacheFileFromUriConstMeta =>
      const TaskConstMeta(
        debugName: "cache_file_from_uri",
        argNames: [
          "documentFolder",
          "uri",
          "cacheFolder",
          "filename",
          "customCacheRoot"
        ],
      );

  @override
  Future<void> crateApiCacheMusicCacheCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists,
      required PlayInfo playinfo,
      String? lyric}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        sse_encode_String(name, serializer);
        sse_encode_String(artists, serializer);
        sse_encode_box_autoadd_play_info(playinfo, serializer);
        sse_encode_opt_String(lyric, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 12, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheMusicCacheCacheMusicConstMeta,
      argValues: [
        documentFolder,
        customCacheRoot,
        name,
        artists,
        playinfo,
        lyric
      ],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheMusicCacheCacheMusicConstMeta =>
      const TaskConstMeta(
        debugName: "cache_music",
        argNames: [
          "documentFolder",
          "customCacheRoot",
          "name",
          "artists",
          "playinfo",
          "lyric"
        ],
      );

  @override
  Future<Release?> crateApiTypesVersionCheckUpdate(
      {required String currentVersion}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(currentVersion, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 13, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_box_autoadd_release,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesVersionCheckUpdateConstMeta,
      argValues: [currentVersion],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesVersionCheckUpdateConstMeta =>
      const TaskConstMeta(
        debugName: "check_update",
        argNames: ["currentVersion"],
      );

  @override
  Future<void> crateApiMusicApiFnsClearDb() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 14, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiFnsClearDbConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiFnsClearDbConstMeta => const TaskConstMeta(
        debugName: "clear_db",
        argNames: [],
      );

  @override
  Future<void> crateApiMusicApiFnsCloseDb() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 15, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiFnsCloseDbConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiFnsCloseDbConstMeta => const TaskConstMeta(
        debugName: "close_db",
        argNames: [],
      );

  @override
  Future<Config> crateApiTypesConfigConfigDefault() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 16, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_config,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiTypesConfigConfigDefaultConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigConfigDefaultConstMeta =>
      const TaskConstMeta(
        debugName: "config_default",
        argNames: [],
      );

  @override
  String crateApiTypesConfigConfigGetSqlUrl(
      {required Config that, required String documentFolder}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_config(that, serializer);
        sse_encode_String(documentFolder, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 17)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesConfigConfigGetSqlUrlConstMeta,
      argValues: [that, documentFolder],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigConfigGetSqlUrlConstMeta =>
      const TaskConstMeta(
        debugName: "config_get_sql_url",
        argNames: ["that", "documentFolder"],
      );

  @override
  String crateApiTypesConfigConfigGetStorageFolder(
      {required Config that, required String documentFolder}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_config(that, serializer);
        sse_encode_String(documentFolder, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 18)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesConfigConfigGetStorageFolderConstMeta,
      argValues: [that, documentFolder],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigConfigGetStorageFolderConstMeta =>
      const TaskConstMeta(
        debugName: "config_get_storage_folder",
        argNames: ["that", "documentFolder"],
      );

  @override
  Future<Config> crateApiTypesConfigConfigLoad(
      {required String documentFolder}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 19, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_config,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesConfigConfigLoadConstMeta,
      argValues: [documentFolder],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigConfigLoadConstMeta =>
      const TaskConstMeta(
        debugName: "config_load",
        argNames: ["documentFolder"],
      );

  @override
  Future<void> crateApiTypesConfigConfigSave(
      {required Config that, required String documentFolder}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_config(that, serializer);
        sse_encode_String(documentFolder, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 20, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesConfigConfigSaveConstMeta,
      argValues: [that, documentFolder],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigConfigSaveConstMeta =>
      const TaskConstMeta(
        debugName: "config_save",
        argNames: ["that", "documentFolder"],
      );

  @override
  Future<void> crateApiCacheCacheUtilDeleteCacheData(
      {required String documentPath, String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentPath, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 21, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheCacheUtilDeleteCacheDataConstMeta,
      argValues: [documentPath, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheCacheUtilDeleteCacheDataConstMeta =>
      const TaskConstMeta(
        debugName: "delete_cache_data",
        argNames: ["documentPath", "customCacheRoot"],
      );

  @override
  Future<void> crateApiCacheFileCacheDeleteCacheFileWithUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_String(uri, serializer);
        sse_encode_String(cacheFolder, serializer);
        sse_encode_opt_String(filename, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 22, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheFileCacheDeleteCacheFileWithUriConstMeta,
      argValues: [documentFolder, uri, cacheFolder, filename, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheFileCacheDeleteCacheFileWithUriConstMeta =>
      const TaskConstMeta(
        debugName: "delete_cache_file_with_uri",
        argNames: [
          "documentFolder",
          "uri",
          "cacheFolder",
          "filename",
          "customCacheRoot"
        ],
      );

  @override
  Future<void> crateApiCacheMusicCacheDeleteMusicCache(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        sse_encode_String(name, serializer);
        sse_encode_String(artists, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 23, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheMusicCacheDeleteMusicCacheConstMeta,
      argValues: [documentFolder, customCacheRoot, name, artists],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheMusicCacheDeleteMusicCacheConstMeta =>
      const TaskConstMeta(
        debugName: "delete_music_cache",
        argNames: ["documentFolder", "customCacheRoot", "name", "artists"],
      );

  @override
  Future<ExternalApiConfig?>
      crateApiTypesExternalApiExternalApiConfigFetchUpdate(
          {required ExternalApiConfig that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_external_api_config(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 24, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_box_autoadd_external_api_config,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesExternalApiExternalApiConfigFetchUpdateConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiTypesExternalApiExternalApiConfigFetchUpdateConstMeta =>
          const TaskConstMeta(
            debugName: "external_api_config_fetch_update",
            argNames: ["that"],
          );

  @override
  Future<ExternalApiConfig> crateApiTypesExternalApiExternalApiConfigFromPath(
      {required String path,
      required String documentFolder,
      String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(path, serializer);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 25, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_external_api_config,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesExternalApiExternalApiConfigFromPathConstMeta,
      argValues: [path, documentFolder, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiTypesExternalApiExternalApiConfigFromPathConstMeta =>
          const TaskConstMeta(
            debugName: "external_api_config_from_path",
            argNames: ["path", "documentFolder", "customCacheRoot"],
          );

  @override
  Future<ExternalApiConfig> crateApiTypesExternalApiExternalApiConfigFromUrl(
      {required String url,
      required String documentFolder,
      String? customCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(url, serializer);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 26, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_external_api_config,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesExternalApiExternalApiConfigFromUrlConstMeta,
      argValues: [url, documentFolder, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiTypesExternalApiExternalApiConfigFromUrlConstMeta =>
          const TaskConstMeta(
            debugName: "external_api_config_from_url",
            argNames: ["url", "documentFolder", "customCacheRoot"],
          );

  @override
  Future<String> crateApiCacheFileCacheGenHash({required String str}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(str, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 27, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiCacheFileCacheGenHashConstMeta,
      argValues: [str],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheFileCacheGenHashConstMeta =>
      const TaskConstMeta(
        debugName: "gen_hash",
        argNames: ["str"],
      );

  @override
  Future<String> crateApiUtilsPathUtilGetApprhymeDir(
      {required String documentDir}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentDir, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 28, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiUtilsPathUtilGetApprhymeDirConstMeta,
      argValues: [documentDir],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsPathUtilGetApprhymeDirConstMeta =>
      const TaskConstMeta(
        debugName: "get_apprhyme_dir",
        argNames: ["documentDir"],
      );

  @override
  String? crateApiCacheFileCacheGetCacheFileFromUri(
      {required String documentFolder,
      required String uri,
      required String cacheFolder,
      String? filename,
      String? customCacheRoot}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_String(uri, serializer);
        sse_encode_String(cacheFolder, serializer);
        sse_encode_opt_String(filename, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 29)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiCacheFileCacheGetCacheFileFromUriConstMeta,
      argValues: [documentFolder, uri, cacheFolder, filename, customCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheFileCacheGetCacheFileFromUriConstMeta =>
      const TaskConstMeta(
        debugName: "get_cache_file_from_uri",
        argNames: [
          "documentFolder",
          "uri",
          "cacheFolder",
          "filename",
          "customCacheRoot"
        ],
      );

  @override
  Future<(PlayInfo?, String?)> crateApiCacheMusicCacheGetCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        sse_encode_String(name, serializer);
        sse_encode_String(artists, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 30, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_record_opt_box_autoadd_play_info_opt_string,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiCacheMusicCacheGetCacheMusicConstMeta,
      argValues: [documentFolder, customCacheRoot, name, artists],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheMusicCacheGetCacheMusicConstMeta =>
      const TaskConstMeta(
        debugName: "get_cache_music",
        argNames: ["documentFolder", "customCacheRoot", "name", "artists"],
      );

  @override
  Future<String> crateApiUtilsPathUtilGetLogDir({required String documentDir}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentDir, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 31, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiUtilsPathUtilGetLogDirConstMeta,
      argValues: [documentDir],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsPathUtilGetLogDirConstMeta =>
      const TaskConstMeta(
        debugName: "get_log_dir",
        argNames: ["documentDir"],
      );

  @override
  Future<Release> crateApiTypesVersionGetRelease() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 32, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_release,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiTypesVersionGetReleaseConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesVersionGetReleaseConstMeta =>
      const TaskConstMeta(
        debugName: "get_release",
        argNames: [],
      );

  @override
  Future<bool> crateApiCacheMusicCacheHasCacheMusic(
      {required String documentFolder,
      String? customCacheRoot,
      required String name,
      required String artists}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        sse_encode_opt_String(customCacheRoot, serializer);
        sse_encode_String(name, serializer);
        sse_encode_String(artists, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 33, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_bool,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiCacheMusicCacheHasCacheMusicConstMeta,
      argValues: [documentFolder, customCacheRoot, name, artists],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheMusicCacheHasCacheMusicConstMeta =>
      const TaskConstMeta(
        debugName: "has_cache_music",
        argNames: ["documentFolder", "customCacheRoot", "name", "artists"],
      );

  @override
  Future<void> crateApiInitInit() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 34, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiInitInitConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiInitInitConstMeta => const TaskConstMeta(
        debugName: "init",
        argNames: [],
      );

  @override
  Future<void> crateApiLogInit() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 35, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiLogInitConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogInitConstMeta => const TaskConstMeta(
        debugName: "init",
        argNames: [],
      );

  @override
  Future<Config> crateApiInitInitBackend({required String documentFolder}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentFolder, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 36, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_config,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiInitInitBackendConstMeta,
      argValues: [documentFolder],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiInitInitBackendConstMeta => const TaskConstMeta(
        debugName: "init_backend",
        argNames: ["documentFolder"],
      );

  @override
  Future<void> crateApiLogLoggerDebug(
      {required Logger that, required String message}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_logger(that, serializer);
        sse_encode_String(message, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 37, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiLogLoggerDebugConstMeta,
      argValues: [that, message],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogLoggerDebugConstMeta => const TaskConstMeta(
        debugName: "logger_debug",
        argNames: ["that", "message"],
      );

  @override
  Future<void> crateApiLogLoggerError(
      {required Logger that, required String message}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_logger(that, serializer);
        sse_encode_String(message, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 38, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiLogLoggerErrorConstMeta,
      argValues: [that, message],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogLoggerErrorConstMeta => const TaskConstMeta(
        debugName: "logger_error",
        argNames: ["that", "message"],
      );

  @override
  Future<void> crateApiLogLoggerInfo(
      {required Logger that, required String message}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_logger(that, serializer);
        sse_encode_String(message, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 39, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiLogLoggerInfoConstMeta,
      argValues: [that, message],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogLoggerInfoConstMeta => const TaskConstMeta(
        debugName: "logger_info",
        argNames: ["that", "message"],
      );

  @override
  Future<Logger> crateApiLogLoggerNew(
      {required String logDir,
      required LogLevel maxLevel,
      required BigInt maxLogSize,
      required BigInt maxLogFiles}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(logDir, serializer);
        sse_encode_log_level(maxLevel, serializer);
        sse_encode_u_64(maxLogSize, serializer);
        sse_encode_usize(maxLogFiles, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 40, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_logger,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiLogLoggerNewConstMeta,
      argValues: [logDir, maxLevel, maxLogSize, maxLogFiles],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogLoggerNewConstMeta => const TaskConstMeta(
        debugName: "logger_new",
        argNames: ["logDir", "maxLevel", "maxLogSize", "maxLogFiles"],
      );

  @override
  Future<void> crateApiLogLoggerWarn(
      {required Logger that, required String message}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_logger(that, serializer);
        sse_encode_String(message, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 41, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiLogLoggerWarnConstMeta,
      argValues: [that, message],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogLoggerWarnConstMeta => const TaskConstMeta(
        debugName: "logger_warn",
        argNames: ["that", "message"],
      );

  @override
  Future<void> crateApiCacheCacheUtilMoveCacheData(
      {required String documentPath,
      String? oldCustomCacheRoot,
      required String newCustomCacheRoot}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentPath, serializer);
        sse_encode_opt_String(oldCustomCacheRoot, serializer);
        sse_encode_String(newCustomCacheRoot, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 42, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiCacheCacheUtilMoveCacheDataConstMeta,
      argValues: [documentPath, oldCustomCacheRoot, newCustomCacheRoot],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiCacheCacheUtilMoveCacheDataConstMeta =>
      const TaskConstMeta(
        debugName: "move_cache_data",
        argNames: ["documentPath", "oldCustomCacheRoot", "newCustomCacheRoot"],
      );

  @override
  Future<void> crateApiMusicApiMirrorMusicAggregatorChangeDefaultServerInDb(
      {required MusicAggregator that, required MusicServer server}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        sse_encode_music_server(server, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 43, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorMusicAggregatorChangeDefaultServerInDbConstMeta,
      argValues: [that, server],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorChangeDefaultServerInDbConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_change_default_server_in_db",
            argNames: ["that", "server"],
          );

  @override
  Future<void> crateApiMusicApiMirrorMusicAggregatorClearUnused() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 44, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorClearUnusedConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorClearUnusedConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_clear_unused",
            argNames: [],
          );

  @override
  Future<void> crateApiMusicApiMirrorMusicAggregatorDelFromDb(
      {required MusicAggregator that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 45, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorDelFromDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicAggregatorDelFromDbConstMeta =>
      const TaskConstMeta(
        debugName: "music_aggregator_del_from_db",
        argNames: ["that"],
      );

  @override
  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorMusicAggregatorFetchArtistMusicAggregators(
          {required MusicServer server,
          required String artistId,
          required int page,
          required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_music_server(server, serializer);
        sse_encode_String(artistId, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 46, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorMusicAggregatorFetchArtistMusicAggregatorsConstMeta,
      argValues: [server, artistId, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorFetchArtistMusicAggregatorsConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_fetch_artist_music_aggregators",
            argNames: ["server", "artistId", "page", "limit"],
          );

  @override
  Future<MusicAggregator>
      crateApiMusicApiMirrorMusicAggregatorFetchServerOnline(
          {required MusicAggregator that, required List<MusicServer> servers}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        sse_encode_list_music_server(servers, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 47, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorMusicAggregatorFetchServerOnlineConstMeta,
      argValues: [that, servers],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorFetchServerOnlineConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_fetch_server_online",
            argNames: ["that", "servers"],
          );

  @override
  Future<MusicAggregator> crateApiMusicApiMirrorMusicAggregatorFromMusic(
      {required Music music}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(music, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 48, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_music_aggregator,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorFromMusicConstMeta,
      argValues: [music],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicAggregatorFromMusicConstMeta =>
      const TaskConstMeta(
        debugName: "music_aggregator_from_music",
        argNames: ["music"],
      );

  @override
  String crateApiMusicApiMirrorMusicAggregatorIdentity(
      {required MusicAggregator that}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 49)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorIdentityConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicAggregatorIdentityConstMeta =>
      const TaskConstMeta(
        debugName: "music_aggregator_identity",
        argNames: ["that"],
      );

  @override
  Future<void> crateApiMusicApiMirrorMusicAggregatorSaveToDb(
      {required MusicAggregator that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 50, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorSaveToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicAggregatorSaveToDbConstMeta =>
      const TaskConstMeta(
        debugName: "music_aggregator_save_to_db",
        argNames: ["that"],
      );

  @override
  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorMusicAggregatorSearchOnline(
          {required List<MusicAggregator> aggs,
          required List<MusicServer> servers,
          required String content,
          required int page,
          required int size}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_list_music_aggregator(aggs, serializer);
        sse_encode_list_music_server(servers, serializer);
        sse_encode_String(content, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(size, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 51, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorSearchOnlineConstMeta,
      argValues: [aggs, servers, content, page, size],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorSearchOnlineConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_search_online",
            argNames: ["aggs", "servers", "content", "page", "size"],
          );

  @override
  Future<void> crateApiMusicApiMirrorMusicAggregatorUpdateOrderToDb(
      {required MusicAggregator that, required PlatformInt64 playlistId}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music_aggregator(that, serializer);
        sse_encode_i_64(playlistId, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 52, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicAggregatorUpdateOrderToDbConstMeta,
      argValues: [that, playlistId],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorMusicAggregatorUpdateOrderToDbConstMeta =>
          const TaskConstMeta(
            debugName: "music_aggregator_update_order_to_db",
            argNames: ["that", "playlistId"],
          );

  @override
  Future<(Playlist?, List<MusicAggregator>)>
      crateApiMusicApiMirrorMusicGetAlbum(
          {required Music that, required int page, required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(that, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 53, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData:
            sse_decode_record_opt_box_autoadd_playlist_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicGetAlbumConstMeta,
      argValues: [that, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicGetAlbumConstMeta =>
      const TaskConstMeta(
        debugName: "music_get_album",
        argNames: ["that", "page", "limit"],
      );

  @override
  String? crateApiMusicApiMirrorMusicGetCover(
      {required Music that, required int size}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(that, serializer);
        sse_encode_u_16(size, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 54)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicGetCoverConstMeta,
      argValues: [that, size],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicGetCoverConstMeta =>
      const TaskConstMeta(
        debugName: "music_get_cover",
        argNames: ["that", "size"],
      );

  @override
  Future<String> crateApiMusicApiMirrorMusicGetLyric({required Music that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 55, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicGetLyricConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicGetLyricConstMeta =>
      const TaskConstMeta(
        debugName: "music_get_lyric",
        argNames: ["that"],
      );

  @override
  Future<void> crateApiMusicApiMirrorMusicInsertToDb({required Music that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 56, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicInsertToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicInsertToDbConstMeta =>
      const TaskConstMeta(
        debugName: "music_insert_to_db",
        argNames: ["that"],
      );

  @override
  Future<List<Music>> crateApiMusicApiMirrorMusicSearchOnline(
      {required List<MusicServer> servers,
      required String content,
      required int page,
      required int size}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_list_music_server(servers, serializer);
        sse_encode_String(content, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(size, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 57, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicSearchOnlineConstMeta,
      argValues: [servers, content, page, size],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicSearchOnlineConstMeta =>
      const TaskConstMeta(
        debugName: "music_search_online",
        argNames: ["servers", "content", "page", "size"],
      );

  @override
  List<MusicServer> crateApiMusicApiMirrorMusicServerAll() {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 58)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_server,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicServerAllConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicServerAllConstMeta =>
      const TaskConstMeta(
        debugName: "music_server_all",
        argNames: [],
      );

  @override
  BigInt crateApiMusicApiMirrorMusicServerLength() {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 59)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_usize,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicServerLengthConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicServerLengthConstMeta =>
      const TaskConstMeta(
        debugName: "music_server_length",
        argNames: [],
      );

  @override
  String crateApiMusicApiMirrorMusicServerToString(
      {required MusicServer that}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_music_server(that, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 60)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicServerToStringConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicServerToStringConstMeta =>
      const TaskConstMeta(
        debugName: "music_server_to_string",
        argNames: ["that"],
      );

  @override
  Future<String> crateApiMusicApiPluginFnMusicToJson(
      {required Music music, required Quality quality}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(music, serializer);
        sse_encode_box_autoadd_quality(quality, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 61, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiPluginFnMusicToJsonConstMeta,
      argValues: [music, quality],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiPluginFnMusicToJsonConstMeta =>
      const TaskConstMeta(
        debugName: "music_to_json",
        argNames: ["music", "quality"],
      );

  @override
  Future<Music> crateApiMusicApiMirrorMusicUpdateToDb({required Music that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_music(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 62, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_music,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorMusicUpdateToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorMusicUpdateToDbConstMeta =>
      const TaskConstMeta(
        debugName: "music_update_to_db",
        argNames: ["that"],
      );

  @override
  Future<void> crateApiMusicApiMirrorPlaylistAddAggsToDb(
      {required Playlist that, required List<MusicAggregator> musicAggs}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        sse_encode_list_music_aggregator(musicAggs, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 63, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistAddAggsToDbConstMeta,
      argValues: [that, musicAggs],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistAddAggsToDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_add_aggs_to_db",
        argNames: ["that", "musicAggs"],
      );

  @override
  Future<void> crateApiMusicApiMirrorPlaylistCollectionDeleteFromDb(
      {required PlaylistCollection that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist_collection(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 64, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionDeleteFromDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionDeleteFromDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_delete_from_db",
            argNames: ["that"],
          );

  @override
  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionFindInDb(
      {required PlatformInt64 id}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_i_64(id, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 65, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist_collection,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionFindInDbConstMeta,
      argValues: [id],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionFindInDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_find_in_db",
            argNames: ["id"],
          );

  @override
  Future<List<PlaylistCollection>>
      crateApiMusicApiMirrorPlaylistCollectionGetFormDb() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 66, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist_collection,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionGetFormDbConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionGetFormDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_get_form_db",
            argNames: [],
          );

  @override
  Future<List<Playlist>>
      crateApiMusicApiMirrorPlaylistCollectionGetPlaylistsFromDb(
          {required PlaylistCollection that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist_collection(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 67, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorPlaylistCollectionGetPlaylistsFromDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionGetPlaylistsFromDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_get_playlists_from_db",
            argNames: ["that"],
          );

  @override
  Future<PlatformInt64> crateApiMusicApiMirrorPlaylistCollectionInsertToDb(
      {required PlaylistCollection that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist_collection(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 68, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_i_64,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionInsertToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionInsertToDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_insert_to_db",
            argNames: ["that"],
          );

  @override
  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionNew(
      {required String name}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(name, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 69, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist_collection,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionNewConstMeta,
      argValues: [name],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistCollectionNewConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_collection_new",
        argNames: ["name"],
      );

  @override
  Future<PlaylistCollection> crateApiMusicApiMirrorPlaylistCollectionUpdateToDb(
      {required PlaylistCollection that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist_collection(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 70, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist_collection,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistCollectionUpdateToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistCollectionUpdateToDbConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_collection_update_to_db",
            argNames: ["that"],
          );

  @override
  Future<void> crateApiMusicApiMirrorPlaylistDelFromDb(
      {required Playlist that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 71, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistDelFromDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistDelFromDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_del_from_db",
        argNames: ["that"],
      );

  @override
  Future<void> crateApiMusicApiMirrorPlaylistDelMusicAgg(
      {required Playlist that, required String musicAggIdentity}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        sse_encode_String(musicAggIdentity, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 72, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistDelMusicAggConstMeta,
      argValues: [that, musicAggIdentity],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistDelMusicAggConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_del_music_agg",
        argNames: ["that", "musicAggIdentity"],
      );

  @override
  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistFetchArtistAlbums(
      {required MusicServer server,
      required String artistId,
      required int page,
      required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_music_server(server, serializer);
        sse_encode_String(artistId, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 73, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistFetchArtistAlbumsConstMeta,
      argValues: [server, artistId, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistFetchArtistAlbumsConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_fetch_artist_albums",
        argNames: ["server", "artistId", "page", "limit"],
      );

  @override
  Future<List<MusicAggregator>> crateApiMusicApiMirrorPlaylistFetchMusicsOnline(
      {required Playlist that, required int page, required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 74, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistFetchMusicsOnlineConstMeta,
      argValues: [that, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistFetchMusicsOnlineConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_fetch_musics_online",
        argNames: ["that", "page", "limit"],
      );

  @override
  Future<Playlist?> crateApiMusicApiMirrorPlaylistFindInDb(
      {required PlatformInt64 id}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_i_64(id, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 75, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_box_autoadd_playlist,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistFindInDbConstMeta,
      argValues: [id],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistFindInDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_find_in_db",
        argNames: ["id"],
      );

  @override
  String? crateApiMusicApiMirrorPlaylistGetCover(
      {required Playlist that, required int size}) {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        sse_encode_u_16(size, serializer);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 76)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_opt_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistGetCoverConstMeta,
      argValues: [that, size],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistGetCoverConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_get_cover",
        argNames: ["that", "size"],
      );

  @override
  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistGetFromDb() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 77, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistGetFromDbConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistGetFromDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_get_from_db",
        argNames: [],
      );

  @override
  Future<Playlist> crateApiMusicApiMirrorPlaylistGetFromShare(
      {required String share}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(share, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 78, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistGetFromShareConstMeta,
      argValues: [share],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistGetFromShareConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_get_from_share",
        argNames: ["share"],
      );

  @override
  Future<List<MusicAggregator>> crateApiMusicApiMirrorPlaylistGetMusicsFromDb(
      {required Playlist that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 79, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistGetMusicsFromDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistGetMusicsFromDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_get_musics_from_db",
        argNames: ["that"],
      );

  @override
  Future<PlatformInt64> crateApiMusicApiMirrorPlaylistInsertToDb(
      {required Playlist that, required PlatformInt64 collectionId}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        sse_encode_i_64(collectionId, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 80, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_i_64,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistInsertToDbConstMeta,
      argValues: [that, collectionId],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistInsertToDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_insert_to_db",
        argNames: ["that", "collectionId"],
      );

  @override
  Future<Playlist> crateApiMusicApiMirrorPlaylistNew(
      {required String name,
      String? summary,
      String? cover,
      required List<PlayListSubscription> subscriptions}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(name, serializer);
        sse_encode_opt_String(summary, serializer);
        sse_encode_opt_String(cover, serializer);
        sse_encode_list_play_list_subscription(subscriptions, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 81, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistNewConstMeta,
      argValues: [name, summary, cover, subscriptions],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistNewConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_new",
        argNames: ["name", "summary", "cover", "subscriptions"],
      );

  @override
  Future<List<Playlist>> crateApiMusicApiMirrorPlaylistSearchOnline(
      {required List<MusicServer> servers,
      required String content,
      required int page,
      required int size}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_list_music_server(servers, serializer);
        sse_encode_String(content, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(size, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 82, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistSearchOnlineConstMeta,
      argValues: [servers, content, page, size],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistSearchOnlineConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_search_online",
        argNames: ["servers", "content", "page", "size"],
      );

  @override
  Future<PlaylistUpdateSubscriptionResult>
      crateApiMusicApiMirrorPlaylistUpdateSubscription(
          {required Playlist that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 83, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist_update_subscription_result,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistUpdateSubscriptionConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorPlaylistUpdateSubscriptionConstMeta =>
          const TaskConstMeta(
            debugName: "playlist_update_subscription",
            argNames: ["that"],
          );

  @override
  Future<Playlist> crateApiMusicApiMirrorPlaylistUpdateToDb(
      {required Playlist that}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_box_autoadd_playlist(that, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 84, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiMirrorPlaylistUpdateToDbConstMeta,
      argValues: [that],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiMirrorPlaylistUpdateToDbConstMeta =>
      const TaskConstMeta(
        debugName: "playlist_update_to_db",
        argNames: ["that"],
      );

  @override
  Future<QualityConfig> crateApiTypesConfigQualityConfigDefault() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 85, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_quality_config,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiTypesConfigQualityConfigDefaultConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigQualityConfigDefaultConstMeta =>
      const TaskConstMeta(
        debugName: "quality_config_default",
        argNames: [],
      );

  @override
  Future<String> crateApiUtilsCryptoRc4DecryptFromBase64(
      {required String key, required String input}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(key, serializer);
        sse_encode_String(input, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 86, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiUtilsCryptoRc4DecryptFromBase64ConstMeta,
      argValues: [key, input],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsCryptoRc4DecryptFromBase64ConstMeta =>
      const TaskConstMeta(
        debugName: "rc4_decrypt_from_base64",
        argNames: ["key", "input"],
      );

  @override
  Future<String> crateApiUtilsCryptoRc4EncryptToBase64(
      {required String key, required String input}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(key, serializer);
        sse_encode_String(input, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 87, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiUtilsCryptoRc4EncryptToBase64ConstMeta,
      argValues: [key, input],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsCryptoRc4EncryptToBase64ConstMeta =>
      const TaskConstMeta(
        debugName: "rc4_encrypt_to_base64",
        argNames: ["key", "input"],
      );

  @override
  Future<void> crateApiMusicApiFnsReinitDb() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 88, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiFnsReinitDbConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiFnsReinitDbConstMeta =>
      const TaskConstMeta(
        debugName: "reinit_db",
        argNames: [],
      );

  @override
  Future<void> crateApiLogSaveLog(
      {required String documentDir, required String outputDir}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(documentDir, serializer);
        sse_encode_String(outputDir, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 89, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiLogSaveLogConstMeta,
      argValues: [documentDir, outputDir],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiLogSaveLogConstMeta => const TaskConstMeta(
        debugName: "save_log",
        argNames: ["documentDir", "outputDir"],
      );

  @override
  Future<String> crateApiUtilsHttpHelperSendRequest(
      {required String method,
      required Map<String, String> headers,
      required String url,
      required String payload}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(method, serializer);
        sse_encode_Map_String_String(headers, serializer);
        sse_encode_String(url, serializer);
        sse_encode_String(payload, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 90, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiUtilsHttpHelperSendRequestConstMeta,
      argValues: [method, headers, url, payload],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsHttpHelperSendRequestConstMeta =>
      const TaskConstMeta(
        debugName: "send_request",
        argNames: ["method", "headers", "url", "payload"],
      );

  @override
  Future<List<ServerMusicChartCollection>>
      crateApiMusicApiMirrorServerMusicChartCollectionGetMusicChartCollection() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 91, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_server_music_chart_collection,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorServerMusicChartCollectionGetMusicChartCollectionConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorServerMusicChartCollectionGetMusicChartCollectionConstMeta =>
          const TaskConstMeta(
            debugName:
                "server_music_chart_collection_get_music_chart_collection",
            argNames: [],
          );

  @override
  Future<List<MusicAggregator>>
      crateApiMusicApiMirrorServerMusicChartCollectionGetMusicsFromChart(
          {required MusicServer server,
          required String id,
          required int page,
          required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_music_server(server, serializer);
        sse_encode_String(id, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 92, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_music_aggregator,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorServerMusicChartCollectionGetMusicsFromChartConstMeta,
      argValues: [server, id, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorServerMusicChartCollectionGetMusicsFromChartConstMeta =>
          const TaskConstMeta(
            debugName: "server_music_chart_collection_get_musics_from_chart",
            argNames: ["server", "id", "page", "limit"],
          );

  @override
  Future<List<ServerPlaylistTagCollection>>
      crateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistTags() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 93, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_server_playlist_tag_collection,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistTagsConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistTagsConstMeta =>
          const TaskConstMeta(
            debugName: "server_playlist_tag_collection_get_playlist_tags",
            argNames: [],
          );

  @override
  Future<List<Playlist>>
      crateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistsFromTag(
          {required MusicServer server,
          required String tagId,
          required TagPlaylistOrder order,
          required int page,
          required int limit}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_music_server(server, serializer);
        sse_encode_String(tagId, serializer);
        sse_encode_tag_playlist_order(order, serializer);
        sse_encode_u_16(page, serializer);
        sse_encode_u_16(limit, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 94, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_list_playlist,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta:
          kCrateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistsFromTagConstMeta,
      argValues: [server, tagId, order, page, limit],
      apiImpl: this,
    ));
  }

  TaskConstMeta
      get kCrateApiMusicApiMirrorServerPlaylistTagCollectionGetPlaylistsFromTagConstMeta =>
          const TaskConstMeta(
            debugName: "server_playlist_tag_collection_get_playlists_from_tag",
            argNames: ["server", "tagId", "order", "page", "limit"],
          );

  @override
  Future<void> crateApiMusicApiFnsSetDb({required String databaseUrl}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(databaseUrl, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 95, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiMusicApiFnsSetDbConstMeta,
      argValues: [databaseUrl],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiMusicApiFnsSetDbConstMeta => const TaskConstMeta(
        debugName: "set_db",
        argNames: ["databaseUrl"],
      );

  @override
  Future<StorageConfig> crateApiTypesConfigStorageConfigDefault() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 96, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_storage_config,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiTypesConfigStorageConfigDefaultConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigStorageConfigDefaultConstMeta =>
      const TaskConstMeta(
        debugName: "storage_config_default",
        argNames: [],
      );

  @override
  Future<UpdateConfig> crateApiTypesConfigUpdateConfigDefault() {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 97, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_update_config,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiTypesConfigUpdateConfigDefaultConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigUpdateConfigDefaultConstMeta =>
      const TaskConstMeta(
        debugName: "update_config_default",
        argNames: [],
      );

  @override
  Future<String> crateApiUtilsPathUtilUrlEncodeSpecialChars(
      {required String input}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(input, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 98, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_String,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiUtilsPathUtilUrlEncodeSpecialCharsConstMeta,
      argValues: [input],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsPathUtilUrlEncodeSpecialCharsConstMeta =>
      const TaskConstMeta(
        debugName: "url_encode_special_chars",
        argNames: ["input"],
      );

  @override
  Future<void> crateApiUtilsDatabaseVerifySqliteUrl(
      {required String sqliteUrl}) {
    return handler.executeNormal(NormalTask(
      callFfi: (port_) {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        sse_encode_String(sqliteUrl, serializer);
        pdeCallFfi(generalizedFrbRustBinding, serializer,
            funcId: 99, port: port_);
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_unit,
        decodeErrorData: sse_decode_AnyhowException,
      ),
      constMeta: kCrateApiUtilsDatabaseVerifySqliteUrlConstMeta,
      argValues: [sqliteUrl],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiUtilsDatabaseVerifySqliteUrlConstMeta =>
      const TaskConstMeta(
        debugName: "verify_sqlite_url",
        argNames: ["sqliteUrl"],
      );

  @override
  WindowConfig crateApiTypesConfigWindowConfigDefault() {
    return handler.executeSync(SyncTask(
      callFfi: () {
        final serializer = SseSerializer(generalizedFrbRustBinding);
        return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 100)!;
      },
      codec: SseCodec(
        decodeSuccessData: sse_decode_window_config,
        decodeErrorData: null,
      ),
      constMeta: kCrateApiTypesConfigWindowConfigDefaultConstMeta,
      argValues: [],
      apiImpl: this,
    ));
  }

  TaskConstMeta get kCrateApiTypesConfigWindowConfigDefaultConstMeta =>
      const TaskConstMeta(
        debugName: "window_config_default",
        argNames: [],
      );

  RustArcIncrementStrongCountFnType
      get rust_arc_increment_strong_count_MusicDataJsonWrapper => wire
          .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper;

  RustArcDecrementStrongCountFnType
      get rust_arc_decrement_strong_count_MusicDataJsonWrapper => wire
          .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper;

  @protected
  AnyhowException dco_decode_AnyhowException(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return AnyhowException(raw as String);
  }

  @protected
  MusicDataJsonWrapper
      dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalDcoDecode(raw as List<dynamic>);
  }

  @protected
  MusicDataJsonWrapper
      dco_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalDcoDecode(raw as List<dynamic>);
  }

  @protected
  Map<String, String> dco_decode_Map_String_String(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return Map.fromEntries(dco_decode_list_record_string_string(raw)
        .map((e) => MapEntry(e.$1, e.$2)));
  }

  @protected
  MusicDataJsonWrapper
      dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalDcoDecode(raw as List<dynamic>);
  }

  @protected
  String dco_decode_String(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as String;
  }

  @protected
  Artist dco_decode_artist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return Artist(
      name: dco_decode_String(arr[0]),
      id: dco_decode_opt_String(arr[1]),
    );
  }

  @protected
  Asset dco_decode_asset(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 13)
      throw Exception('unexpected arr length: expect 13 but see ${arr.length}');
    return Asset(
      url: dco_decode_String(arr[0]),
      id: dco_decode_u_64(arr[1]),
      nodeId: dco_decode_String(arr[2]),
      name: dco_decode_String(arr[3]),
      label: dco_decode_opt_String(arr[4]),
      uploader: dco_decode_author(arr[5]),
      contentType: dco_decode_String(arr[6]),
      state: dco_decode_String(arr[7]),
      size: dco_decode_u_64(arr[8]),
      downloadCount: dco_decode_u_64(arr[9]),
      createdAt: dco_decode_String(arr[10]),
      updatedAt: dco_decode_String(arr[11]),
      browserDownloadUrl: dco_decode_String(arr[12]),
    );
  }

  @protected
  Author dco_decode_author(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 18)
      throw Exception('unexpected arr length: expect 18 but see ${arr.length}');
    return Author(
      login: dco_decode_String(arr[0]),
      id: dco_decode_u_64(arr[1]),
      nodeId: dco_decode_String(arr[2]),
      avatarUrl: dco_decode_String(arr[3]),
      gravatarId: dco_decode_String(arr[4]),
      url: dco_decode_String(arr[5]),
      htmlUrl: dco_decode_String(arr[6]),
      followersUrl: dco_decode_String(arr[7]),
      followingUrl: dco_decode_String(arr[8]),
      gistsUrl: dco_decode_String(arr[9]),
      starredUrl: dco_decode_String(arr[10]),
      subscriptionsUrl: dco_decode_String(arr[11]),
      organizationsUrl: dco_decode_String(arr[12]),
      reposUrl: dco_decode_String(arr[13]),
      eventsUrl: dco_decode_String(arr[14]),
      receivedEventsUrl: dco_decode_String(arr[15]),
      type: dco_decode_String(arr[16]),
      siteAdmin: dco_decode_bool(arr[17]),
    );
  }

  @protected
  bool dco_decode_bool(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as bool;
  }

  @protected
  Config dco_decode_box_autoadd_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_config(raw);
  }

  @protected
  ExternalApiConfig dco_decode_box_autoadd_external_api_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_external_api_config(raw);
  }

  @protected
  PlatformInt64 dco_decode_box_autoadd_i_64(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_i_64(raw);
  }

  @protected
  Logger dco_decode_box_autoadd_logger(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_logger(raw);
  }

  @protected
  Music dco_decode_box_autoadd_music(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_music(raw);
  }

  @protected
  MusicAggregator dco_decode_box_autoadd_music_aggregator(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_music_aggregator(raw);
  }

  @protected
  MusicServer dco_decode_box_autoadd_music_server(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_music_server(raw);
  }

  @protected
  PlayInfo dco_decode_box_autoadd_play_info(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_play_info(raw);
  }

  @protected
  Playlist dco_decode_box_autoadd_playlist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_playlist(raw);
  }

  @protected
  PlaylistCollection dco_decode_box_autoadd_playlist_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_playlist_collection(raw);
  }

  @protected
  Quality dco_decode_box_autoadd_quality(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_quality(raw);
  }

  @protected
  Release dco_decode_box_autoadd_release(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_release(raw);
  }

  @protected
  WindowConfig dco_decode_box_autoadd_window_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_window_config(raw);
  }

  @protected
  Config dco_decode_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 6)
      throw Exception('unexpected arr length: expect 6 but see ${arr.length}');
    return Config(
      userAgreement: dco_decode_bool(arr[0]),
      qualityConfig: dco_decode_quality_config(arr[1]),
      externalApi: dco_decode_opt_box_autoadd_external_api_config(arr[2]),
      updateConfig: dco_decode_update_config(arr[3]),
      storageConfig: dco_decode_storage_config(arr[4]),
      windowConfig: dco_decode_opt_box_autoadd_window_config(arr[5]),
    );
  }

  @protected
  ExternalApiConfig dco_decode_external_api_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 3)
      throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
    return ExternalApiConfig(
      filePath: dco_decode_String(arr[0]),
      url: dco_decode_opt_String(arr[1]),
      lastHash: dco_decode_opt_String(arr[2]),
    );
  }

  @protected
  int dco_decode_i_32(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as int;
  }

  @protected
  PlatformInt64 dco_decode_i_64(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dcoDecodeI64(raw);
  }

  @protected
  List<Artist> dco_decode_list_artist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_artist).toList();
  }

  @protected
  List<Asset> dco_decode_list_asset(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_asset).toList();
  }

  @protected
  List<Music> dco_decode_list_music(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_music).toList();
  }

  @protected
  List<MusicAggregator> dco_decode_list_music_aggregator(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_music_aggregator).toList();
  }

  @protected
  List<MusicChart> dco_decode_list_music_chart(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_music_chart).toList();
  }

  @protected
  List<MusicChartCollection> dco_decode_list_music_chart_collection(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_music_chart_collection)
        .toList();
  }

  @protected
  List<MusicServer> dco_decode_list_music_server(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_music_server).toList();
  }

  @protected
  List<PlayListSubscription> dco_decode_list_play_list_subscription(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_play_list_subscription)
        .toList();
  }

  @protected
  List<Playlist> dco_decode_list_playlist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_playlist).toList();
  }

  @protected
  List<PlaylistCollection> dco_decode_list_playlist_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_playlist_collection).toList();
  }

  @protected
  List<PlaylistTag> dco_decode_list_playlist_tag(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_playlist_tag).toList();
  }

  @protected
  List<PlaylistTagCollection> dco_decode_list_playlist_tag_collection(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_playlist_tag_collection)
        .toList();
  }

  @protected
  Uint8List dco_decode_list_prim_u_8_strict(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as Uint8List;
  }

  @protected
  List<Quality> dco_decode_list_quality(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_quality).toList();
  }

  @protected
  List<(String, String)> dco_decode_list_record_string_string(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_record_string_string).toList();
  }

  @protected
  List<ServerMusicChartCollection>
      dco_decode_list_server_music_chart_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_server_music_chart_collection)
        .toList();
  }

  @protected
  List<ServerPlaylistTagCollection>
      dco_decode_list_server_playlist_tag_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_server_playlist_tag_collection)
        .toList();
  }

  @protected
  LogLevel dco_decode_log_level(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return LogLevel.values[raw as int];
  }

  @protected
  Logger dco_decode_logger(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.isNotEmpty)
      throw Exception('unexpected arr length: expect 0 but see ${arr.length}');
    return Logger();
  }

  @protected
  Music dco_decode_music(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 10)
      throw Exception('unexpected arr length: expect 10 but see ${arr.length}');
    return Music(
      fromDb: dco_decode_bool(arr[0]),
      server: dco_decode_music_server(arr[1]),
      identity: dco_decode_String(arr[2]),
      name: dco_decode_String(arr[3]),
      duration: dco_decode_opt_box_autoadd_i_64(arr[4]),
      artists: dco_decode_list_artist(arr[5]),
      album: dco_decode_opt_String(arr[6]),
      albumId: dco_decode_opt_String(arr[7]),
      qualities: dco_decode_list_quality(arr[8]),
      cover: dco_decode_opt_String(arr[9]),
    );
  }

  @protected
  MusicAggregator dco_decode_music_aggregator(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 6)
      throw Exception('unexpected arr length: expect 6 but see ${arr.length}');
    return MusicAggregator(
      name: dco_decode_String(arr[0]),
      artist: dco_decode_String(arr[1]),
      fromDb: dco_decode_bool(arr[2]),
      order: dco_decode_opt_box_autoadd_i_64(arr[3]),
      musics: dco_decode_list_music(arr[4]),
      defaultServer: dco_decode_music_server(arr[5]),
    );
  }

  @protected
  MusicChart dco_decode_music_chart(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 4)
      throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
    return MusicChart(
      name: dco_decode_String(arr[0]),
      summary: dco_decode_opt_String(arr[1]),
      cover: dco_decode_opt_String(arr[2]),
      id: dco_decode_String(arr[3]),
    );
  }

  @protected
  MusicChartCollection dco_decode_music_chart_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 3)
      throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
    return MusicChartCollection(
      name: dco_decode_String(arr[0]),
      summary: dco_decode_opt_String(arr[1]),
      charts: dco_decode_list_music_chart(arr[2]),
    );
  }

  @protected
  MusicDataType dco_decode_music_data_type(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return MusicDataType.values[raw as int];
  }

  @protected
  MusicServer dco_decode_music_server(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return MusicServer.values[raw as int];
  }

  @protected
  String? dco_decode_opt_String(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_String(raw);
  }

  @protected
  ExternalApiConfig? dco_decode_opt_box_autoadd_external_api_config(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_external_api_config(raw);
  }

  @protected
  PlatformInt64? dco_decode_opt_box_autoadd_i_64(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_i_64(raw);
  }

  @protected
  MusicServer? dco_decode_opt_box_autoadd_music_server(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_music_server(raw);
  }

  @protected
  PlayInfo? dco_decode_opt_box_autoadd_play_info(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_play_info(raw);
  }

  @protected
  Playlist? dco_decode_opt_box_autoadd_playlist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_playlist(raw);
  }

  @protected
  Release? dco_decode_opt_box_autoadd_release(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_release(raw);
  }

  @protected
  WindowConfig? dco_decode_opt_box_autoadd_window_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_window_config(raw);
  }

  @protected
  List<PlayListSubscription>? dco_decode_opt_list_play_list_subscription(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_list_play_list_subscription(raw);
  }

  @protected
  PlayInfo dco_decode_play_info(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return PlayInfo(
      uri: dco_decode_String(arr[0]),
      quality: dco_decode_quality(arr[1]),
    );
  }

  @protected
  PlayListSubscription dco_decode_play_list_subscription(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return PlayListSubscription(
      name: dco_decode_String(arr[0]),
      share: dco_decode_String(arr[1]),
    );
  }

  @protected
  Playlist dco_decode_playlist(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 14)
      throw Exception('unexpected arr length: expect 14 but see ${arr.length}');
    return Playlist(
      fromDb: dco_decode_bool(arr[0]),
      server: dco_decode_opt_box_autoadd_music_server(arr[1]),
      typeField: dco_decode_playlist_type(arr[2]),
      identity: dco_decode_String(arr[3]),
      collectionId: dco_decode_opt_box_autoadd_i_64(arr[4]),
      name: dco_decode_String(arr[5]),
      order: dco_decode_opt_box_autoadd_i_64(arr[6]),
      summary: dco_decode_opt_String(arr[7]),
      cover: dco_decode_opt_String(arr[8]),
      creator: dco_decode_opt_String(arr[9]),
      creatorId: dco_decode_opt_String(arr[10]),
      playTime: dco_decode_opt_box_autoadd_i_64(arr[11]),
      musicNum: dco_decode_opt_box_autoadd_i_64(arr[12]),
      subscription: dco_decode_opt_list_play_list_subscription(arr[13]),
    );
  }

  @protected
  PlaylistCollection dco_decode_playlist_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 3)
      throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
    return PlaylistCollection(
      id: dco_decode_i_64(arr[0]),
      order: dco_decode_i_64(arr[1]),
      name: dco_decode_String(arr[2]),
    );
  }

  @protected
  PlaylistTag dco_decode_playlist_tag(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return PlaylistTag(
      name: dco_decode_String(arr[0]),
      id: dco_decode_String(arr[1]),
    );
  }

  @protected
  PlaylistTagCollection dco_decode_playlist_tag_collection(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return PlaylistTagCollection(
      name: dco_decode_String(arr[0]),
      tags: dco_decode_list_playlist_tag(arr[1]),
    );
  }

  @protected
  PlaylistType dco_decode_playlist_type(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return PlaylistType.values[raw as int];
  }

  @protected
  PlaylistUpdateSubscriptionResult
      dco_decode_playlist_update_subscription_result(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 1)
      throw Exception('unexpected arr length: expect 1 but see ${arr.length}');
    return PlaylistUpdateSubscriptionResult(
      errors: dco_decode_list_record_string_string(arr[0]),
    );
  }

  @protected
  Quality dco_decode_quality(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 4)
      throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
    return Quality(
      summary: dco_decode_String(arr[0]),
      bitrate: dco_decode_opt_String(arr[1]),
      format: dco_decode_opt_String(arr[2]),
      size: dco_decode_opt_String(arr[3]),
    );
  }

  @protected
  QualityConfig dco_decode_quality_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return QualityConfig(
      wifiAutoQuality: dco_decode_quality_option(arr[0]),
      mobileAutoQuality: dco_decode_quality_option(arr[1]),
    );
  }

  @protected
  QualityOption dco_decode_quality_option(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return QualityOption.values[raw as int];
  }

  @protected
  (PlayInfo?, String?) dco_decode_record_opt_box_autoadd_play_info_opt_string(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2) {
      throw Exception('Expected 2 elements, got ${arr.length}');
    }
    return (
      dco_decode_opt_box_autoadd_play_info(arr[0]),
      dco_decode_opt_String(arr[1]),
    );
  }

  @protected
  (Playlist?, List<MusicAggregator>)
      dco_decode_record_opt_box_autoadd_playlist_list_music_aggregator(
          dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2) {
      throw Exception('Expected 2 elements, got ${arr.length}');
    }
    return (
      dco_decode_opt_box_autoadd_playlist(arr[0]),
      dco_decode_list_music_aggregator(arr[1]),
    );
  }

  @protected
  (String, String) dco_decode_record_string_string(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2) {
      throw Exception('Expected 2 elements, got ${arr.length}');
    }
    return (
      dco_decode_String(arr[0]),
      dco_decode_String(arr[1]),
    );
  }

  @protected
  Release dco_decode_release(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 18)
      throw Exception('unexpected arr length: expect 18 but see ${arr.length}');
    return Release(
      url: dco_decode_String(arr[0]),
      assetsUrl: dco_decode_String(arr[1]),
      uploadUrl: dco_decode_String(arr[2]),
      htmlUrl: dco_decode_String(arr[3]),
      id: dco_decode_u_64(arr[4]),
      author: dco_decode_author(arr[5]),
      nodeId: dco_decode_String(arr[6]),
      tagName: dco_decode_String(arr[7]),
      targetCommitish: dco_decode_String(arr[8]),
      name: dco_decode_String(arr[9]),
      draft: dco_decode_bool(arr[10]),
      prerelease: dco_decode_bool(arr[11]),
      createdAt: dco_decode_String(arr[12]),
      publishedAt: dco_decode_String(arr[13]),
      assets: dco_decode_list_asset(arr[14]),
      tarballUrl: dco_decode_String(arr[15]),
      zipballUrl: dco_decode_String(arr[16]),
      body: dco_decode_String(arr[17]),
    );
  }

  @protected
  ServerMusicChartCollection dco_decode_server_music_chart_collection(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return ServerMusicChartCollection(
      server: dco_decode_music_server(arr[0]),
      collections: dco_decode_list_music_chart_collection(arr[1]),
    );
  }

  @protected
  ServerPlaylistTagCollection dco_decode_server_playlist_tag_collection(
      dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return ServerPlaylistTagCollection(
      server: dco_decode_music_server(arr[0]),
      collections: dco_decode_list_playlist_tag_collection(arr[1]),
    );
  }

  @protected
  StorageConfig dco_decode_storage_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 3)
      throw Exception('unexpected arr length: expect 3 but see ${arr.length}');
    return StorageConfig(
      saveCover: dco_decode_bool(arr[0]),
      customCacheRoot: dco_decode_opt_String(arr[1]),
      customDb: dco_decode_opt_String(arr[2]),
    );
  }

  @protected
  TagPlaylistOrder dco_decode_tag_playlist_order(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return TagPlaylistOrder.values[raw as int];
  }

  @protected
  int dco_decode_u_16(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as int;
  }

  @protected
  BigInt dco_decode_u_64(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dcoDecodeU64(raw);
  }

  @protected
  int dco_decode_u_8(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw as int;
  }

  @protected
  void dco_decode_unit(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return;
  }

  @protected
  UpdateConfig dco_decode_update_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 2)
      throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
    return UpdateConfig(
      versionAutoUpdate: dco_decode_bool(arr[0]),
      externalApiAutoUpdate: dco_decode_bool(arr[1]),
    );
  }

  @protected
  BigInt dco_decode_usize(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dcoDecodeU64(raw);
  }

  @protected
  WindowConfig dco_decode_window_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 5)
      throw Exception('unexpected arr length: expect 5 but see ${arr.length}');
    return WindowConfig(
      width: dco_decode_i_32(arr[0]),
      height: dco_decode_i_32(arr[1]),
      minWidth: dco_decode_i_32(arr[2]),
      minHeight: dco_decode_i_32(arr[3]),
      fullscreen: dco_decode_bool(arr[4]),
    );
  }

  @protected
  AnyhowException sse_decode_AnyhowException(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_String(deserializer);
    return AnyhowException(inner);
  }

  @protected
  MusicDataJsonWrapper
      sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalSseDecode(
        sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
  }

  @protected
  MusicDataJsonWrapper
      sse_decode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalSseDecode(
        sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
  }

  @protected
  Map<String, String> sse_decode_Map_String_String(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_list_record_string_string(deserializer);
    return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2)));
  }

  @protected
  MusicDataJsonWrapper
      sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return MusicDataJsonWrapperImpl.frbInternalSseDecode(
        sse_decode_usize(deserializer), sse_decode_i_32(deserializer));
  }

  @protected
  String sse_decode_String(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_list_prim_u_8_strict(deserializer);
    return utf8.decoder.convert(inner);
  }

  @protected
  Artist sse_decode_artist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_id = sse_decode_opt_String(deserializer);
    return Artist(name: var_name, id: var_id);
  }

  @protected
  Asset sse_decode_asset(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_url = sse_decode_String(deserializer);
    var var_id = sse_decode_u_64(deserializer);
    var var_nodeId = sse_decode_String(deserializer);
    var var_name = sse_decode_String(deserializer);
    var var_label = sse_decode_opt_String(deserializer);
    var var_uploader = sse_decode_author(deserializer);
    var var_contentType = sse_decode_String(deserializer);
    var var_state = sse_decode_String(deserializer);
    var var_size = sse_decode_u_64(deserializer);
    var var_downloadCount = sse_decode_u_64(deserializer);
    var var_createdAt = sse_decode_String(deserializer);
    var var_updatedAt = sse_decode_String(deserializer);
    var var_browserDownloadUrl = sse_decode_String(deserializer);
    return Asset(
        url: var_url,
        id: var_id,
        nodeId: var_nodeId,
        name: var_name,
        label: var_label,
        uploader: var_uploader,
        contentType: var_contentType,
        state: var_state,
        size: var_size,
        downloadCount: var_downloadCount,
        createdAt: var_createdAt,
        updatedAt: var_updatedAt,
        browserDownloadUrl: var_browserDownloadUrl);
  }

  @protected
  Author sse_decode_author(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_login = sse_decode_String(deserializer);
    var var_id = sse_decode_u_64(deserializer);
    var var_nodeId = sse_decode_String(deserializer);
    var var_avatarUrl = sse_decode_String(deserializer);
    var var_gravatarId = sse_decode_String(deserializer);
    var var_url = sse_decode_String(deserializer);
    var var_htmlUrl = sse_decode_String(deserializer);
    var var_followersUrl = sse_decode_String(deserializer);
    var var_followingUrl = sse_decode_String(deserializer);
    var var_gistsUrl = sse_decode_String(deserializer);
    var var_starredUrl = sse_decode_String(deserializer);
    var var_subscriptionsUrl = sse_decode_String(deserializer);
    var var_organizationsUrl = sse_decode_String(deserializer);
    var var_reposUrl = sse_decode_String(deserializer);
    var var_eventsUrl = sse_decode_String(deserializer);
    var var_receivedEventsUrl = sse_decode_String(deserializer);
    var var_type = sse_decode_String(deserializer);
    var var_siteAdmin = sse_decode_bool(deserializer);
    return Author(
        login: var_login,
        id: var_id,
        nodeId: var_nodeId,
        avatarUrl: var_avatarUrl,
        gravatarId: var_gravatarId,
        url: var_url,
        htmlUrl: var_htmlUrl,
        followersUrl: var_followersUrl,
        followingUrl: var_followingUrl,
        gistsUrl: var_gistsUrl,
        starredUrl: var_starredUrl,
        subscriptionsUrl: var_subscriptionsUrl,
        organizationsUrl: var_organizationsUrl,
        reposUrl: var_reposUrl,
        eventsUrl: var_eventsUrl,
        receivedEventsUrl: var_receivedEventsUrl,
        type: var_type,
        siteAdmin: var_siteAdmin);
  }

  @protected
  bool sse_decode_bool(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getUint8() != 0;
  }

  @protected
  Config sse_decode_box_autoadd_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_config(deserializer));
  }

  @protected
  ExternalApiConfig sse_decode_box_autoadd_external_api_config(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_external_api_config(deserializer));
  }

  @protected
  PlatformInt64 sse_decode_box_autoadd_i_64(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_i_64(deserializer));
  }

  @protected
  Logger sse_decode_box_autoadd_logger(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_logger(deserializer));
  }

  @protected
  Music sse_decode_box_autoadd_music(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_music(deserializer));
  }

  @protected
  MusicAggregator sse_decode_box_autoadd_music_aggregator(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_music_aggregator(deserializer));
  }

  @protected
  MusicServer sse_decode_box_autoadd_music_server(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_music_server(deserializer));
  }

  @protected
  PlayInfo sse_decode_box_autoadd_play_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_play_info(deserializer));
  }

  @protected
  Playlist sse_decode_box_autoadd_playlist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_playlist(deserializer));
  }

  @protected
  PlaylistCollection sse_decode_box_autoadd_playlist_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_playlist_collection(deserializer));
  }

  @protected
  Quality sse_decode_box_autoadd_quality(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_quality(deserializer));
  }

  @protected
  Release sse_decode_box_autoadd_release(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_release(deserializer));
  }

  @protected
  WindowConfig sse_decode_box_autoadd_window_config(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_window_config(deserializer));
  }

  @protected
  Config sse_decode_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_userAgreement = sse_decode_bool(deserializer);
    var var_qualityConfig = sse_decode_quality_config(deserializer);
    var var_externalApi =
        sse_decode_opt_box_autoadd_external_api_config(deserializer);
    var var_updateConfig = sse_decode_update_config(deserializer);
    var var_storageConfig = sse_decode_storage_config(deserializer);
    var var_windowConfig =
        sse_decode_opt_box_autoadd_window_config(deserializer);
    return Config(
        userAgreement: var_userAgreement,
        qualityConfig: var_qualityConfig,
        externalApi: var_externalApi,
        updateConfig: var_updateConfig,
        storageConfig: var_storageConfig,
        windowConfig: var_windowConfig);
  }

  @protected
  ExternalApiConfig sse_decode_external_api_config(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_filePath = sse_decode_String(deserializer);
    var var_url = sse_decode_opt_String(deserializer);
    var var_lastHash = sse_decode_opt_String(deserializer);
    return ExternalApiConfig(
        filePath: var_filePath, url: var_url, lastHash: var_lastHash);
  }

  @protected
  int sse_decode_i_32(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getInt32();
  }

  @protected
  PlatformInt64 sse_decode_i_64(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getPlatformInt64();
  }

  @protected
  List<Artist> sse_decode_list_artist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <Artist>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_artist(deserializer));
    }
    return ans_;
  }

  @protected
  List<Asset> sse_decode_list_asset(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <Asset>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_asset(deserializer));
    }
    return ans_;
  }

  @protected
  List<Music> sse_decode_list_music(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <Music>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_music(deserializer));
    }
    return ans_;
  }

  @protected
  List<MusicAggregator> sse_decode_list_music_aggregator(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <MusicAggregator>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_music_aggregator(deserializer));
    }
    return ans_;
  }

  @protected
  List<MusicChart> sse_decode_list_music_chart(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <MusicChart>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_music_chart(deserializer));
    }
    return ans_;
  }

  @protected
  List<MusicChartCollection> sse_decode_list_music_chart_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <MusicChartCollection>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_music_chart_collection(deserializer));
    }
    return ans_;
  }

  @protected
  List<MusicServer> sse_decode_list_music_server(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <MusicServer>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_music_server(deserializer));
    }
    return ans_;
  }

  @protected
  List<PlayListSubscription> sse_decode_list_play_list_subscription(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <PlayListSubscription>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_play_list_subscription(deserializer));
    }
    return ans_;
  }

  @protected
  List<Playlist> sse_decode_list_playlist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <Playlist>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_playlist(deserializer));
    }
    return ans_;
  }

  @protected
  List<PlaylistCollection> sse_decode_list_playlist_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <PlaylistCollection>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_playlist_collection(deserializer));
    }
    return ans_;
  }

  @protected
  List<PlaylistTag> sse_decode_list_playlist_tag(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <PlaylistTag>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_playlist_tag(deserializer));
    }
    return ans_;
  }

  @protected
  List<PlaylistTagCollection> sse_decode_list_playlist_tag_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <PlaylistTagCollection>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_playlist_tag_collection(deserializer));
    }
    return ans_;
  }

  @protected
  Uint8List sse_decode_list_prim_u_8_strict(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var len_ = sse_decode_i_32(deserializer);
    return deserializer.buffer.getUint8List(len_);
  }

  @protected
  List<Quality> sse_decode_list_quality(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <Quality>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_quality(deserializer));
    }
    return ans_;
  }

  @protected
  List<(String, String)> sse_decode_list_record_string_string(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <(String, String)>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_record_string_string(deserializer));
    }
    return ans_;
  }

  @protected
  List<ServerMusicChartCollection>
      sse_decode_list_server_music_chart_collection(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <ServerMusicChartCollection>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_server_music_chart_collection(deserializer));
    }
    return ans_;
  }

  @protected
  List<ServerPlaylistTagCollection>
      sse_decode_list_server_playlist_tag_collection(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <ServerPlaylistTagCollection>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_server_playlist_tag_collection(deserializer));
    }
    return ans_;
  }

  @protected
  LogLevel sse_decode_log_level(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return LogLevel.values[inner];
  }

  @protected
  Logger sse_decode_logger(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return Logger();
  }

  @protected
  Music sse_decode_music(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_fromDb = sse_decode_bool(deserializer);
    var var_server = sse_decode_music_server(deserializer);
    var var_identity = sse_decode_String(deserializer);
    var var_name = sse_decode_String(deserializer);
    var var_duration = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_artists = sse_decode_list_artist(deserializer);
    var var_album = sse_decode_opt_String(deserializer);
    var var_albumId = sse_decode_opt_String(deserializer);
    var var_qualities = sse_decode_list_quality(deserializer);
    var var_cover = sse_decode_opt_String(deserializer);
    return Music(
        fromDb: var_fromDb,
        server: var_server,
        identity: var_identity,
        name: var_name,
        duration: var_duration,
        artists: var_artists,
        album: var_album,
        albumId: var_albumId,
        qualities: var_qualities,
        cover: var_cover);
  }

  @protected
  MusicAggregator sse_decode_music_aggregator(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_artist = sse_decode_String(deserializer);
    var var_fromDb = sse_decode_bool(deserializer);
    var var_order = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_musics = sse_decode_list_music(deserializer);
    var var_defaultServer = sse_decode_music_server(deserializer);
    return MusicAggregator(
        name: var_name,
        artist: var_artist,
        fromDb: var_fromDb,
        order: var_order,
        musics: var_musics,
        defaultServer: var_defaultServer);
  }

  @protected
  MusicChart sse_decode_music_chart(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_summary = sse_decode_opt_String(deserializer);
    var var_cover = sse_decode_opt_String(deserializer);
    var var_id = sse_decode_String(deserializer);
    return MusicChart(
        name: var_name, summary: var_summary, cover: var_cover, id: var_id);
  }

  @protected
  MusicChartCollection sse_decode_music_chart_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_summary = sse_decode_opt_String(deserializer);
    var var_charts = sse_decode_list_music_chart(deserializer);
    return MusicChartCollection(
        name: var_name, summary: var_summary, charts: var_charts);
  }

  @protected
  MusicDataType sse_decode_music_data_type(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return MusicDataType.values[inner];
  }

  @protected
  MusicServer sse_decode_music_server(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return MusicServer.values[inner];
  }

  @protected
  String? sse_decode_opt_String(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_String(deserializer));
    } else {
      return null;
    }
  }

  @protected
  ExternalApiConfig? sse_decode_opt_box_autoadd_external_api_config(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_external_api_config(deserializer));
    } else {
      return null;
    }
  }

  @protected
  PlatformInt64? sse_decode_opt_box_autoadd_i_64(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_i_64(deserializer));
    } else {
      return null;
    }
  }

  @protected
  MusicServer? sse_decode_opt_box_autoadd_music_server(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_music_server(deserializer));
    } else {
      return null;
    }
  }

  @protected
  PlayInfo? sse_decode_opt_box_autoadd_play_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_play_info(deserializer));
    } else {
      return null;
    }
  }

  @protected
  Playlist? sse_decode_opt_box_autoadd_playlist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_playlist(deserializer));
    } else {
      return null;
    }
  }

  @protected
  Release? sse_decode_opt_box_autoadd_release(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_release(deserializer));
    } else {
      return null;
    }
  }

  @protected
  WindowConfig? sse_decode_opt_box_autoadd_window_config(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_window_config(deserializer));
    } else {
      return null;
    }
  }

  @protected
  List<PlayListSubscription>? sse_decode_opt_list_play_list_subscription(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_play_list_subscription(deserializer));
    } else {
      return null;
    }
  }

  @protected
  PlayInfo sse_decode_play_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_uri = sse_decode_String(deserializer);
    var var_quality = sse_decode_quality(deserializer);
    return PlayInfo(uri: var_uri, quality: var_quality);
  }

  @protected
  PlayListSubscription sse_decode_play_list_subscription(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_share = sse_decode_String(deserializer);
    return PlayListSubscription(name: var_name, share: var_share);
  }

  @protected
  Playlist sse_decode_playlist(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_fromDb = sse_decode_bool(deserializer);
    var var_server = sse_decode_opt_box_autoadd_music_server(deserializer);
    var var_typeField = sse_decode_playlist_type(deserializer);
    var var_identity = sse_decode_String(deserializer);
    var var_collectionId = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_name = sse_decode_String(deserializer);
    var var_order = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_summary = sse_decode_opt_String(deserializer);
    var var_cover = sse_decode_opt_String(deserializer);
    var var_creator = sse_decode_opt_String(deserializer);
    var var_creatorId = sse_decode_opt_String(deserializer);
    var var_playTime = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_musicNum = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_subscription =
        sse_decode_opt_list_play_list_subscription(deserializer);
    return Playlist(
        fromDb: var_fromDb,
        server: var_server,
        typeField: var_typeField,
        identity: var_identity,
        collectionId: var_collectionId,
        name: var_name,
        order: var_order,
        summary: var_summary,
        cover: var_cover,
        creator: var_creator,
        creatorId: var_creatorId,
        playTime: var_playTime,
        musicNum: var_musicNum,
        subscription: var_subscription);
  }

  @protected
  PlaylistCollection sse_decode_playlist_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_id = sse_decode_i_64(deserializer);
    var var_order = sse_decode_i_64(deserializer);
    var var_name = sse_decode_String(deserializer);
    return PlaylistCollection(id: var_id, order: var_order, name: var_name);
  }

  @protected
  PlaylistTag sse_decode_playlist_tag(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_id = sse_decode_String(deserializer);
    return PlaylistTag(name: var_name, id: var_id);
  }

  @protected
  PlaylistTagCollection sse_decode_playlist_tag_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_tags = sse_decode_list_playlist_tag(deserializer);
    return PlaylistTagCollection(name: var_name, tags: var_tags);
  }

  @protected
  PlaylistType sse_decode_playlist_type(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return PlaylistType.values[inner];
  }

  @protected
  PlaylistUpdateSubscriptionResult
      sse_decode_playlist_update_subscription_result(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_errors = sse_decode_list_record_string_string(deserializer);
    return PlaylistUpdateSubscriptionResult(errors: var_errors);
  }

  @protected
  Quality sse_decode_quality(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_summary = sse_decode_String(deserializer);
    var var_bitrate = sse_decode_opt_String(deserializer);
    var var_format = sse_decode_opt_String(deserializer);
    var var_size = sse_decode_opt_String(deserializer);
    return Quality(
        summary: var_summary,
        bitrate: var_bitrate,
        format: var_format,
        size: var_size);
  }

  @protected
  QualityConfig sse_decode_quality_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_wifiAutoQuality = sse_decode_quality_option(deserializer);
    var var_mobileAutoQuality = sse_decode_quality_option(deserializer);
    return QualityConfig(
        wifiAutoQuality: var_wifiAutoQuality,
        mobileAutoQuality: var_mobileAutoQuality);
  }

  @protected
  QualityOption sse_decode_quality_option(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return QualityOption.values[inner];
  }

  @protected
  (PlayInfo?, String?) sse_decode_record_opt_box_autoadd_play_info_opt_string(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_field0 = sse_decode_opt_box_autoadd_play_info(deserializer);
    var var_field1 = sse_decode_opt_String(deserializer);
    return (var_field0, var_field1);
  }

  @protected
  (Playlist?, List<MusicAggregator>)
      sse_decode_record_opt_box_autoadd_playlist_list_music_aggregator(
          SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_field0 = sse_decode_opt_box_autoadd_playlist(deserializer);
    var var_field1 = sse_decode_list_music_aggregator(deserializer);
    return (var_field0, var_field1);
  }

  @protected
  (String, String) sse_decode_record_string_string(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_field0 = sse_decode_String(deserializer);
    var var_field1 = sse_decode_String(deserializer);
    return (var_field0, var_field1);
  }

  @protected
  Release sse_decode_release(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_url = sse_decode_String(deserializer);
    var var_assetsUrl = sse_decode_String(deserializer);
    var var_uploadUrl = sse_decode_String(deserializer);
    var var_htmlUrl = sse_decode_String(deserializer);
    var var_id = sse_decode_u_64(deserializer);
    var var_author = sse_decode_author(deserializer);
    var var_nodeId = sse_decode_String(deserializer);
    var var_tagName = sse_decode_String(deserializer);
    var var_targetCommitish = sse_decode_String(deserializer);
    var var_name = sse_decode_String(deserializer);
    var var_draft = sse_decode_bool(deserializer);
    var var_prerelease = sse_decode_bool(deserializer);
    var var_createdAt = sse_decode_String(deserializer);
    var var_publishedAt = sse_decode_String(deserializer);
    var var_assets = sse_decode_list_asset(deserializer);
    var var_tarballUrl = sse_decode_String(deserializer);
    var var_zipballUrl = sse_decode_String(deserializer);
    var var_body = sse_decode_String(deserializer);
    return Release(
        url: var_url,
        assetsUrl: var_assetsUrl,
        uploadUrl: var_uploadUrl,
        htmlUrl: var_htmlUrl,
        id: var_id,
        author: var_author,
        nodeId: var_nodeId,
        tagName: var_tagName,
        targetCommitish: var_targetCommitish,
        name: var_name,
        draft: var_draft,
        prerelease: var_prerelease,
        createdAt: var_createdAt,
        publishedAt: var_publishedAt,
        assets: var_assets,
        tarballUrl: var_tarballUrl,
        zipballUrl: var_zipballUrl,
        body: var_body);
  }

  @protected
  ServerMusicChartCollection sse_decode_server_music_chart_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_server = sse_decode_music_server(deserializer);
    var var_collections = sse_decode_list_music_chart_collection(deserializer);
    return ServerMusicChartCollection(
        server: var_server, collections: var_collections);
  }

  @protected
  ServerPlaylistTagCollection sse_decode_server_playlist_tag_collection(
      SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_server = sse_decode_music_server(deserializer);
    var var_collections = sse_decode_list_playlist_tag_collection(deserializer);
    return ServerPlaylistTagCollection(
        server: var_server, collections: var_collections);
  }

  @protected
  StorageConfig sse_decode_storage_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_saveCover = sse_decode_bool(deserializer);
    var var_customCacheRoot = sse_decode_opt_String(deserializer);
    var var_customDb = sse_decode_opt_String(deserializer);
    return StorageConfig(
        saveCover: var_saveCover,
        customCacheRoot: var_customCacheRoot,
        customDb: var_customDb);
  }

  @protected
  TagPlaylistOrder sse_decode_tag_playlist_order(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return TagPlaylistOrder.values[inner];
  }

  @protected
  int sse_decode_u_16(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getUint16();
  }

  @protected
  BigInt sse_decode_u_64(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getBigUint64();
  }

  @protected
  int sse_decode_u_8(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getUint8();
  }

  @protected
  void sse_decode_unit(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
  }

  @protected
  UpdateConfig sse_decode_update_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_versionAutoUpdate = sse_decode_bool(deserializer);
    var var_externalApiAutoUpdate = sse_decode_bool(deserializer);
    return UpdateConfig(
        versionAutoUpdate: var_versionAutoUpdate,
        externalApiAutoUpdate: var_externalApiAutoUpdate);
  }

  @protected
  BigInt sse_decode_usize(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getBigUint64();
  }

  @protected
  WindowConfig sse_decode_window_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_width = sse_decode_i_32(deserializer);
    var var_height = sse_decode_i_32(deserializer);
    var var_minWidth = sse_decode_i_32(deserializer);
    var var_minHeight = sse_decode_i_32(deserializer);
    var var_fullscreen = sse_decode_bool(deserializer);
    return WindowConfig(
        width: var_width,
        height: var_height,
        minWidth: var_minWidth,
        minHeight: var_minHeight,
        fullscreen: var_fullscreen);
  }

  @protected
  void sse_encode_AnyhowException(
      AnyhowException self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.message, serializer);
  }

  @protected
  void
      sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          MusicDataJsonWrapper self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
        (self as MusicDataJsonWrapperImpl).frbInternalSseEncode(move: true),
        serializer);
  }

  @protected
  void
      sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          MusicDataJsonWrapper self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
        (self as MusicDataJsonWrapperImpl).frbInternalSseEncode(move: false),
        serializer);
  }

  @protected
  void sse_encode_Map_String_String(
      Map<String, String> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_record_string_string(
        self.entries.map((e) => (e.key, e.value)).toList(), serializer);
  }

  @protected
  void
      sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerMusicDataJsonWrapper(
          MusicDataJsonWrapper self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
        (self as MusicDataJsonWrapperImpl).frbInternalSseEncode(move: null),
        serializer);
  }

  @protected
  void sse_encode_String(String self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_prim_u_8_strict(utf8.encoder.convert(self), serializer);
  }

  @protected
  void sse_encode_artist(Artist self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_opt_String(self.id, serializer);
  }

  @protected
  void sse_encode_asset(Asset self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.url, serializer);
    sse_encode_u_64(self.id, serializer);
    sse_encode_String(self.nodeId, serializer);
    sse_encode_String(self.name, serializer);
    sse_encode_opt_String(self.label, serializer);
    sse_encode_author(self.uploader, serializer);
    sse_encode_String(self.contentType, serializer);
    sse_encode_String(self.state, serializer);
    sse_encode_u_64(self.size, serializer);
    sse_encode_u_64(self.downloadCount, serializer);
    sse_encode_String(self.createdAt, serializer);
    sse_encode_String(self.updatedAt, serializer);
    sse_encode_String(self.browserDownloadUrl, serializer);
  }

  @protected
  void sse_encode_author(Author self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.login, serializer);
    sse_encode_u_64(self.id, serializer);
    sse_encode_String(self.nodeId, serializer);
    sse_encode_String(self.avatarUrl, serializer);
    sse_encode_String(self.gravatarId, serializer);
    sse_encode_String(self.url, serializer);
    sse_encode_String(self.htmlUrl, serializer);
    sse_encode_String(self.followersUrl, serializer);
    sse_encode_String(self.followingUrl, serializer);
    sse_encode_String(self.gistsUrl, serializer);
    sse_encode_String(self.starredUrl, serializer);
    sse_encode_String(self.subscriptionsUrl, serializer);
    sse_encode_String(self.organizationsUrl, serializer);
    sse_encode_String(self.reposUrl, serializer);
    sse_encode_String(self.eventsUrl, serializer);
    sse_encode_String(self.receivedEventsUrl, serializer);
    sse_encode_String(self.type, serializer);
    sse_encode_bool(self.siteAdmin, serializer);
  }

  @protected
  void sse_encode_bool(bool self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putUint8(self ? 1 : 0);
  }

  @protected
  void sse_encode_box_autoadd_config(Config self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_external_api_config(
      ExternalApiConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_external_api_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_i_64(
      PlatformInt64 self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_logger(Logger self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_logger(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_music(Music self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_music(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_music_aggregator(
      MusicAggregator self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_music_aggregator(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_music_server(
      MusicServer self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_music_server(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_play_info(
      PlayInfo self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_play_info(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_playlist(
      Playlist self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_playlist(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_playlist_collection(
      PlaylistCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_playlist_collection(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_quality(Quality self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_quality(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_release(Release self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_release(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_window_config(
      WindowConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_window_config(self, serializer);
  }

  @protected
  void sse_encode_config(Config self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.userAgreement, serializer);
    sse_encode_quality_config(self.qualityConfig, serializer);
    sse_encode_opt_box_autoadd_external_api_config(
        self.externalApi, serializer);
    sse_encode_update_config(self.updateConfig, serializer);
    sse_encode_storage_config(self.storageConfig, serializer);
    sse_encode_opt_box_autoadd_window_config(self.windowConfig, serializer);
  }

  @protected
  void sse_encode_external_api_config(
      ExternalApiConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.filePath, serializer);
    sse_encode_opt_String(self.url, serializer);
    sse_encode_opt_String(self.lastHash, serializer);
  }

  @protected
  void sse_encode_i_32(int self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putInt32(self);
  }

  @protected
  void sse_encode_i_64(PlatformInt64 self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putPlatformInt64(self);
  }

  @protected
  void sse_encode_list_artist(List<Artist> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_artist(item, serializer);
    }
  }

  @protected
  void sse_encode_list_asset(List<Asset> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_asset(item, serializer);
    }
  }

  @protected
  void sse_encode_list_music(List<Music> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_music(item, serializer);
    }
  }

  @protected
  void sse_encode_list_music_aggregator(
      List<MusicAggregator> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_music_aggregator(item, serializer);
    }
  }

  @protected
  void sse_encode_list_music_chart(
      List<MusicChart> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_music_chart(item, serializer);
    }
  }

  @protected
  void sse_encode_list_music_chart_collection(
      List<MusicChartCollection> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_music_chart_collection(item, serializer);
    }
  }

  @protected
  void sse_encode_list_music_server(
      List<MusicServer> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_music_server(item, serializer);
    }
  }

  @protected
  void sse_encode_list_play_list_subscription(
      List<PlayListSubscription> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_play_list_subscription(item, serializer);
    }
  }

  @protected
  void sse_encode_list_playlist(List<Playlist> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_playlist(item, serializer);
    }
  }

  @protected
  void sse_encode_list_playlist_collection(
      List<PlaylistCollection> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_playlist_collection(item, serializer);
    }
  }

  @protected
  void sse_encode_list_playlist_tag(
      List<PlaylistTag> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_playlist_tag(item, serializer);
    }
  }

  @protected
  void sse_encode_list_playlist_tag_collection(
      List<PlaylistTagCollection> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_playlist_tag_collection(item, serializer);
    }
  }

  @protected
  void sse_encode_list_prim_u_8_strict(
      Uint8List self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    serializer.buffer.putUint8List(self);
  }

  @protected
  void sse_encode_list_quality(List<Quality> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_quality(item, serializer);
    }
  }

  @protected
  void sse_encode_list_record_string_string(
      List<(String, String)> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_record_string_string(item, serializer);
    }
  }

  @protected
  void sse_encode_list_server_music_chart_collection(
      List<ServerMusicChartCollection> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_server_music_chart_collection(item, serializer);
    }
  }

  @protected
  void sse_encode_list_server_playlist_tag_collection(
      List<ServerPlaylistTagCollection> self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    for (final item in self) {
      sse_encode_server_playlist_tag_collection(item, serializer);
    }
  }

  @protected
  void sse_encode_log_level(LogLevel self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_logger(Logger self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
  }

  @protected
  void sse_encode_music(Music self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.fromDb, serializer);
    sse_encode_music_server(self.server, serializer);
    sse_encode_String(self.identity, serializer);
    sse_encode_String(self.name, serializer);
    sse_encode_opt_box_autoadd_i_64(self.duration, serializer);
    sse_encode_list_artist(self.artists, serializer);
    sse_encode_opt_String(self.album, serializer);
    sse_encode_opt_String(self.albumId, serializer);
    sse_encode_list_quality(self.qualities, serializer);
    sse_encode_opt_String(self.cover, serializer);
  }

  @protected
  void sse_encode_music_aggregator(
      MusicAggregator self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_String(self.artist, serializer);
    sse_encode_bool(self.fromDb, serializer);
    sse_encode_opt_box_autoadd_i_64(self.order, serializer);
    sse_encode_list_music(self.musics, serializer);
    sse_encode_music_server(self.defaultServer, serializer);
  }

  @protected
  void sse_encode_music_chart(MusicChart self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_opt_String(self.summary, serializer);
    sse_encode_opt_String(self.cover, serializer);
    sse_encode_String(self.id, serializer);
  }

  @protected
  void sse_encode_music_chart_collection(
      MusicChartCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_opt_String(self.summary, serializer);
    sse_encode_list_music_chart(self.charts, serializer);
  }

  @protected
  void sse_encode_music_data_type(
      MusicDataType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_music_server(MusicServer self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_opt_String(String? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_String(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_external_api_config(
      ExternalApiConfig? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_external_api_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_i_64(
      PlatformInt64? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_i_64(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_music_server(
      MusicServer? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_music_server(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_play_info(
      PlayInfo? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_play_info(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_playlist(
      Playlist? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_playlist(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_release(
      Release? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_release(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_window_config(
      WindowConfig? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_box_autoadd_window_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_play_list_subscription(
      List<PlayListSubscription>? self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_list_play_list_subscription(self, serializer);
    }
  }

  @protected
  void sse_encode_play_info(PlayInfo self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.uri, serializer);
    sse_encode_quality(self.quality, serializer);
  }

  @protected
  void sse_encode_play_list_subscription(
      PlayListSubscription self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_String(self.share, serializer);
  }

  @protected
  void sse_encode_playlist(Playlist self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.fromDb, serializer);
    sse_encode_opt_box_autoadd_music_server(self.server, serializer);
    sse_encode_playlist_type(self.typeField, serializer);
    sse_encode_String(self.identity, serializer);
    sse_encode_opt_box_autoadd_i_64(self.collectionId, serializer);
    sse_encode_String(self.name, serializer);
    sse_encode_opt_box_autoadd_i_64(self.order, serializer);
    sse_encode_opt_String(self.summary, serializer);
    sse_encode_opt_String(self.cover, serializer);
    sse_encode_opt_String(self.creator, serializer);
    sse_encode_opt_String(self.creatorId, serializer);
    sse_encode_opt_box_autoadd_i_64(self.playTime, serializer);
    sse_encode_opt_box_autoadd_i_64(self.musicNum, serializer);
    sse_encode_opt_list_play_list_subscription(self.subscription, serializer);
  }

  @protected
  void sse_encode_playlist_collection(
      PlaylistCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.id, serializer);
    sse_encode_i_64(self.order, serializer);
    sse_encode_String(self.name, serializer);
  }

  @protected
  void sse_encode_playlist_tag(PlaylistTag self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_String(self.id, serializer);
  }

  @protected
  void sse_encode_playlist_tag_collection(
      PlaylistTagCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_list_playlist_tag(self.tags, serializer);
  }

  @protected
  void sse_encode_playlist_type(PlaylistType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_playlist_update_subscription_result(
      PlaylistUpdateSubscriptionResult self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_record_string_string(self.errors, serializer);
  }

  @protected
  void sse_encode_quality(Quality self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.summary, serializer);
    sse_encode_opt_String(self.bitrate, serializer);
    sse_encode_opt_String(self.format, serializer);
    sse_encode_opt_String(self.size, serializer);
  }

  @protected
  void sse_encode_quality_config(QualityConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_quality_option(self.wifiAutoQuality, serializer);
    sse_encode_quality_option(self.mobileAutoQuality, serializer);
  }

  @protected
  void sse_encode_quality_option(QualityOption self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_record_opt_box_autoadd_play_info_opt_string(
      (PlayInfo?, String?) self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_play_info(self.$1, serializer);
    sse_encode_opt_String(self.$2, serializer);
  }

  @protected
  void sse_encode_record_opt_box_autoadd_playlist_list_music_aggregator(
      (Playlist?, List<MusicAggregator>) self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_playlist(self.$1, serializer);
    sse_encode_list_music_aggregator(self.$2, serializer);
  }

  @protected
  void sse_encode_record_string_string(
      (String, String) self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.$1, serializer);
    sse_encode_String(self.$2, serializer);
  }

  @protected
  void sse_encode_release(Release self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.url, serializer);
    sse_encode_String(self.assetsUrl, serializer);
    sse_encode_String(self.uploadUrl, serializer);
    sse_encode_String(self.htmlUrl, serializer);
    sse_encode_u_64(self.id, serializer);
    sse_encode_author(self.author, serializer);
    sse_encode_String(self.nodeId, serializer);
    sse_encode_String(self.tagName, serializer);
    sse_encode_String(self.targetCommitish, serializer);
    sse_encode_String(self.name, serializer);
    sse_encode_bool(self.draft, serializer);
    sse_encode_bool(self.prerelease, serializer);
    sse_encode_String(self.createdAt, serializer);
    sse_encode_String(self.publishedAt, serializer);
    sse_encode_list_asset(self.assets, serializer);
    sse_encode_String(self.tarballUrl, serializer);
    sse_encode_String(self.zipballUrl, serializer);
    sse_encode_String(self.body, serializer);
  }

  @protected
  void sse_encode_server_music_chart_collection(
      ServerMusicChartCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_music_server(self.server, serializer);
    sse_encode_list_music_chart_collection(self.collections, serializer);
  }

  @protected
  void sse_encode_server_playlist_tag_collection(
      ServerPlaylistTagCollection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_music_server(self.server, serializer);
    sse_encode_list_playlist_tag_collection(self.collections, serializer);
  }

  @protected
  void sse_encode_storage_config(StorageConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.saveCover, serializer);
    sse_encode_opt_String(self.customCacheRoot, serializer);
    sse_encode_opt_String(self.customDb, serializer);
  }

  @protected
  void sse_encode_tag_playlist_order(
      TagPlaylistOrder self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_u_16(int self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putUint16(self);
  }

  @protected
  void sse_encode_u_64(BigInt self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putBigUint64(self);
  }

  @protected
  void sse_encode_u_8(int self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putUint8(self);
  }

  @protected
  void sse_encode_unit(void self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
  }

  @protected
  void sse_encode_update_config(UpdateConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.versionAutoUpdate, serializer);
    sse_encode_bool(self.externalApiAutoUpdate, serializer);
  }

  @protected
  void sse_encode_usize(BigInt self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putBigUint64(self);
  }

  @protected
  void sse_encode_window_config(WindowConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.width, serializer);
    sse_encode_i_32(self.height, serializer);
    sse_encode_i_32(self.minWidth, serializer);
    sse_encode_i_32(self.minHeight, serializer);
    sse_encode_bool(self.fullscreen, serializer);
  }
}

@sealed
class MusicDataJsonWrapperImpl extends RustOpaque
    implements MusicDataJsonWrapper {
  // Not to be used by end users
  MusicDataJsonWrapperImpl.frbInternalDcoDecode(List<dynamic> wire)
      : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  MusicDataJsonWrapperImpl.frbInternalSseDecode(
      BigInt ptr, int externalSizeOnNative)
      : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance.api.rust_arc_increment_strong_count_MusicDataJsonWrapper,
    rustArcDecrementStrongCount: RustLib
        .instance.api.rust_arc_decrement_strong_count_MusicDataJsonWrapper,
    rustArcDecrementStrongCountPtr: RustLib
        .instance.api.rust_arc_decrement_strong_count_MusicDataJsonWrapperPtr,
  );

  /// takes ownership
  Future<void> applyToDb(
          {PlatformInt64? playlistId, PlatformInt64? playlistCollectionId}) =>
      RustLib.instance.api.crateApiMusicApiWrapperMusicDataJsonWrapperApplyToDb(
          that: this,
          playlistId: playlistId,
          playlistCollectionId: playlistCollectionId);

  Future<MusicDataType> getType() =>
      RustLib.instance.api.crateApiMusicApiWrapperMusicDataJsonWrapperGetType(
        that: this,
      );

  Future<void> saveTo({required String path}) =>
      RustLib.instance.api.crateApiMusicApiWrapperMusicDataJsonWrapperSaveTo(
          that: this, path: path);

  Future<String> toJson() =>
      RustLib.instance.api.crateApiMusicApiWrapperMusicDataJsonWrapperToJson(
        that: this,
      );
}
