// This file is automatically generated, so please do not edit it.
// @generated by `flutter_rust_bridge`@ 2.12.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 'dart:ffi';
import 'dart:isolate';
import 'dart:io';
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 'lib.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._();

  /// Resolve the prebuilt native library from this package's own installed
  /// location so the load works from any working directory and under hardened
  /// runtimes. Returns `null` to defer to flutter_rust_bridge's default loader.
  ///
  /// Published pub.dev packages stage natives under `lib/src/native/<rid>/`
  /// (e.g. `macos-arm64`, `linux-x64`). For local FRB-dev builds the dylib is
  /// emitted into `lib/src/kreuzberg_bridge_generated/`; that
  /// path is searched as a fallback.
  static Future<ExternalLibrary?> _alefResolveExternalLibrary() async {
    try {
      final packageRoot = await Isolate.resolvePackageUri(
        Uri.parse('package:kreuzberg/kreuzberg.dart'),
      );
      if (packageRoot == null) return null;
      final libNames = _alefHostLibNames();
      final searchDirs = <Uri>[
        if (_alefHostRid() != null)
          packageRoot.resolve('src/native/${_alefHostRid()}/'),
        packageRoot.resolve('src/kreuzberg_bridge_generated/'),
      ];
      for (final dir in searchDirs) {
        for (final name in libNames) {
          final libPath = dir.resolve(name).toFilePath();
          if (File(libPath).existsSync()) {
            return ExternalLibrary.open(libPath);
          }
        }
      }
    } catch (_) {
      // Fall through to the default loader on any resolution failure.
    }
    return null;
  }

  /// Map the host platform to the pub.dev native staging RID. Returns `null`
  /// for unrecognized host triples so the FRB-dev fallback path runs instead.
  static String? _alefHostRid() {
    final abi = Abi.current();
    if (abi == Abi.macosArm64) return 'macos-arm64';
    if (abi == Abi.macosX64) return 'macos-x64';
    if (abi == Abi.linuxArm64) return 'linux-arm64';
    if (abi == Abi.linuxX64) return 'linux-x64';
    if (abi == Abi.windowsArm64) return 'windows-arm64';
    if (abi == Abi.windowsX64) return 'windows-x64';
    return null;
  }

  static List<String> _alefHostLibNames() {
    // The Dart-binding Rust crate is `{stem}-dart` (per the cargo manifest
    // template), which produces a cdylib named `lib{stem}_dart.{ext}` on Unix
    // and `{stem}_dart.dll` on Windows.
    if (Platform.isMacOS) return const ['libkreuzberg_dart.dylib'];
    if (Platform.isWindows) return const ['kreuzberg_dart.dll'];
    return const ['libkreuzberg_dart.so'];
  }

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

  /// 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 {}

  @override
  ExternalLibraryLoaderConfig get defaultExternalLibraryLoaderConfig =>
      kDefaultExternalLibraryLoaderConfig;

  @override
  String get codegenVersion => '2.12.0';

  @override
  int get rustContentHash => 1859615725;

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

abstract class RustLibApi extends BaseApi {
  ArcDocumentExtractor crateDocumentExtractorDartImplAutoAccessorGetField0({
    required DocumentExtractorDartImpl that,
  });

  void crateDocumentExtractorDartImplAutoAccessorSetField0({
    required DocumentExtractorDartImpl that,
    required ArcDocumentExtractor field0,
  });

  ArcEmbeddingBackend crateEmbeddingBackendDartImplAutoAccessorGetField0({
    required EmbeddingBackendDartImpl that,
  });

  void crateEmbeddingBackendDartImplAutoAccessorSetField0({
    required EmbeddingBackendDartImpl that,
    required ArcEmbeddingBackend field0,
  });

  ArcOcrBackend crateOcrBackendDartImplAutoAccessorGetField0({
    required OcrBackendDartImpl that,
  });

  void crateOcrBackendDartImplAutoAccessorSetField0({
    required OcrBackendDartImpl that,
    required ArcOcrBackend field0,
  });

  ArcPostProcessor cratePostProcessorDartImplAutoAccessorGetField0({
    required PostProcessorDartImpl that,
  });

  void cratePostProcessorDartImplAutoAccessorSetField0({
    required PostProcessorDartImpl that,
    required ArcPostProcessor field0,
  });

  ArcRenderer crateRendererDartImplAutoAccessorGetField0({
    required RendererDartImpl that,
  });

  void crateRendererDartImplAutoAccessorSetField0({
    required RendererDartImpl that,
    required ArcRenderer field0,
  });

  ArcValidator crateValidatorDartImplAutoAccessorGetField0({
    required ValidatorDartImpl that,
  });

  void crateValidatorDartImplAutoAccessorSetField0({
    required ValidatorDartImpl that,
    required ArcValidator field0,
  });

  Future<List<ExtractionResult>> crateBatchExtractBytes({
    required List<BatchBytesItem> items,
    required ExtractionConfig config,
  });

  Future<List<ExtractionResult>> crateBatchExtractBytesSync({
    required List<BatchBytesItem> items,
    required ExtractionConfig config,
  });

  Future<List<ExtractionResult>> crateBatchExtractFiles({
    required List<BatchFileItem> items,
    required ExtractionConfig config,
  });

  Future<List<ExtractionResult>> crateBatchExtractFilesSync({
    required List<BatchFileItem> items,
    required ExtractionConfig config,
  });

  Future<void> crateClearDocumentExtractors();

  Future<void> crateClearEmbeddingBackends();

  Future<void> crateClearOcrBackends();

  Future<void> crateClearPostProcessors();

  Future<void> crateClearRenderers();

  Future<void> crateClearValidators();

  Future<ExtractionDiff> crateCompare({
    required ExtractionResult a,
    required ExtractionResult b,
    required DiffOptions opts,
  });

  Future<AccelerationConfig> crateCreateAccelerationConfigFromJson({
    required String json,
  });

  Future<ArchiveEntry> crateCreateArchiveEntryFromJson({required String json});

  Future<ArchiveMetadata> crateCreateArchiveMetadataFromJson({
    required String json,
  });

  Future<BBox> crateCreateBBoxFromJson({required String json});

  Future<BatchBytesItem> crateCreateBatchBytesItemFromJson({
    required String json,
  });

  Future<BatchFileItem> crateCreateBatchFileItemFromJson({
    required String json,
  });

  Future<BibtexMetadata> crateCreateBibtexMetadataFromJson({
    required String json,
  });

  Future<BoundingBox> crateCreateBoundingBoxFromJson({required String json});

  Future<CacheStats> crateCreateCacheStatsFromJson({required String json});

  Future<CellChange> crateCreateCellChangeFromJson({required String json});

  Future<Chunk> crateCreateChunkFromJson({required String json});

  Future<ChunkMetadata> crateCreateChunkMetadataFromJson({
    required String json,
  });

  Future<ChunkingConfig> crateCreateChunkingConfigFromJson({
    required String json,
  });

  Future<CitationMetadata> crateCreateCitationMetadataFromJson({
    required String json,
  });

  Future<ContentFilterConfig> crateCreateContentFilterConfigFromJson({
    required String json,
  });

  Future<ContributorRole> crateCreateContributorRoleFromJson({
    required String json,
  });

  Future<CoreProperties> crateCreateCorePropertiesFromJson({
    required String json,
  });

  Future<CsvMetadata> crateCreateCsvMetadataFromJson({required String json});

  Future<DbfFieldInfo> crateCreateDbfFieldInfoFromJson({required String json});

  Future<DbfMetadata> crateCreateDbfMetadataFromJson({required String json});

  Future<DetectResponse> crateCreateDetectResponseFromJson({
    required String json,
  });

  Future<DetectionResult> crateCreateDetectionResultFromJson({
    required String json,
  });

  Future<DiffHunk> crateCreateDiffHunkFromJson({required String json});

  Future<DiffOptions> crateCreateDiffOptionsFromJson({required String json});

  Future<DjotContent> crateCreateDjotContentFromJson({required String json});

  Future<DjotImage> crateCreateDjotImageFromJson({required String json});

  Future<DjotLink> crateCreateDjotLinkFromJson({required String json});

  Future<DocumentExtractorDartImpl> crateCreateDocumentExtractorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<InternalDocumentBridge> Function(
      Uint8List,
      String,
      ExtractionConfig,
    )
    extractBytes,
    required FutureOr<InternalDocumentBridge> Function(
      String,
      String,
      ExtractionConfig,
    )
    extractFile,
    required FutureOr<List<String>> Function() supportedMimeTypes,
    required FutureOr<PlatformInt64> Function() priority,
    required FutureOr<bool> Function(String, String) canHandle,
  });

  Future<DocumentNode> crateCreateDocumentNodeFromJson({required String json});

  Future<DocumentRelationship> crateCreateDocumentRelationshipFromJson({
    required String json,
  });

  Future<DocumentRevision> crateCreateDocumentRevisionFromJson({
    required String json,
  });

  Future<DocumentStructure> crateCreateDocumentStructureFromJson({
    required String json,
  });

  Future<DocxAppProperties> crateCreateDocxAppPropertiesFromJson({
    required String json,
  });

  Future<DocxMetadata> crateCreateDocxMetadataFromJson({required String json});

  Future<Element> crateCreateElementFromJson({required String json});

  Future<ElementMetadata> crateCreateElementMetadataFromJson({
    required String json,
  });

  Future<EmailAttachment> crateCreateEmailAttachmentFromJson({
    required String json,
  });

  Future<EmailConfig> crateCreateEmailConfigFromJson({required String json});

  Future<EmailExtractionResult> crateCreateEmailExtractionResultFromJson({
    required String json,
  });

  Future<EmailMetadata> crateCreateEmailMetadataFromJson({
    required String json,
  });

  Future<EmbeddedChanges> crateCreateEmbeddedChangesFromJson({
    required String json,
  });

  Future<EmbeddedDiff> crateCreateEmbeddedDiffFromJson({required String json});

  Future<EmbeddedFile> crateCreateEmbeddedFileFromJson({required String json});

  Future<EmbeddingBackendDartImpl> crateCreateEmbeddingBackendDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<PlatformInt64> Function() dimensions,
    required FutureOr<List<Float64List>> Function(List<String>) embed,
  });

  Future<EmbeddingConfig> crateCreateEmbeddingConfigFromJson({
    required String json,
  });

  Future<EmbeddingPreset> crateCreateEmbeddingPresetFromJson({
    required String json,
  });

  Future<EpubMetadata> crateCreateEpubMetadataFromJson({required String json});

  Future<ErrorMetadata> crateCreateErrorMetadataFromJson({
    required String json,
  });

  Future<ExcelMetadata> crateCreateExcelMetadataFromJson({
    required String json,
  });

  Future<ExcelSheet> crateCreateExcelSheetFromJson({required String json});

  Future<ExcelWorkbook> crateCreateExcelWorkbookFromJson({
    required String json,
  });

  Future<ExtractedImage> crateCreateExtractedImageFromJson({
    required String json,
  });

  Future<ExtractedUri> crateCreateExtractedUriFromJson({required String json});

  Future<ExtractionConfig> crateCreateExtractionConfigFromJson({
    required String json,
  });

  Future<ExtractionDiff> crateCreateExtractionDiffFromJson({
    required String json,
  });

  Future<ExtractionResult> crateCreateExtractionResultFromJson({
    required String json,
  });

  Future<FictionBookMetadata> crateCreateFictionBookMetadataFromJson({
    required String json,
  });

  Future<FileExtractionConfig> crateCreateFileExtractionConfigFromJson({
    required String json,
  });

  Future<Footnote> crateCreateFootnoteFromJson({required String json});

  Future<FormattedBlock> crateCreateFormattedBlockFromJson({
    required String json,
  });

  Future<GridCell> crateCreateGridCellFromJson({required String json});

  Future<HeaderMetadata> crateCreateHeaderMetadataFromJson({
    required String json,
  });

  Future<HeadingContext> crateCreateHeadingContextFromJson({
    required String json,
  });

  Future<HeadingLevel> crateCreateHeadingLevelFromJson({required String json});

  Future<HierarchicalBlock> crateCreateHierarchicalBlockFromJson({
    required String json,
  });

  Future<HierarchyConfig> crateCreateHierarchyConfigFromJson({
    required String json,
  });

  Future<HtmlMetadata> crateCreateHtmlMetadataFromJson({required String json});

  Future<HtmlOutputConfig> crateCreateHtmlOutputConfigFromJson({
    required String json,
  });

  Future<ImageExtractionConfig> crateCreateImageExtractionConfigFromJson({
    required String json,
  });

  Future<ImageMetadata> crateCreateImageMetadataFromJson({
    required String json,
  });

  Future<ImageMetadataType> crateCreateImageMetadataTypeFromJson({
    required String json,
  });

  Future<ImagePreprocessingConfig> crateCreateImagePreprocessingConfigFromJson({
    required String json,
  });

  Future<ImagePreprocessingMetadata>
  crateCreateImagePreprocessingMetadataFromJson({required String json});

  Future<InlineElement> crateCreateInlineElementFromJson({
    required String json,
  });

  Future<JatsMetadata> crateCreateJatsMetadataFromJson({required String json});

  Future<KeywordConfig> crateCreateKeywordConfigFromJson({
    required String json,
  });

  Future<Keyword> crateCreateKeywordFromJson({required String json});

  Future<LanguageDetectionConfig> crateCreateLanguageDetectionConfigFromJson({
    required String json,
  });

  Future<LayoutDetectionConfig> crateCreateLayoutDetectionConfigFromJson({
    required String json,
  });

  Future<LayoutDetection> crateCreateLayoutDetectionFromJson({
    required String json,
  });

  Future<LayoutRegion> crateCreateLayoutRegionFromJson({required String json});

  Future<LinkMetadata> crateCreateLinkMetadataFromJson({required String json});

  Future<LlmConfig> crateCreateLlmConfigFromJson({required String json});

  Future<LlmUsage> crateCreateLlmUsageFromJson({required String json});

  Future<Metadata> crateCreateMetadataFromJson({required String json});

  Future<ModelPaths> crateCreateModelPathsFromJson({required String json});

  Future<OcrBackendDartImpl> crateCreateOcrBackendDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<ExtractionResult> Function(Uint8List, OcrConfig)
    processImage,
    required FutureOr<ExtractionResult> Function(String, OcrConfig)
    processImageFile,
    required FutureOr<bool> Function(String) supportsLanguage,
    required FutureOr<OcrBackendType> Function() backendType,
    required FutureOr<List<String>> Function() supportedLanguages,
    required FutureOr<bool> Function() supportsTableDetection,
    required FutureOr<bool> Function() supportsDocumentProcessing,
    required FutureOr<ExtractionResult> Function(String, OcrConfig)
    processDocument,
  });

  Future<OcrConfidence> crateCreateOcrConfidenceFromJson({
    required String json,
  });

  Future<OcrConfig> crateCreateOcrConfigFromJson({required String json});

  Future<OcrElementConfig> crateCreateOcrElementConfigFromJson({
    required String json,
  });

  Future<OcrElement> crateCreateOcrElementFromJson({required String json});

  Future<OcrExtractionResult> crateCreateOcrExtractionResultFromJson({
    required String json,
  });

  Future<OcrMetadata> crateCreateOcrMetadataFromJson({required String json});

  Future<OcrPipelineConfig> crateCreateOcrPipelineConfigFromJson({
    required String json,
  });

  Future<OcrPipelineStage> crateCreateOcrPipelineStageFromJson({
    required String json,
  });

  Future<OcrQualityThresholds> crateCreateOcrQualityThresholdsFromJson({
    required String json,
  });

  Future<OcrRotation> crateCreateOcrRotationFromJson({required String json});

  Future<OcrTableBoundingBox> crateCreateOcrTableBoundingBoxFromJson({
    required String json,
  });

  Future<OcrTable> crateCreateOcrTableFromJson({required String json});

  Future<OrientationResult> crateCreateOrientationResultFromJson({
    required String json,
  });

  Future<PaddleOcrConfig> crateCreatePaddleOcrConfigFromJson({
    required String json,
  });

  Future<PageBoundary> crateCreatePageBoundaryFromJson({required String json});

  Future<PageConfig> crateCreatePageConfigFromJson({required String json});

  Future<PageContent> crateCreatePageContentFromJson({required String json});

  Future<PageHierarchy> crateCreatePageHierarchyFromJson({
    required String json,
  });

  Future<PageInfo> crateCreatePageInfoFromJson({required String json});

  Future<PageStructure> crateCreatePageStructureFromJson({
    required String json,
  });

  Future<PdfAnnotation> crateCreatePdfAnnotationFromJson({
    required String json,
  });

  Future<PdfConfig> crateCreatePdfConfigFromJson({required String json});

  Future<PdfMetadata> crateCreatePdfMetadataFromJson({required String json});

  Future<PostProcessorConfig> crateCreatePostProcessorConfigFromJson({
    required String json,
  });

  Future<PostProcessorDartImpl> crateCreatePostProcessorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<void> Function(ExtractionResult, ExtractionConfig)
    process,
    required FutureOr<ProcessingStage> Function() processingStage,
    required FutureOr<bool> Function(ExtractionResult, ExtractionConfig)
    shouldProcess,
    required FutureOr<PlatformInt64> Function(ExtractionResult)
    estimatedDurationMs,
    required FutureOr<PlatformInt64> Function() priority,
  });

  Future<PptxAppProperties> crateCreatePptxAppPropertiesFromJson({
    required String json,
  });

  Future<PptxExtractionResult> crateCreatePptxExtractionResultFromJson({
    required String json,
  });

  Future<PptxMetadata> crateCreatePptxMetadataFromJson({required String json});

  Future<ProcessingWarning> crateCreateProcessingWarningFromJson({
    required String json,
  });

  Future<PstMetadata> crateCreatePstMetadataFromJson({required String json});

  Future<RakeParams> crateCreateRakeParamsFromJson({required String json});

  Future<RecognizedTable> crateCreateRecognizedTableFromJson({
    required String json,
  });

  Future<RendererDartImpl> crateCreateRendererDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<String> Function(InternalDocumentBridge) render,
  });

  Future<RevisionDelta> crateCreateRevisionDeltaFromJson({
    required String json,
  });

  Future<SecurityLimits> crateCreateSecurityLimitsFromJson({
    required String json,
  });

  Future<ServerConfig> crateCreateServerConfigFromJson({required String json});

  Future<StructuredData> crateCreateStructuredDataFromJson({
    required String json,
  });

  Future<StructuredDataResult> crateCreateStructuredDataResultFromJson({
    required String json,
  });

  Future<StructuredExtractionConfig>
  crateCreateStructuredExtractionConfigFromJson({required String json});

  Future<SupportedFormat> crateCreateSupportedFormatFromJson({
    required String json,
  });

  Future<TableCell> crateCreateTableCellFromJson({required String json});

  Future<TableDiff> crateCreateTableDiffFromJson({required String json});

  Future<Table> crateCreateTableFromJson({required String json});

  Future<TableGrid> crateCreateTableGridFromJson({required String json});

  Future<TesseractConfig> crateCreateTesseractConfigFromJson({
    required String json,
  });

  Future<TextAnnotation> crateCreateTextAnnotationFromJson({
    required String json,
  });

  Future<TextExtractionResult> crateCreateTextExtractionResultFromJson({
    required String json,
  });

  Future<TextMetadata> crateCreateTextMetadataFromJson({required String json});

  Future<TokenReductionConfig> crateCreateTokenReductionConfigFromJson({
    required String json,
  });

  Future<TokenReductionOptions> crateCreateTokenReductionOptionsFromJson({
    required String json,
  });

  Future<TreeSitterConfig> crateCreateTreeSitterConfigFromJson({
    required String json,
  });

  Future<TreeSitterProcessConfig> crateCreateTreeSitterProcessConfigFromJson({
    required String json,
  });

  Future<ValidatorDartImpl> crateCreateValidatorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<void> Function(ExtractionResult, ExtractionConfig)
    validate,
    required FutureOr<bool> Function(ExtractionResult, ExtractionConfig)
    shouldValidate,
    required FutureOr<PlatformInt64> Function() priority,
  });

  Future<XlsxAppProperties> crateCreateXlsxAppPropertiesFromJson({
    required String json,
  });

  Future<XmlExtractionResult> crateCreateXmlExtractionResultFromJson({
    required String json,
  });

  Future<XmlMetadata> crateCreateXmlMetadataFromJson({required String json});

  Future<YakeParams> crateCreateYakeParamsFromJson({required String json});

  Future<YearRange> crateCreateYearRangeFromJson({required String json});

  Future<String> crateDetectMimeType({
    required String path,
    required bool checkExists,
  });

  Future<String> crateDetectMimeTypeFromBytes({required List<int> content});

  Future<List<Float64List>> crateEmbedTexts({
    required List<String> texts,
    required EmbeddingConfig config,
  });

  Future<List<Float64List>> crateEmbedTextsAsync({
    required List<String> texts,
    required EmbeddingConfig config,
  });

  Future<ExtractionResult> crateExtractBytes({
    required List<int> content,
    required String mimeType,
    required ExtractionConfig config,
  });

  Future<ExtractionResult> crateExtractBytesSync({
    required List<int> content,
    required String mimeType,
    required ExtractionConfig config,
  });

  Future<ExtractionResult> crateExtractFile({
    required String path,
    String? mimeType,
    required ExtractionConfig config,
  });

  Future<ExtractionResult> crateExtractFileSync({
    required String path,
    String? mimeType,
    required ExtractionConfig config,
  });

  Future<EmbeddingPreset?> crateGetEmbeddingPreset({required String name});

  Future<List<String>> crateGetExtensionsForMime({required String mimeType});

  Future<List<String>> crateListDocumentExtractors();

  Future<List<String>> crateListEmbeddingBackends();

  Future<List<String>> crateListEmbeddingPresets();

  Future<List<String>> crateListOcrBackends();

  Future<List<String>> crateListPostProcessors();

  Future<List<String>> crateListRenderers();

  Future<List<String>> crateListValidators();

  Future<void> crateRegisterDocumentExtractor({
    required DocumentExtractorDartImpl impl,
  });

  Future<void> crateRegisterEmbeddingBackend({
    required EmbeddingBackendDartImpl impl,
  });

  Future<void> crateRegisterOcrBackend({required OcrBackendDartImpl impl});

  Future<void> crateRegisterPostProcessor({
    required PostProcessorDartImpl impl,
  });

  Future<void> crateRegisterRenderer({required RendererDartImpl impl});

  Future<void> crateRegisterValidator({required ValidatorDartImpl impl});

  Future<Uint8List> crateRenderPdfPageToPng({
    required List<int> pdfBytes,
    required PlatformInt64 pageIndex,
    PlatformInt64? dpi,
    String? password,
  });

  Future<void> crateUnregisterDocumentExtractor({required String name});

  Future<void> crateUnregisterEmbeddingBackend({required String name});

  Future<void> crateUnregisterOcrBackend({required String name});

  Future<void> crateUnregisterPostProcessor({required String name});

  Future<void> crateUnregisterRenderer({required String name});

  Future<void> crateUnregisterValidator({required String name});

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcDocumentExtractor;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcDocumentExtractor;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_ArcDocumentExtractorPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcEmbeddingBackend;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcEmbeddingBackend;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_ArcEmbeddingBackendPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcOcrBackend;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcOcrBackend;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_ArcOcrBackendPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcPostProcessor;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcPostProcessor;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_ArcPostProcessorPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcRenderer;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcRenderer;

  CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ArcRendererPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcValidator;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcValidator;

  CrossPlatformFinalizerArg get rust_arc_decrement_strong_count_ArcValidatorPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_DocumentExtractorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_DocumentExtractorDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_DocumentExtractorDartImplPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_EmbeddingBackendDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_EmbeddingBackendDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_EmbeddingBackendDartImplPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_OcrBackendDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_OcrBackendDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_OcrBackendDartImplPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_PostProcessorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_PostProcessorDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_PostProcessorDartImplPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_RendererDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_RendererDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_RendererDartImplPtr;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ValidatorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ValidatorDartImpl;

  CrossPlatformFinalizerArg
  get rust_arc_decrement_strong_count_ValidatorDartImplPtr;
}

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

  @override
  ArcDocumentExtractor crateDocumentExtractorDartImplAutoAccessorGetField0({
    required DocumentExtractorDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 1)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync,
          decodeErrorData: null,
        ),
        constMeta:
            kCrateDocumentExtractorDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void crateDocumentExtractorDartImplAutoAccessorSetField0({
    required DocumentExtractorDartImpl that,
    required ArcDocumentExtractor field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 2)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta:
            kCrateDocumentExtractorDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta
  get kCrateDocumentExtractorDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "DocumentExtractorDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  ArcEmbeddingBackend crateEmbeddingBackendDartImplAutoAccessorGetField0({
    required EmbeddingBackendDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 3)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync,
          decodeErrorData: null,
        ),
        constMeta: kCrateEmbeddingBackendDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void crateEmbeddingBackendDartImplAutoAccessorSetField0({
    required EmbeddingBackendDartImpl that,
    required ArcEmbeddingBackend field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 4)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta: kCrateEmbeddingBackendDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta
  get kCrateEmbeddingBackendDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "EmbeddingBackendDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  ArcOcrBackend crateOcrBackendDartImplAutoAccessorGetField0({
    required OcrBackendDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 5)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync,
          decodeErrorData: null,
        ),
        constMeta: kCrateOcrBackendDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void crateOcrBackendDartImplAutoAccessorSetField0({
    required OcrBackendDartImpl that,
    required ArcOcrBackend field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 6)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta: kCrateOcrBackendDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateOcrBackendDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "OcrBackendDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  ArcPostProcessor cratePostProcessorDartImplAutoAccessorGetField0({
    required PostProcessorDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 7)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync,
          decodeErrorData: null,
        ),
        constMeta: kCratePostProcessorDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void cratePostProcessorDartImplAutoAccessorSetField0({
    required PostProcessorDartImpl that,
    required ArcPostProcessor field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 8)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta: kCratePostProcessorDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCratePostProcessorDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "PostProcessorDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  ArcRenderer crateRendererDartImplAutoAccessorGetField0({
    required RendererDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 9)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync,
          decodeErrorData: null,
        ),
        constMeta: kCrateRendererDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void crateRendererDartImplAutoAccessorSetField0({
    required RendererDartImpl that,
    required ArcRenderer field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 10)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta: kCrateRendererDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRendererDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "RendererDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  ArcValidator crateValidatorDartImplAutoAccessorGetField0({
    required ValidatorDartImpl that,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
            that,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 11)!;
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync,
          decodeErrorData: null,
        ),
        constMeta: kCrateValidatorDartImplAutoAccessorGetField0ConstMeta,
        argValues: [that],
        apiImpl: this,
      ),
    );
  }

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

  @override
  void crateValidatorDartImplAutoAccessorSetField0({
    required ValidatorDartImpl that,
    required ArcValidator field0,
  }) {
    return handler.executeSync(
      SyncTask(
        callFfi: () {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
            that,
            serializer,
          );
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync(
            field0,
            serializer,
          );
          return pdeCallFfi(generalizedFrbRustBinding, serializer, funcId: 12)!;
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: null,
        ),
        constMeta: kCrateValidatorDartImplAutoAccessorSetField0ConstMeta,
        argValues: [that, field0],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateValidatorDartImplAutoAccessorSetField0ConstMeta =>
      const TaskConstMeta(
        debugName: "ValidatorDartImpl_auto_accessor_set_field0",
        argNames: ["that", "field0"],
      );

  @override
  Future<List<ExtractionResult>> crateBatchExtractBytes({
    required List<BatchBytesItem> items,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_batch_bytes_item(items, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 13,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateBatchExtractBytesConstMeta,
        argValues: [items, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateBatchExtractBytesConstMeta => const TaskConstMeta(
    debugName: "batch_extract_bytes",
    argNames: ["items", "config"],
  );

  @override
  Future<List<ExtractionResult>> crateBatchExtractBytesSync({
    required List<BatchBytesItem> items,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_batch_bytes_item(items, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 14,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateBatchExtractBytesSyncConstMeta,
        argValues: [items, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateBatchExtractBytesSyncConstMeta => const TaskConstMeta(
    debugName: "batch_extract_bytes_sync",
    argNames: ["items", "config"],
  );

  @override
  Future<List<ExtractionResult>> crateBatchExtractFiles({
    required List<BatchFileItem> items,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_batch_file_item(items, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 15,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateBatchExtractFilesConstMeta,
        argValues: [items, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateBatchExtractFilesConstMeta => const TaskConstMeta(
    debugName: "batch_extract_files",
    argNames: ["items", "config"],
  );

  @override
  Future<List<ExtractionResult>> crateBatchExtractFilesSync({
    required List<BatchFileItem> items,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_batch_file_item(items, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 16,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateBatchExtractFilesSyncConstMeta,
        argValues: [items, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateBatchExtractFilesSyncConstMeta => const TaskConstMeta(
    debugName: "batch_extract_files_sync",
    argNames: ["items", "config"],
  );

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

  TaskConstMeta get kCrateClearDocumentExtractorsConstMeta =>
      const TaskConstMeta(debugName: "clear_document_extractors", argNames: []);

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

  TaskConstMeta get kCrateClearEmbeddingBackendsConstMeta =>
      const TaskConstMeta(debugName: "clear_embedding_backends", argNames: []);

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

  TaskConstMeta get kCrateClearOcrBackendsConstMeta =>
      const TaskConstMeta(debugName: "clear_ocr_backends", argNames: []);

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

  TaskConstMeta get kCrateClearPostProcessorsConstMeta =>
      const TaskConstMeta(debugName: "clear_post_processors", argNames: []);

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

  TaskConstMeta get kCrateClearRenderersConstMeta =>
      const TaskConstMeta(debugName: "clear_renderers", argNames: []);

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

  TaskConstMeta get kCrateClearValidatorsConstMeta =>
      const TaskConstMeta(debugName: "clear_validators", argNames: []);

  @override
  Future<ExtractionDiff> crateCompare({
    required ExtractionResult a,
    required ExtractionResult b,
    required DiffOptions opts,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_box_autoadd_extraction_result(a, serializer);
          sse_encode_box_autoadd_extraction_result(b, serializer);
          sse_encode_box_autoadd_diff_options(opts, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 23,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_diff,
          decodeErrorData: null,
        ),
        constMeta: kCrateCompareConstMeta,
        argValues: [a, b, opts],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCompareConstMeta =>
      const TaskConstMeta(debugName: "compare", argNames: ["a", "b", "opts"]);

  @override
  Future<AccelerationConfig> crateCreateAccelerationConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 24,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_acceleration_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateAccelerationConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ArchiveEntry> crateCreateArchiveEntryFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 25,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_archive_entry,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateArchiveEntryFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ArchiveMetadata> crateCreateArchiveMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 26,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_archive_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateArchiveMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

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

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

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

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

  @override
  Future<BatchFileItem> crateCreateBatchFileItemFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 29,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_batch_file_item,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateBatchFileItemFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<BibtexMetadata> crateCreateBibtexMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 30,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_bibtex_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateBibtexMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

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

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

  @override
  Future<CacheStats> crateCreateCacheStatsFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 32,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_cache_stats,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateCacheStatsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<CellChange> crateCreateCellChangeFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 33,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_cell_change,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateCellChangeFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Chunk> crateCreateChunkFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 34,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_chunk,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateChunkFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ChunkMetadata> crateCreateChunkMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 35,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_chunk_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateChunkMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ChunkingConfig> crateCreateChunkingConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 36,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_chunking_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateChunkingConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<CitationMetadata> crateCreateCitationMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 37,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_citation_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateCitationMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ContentFilterConfig> crateCreateContentFilterConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 38,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_content_filter_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateContentFilterConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ContributorRole> crateCreateContributorRoleFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 39,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_contributor_role,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateContributorRoleFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<CoreProperties> crateCreateCorePropertiesFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 40,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_core_properties,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateCorePropertiesFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<CsvMetadata> crateCreateCsvMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 41,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_csv_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateCsvMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DbfFieldInfo> crateCreateDbfFieldInfoFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 42,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_dbf_field_info,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDbfFieldInfoFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DbfMetadata> crateCreateDbfMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 43,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_dbf_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDbfMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DetectResponse> crateCreateDetectResponseFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 44,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_detect_response,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDetectResponseFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DetectionResult> crateCreateDetectionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 45,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_detection_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDetectionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DiffHunk> crateCreateDiffHunkFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 46,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_diff_hunk,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDiffHunkFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DiffOptions> crateCreateDiffOptionsFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 47,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_diff_options,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDiffOptionsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DjotContent> crateCreateDjotContentFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 48,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_djot_content,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDjotContentFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DjotImage> crateCreateDjotImageFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 49,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_djot_image,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDjotImageFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DjotLink> crateCreateDjotLinkFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 50,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_djot_link,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDjotLinkFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocumentExtractorDartImpl> crateCreateDocumentExtractorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<InternalDocumentBridge> Function(
      Uint8List,
      String,
      ExtractionConfig,
    )
    extractBytes,
    required FutureOr<InternalDocumentBridge> Function(
      String,
      String,
      ExtractionConfig,
    )
    extractFile,
    required FutureOr<List<String>> Function() supportedMimeTypes,
    required FutureOr<PlatformInt64> Function() priority,
    required FutureOr<bool> Function(String, String) canHandle,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs_list_prim_u_8_strict_String_extraction_config_Output_internal_document_bridge_AnyhowException(
            extractBytes,
            serializer,
          );
          sse_encode_DartFn_Inputs_String_String_extraction_config_Output_internal_document_bridge_AnyhowException(
            extractFile,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_list_String_AnyhowException(
            supportedMimeTypes,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_i_64_AnyhowException(
            priority,
            serializer,
          );
          sse_encode_DartFn_Inputs_String_String_Output_bool_AnyhowException(
            canHandle,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 51,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreateDocumentExtractorDartImplConstMeta,
        argValues: [
          pluginName,
          pluginVersion,
          extractBytes,
          extractFile,
          supportedMimeTypes,
          priority,
          canHandle,
        ],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreateDocumentExtractorDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_document_extractor_dart_impl",
        argNames: [
          "pluginName",
          "pluginVersion",
          "extractBytes",
          "extractFile",
          "supportedMimeTypes",
          "priority",
          "canHandle",
        ],
      );

  @override
  Future<DocumentNode> crateCreateDocumentNodeFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 52,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_document_node,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocumentNodeFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocumentRelationship> crateCreateDocumentRelationshipFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 53,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_document_relationship,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocumentRelationshipFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocumentRevision> crateCreateDocumentRevisionFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 54,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_document_revision,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocumentRevisionFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocumentStructure> crateCreateDocumentStructureFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 55,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_document_structure,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocumentStructureFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocxAppProperties> crateCreateDocxAppPropertiesFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 56,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_docx_app_properties,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocxAppPropertiesFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<DocxMetadata> crateCreateDocxMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 57,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_docx_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateDocxMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Element> crateCreateElementFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 58,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_element,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateElementFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ElementMetadata> crateCreateElementMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 59,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_element_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateElementMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmailAttachment> crateCreateEmailAttachmentFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 60,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_email_attachment,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmailAttachmentFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmailConfig> crateCreateEmailConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 61,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_email_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmailConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmailExtractionResult> crateCreateEmailExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 62,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_email_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmailExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmailMetadata> crateCreateEmailMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 63,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_email_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmailMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmbeddedChanges> crateCreateEmbeddedChangesFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 64,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_embedded_changes,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmbeddedChangesFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmbeddedDiff> crateCreateEmbeddedDiffFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 65,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_embedded_diff,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmbeddedDiffFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmbeddedFile> crateCreateEmbeddedFileFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 66,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_embedded_file,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmbeddedFileFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmbeddingBackendDartImpl> crateCreateEmbeddingBackendDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<PlatformInt64> Function() dimensions,
    required FutureOr<List<Float64List>> Function(List<String>) embed,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs__Output_i_64_AnyhowException(
            dimensions,
            serializer,
          );
          sse_encode_DartFn_Inputs_list_String_Output_list_list_prim_f_64_strict_AnyhowException(
            embed,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 67,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreateEmbeddingBackendDartImplConstMeta,
        argValues: [pluginName, pluginVersion, dimensions, embed],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreateEmbeddingBackendDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_embedding_backend_dart_impl",
        argNames: ["pluginName", "pluginVersion", "dimensions", "embed"],
      );

  @override
  Future<EmbeddingConfig> crateCreateEmbeddingConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 68,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_embedding_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmbeddingConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EmbeddingPreset> crateCreateEmbeddingPresetFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 69,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_embedding_preset,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEmbeddingPresetFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<EpubMetadata> crateCreateEpubMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 70,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_epub_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateEpubMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ErrorMetadata> crateCreateErrorMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 71,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_error_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateErrorMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExcelMetadata> crateCreateExcelMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 72,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_excel_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExcelMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExcelSheet> crateCreateExcelSheetFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 73,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_excel_sheet,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExcelSheetFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExcelWorkbook> crateCreateExcelWorkbookFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 74,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_excel_workbook,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExcelWorkbookFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExtractedImage> crateCreateExtractedImageFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 75,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extracted_image,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExtractedImageFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExtractedUri> crateCreateExtractedUriFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 76,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extracted_uri,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExtractedUriFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExtractionConfig> crateCreateExtractionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 77,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExtractionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExtractionDiff> crateCreateExtractionDiffFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 78,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_diff,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExtractionDiffFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ExtractionResult> crateCreateExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 79,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<FictionBookMetadata> crateCreateFictionBookMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 80,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_fiction_book_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateFictionBookMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<FileExtractionConfig> crateCreateFileExtractionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 81,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_file_extraction_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateFileExtractionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Footnote> crateCreateFootnoteFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 82,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_footnote,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateFootnoteFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<FormattedBlock> crateCreateFormattedBlockFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 83,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_formatted_block,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateFormattedBlockFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<GridCell> crateCreateGridCellFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 84,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_grid_cell,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateGridCellFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<HeaderMetadata> crateCreateHeaderMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 85,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_header_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateHeaderMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

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

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

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

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

  @override
  Future<HierarchicalBlock> crateCreateHierarchicalBlockFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 88,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_hierarchical_block,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateHierarchicalBlockFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<HierarchyConfig> crateCreateHierarchyConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 89,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_hierarchy_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateHierarchyConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<HtmlMetadata> crateCreateHtmlMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 90,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_html_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateHtmlMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<HtmlOutputConfig> crateCreateHtmlOutputConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 91,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_html_output_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateHtmlOutputConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ImageExtractionConfig> crateCreateImageExtractionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 92,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_image_extraction_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateImageExtractionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ImageMetadata> crateCreateImageMetadataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 93,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_image_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateImageMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ImageMetadataType> crateCreateImageMetadataTypeFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 94,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_image_metadata_type,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateImageMetadataTypeFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ImagePreprocessingConfig> crateCreateImagePreprocessingConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 95,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_image_preprocessing_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateImagePreprocessingConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ImagePreprocessingMetadata>
  crateCreateImagePreprocessingMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 96,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_image_preprocessing_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateImagePreprocessingMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<InlineElement> crateCreateInlineElementFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 97,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_inline_element,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateInlineElementFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

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

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

  @override
  Future<KeywordConfig> crateCreateKeywordConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 99,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_keyword_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateKeywordConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Keyword> crateCreateKeywordFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 100,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_keyword,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateKeywordFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LanguageDetectionConfig> crateCreateLanguageDetectionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 101,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_language_detection_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLanguageDetectionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LayoutDetectionConfig> crateCreateLayoutDetectionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 102,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_layout_detection_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLayoutDetectionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LayoutDetection> crateCreateLayoutDetectionFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 103,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_layout_detection,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLayoutDetectionFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LayoutRegion> crateCreateLayoutRegionFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 104,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_layout_region,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLayoutRegionFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LinkMetadata> crateCreateLinkMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 105,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_link_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLinkMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LlmConfig> crateCreateLlmConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 106,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_llm_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLlmConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<LlmUsage> crateCreateLlmUsageFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 107,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_llm_usage,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateLlmUsageFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Metadata> crateCreateMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 108,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ModelPaths> crateCreateModelPathsFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 109,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_model_paths,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateModelPathsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrBackendDartImpl> crateCreateOcrBackendDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<ExtractionResult> Function(Uint8List, OcrConfig)
    processImage,
    required FutureOr<ExtractionResult> Function(String, OcrConfig)
    processImageFile,
    required FutureOr<bool> Function(String) supportsLanguage,
    required FutureOr<OcrBackendType> Function() backendType,
    required FutureOr<List<String>> Function() supportedLanguages,
    required FutureOr<bool> Function() supportsTableDetection,
    required FutureOr<bool> Function() supportsDocumentProcessing,
    required FutureOr<ExtractionResult> Function(String, OcrConfig)
    processDocument,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs_list_prim_u_8_strict_ocr_config_Output_extraction_result_AnyhowException(
            processImage,
            serializer,
          );
          sse_encode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
            processImageFile,
            serializer,
          );
          sse_encode_DartFn_Inputs_String_Output_bool_AnyhowException(
            supportsLanguage,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_ocr_backend_type_AnyhowException(
            backendType,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_list_String_AnyhowException(
            supportedLanguages,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_bool_AnyhowException(
            supportsTableDetection,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_bool_AnyhowException(
            supportsDocumentProcessing,
            serializer,
          );
          sse_encode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
            processDocument,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 110,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreateOcrBackendDartImplConstMeta,
        argValues: [
          pluginName,
          pluginVersion,
          processImage,
          processImageFile,
          supportsLanguage,
          backendType,
          supportedLanguages,
          supportsTableDetection,
          supportsDocumentProcessing,
          processDocument,
        ],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreateOcrBackendDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_ocr_backend_dart_impl",
        argNames: [
          "pluginName",
          "pluginVersion",
          "processImage",
          "processImageFile",
          "supportsLanguage",
          "backendType",
          "supportedLanguages",
          "supportsTableDetection",
          "supportsDocumentProcessing",
          "processDocument",
        ],
      );

  @override
  Future<OcrConfidence> crateCreateOcrConfidenceFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 111,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_confidence,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrConfidenceFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrConfig> crateCreateOcrConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 112,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrElementConfig> crateCreateOcrElementConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 113,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_element_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrElementConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrElement> crateCreateOcrElementFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 114,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_element,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrElementFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrExtractionResult> crateCreateOcrExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 115,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrMetadata> crateCreateOcrMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 116,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrPipelineConfig> crateCreateOcrPipelineConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 117,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_pipeline_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrPipelineConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrPipelineStage> crateCreateOcrPipelineStageFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 118,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_pipeline_stage,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrPipelineStageFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrQualityThresholds> crateCreateOcrQualityThresholdsFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 119,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_quality_thresholds,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrQualityThresholdsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrRotation> crateCreateOcrRotationFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 120,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_rotation,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrRotationFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrTableBoundingBox> crateCreateOcrTableBoundingBoxFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 121,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_table_bounding_box,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrTableBoundingBoxFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OcrTable> crateCreateOcrTableFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 122,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_ocr_table,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOcrTableFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<OrientationResult> crateCreateOrientationResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 123,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_orientation_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateOrientationResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PaddleOcrConfig> crateCreatePaddleOcrConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 124,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_paddle_ocr_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePaddleOcrConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageBoundary> crateCreatePageBoundaryFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 125,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_boundary,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageBoundaryFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageConfig> crateCreatePageConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 126,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageContent> crateCreatePageContentFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 127,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_content,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageContentFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageHierarchy> crateCreatePageHierarchyFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 128,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_hierarchy,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageHierarchyFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageInfo> crateCreatePageInfoFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 129,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_info,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageInfoFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PageStructure> crateCreatePageStructureFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 130,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_page_structure,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePageStructureFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PdfAnnotation> crateCreatePdfAnnotationFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 131,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pdf_annotation,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePdfAnnotationFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PdfConfig> crateCreatePdfConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 132,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pdf_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePdfConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PdfMetadata> crateCreatePdfMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 133,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pdf_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePdfMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PostProcessorConfig> crateCreatePostProcessorConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 134,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_post_processor_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePostProcessorConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PostProcessorDartImpl> crateCreatePostProcessorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<void> Function(ExtractionResult, ExtractionConfig)
    process,
    required FutureOr<ProcessingStage> Function() processingStage,
    required FutureOr<bool> Function(ExtractionResult, ExtractionConfig)
    shouldProcess,
    required FutureOr<PlatformInt64> Function(ExtractionResult)
    estimatedDurationMs,
    required FutureOr<PlatformInt64> Function() priority,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
            process,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_processing_stage_AnyhowException(
            processingStage,
            serializer,
          );
          sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
            shouldProcess,
            serializer,
          );
          sse_encode_DartFn_Inputs_extraction_result_Output_i_64_AnyhowException(
            estimatedDurationMs,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_i_64_AnyhowException(
            priority,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 135,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreatePostProcessorDartImplConstMeta,
        argValues: [
          pluginName,
          pluginVersion,
          process,
          processingStage,
          shouldProcess,
          estimatedDurationMs,
          priority,
        ],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreatePostProcessorDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_post_processor_dart_impl",
        argNames: [
          "pluginName",
          "pluginVersion",
          "process",
          "processingStage",
          "shouldProcess",
          "estimatedDurationMs",
          "priority",
        ],
      );

  @override
  Future<PptxAppProperties> crateCreatePptxAppPropertiesFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 136,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pptx_app_properties,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePptxAppPropertiesFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PptxExtractionResult> crateCreatePptxExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 137,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pptx_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePptxExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PptxMetadata> crateCreatePptxMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 138,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pptx_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePptxMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ProcessingWarning> crateCreateProcessingWarningFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 139,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_processing_warning,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateProcessingWarningFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<PstMetadata> crateCreatePstMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 140,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_pst_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreatePstMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<RakeParams> crateCreateRakeParamsFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 141,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_rake_params,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateRakeParamsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<RecognizedTable> crateCreateRecognizedTableFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 142,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_recognized_table,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateRecognizedTableFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<RendererDartImpl> crateCreateRendererDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<String> Function(InternalDocumentBridge) render,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs_internal_document_bridge_Output_String_AnyhowException(
            render,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 143,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreateRendererDartImplConstMeta,
        argValues: [pluginName, pluginVersion, render],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreateRendererDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_renderer_dart_impl",
        argNames: ["pluginName", "pluginVersion", "render"],
      );

  @override
  Future<RevisionDelta> crateCreateRevisionDeltaFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 144,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_revision_delta,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateRevisionDeltaFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<SecurityLimits> crateCreateSecurityLimitsFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 145,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_security_limits,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateSecurityLimitsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ServerConfig> crateCreateServerConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 146,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_server_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateServerConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<StructuredData> crateCreateStructuredDataFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 147,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_structured_data,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateStructuredDataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<StructuredDataResult> crateCreateStructuredDataResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 148,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_structured_data_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateStructuredDataResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<StructuredExtractionConfig>
  crateCreateStructuredExtractionConfigFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 149,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_structured_extraction_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateStructuredExtractionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<SupportedFormat> crateCreateSupportedFormatFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 150,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_supported_format,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateSupportedFormatFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TableCell> crateCreateTableCellFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 151,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_table_cell,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTableCellFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TableDiff> crateCreateTableDiffFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 152,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_table_diff,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTableDiffFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<Table> crateCreateTableFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 153,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_table,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTableFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TableGrid> crateCreateTableGridFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 154,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_table_grid,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTableGridFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TesseractConfig> crateCreateTesseractConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 155,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_tesseract_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTesseractConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TextAnnotation> crateCreateTextAnnotationFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 156,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_text_annotation,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTextAnnotationFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TextExtractionResult> crateCreateTextExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 157,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_text_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTextExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TextMetadata> crateCreateTextMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 158,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_text_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTextMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TokenReductionConfig> crateCreateTokenReductionConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 159,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_token_reduction_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTokenReductionConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TokenReductionOptions> crateCreateTokenReductionOptionsFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 160,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_token_reduction_options,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTokenReductionOptionsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TreeSitterConfig> crateCreateTreeSitterConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 161,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_tree_sitter_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTreeSitterConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<TreeSitterProcessConfig> crateCreateTreeSitterProcessConfigFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 162,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_tree_sitter_process_config,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateTreeSitterProcessConfigFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<ValidatorDartImpl> crateCreateValidatorDartImpl({
    required String pluginName,
    required String pluginVersion,
    required FutureOr<void> Function(ExtractionResult, ExtractionConfig)
    validate,
    required FutureOr<bool> Function(ExtractionResult, ExtractionConfig)
    shouldValidate,
    required FutureOr<PlatformInt64> Function() priority,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(pluginName, serializer);
          sse_encode_String(pluginVersion, serializer);
          sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
            validate,
            serializer,
          );
          sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
            shouldValidate,
            serializer,
          );
          sse_encode_DartFn_Inputs__Output_i_64_AnyhowException(
            priority,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 163,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData:
              sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl,
          decodeErrorData: null,
        ),
        constMeta: kCrateCreateValidatorDartImplConstMeta,
        argValues: [
          pluginName,
          pluginVersion,
          validate,
          shouldValidate,
          priority,
        ],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateCreateValidatorDartImplConstMeta =>
      const TaskConstMeta(
        debugName: "create_validator_dart_impl",
        argNames: [
          "pluginName",
          "pluginVersion",
          "validate",
          "shouldValidate",
          "priority",
        ],
      );

  @override
  Future<XlsxAppProperties> crateCreateXlsxAppPropertiesFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 164,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_xlsx_app_properties,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateXlsxAppPropertiesFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<XmlExtractionResult> crateCreateXmlExtractionResultFromJson({
    required String json,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 165,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_xml_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateXmlExtractionResultFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<XmlMetadata> crateCreateXmlMetadataFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 166,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_xml_metadata,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateXmlMetadataFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<YakeParams> crateCreateYakeParamsFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 167,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_yake_params,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateYakeParamsFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<YearRange> crateCreateYearRangeFromJson({required String json}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(json, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 168,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_year_range,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateCreateYearRangeFromJsonConstMeta,
        argValues: [json],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<String> crateDetectMimeType({
    required String path,
    required bool checkExists,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(path, serializer);
          sse_encode_bool(checkExists, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 169,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateDetectMimeTypeConstMeta,
        argValues: [path, checkExists],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateDetectMimeTypeConstMeta => const TaskConstMeta(
    debugName: "detect_mime_type",
    argNames: ["path", "checkExists"],
  );

  @override
  Future<String> crateDetectMimeTypeFromBytes({required List<int> content}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_prim_u_8_loose(content, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 170,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateDetectMimeTypeFromBytesConstMeta,
        argValues: [content],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateDetectMimeTypeFromBytesConstMeta =>
      const TaskConstMeta(
        debugName: "detect_mime_type_from_bytes",
        argNames: ["content"],
      );

  @override
  Future<List<Float64List>> crateEmbedTexts({
    required List<String> texts,
    required EmbeddingConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_String(texts, serializer);
          sse_encode_box_autoadd_embedding_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 171,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_list_prim_f_64_strict,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateEmbedTextsConstMeta,
        argValues: [texts, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateEmbedTextsConstMeta => const TaskConstMeta(
    debugName: "embed_texts",
    argNames: ["texts", "config"],
  );

  @override
  Future<List<Float64List>> crateEmbedTextsAsync({
    required List<String> texts,
    required EmbeddingConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_String(texts, serializer);
          sse_encode_box_autoadd_embedding_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 172,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_list_prim_f_64_strict,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateEmbedTextsAsyncConstMeta,
        argValues: [texts, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateEmbedTextsAsyncConstMeta => const TaskConstMeta(
    debugName: "embed_texts_async",
    argNames: ["texts", "config"],
  );

  @override
  Future<ExtractionResult> crateExtractBytes({
    required List<int> content,
    required String mimeType,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_prim_u_8_loose(content, serializer);
          sse_encode_String(mimeType, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 173,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateExtractBytesConstMeta,
        argValues: [content, mimeType, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateExtractBytesConstMeta => const TaskConstMeta(
    debugName: "extract_bytes",
    argNames: ["content", "mimeType", "config"],
  );

  @override
  Future<ExtractionResult> crateExtractBytesSync({
    required List<int> content,
    required String mimeType,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_prim_u_8_loose(content, serializer);
          sse_encode_String(mimeType, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 174,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateExtractBytesSyncConstMeta,
        argValues: [content, mimeType, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateExtractBytesSyncConstMeta => const TaskConstMeta(
    debugName: "extract_bytes_sync",
    argNames: ["content", "mimeType", "config"],
  );

  @override
  Future<ExtractionResult> crateExtractFile({
    required String path,
    String? mimeType,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(path, serializer);
          sse_encode_opt_String(mimeType, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 175,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateExtractFileConstMeta,
        argValues: [path, mimeType, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateExtractFileConstMeta => const TaskConstMeta(
    debugName: "extract_file",
    argNames: ["path", "mimeType", "config"],
  );

  @override
  Future<ExtractionResult> crateExtractFileSync({
    required String path,
    String? mimeType,
    required ExtractionConfig config,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(path, serializer);
          sse_encode_opt_String(mimeType, serializer);
          sse_encode_box_autoadd_extraction_config(config, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 176,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_extraction_result,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateExtractFileSyncConstMeta,
        argValues: [path, mimeType, config],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateExtractFileSyncConstMeta => const TaskConstMeta(
    debugName: "extract_file_sync",
    argNames: ["path", "mimeType", "config"],
  );

  @override
  Future<EmbeddingPreset?> crateGetEmbeddingPreset({required String name}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(name, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 177,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_opt_box_autoadd_embedding_preset,
          decodeErrorData: null,
        ),
        constMeta: kCrateGetEmbeddingPresetConstMeta,
        argValues: [name],
        apiImpl: this,
      ),
    );
  }

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

  @override
  Future<List<String>> crateGetExtensionsForMime({required String mimeType}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_String(mimeType, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 178,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateGetExtensionsForMimeConstMeta,
        argValues: [mimeType],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateGetExtensionsForMimeConstMeta => const TaskConstMeta(
    debugName: "get_extensions_for_mime",
    argNames: ["mimeType"],
  );

  @override
  Future<List<String>> crateListDocumentExtractors() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 179,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListDocumentExtractorsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListDocumentExtractorsConstMeta =>
      const TaskConstMeta(debugName: "list_document_extractors", argNames: []);

  @override
  Future<List<String>> crateListEmbeddingBackends() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 180,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListEmbeddingBackendsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListEmbeddingBackendsConstMeta =>
      const TaskConstMeta(debugName: "list_embedding_backends", argNames: []);

  @override
  Future<List<String>> crateListEmbeddingPresets() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 181,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: null,
        ),
        constMeta: kCrateListEmbeddingPresetsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListEmbeddingPresetsConstMeta =>
      const TaskConstMeta(debugName: "list_embedding_presets", argNames: []);

  @override
  Future<List<String>> crateListOcrBackends() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 182,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListOcrBackendsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListOcrBackendsConstMeta =>
      const TaskConstMeta(debugName: "list_ocr_backends", argNames: []);

  @override
  Future<List<String>> crateListPostProcessors() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 183,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListPostProcessorsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListPostProcessorsConstMeta =>
      const TaskConstMeta(debugName: "list_post_processors", argNames: []);

  @override
  Future<List<String>> crateListRenderers() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 184,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListRenderersConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListRenderersConstMeta =>
      const TaskConstMeta(debugName: "list_renderers", argNames: []);

  @override
  Future<List<String>> crateListValidators() {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 185,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_String,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateListValidatorsConstMeta,
        argValues: [],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateListValidatorsConstMeta =>
      const TaskConstMeta(debugName: "list_validators", argNames: []);

  @override
  Future<void> crateRegisterDocumentExtractor({
    required DocumentExtractorDartImpl impl,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 186,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterDocumentExtractorConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterDocumentExtractorConstMeta =>
      const TaskConstMeta(
        debugName: "register_document_extractor",
        argNames: ["impl"],
      );

  @override
  Future<void> crateRegisterEmbeddingBackend({
    required EmbeddingBackendDartImpl impl,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 187,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterEmbeddingBackendConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterEmbeddingBackendConstMeta =>
      const TaskConstMeta(
        debugName: "register_embedding_backend",
        argNames: ["impl"],
      );

  @override
  Future<void> crateRegisterOcrBackend({required OcrBackendDartImpl impl}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 188,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterOcrBackendConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterOcrBackendConstMeta => const TaskConstMeta(
    debugName: "register_ocr_backend",
    argNames: ["impl"],
  );

  @override
  Future<void> crateRegisterPostProcessor({
    required PostProcessorDartImpl impl,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 189,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterPostProcessorConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterPostProcessorConstMeta => const TaskConstMeta(
    debugName: "register_post_processor",
    argNames: ["impl"],
  );

  @override
  Future<void> crateRegisterRenderer({required RendererDartImpl impl}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 190,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterRendererConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterRendererConstMeta =>
      const TaskConstMeta(debugName: "register_renderer", argNames: ["impl"]);

  @override
  Future<void> crateRegisterValidator({required ValidatorDartImpl impl}) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
            impl,
            serializer,
          );
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 191,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_unit,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRegisterValidatorConstMeta,
        argValues: [impl],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRegisterValidatorConstMeta =>
      const TaskConstMeta(debugName: "register_validator", argNames: ["impl"]);

  @override
  Future<Uint8List> crateRenderPdfPageToPng({
    required List<int> pdfBytes,
    required PlatformInt64 pageIndex,
    PlatformInt64? dpi,
    String? password,
  }) {
    return handler.executeNormal(
      NormalTask(
        callFfi: (port_) {
          final serializer = SseSerializer(generalizedFrbRustBinding);
          sse_encode_list_prim_u_8_loose(pdfBytes, serializer);
          sse_encode_i_64(pageIndex, serializer);
          sse_encode_opt_box_autoadd_i_64(dpi, serializer);
          sse_encode_opt_String(password, serializer);
          pdeCallFfi(
            generalizedFrbRustBinding,
            serializer,
            funcId: 192,
            port: port_,
          );
        },
        codec: SseCodec(
          decodeSuccessData: sse_decode_list_prim_u_8_strict,
          decodeErrorData: sse_decode_String,
        ),
        constMeta: kCrateRenderPdfPageToPngConstMeta,
        argValues: [pdfBytes, pageIndex, dpi, password],
        apiImpl: this,
      ),
    );
  }

  TaskConstMeta get kCrateRenderPdfPageToPngConstMeta => const TaskConstMeta(
    debugName: "render_pdf_page_to_png",
    argNames: ["pdfBytes", "pageIndex", "dpi", "password"],
  );

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

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

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

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

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

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

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

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

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

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

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

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

  Future<void> Function(int, dynamic)
  encode_DartFn_Inputs_String_Output_bool_AnyhowException(
    FutureOr<bool> Function(String) raw,
  ) {
    return (callId, rawArg0) async {
      final arg0 = dco_decode_String(rawArg0);

      Box<bool>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_bool(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic)
  encode_DartFn_Inputs_String_String_Output_bool_AnyhowException(
    FutureOr<bool> Function(String, String) raw,
  ) {
    return (callId, rawArg0, rawArg1) async {
      final arg0 = dco_decode_String(rawArg0);
      final arg1 = dco_decode_String(rawArg1);

      Box<bool>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_bool(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic, dynamic)
  encode_DartFn_Inputs_String_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    FutureOr<InternalDocumentBridge> Function(String, String, ExtractionConfig)
    raw,
  ) {
    return (callId, rawArg0, rawArg1, rawArg2) async {
      final arg0 = dco_decode_String(rawArg0);
      final arg1 = dco_decode_String(rawArg1);
      final arg2 = dco_decode_extraction_config(rawArg2);

      Box<InternalDocumentBridge>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1, arg2));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_internal_document_bridge(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic)
  encode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
    FutureOr<ExtractionResult> Function(String, OcrConfig) raw,
  ) {
    return (callId, rawArg0, rawArg1) async {
      final arg0 = dco_decode_String(rawArg0);
      final arg1 = dco_decode_ocr_config(rawArg1);

      Box<ExtractionResult>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_extraction_result(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int) encode_DartFn_Inputs__Output_bool_AnyhowException(
    FutureOr<bool> Function() raw,
  ) {
    return (callId) async {
      Box<bool>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw());
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_bool(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int) encode_DartFn_Inputs__Output_i_64_AnyhowException(
    FutureOr<PlatformInt64> Function() raw,
  ) {
    return (callId) async {
      Box<PlatformInt64>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw());
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_i_64(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int)
  encode_DartFn_Inputs__Output_list_String_AnyhowException(
    FutureOr<List<String>> Function() raw,
  ) {
    return (callId) async {
      Box<List<String>>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw());
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_list_String(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int)
  encode_DartFn_Inputs__Output_ocr_backend_type_AnyhowException(
    FutureOr<OcrBackendType> Function() raw,
  ) {
    return (callId) async {
      Box<OcrBackendType>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw());
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_ocr_backend_type(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int)
  encode_DartFn_Inputs__Output_processing_stage_AnyhowException(
    FutureOr<ProcessingStage> Function() raw,
  ) {
    return (callId) async {
      Box<ProcessingStage>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw());
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_processing_stage(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic)
  encode_DartFn_Inputs_extraction_result_Output_i_64_AnyhowException(
    FutureOr<PlatformInt64> Function(ExtractionResult) raw,
  ) {
    return (callId, rawArg0) async {
      final arg0 = dco_decode_extraction_result(rawArg0);

      Box<PlatformInt64>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_i_64(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic)
  encode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
    FutureOr<bool> Function(ExtractionResult, ExtractionConfig) raw,
  ) {
    return (callId, rawArg0, rawArg1) async {
      final arg0 = dco_decode_extraction_result(rawArg0);
      final arg1 = dco_decode_extraction_config(rawArg1);

      Box<bool>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_bool(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic)
  encode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
    FutureOr<void> Function(ExtractionResult, ExtractionConfig) raw,
  ) {
    return (callId, rawArg0, rawArg1) async {
      final arg0 = dco_decode_extraction_result(rawArg0);
      final arg1 = dco_decode_extraction_config(rawArg1);

      Box<void>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_unit(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic)
  encode_DartFn_Inputs_internal_document_bridge_Output_String_AnyhowException(
    FutureOr<String> Function(InternalDocumentBridge) raw,
  ) {
    return (callId, rawArg0) async {
      final arg0 = dco_decode_internal_document_bridge(rawArg0);

      Box<String>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_String(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic)
  encode_DartFn_Inputs_list_String_Output_list_list_prim_f_64_strict_AnyhowException(
    FutureOr<List<Float64List>> Function(List<String>) raw,
  ) {
    return (callId, rawArg0) async {
      final arg0 = dco_decode_list_String(rawArg0);

      Box<List<Float64List>>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_list_list_prim_f_64_strict(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic, dynamic)
  encode_DartFn_Inputs_list_prim_u_8_strict_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    FutureOr<InternalDocumentBridge> Function(
      Uint8List,
      String,
      ExtractionConfig,
    )
    raw,
  ) {
    return (callId, rawArg0, rawArg1, rawArg2) async {
      final arg0 = dco_decode_list_prim_u_8_strict(rawArg0);
      final arg1 = dco_decode_String(rawArg1);
      final arg2 = dco_decode_extraction_config(rawArg2);

      Box<InternalDocumentBridge>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1, arg2));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_internal_document_bridge(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  Future<void> Function(int, dynamic, dynamic)
  encode_DartFn_Inputs_list_prim_u_8_strict_ocr_config_Output_extraction_result_AnyhowException(
    FutureOr<ExtractionResult> Function(Uint8List, OcrConfig) raw,
  ) {
    return (callId, rawArg0, rawArg1) async {
      final arg0 = dco_decode_list_prim_u_8_strict(rawArg0);
      final arg1 = dco_decode_ocr_config(rawArg1);

      Box<ExtractionResult>? rawOutput;
      Box<AnyhowException>? rawError;
      try {
        rawOutput = Box(await raw(arg0, arg1));
      } catch (e, s) {
        rawError = Box(AnyhowException("$e\n\n$s"));
      }

      final serializer = SseSerializer(generalizedFrbRustBinding);
      assert((rawOutput != null) ^ (rawError != null));
      if (rawOutput != null) {
        serializer.buffer.putUint8(0);
        sse_encode_extraction_result(rawOutput.value, serializer);
      } else {
        serializer.buffer.putUint8(1);
        sse_encode_AnyhowException(rawError!.value, serializer);
      }
      final output = serializer.intoRaw();

      generalizedFrbRustBinding.dartFnDeliverOutput(
        callId: callId,
        ptr: output.ptr,
        rustVecLen: output.rustVecLen,
        dataLen: output.dataLen,
      );
    };
  }

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcDocumentExtractor => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcDocumentExtractor => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcEmbeddingBackend => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcEmbeddingBackend => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcOcrBackend => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcOcrBackend => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcPostProcessor => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcPostProcessor => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcRenderer => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcRenderer => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ArcValidator => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ArcValidator => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_DocumentExtractorDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_DocumentExtractorDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_EmbeddingBackendDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_EmbeddingBackendDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_OcrBackendDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_OcrBackendDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_PostProcessorDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_PostProcessorDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_RendererDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_RendererDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl;

  RustArcIncrementStrongCountFnType
  get rust_arc_increment_strong_count_ValidatorDartImpl => wire
      .rust_arc_increment_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl;

  RustArcDecrementStrongCountFnType
  get rust_arc_decrement_strong_count_ValidatorDartImpl => wire
      .rust_arc_decrement_strong_count_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  FutureOr<bool> Function(String)
  dco_decode_DartFn_Inputs_String_Output_bool_AnyhowException(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<bool> Function(String, String)
  dco_decode_DartFn_Inputs_String_String_Output_bool_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<InternalDocumentBridge> Function(String, String, ExtractionConfig)
  dco_decode_DartFn_Inputs_String_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<ExtractionResult> Function(String, OcrConfig)
  dco_decode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<bool> Function()
  dco_decode_DartFn_Inputs__Output_bool_AnyhowException(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<PlatformInt64> Function()
  dco_decode_DartFn_Inputs__Output_i_64_AnyhowException(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<List<String>> Function()
  dco_decode_DartFn_Inputs__Output_list_String_AnyhowException(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<OcrBackendType> Function()
  dco_decode_DartFn_Inputs__Output_ocr_backend_type_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<ProcessingStage> Function()
  dco_decode_DartFn_Inputs__Output_processing_stage_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<PlatformInt64> Function(ExtractionResult)
  dco_decode_DartFn_Inputs_extraction_result_Output_i_64_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<bool> Function(ExtractionResult, ExtractionConfig)
  dco_decode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<void> Function(ExtractionResult, ExtractionConfig)
  dco_decode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<String> Function(InternalDocumentBridge)
  dco_decode_DartFn_Inputs_internal_document_bridge_Output_String_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<List<Float64List>> Function(List<String>)
  dco_decode_DartFn_Inputs_list_String_Output_list_list_prim_f_64_strict_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<InternalDocumentBridge> Function(Uint8List, String, ExtractionConfig)
  dco_decode_DartFn_Inputs_list_prim_u_8_strict_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  FutureOr<ExtractionResult> Function(Uint8List, OcrConfig)
  dco_decode_DartFn_Inputs_list_prim_u_8_strict_ocr_config_Output_extraction_result_AnyhowException(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    throw UnimplementedError('');
  }

  @protected
  Object dco_decode_DartOpaque(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return decodeDartOpaque(raw, generalizedFrbRustBinding);
  }

  @protected
  Map<String, String> dco_decode_Map_String_String_None(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
  Map<String, PlatformInt64> dco_decode_Map_String_i_64_None(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return Map.fromEntries(
      dco_decode_list_record_string_i_64(raw).map((e) => MapEntry(e.$1, e.$2)),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  ValidatorDartImpl
  dco_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return ValidatorDartImplImpl.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
  AccelerationConfig dco_decode_acceleration_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 AccelerationConfig(
      provider: dco_decode_execution_provider_type(arr[0]),
      deviceId: dco_decode_i_64(arr[1]),
    );
  }

  @protected
  AnnotationKind dco_decode_annotation_kind(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return AnnotationKind_Bold();
      case 1:
        return AnnotationKind_Italic();
      case 2:
        return AnnotationKind_Underline();
      case 3:
        return AnnotationKind_Strikethrough();
      case 4:
        return AnnotationKind_Code();
      case 5:
        return AnnotationKind_Subscript();
      case 6:
        return AnnotationKind_Superscript();
      case 7:
        return AnnotationKind_Link(
          url: dco_decode_String(raw[1]),
          title: dco_decode_String(raw[2]),
        );
      case 8:
        return AnnotationKind_Highlight();
      case 9:
        return AnnotationKind_Color(value: dco_decode_String(raw[1]));
      case 10:
        return AnnotationKind_FontSize(value: dco_decode_String(raw[1]));
      case 11:
        return AnnotationKind_Custom(
          name: dco_decode_String(raw[1]),
          value: dco_decode_String(raw[2]),
        );
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  ArchiveEntry dco_decode_archive_entry(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 ArchiveEntry(
      path: dco_decode_String(arr[0]),
      mimeType: dco_decode_String(arr[1]),
      result: dco_decode_extraction_result(arr[2]),
    );
  }

  @protected
  ArchiveMetadata dco_decode_archive_metadata(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 ArchiveMetadata(
      format: dco_decode_String(arr[0]),
      fileCount: dco_decode_i_64(arr[1]),
      fileList: dco_decode_list_String(arr[2]),
      totalSize: dco_decode_i_64(arr[3]),
      compressedSize: dco_decode_opt_box_autoadd_i_64(arr[4]),
    );
  }

  @protected
  BBox dco_decode_b_box(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 BBox(
      x1: dco_decode_f_64(arr[0]),
      y1: dco_decode_f_64(arr[1]),
      x2: dco_decode_f_64(arr[2]),
      y2: dco_decode_f_64(arr[3]),
    );
  }

  @protected
  BatchBytesItem dco_decode_batch_bytes_item(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 BatchBytesItem(
      content: dco_decode_list_prim_u_8_strict(arr[0]),
      mimeType: dco_decode_String(arr[1]),
      config: dco_decode_opt_box_autoadd_file_extraction_config(arr[2]),
    );
  }

  @protected
  BatchFileItem dco_decode_batch_file_item(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 BatchFileItem(
      path: dco_decode_String(arr[0]),
      config: dco_decode_opt_box_autoadd_file_extraction_config(arr[1]),
    );
  }

  @protected
  BibtexMetadata dco_decode_bibtex_metadata(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 BibtexMetadata(
      entryCount: dco_decode_i_64(arr[0]),
      citationKeys: dco_decode_list_String(arr[1]),
      authors: dco_decode_list_String(arr[2]),
      yearRange: dco_decode_opt_box_autoadd_year_range(arr[3]),
      entryTypes: dco_decode_opt_Map_String_i_64_None(arr[4]),
    );
  }

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

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

  @protected
  BoundingBox dco_decode_bounding_box(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 BoundingBox(
      x0: dco_decode_f_64(arr[0]),
      y0: dco_decode_f_64(arr[1]),
      x1: dco_decode_f_64(arr[2]),
      y1: dco_decode_f_64(arr[3]),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  HtmlOutputConfig dco_decode_box_autoadd_html_output_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_html_output_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
  ImageExtractionConfig dco_decode_box_autoadd_image_extraction_config(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return dco_decode_image_extraction_config(raw);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  CacheStats dco_decode_cache_stats(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 CacheStats(
      totalFiles: dco_decode_i_64(arr[0]),
      totalSizeMb: dco_decode_f_64(arr[1]),
      availableSpaceMb: dco_decode_f_64(arr[2]),
      oldestFileAgeDays: dco_decode_f_64(arr[3]),
      newestFileAgeDays: dco_decode_f_64(arr[4]),
    );
  }

  @protected
  CellChange dco_decode_cell_change(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 CellChange(
      row: dco_decode_i_64(arr[0]),
      col: dco_decode_i_64(arr[1]),
      from: dco_decode_String(arr[2]),
      to: dco_decode_String(arr[3]),
    );
  }

  @protected
  Chunk dco_decode_chunk(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 Chunk(
      content: dco_decode_String(arr[0]),
      chunkType: dco_decode_chunk_type(arr[1]),
      embedding: dco_decode_opt_list_prim_f_64_strict(arr[2]),
      metadata: dco_decode_chunk_metadata(arr[3]),
    );
  }

  @protected
  ChunkMetadata dco_decode_chunk_metadata(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 9)
      throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
    return ChunkMetadata(
      byteStart: dco_decode_i_64(arr[0]),
      byteEnd: dco_decode_i_64(arr[1]),
      tokenCount: dco_decode_opt_box_autoadd_i_64(arr[2]),
      chunkIndex: dco_decode_i_64(arr[3]),
      totalChunks: dco_decode_i_64(arr[4]),
      firstPage: dco_decode_opt_box_autoadd_i_64(arr[5]),
      lastPage: dco_decode_opt_box_autoadd_i_64(arr[6]),
      headingContext: dco_decode_opt_box_autoadd_heading_context(arr[7]),
      imageIndices: dco_decode_list_prim_i_64_strict(arr[8]),
    );
  }

  @protected
  ChunkSizing dco_decode_chunk_sizing(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return ChunkSizing_Characters();
      case 1:
        return ChunkSizing_Tokenizer(
          model: dco_decode_String(raw[1]),
          cacheDir: dco_decode_String(raw[2]),
        );
      default:
        throw Exception("unreachable");
    }
  }

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

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

  @protected
  ChunkingConfig dco_decode_chunking_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 9)
      throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
    return ChunkingConfig(
      maxCharacters: dco_decode_i_64(arr[0]),
      overlap: dco_decode_i_64(arr[1]),
      trim: dco_decode_bool(arr[2]),
      chunkerType: dco_decode_chunker_type(arr[3]),
      embedding: dco_decode_opt_box_autoadd_embedding_config(arr[4]),
      preset: dco_decode_opt_String(arr[5]),
      sizing: dco_decode_chunk_sizing(arr[6]),
      prependHeadingContext: dco_decode_bool(arr[7]),
      topicThreshold: dco_decode_opt_box_autoadd_f_64(arr[8]),
    );
  }

  @protected
  CitationMetadata dco_decode_citation_metadata(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 CitationMetadata(
      citationCount: dco_decode_i_64(arr[0]),
      format: dco_decode_opt_String(arr[1]),
      authors: dco_decode_list_String(arr[2]),
      yearRange: dco_decode_opt_box_autoadd_year_range(arr[3]),
      dois: dco_decode_list_String(arr[4]),
      keywords: dco_decode_list_String(arr[5]),
    );
  }

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

  @protected
  ContentFilterConfig dco_decode_content_filter_config(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 ContentFilterConfig(
      includeHeaders: dco_decode_bool(arr[0]),
      includeFooters: dco_decode_bool(arr[1]),
      stripRepeatingText: dco_decode_bool(arr[2]),
      includeWatermarks: dco_decode_bool(arr[3]),
    );
  }

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

  @protected
  ContributorRole dco_decode_contributor_role(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 ContributorRole(
      name: dco_decode_String(arr[0]),
      role: dco_decode_opt_String(arr[1]),
    );
  }

  @protected
  CoreProperties dco_decode_core_properties(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 15)
      throw Exception('unexpected arr length: expect 15 but see ${arr.length}');
    return CoreProperties(
      title: dco_decode_opt_String(arr[0]),
      subject: dco_decode_opt_String(arr[1]),
      creator: dco_decode_opt_String(arr[2]),
      keywords: dco_decode_opt_String(arr[3]),
      description: dco_decode_opt_String(arr[4]),
      lastModifiedBy: dco_decode_opt_String(arr[5]),
      revision: dco_decode_opt_String(arr[6]),
      created: dco_decode_opt_String(arr[7]),
      modified: dco_decode_opt_String(arr[8]),
      category: dco_decode_opt_String(arr[9]),
      contentStatus: dco_decode_opt_String(arr[10]),
      language: dco_decode_opt_String(arr[11]),
      identifier: dco_decode_opt_String(arr[12]),
      version: dco_decode_opt_String(arr[13]),
      lastPrinted: dco_decode_opt_String(arr[14]),
    );
  }

  @protected
  CsvMetadata dco_decode_csv_metadata(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 CsvMetadata(
      rowCount: dco_decode_i_64(arr[0]),
      columnCount: dco_decode_i_64(arr[1]),
      delimiter: dco_decode_opt_String(arr[2]),
      hasHeader: dco_decode_bool(arr[3]),
      columnTypes: dco_decode_opt_list_String(arr[4]),
    );
  }

  @protected
  DbfFieldInfo dco_decode_dbf_field_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 DbfFieldInfo(
      name: dco_decode_String(arr[0]),
      fieldType: dco_decode_String(arr[1]),
    );
  }

  @protected
  DbfMetadata dco_decode_dbf_metadata(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 DbfMetadata(
      recordCount: dco_decode_i_64(arr[0]),
      fieldCount: dco_decode_i_64(arr[1]),
      fields: dco_decode_list_dbf_field_info(arr[2]),
    );
  }

  @protected
  DetectResponse dco_decode_detect_response(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 DetectResponse(
      mimeType: dco_decode_String(arr[0]),
      filename: dco_decode_opt_String(arr[1]),
    );
  }

  @protected
  DetectionResult dco_decode_detection_result(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 DetectionResult(
      pageWidth: dco_decode_i_64(arr[0]),
      pageHeight: dco_decode_i_64(arr[1]),
      detections: dco_decode_list_layout_detection(arr[2]),
    );
  }

  @protected
  DiffHunk dco_decode_diff_hunk(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 DiffHunk(
      fromLine: dco_decode_i_64(arr[0]),
      fromCount: dco_decode_i_64(arr[1]),
      toLine: dco_decode_i_64(arr[2]),
      toCount: dco_decode_i_64(arr[3]),
      lines: dco_decode_list_diff_line(arr[4]),
    );
  }

  @protected
  DiffLine dco_decode_diff_line(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return DiffLine_Context(field0: dco_decode_String(raw[1]));
      case 1:
        return DiffLine_Added(field0: dco_decode_String(raw[1]));
      case 2:
        return DiffLine_Removed(field0: dco_decode_String(raw[1]));
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  DiffOptions dco_decode_diff_options(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 DiffOptions(
      includeMetadata: dco_decode_bool(arr[0]),
      includeEmbedded: dco_decode_bool(arr[1]),
      maxContentChars: dco_decode_opt_box_autoadd_i_64(arr[2]),
    );
  }

  @protected
  DjotContent dco_decode_djot_content(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 8)
      throw Exception('unexpected arr length: expect 8 but see ${arr.length}');
    return DjotContent(
      plainText: dco_decode_String(arr[0]),
      blocks: dco_decode_list_formatted_block(arr[1]),
      metadata: dco_decode_metadata(arr[2]),
      tables: dco_decode_list_table(arr[3]),
      images: dco_decode_list_djot_image(arr[4]),
      links: dco_decode_list_djot_link(arr[5]),
      footnotes: dco_decode_list_footnote(arr[6]),
      attributes: dco_decode_list_String(arr[7]),
    );
  }

  @protected
  DjotImage dco_decode_djot_image(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 DjotImage(
      src: dco_decode_String(arr[0]),
      alt: dco_decode_String(arr[1]),
      title: dco_decode_opt_String(arr[2]),
      attributes: dco_decode_opt_String(arr[3]),
    );
  }

  @protected
  DjotLink dco_decode_djot_link(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 DjotLink(
      url: dco_decode_String(arr[0]),
      text: dco_decode_String(arr[1]),
      title: dco_decode_opt_String(arr[2]),
      attributes: dco_decode_opt_String(arr[3]),
    );
  }

  @protected
  DocumentNode dco_decode_document_node(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 DocumentNode(
      id: dco_decode_String(arr[0]),
      content: dco_decode_node_content(arr[1]),
      parent: dco_decode_opt_box_autoadd_i_64(arr[2]),
      children: dco_decode_list_prim_i_64_strict(arr[3]),
      contentLayer: dco_decode_content_layer(arr[4]),
      page: dco_decode_opt_box_autoadd_i_64(arr[5]),
      pageEnd: dco_decode_opt_box_autoadd_i_64(arr[6]),
      bbox: dco_decode_opt_box_autoadd_bounding_box(arr[7]),
      annotations: dco_decode_list_text_annotation(arr[8]),
      attributes: dco_decode_opt_Map_String_String_None(arr[9]),
    );
  }

  @protected
  DocumentRelationship dco_decode_document_relationship(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 DocumentRelationship(
      source: dco_decode_i_64(arr[0]),
      target: dco_decode_i_64(arr[1]),
      kind: dco_decode_relationship_kind(arr[2]),
    );
  }

  @protected
  DocumentRevision dco_decode_document_revision(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 DocumentRevision(
      revisionId: dco_decode_String(arr[0]),
      author: dco_decode_opt_String(arr[1]),
      timestamp: dco_decode_opt_String(arr[2]),
      kind: dco_decode_revision_kind(arr[3]),
      anchor: dco_decode_opt_box_autoadd_revision_anchor(arr[4]),
      delta: dco_decode_revision_delta(arr[5]),
    );
  }

  @protected
  DocumentStructure dco_decode_document_structure(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 DocumentStructure(
      nodes: dco_decode_list_document_node(arr[0]),
      sourceFormat: dco_decode_opt_String(arr[1]),
      relationships: dco_decode_list_document_relationship(arr[2]),
      nodeTypes: dco_decode_list_String(arr[3]),
    );
  }

  @protected
  DocxAppProperties dco_decode_docx_app_properties(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 16)
      throw Exception('unexpected arr length: expect 16 but see ${arr.length}');
    return DocxAppProperties(
      application: dco_decode_opt_String(arr[0]),
      appVersion: dco_decode_opt_String(arr[1]),
      template: dco_decode_opt_String(arr[2]),
      totalTime: dco_decode_opt_box_autoadd_i_64(arr[3]),
      pages: dco_decode_opt_box_autoadd_i_64(arr[4]),
      words: dco_decode_opt_box_autoadd_i_64(arr[5]),
      characters: dco_decode_opt_box_autoadd_i_64(arr[6]),
      charactersWithSpaces: dco_decode_opt_box_autoadd_i_64(arr[7]),
      lines: dco_decode_opt_box_autoadd_i_64(arr[8]),
      paragraphs: dco_decode_opt_box_autoadd_i_64(arr[9]),
      company: dco_decode_opt_String(arr[10]),
      docSecurity: dco_decode_opt_box_autoadd_i_64(arr[11]),
      scaleCrop: dco_decode_opt_box_autoadd_bool(arr[12]),
      linksUpToDate: dco_decode_opt_box_autoadd_bool(arr[13]),
      sharedDoc: dco_decode_opt_box_autoadd_bool(arr[14]),
      hyperlinksChanged: dco_decode_opt_box_autoadd_bool(arr[15]),
    );
  }

  @protected
  DocxMetadata dco_decode_docx_metadata(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 DocxMetadata(
      coreProperties: dco_decode_opt_box_autoadd_core_properties(arr[0]),
      appProperties: dco_decode_opt_box_autoadd_docx_app_properties(arr[1]),
      customProperties: dco_decode_opt_Map_String_String_None(arr[2]),
    );
  }

  @protected
  Element dco_decode_element(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 Element(
      elementId: dco_decode_String(arr[0]),
      elementType: dco_decode_element_type(arr[1]),
      text: dco_decode_String(arr[2]),
      metadata: dco_decode_element_metadata(arr[3]),
    );
  }

  @protected
  ElementMetadata dco_decode_element_metadata(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 ElementMetadata(
      pageNumber: dco_decode_opt_box_autoadd_i_64(arr[0]),
      filename: dco_decode_opt_String(arr[1]),
      coordinates: dco_decode_opt_box_autoadd_bounding_box(arr[2]),
      elementIndex: dco_decode_opt_box_autoadd_i_64(arr[3]),
      additional: dco_decode_Map_String_String_None(arr[4]),
    );
  }

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

  @protected
  EmailAttachment dco_decode_email_attachment(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 EmailAttachment(
      name: dco_decode_opt_String(arr[0]),
      filename: dco_decode_opt_String(arr[1]),
      mimeType: dco_decode_opt_String(arr[2]),
      size: dco_decode_opt_box_autoadd_i_64(arr[3]),
      isImage: dco_decode_bool(arr[4]),
      data: dco_decode_opt_list_prim_u_8_strict(arr[5]),
    );
  }

  @protected
  EmailConfig dco_decode_email_config(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 EmailConfig(
      msgFallbackCodepage: dco_decode_opt_box_autoadd_i_64(arr[0]),
    );
  }

  @protected
  EmailExtractionResult dco_decode_email_extraction_result(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 12)
      throw Exception('unexpected arr length: expect 12 but see ${arr.length}');
    return EmailExtractionResult(
      subject: dco_decode_opt_String(arr[0]),
      fromEmail: dco_decode_opt_String(arr[1]),
      toEmails: dco_decode_list_String(arr[2]),
      ccEmails: dco_decode_list_String(arr[3]),
      bccEmails: dco_decode_list_String(arr[4]),
      date: dco_decode_opt_String(arr[5]),
      messageId: dco_decode_opt_String(arr[6]),
      plainText: dco_decode_opt_String(arr[7]),
      htmlContent: dco_decode_opt_String(arr[8]),
      content: dco_decode_String(arr[9]),
      attachments: dco_decode_list_email_attachment(arr[10]),
      metadata: dco_decode_Map_String_String_None(arr[11]),
    );
  }

  @protected
  EmailMetadata dco_decode_email_metadata(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return EmailMetadata(
      fromEmail: dco_decode_opt_String(arr[0]),
      fromName: dco_decode_opt_String(arr[1]),
      toEmails: dco_decode_list_String(arr[2]),
      ccEmails: dco_decode_list_String(arr[3]),
      bccEmails: dco_decode_list_String(arr[4]),
      messageId: dco_decode_opt_String(arr[5]),
      attachments: dco_decode_list_String(arr[6]),
    );
  }

  @protected
  EmbeddedChanges dco_decode_embedded_changes(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 EmbeddedChanges(
      added: dco_decode_list_archive_entry(arr[0]),
      removed: dco_decode_list_archive_entry(arr[1]),
      changed: dco_decode_list_embedded_diff(arr[2]),
    );
  }

  @protected
  EmbeddedDiff dco_decode_embedded_diff(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 EmbeddedDiff(
      path: dco_decode_String(arr[0]),
      diff: dco_decode_extraction_diff(arr[1]),
    );
  }

  @protected
  EmbeddedFile dco_decode_embedded_file(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 EmbeddedFile(
      name: dco_decode_String(arr[0]),
      data: dco_decode_list_prim_u_8_strict(arr[1]),
      compressedSize: dco_decode_i_64(arr[2]),
      mimeType: dco_decode_opt_String(arr[3]),
    );
  }

  @protected
  EmbeddingConfig dco_decode_embedding_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return EmbeddingConfig(
      model: dco_decode_embedding_model_type(arr[0]),
      normalize: dco_decode_bool(arr[1]),
      batchSize: dco_decode_i_64(arr[2]),
      showDownloadProgress: dco_decode_bool(arr[3]),
      cacheDir: dco_decode_opt_String(arr[4]),
      acceleration: dco_decode_opt_box_autoadd_acceleration_config(arr[5]),
      maxEmbedDurationSecs: dco_decode_opt_box_autoadd_i_64(arr[6]),
    );
  }

  @protected
  EmbeddingModelType dco_decode_embedding_model_type(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return EmbeddingModelType_Preset(name: dco_decode_String(raw[1]));
      case 1:
        return EmbeddingModelType_Custom(
          modelId: dco_decode_String(raw[1]),
          dimensions: dco_decode_i_64(raw[2]),
        );
      case 2:
        return EmbeddingModelType_Llm(
          llm: dco_decode_box_autoadd_llm_config(raw[1]),
        );
      case 3:
        return EmbeddingModelType_Plugin(name: dco_decode_String(raw[1]));
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  EmbeddingPreset dco_decode_embedding_preset(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 8)
      throw Exception('unexpected arr length: expect 8 but see ${arr.length}');
    return EmbeddingPreset(
      name: dco_decode_String(arr[0]),
      chunkSize: dco_decode_i_64(arr[1]),
      overlap: dco_decode_i_64(arr[2]),
      modelRepo: dco_decode_String(arr[3]),
      pooling: dco_decode_String(arr[4]),
      modelFile: dco_decode_String(arr[5]),
      dimensions: dco_decode_i_64(arr[6]),
      description: dco_decode_String(arr[7]),
    );
  }

  @protected
  EpubMetadata dco_decode_epub_metadata(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 EpubMetadata(
      coverage: dco_decode_opt_String(arr[0]),
      dcFormat: dco_decode_opt_String(arr[1]),
      relation: dco_decode_opt_String(arr[2]),
      source: dco_decode_opt_String(arr[3]),
      dcType: dco_decode_opt_String(arr[4]),
      coverImage: dco_decode_opt_String(arr[5]),
    );
  }

  @protected
  ErrorMetadata dco_decode_error_metadata(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 ErrorMetadata(
      errorType: dco_decode_String(arr[0]),
      message: dco_decode_String(arr[1]),
    );
  }

  @protected
  ExcelMetadata dco_decode_excel_metadata(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 ExcelMetadata(
      sheetCount: dco_decode_opt_box_autoadd_i_64(arr[0]),
      sheetNames: dco_decode_opt_list_String(arr[1]),
    );
  }

  @protected
  ExcelSheet dco_decode_excel_sheet(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 ExcelSheet(
      name: dco_decode_String(arr[0]),
      markdown: dco_decode_String(arr[1]),
      rowCount: dco_decode_i_64(arr[2]),
      colCount: dco_decode_i_64(arr[3]),
      cellCount: dco_decode_i_64(arr[4]),
      tableCells: dco_decode_opt_list_list_String(arr[5]),
    );
  }

  @protected
  ExcelWorkbook dco_decode_excel_workbook(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 ExcelWorkbook(
      sheets: dco_decode_list_excel_sheet(arr[0]),
      metadata: dco_decode_Map_String_String_None(arr[1]),
      revisions: dco_decode_opt_list_document_revision(arr[2]),
    );
  }

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

  @protected
  ExtractedImage dco_decode_extracted_image(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 16)
      throw Exception('unexpected arr length: expect 16 but see ${arr.length}');
    return ExtractedImage(
      data: dco_decode_list_prim_u_8_strict(arr[0]),
      format: dco_decode_String(arr[1]),
      imageIndex: dco_decode_i_64(arr[2]),
      pageNumber: dco_decode_opt_box_autoadd_i_64(arr[3]),
      width: dco_decode_opt_box_autoadd_i_64(arr[4]),
      height: dco_decode_opt_box_autoadd_i_64(arr[5]),
      colorspace: dco_decode_opt_String(arr[6]),
      bitsPerComponent: dco_decode_opt_box_autoadd_i_64(arr[7]),
      isMask: dco_decode_bool(arr[8]),
      description: dco_decode_opt_String(arr[9]),
      ocrResult: dco_decode_opt_box_autoadd_extraction_result(arr[10]),
      boundingBox: dco_decode_opt_box_autoadd_bounding_box(arr[11]),
      sourcePath: dco_decode_opt_String(arr[12]),
      imageKind: dco_decode_opt_box_autoadd_image_kind(arr[13]),
      kindConfidence: dco_decode_opt_box_autoadd_f_64(arr[14]),
      clusterId: dco_decode_opt_box_autoadd_i_64(arr[15]),
    );
  }

  @protected
  ExtractedUri dco_decode_extracted_uri(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 ExtractedUri(
      url: dco_decode_String(arr[0]),
      label: dco_decode_opt_String(arr[1]),
      page: dco_decode_opt_box_autoadd_i_64(arr[2]),
      kind: dco_decode_uri_kind(arr[3]),
    );
  }

  @protected
  ExtractionConfig dco_decode_extraction_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 35)
      throw Exception('unexpected arr length: expect 35 but see ${arr.length}');
    return ExtractionConfig(
      useCache: dco_decode_bool(arr[0]),
      enableQualityProcessing: dco_decode_bool(arr[1]),
      ocr: dco_decode_opt_box_autoadd_ocr_config(arr[2]),
      forceOcr: dco_decode_bool(arr[3]),
      forceOcrPages: dco_decode_opt_list_prim_i_64_strict(arr[4]),
      disableOcr: dco_decode_bool(arr[5]),
      chunking: dco_decode_opt_box_autoadd_chunking_config(arr[6]),
      contentFilter: dco_decode_opt_box_autoadd_content_filter_config(arr[7]),
      images: dco_decode_opt_box_autoadd_image_extraction_config(arr[8]),
      pdfOptions: dco_decode_opt_box_autoadd_pdf_config(arr[9]),
      tokenReduction: dco_decode_opt_box_autoadd_token_reduction_options(
        arr[10],
      ),
      languageDetection: dco_decode_opt_box_autoadd_language_detection_config(
        arr[11],
      ),
      pages: dco_decode_opt_box_autoadd_page_config(arr[12]),
      keywords: dco_decode_opt_box_autoadd_keyword_config(arr[13]),
      postprocessor: dco_decode_opt_box_autoadd_post_processor_config(arr[14]),
      htmlOptions: dco_decode_opt_String(arr[15]),
      htmlOutput: dco_decode_opt_box_autoadd_html_output_config(arr[16]),
      extractionTimeoutSecs: dco_decode_opt_box_autoadd_i_64(arr[17]),
      maxConcurrentExtractions: dco_decode_opt_box_autoadd_i_64(arr[18]),
      resultFormat: dco_decode_result_format(arr[19]),
      securityLimits: dco_decode_opt_box_autoadd_security_limits(arr[20]),
      maxEmbeddedFileBytes: dco_decode_opt_box_autoadd_i_64(arr[21]),
      outputFormat: dco_decode_output_format(arr[22]),
      layout: dco_decode_opt_box_autoadd_layout_detection_config(arr[23]),
      useLayoutForMarkdown: dco_decode_bool(arr[24]),
      includeDocumentStructure: dco_decode_bool(arr[25]),
      acceleration: dco_decode_opt_box_autoadd_acceleration_config(arr[26]),
      cacheNamespace: dco_decode_opt_String(arr[27]),
      cacheTtlSecs: dco_decode_opt_box_autoadd_i_64(arr[28]),
      email: dco_decode_opt_box_autoadd_email_config(arr[29]),
      concurrency: dco_decode_opt_String(arr[30]),
      maxArchiveDepth: dco_decode_i_64(arr[31]),
      treeSitter: dco_decode_opt_box_autoadd_tree_sitter_config(arr[32]),
      structuredExtraction:
          dco_decode_opt_box_autoadd_structured_extraction_config(arr[33]),
      cancelToken: dco_decode_opt_String(arr[34]),
    );
  }

  @protected
  ExtractionDiff dco_decode_extraction_diff(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 ExtractionDiff(
      contentDiff: dco_decode_list_diff_hunk(arr[0]),
      tablesAdded: dco_decode_list_table(arr[1]),
      tablesRemoved: dco_decode_list_table(arr[2]),
      tablesChanged: dco_decode_list_table_diff(arr[3]),
      metadataChanged: dco_decode_String(arr[4]),
      embeddedChanges: dco_decode_embedded_changes(arr[5]),
    );
  }

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

  @protected
  ExtractionResult dco_decode_extraction_result(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 25)
      throw Exception('unexpected arr length: expect 25 but see ${arr.length}');
    return ExtractionResult(
      content: dco_decode_String(arr[0]),
      mimeType: dco_decode_String(arr[1]),
      metadata: dco_decode_metadata(arr[2]),
      extractionMethod: dco_decode_opt_box_autoadd_extraction_method(arr[3]),
      tables: dco_decode_list_table(arr[4]),
      detectedLanguages: dco_decode_opt_list_String(arr[5]),
      chunks: dco_decode_opt_list_chunk(arr[6]),
      images: dco_decode_opt_list_extracted_image(arr[7]),
      pages: dco_decode_opt_list_page_content(arr[8]),
      elements: dco_decode_opt_list_element(arr[9]),
      djotContent: dco_decode_opt_box_autoadd_djot_content(arr[10]),
      ocrElements: dco_decode_opt_list_ocr_element(arr[11]),
      document: dco_decode_opt_box_autoadd_document_structure(arr[12]),
      extractedKeywords: dco_decode_opt_list_keyword(arr[13]),
      qualityScore: dco_decode_opt_box_autoadd_f_64(arr[14]),
      processingWarnings: dco_decode_list_processing_warning(arr[15]),
      annotations: dco_decode_opt_list_pdf_annotation(arr[16]),
      children: dco_decode_opt_list_archive_entry(arr[17]),
      uris: dco_decode_opt_list_extracted_uri(arr[18]),
      revisions: dco_decode_opt_list_document_revision(arr[19]),
      structuredOutput: dco_decode_opt_String(arr[20]),
      codeIntelligence: dco_decode_opt_String(arr[21]),
      llmUsage: dco_decode_opt_list_llm_usage(arr[22]),
      formattedContent: dco_decode_opt_String(arr[23]),
      ocrInternalDocument: dco_decode_opt_String(arr[24]),
    );
  }

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

  @protected
  FictionBookMetadata dco_decode_fiction_book_metadata(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 FictionBookMetadata(
      genres: dco_decode_list_String(arr[0]),
      sequences: dco_decode_list_String(arr[1]),
      annotation: dco_decode_opt_String(arr[2]),
    );
  }

  @protected
  FileExtractionConfig dco_decode_file_extraction_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 22)
      throw Exception('unexpected arr length: expect 22 but see ${arr.length}');
    return FileExtractionConfig(
      enableQualityProcessing: dco_decode_opt_box_autoadd_bool(arr[0]),
      ocr: dco_decode_opt_box_autoadd_ocr_config(arr[1]),
      forceOcr: dco_decode_opt_box_autoadd_bool(arr[2]),
      forceOcrPages: dco_decode_opt_list_prim_i_64_strict(arr[3]),
      disableOcr: dco_decode_opt_box_autoadd_bool(arr[4]),
      chunking: dco_decode_opt_box_autoadd_chunking_config(arr[5]),
      contentFilter: dco_decode_opt_box_autoadd_content_filter_config(arr[6]),
      images: dco_decode_opt_box_autoadd_image_extraction_config(arr[7]),
      pdfOptions: dco_decode_opt_box_autoadd_pdf_config(arr[8]),
      tokenReduction: dco_decode_opt_box_autoadd_token_reduction_options(
        arr[9],
      ),
      languageDetection: dco_decode_opt_box_autoadd_language_detection_config(
        arr[10],
      ),
      pages: dco_decode_opt_box_autoadd_page_config(arr[11]),
      keywords: dco_decode_opt_box_autoadd_keyword_config(arr[12]),
      postprocessor: dco_decode_opt_box_autoadd_post_processor_config(arr[13]),
      htmlOptions: dco_decode_opt_String(arr[14]),
      resultFormat: dco_decode_opt_box_autoadd_result_format(arr[15]),
      outputFormat: dco_decode_opt_box_autoadd_output_format(arr[16]),
      includeDocumentStructure: dco_decode_opt_box_autoadd_bool(arr[17]),
      layout: dco_decode_opt_box_autoadd_layout_detection_config(arr[18]),
      timeoutSecs: dco_decode_opt_box_autoadd_i_64(arr[19]),
      treeSitter: dco_decode_opt_box_autoadd_tree_sitter_config(arr[20]),
      structuredExtraction:
          dco_decode_opt_box_autoadd_structured_extraction_config(arr[21]),
    );
  }

  @protected
  Footnote dco_decode_footnote(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 Footnote(
      label: dco_decode_String(arr[0]),
      content: dco_decode_list_formatted_block(arr[1]),
    );
  }

  @protected
  FormatMetadata dco_decode_format_metadata(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return FormatMetadata_Pdf(
          field0: dco_decode_box_autoadd_pdf_metadata(raw[1]),
        );
      case 1:
        return FormatMetadata_Docx(
          field0: dco_decode_box_autoadd_docx_metadata(raw[1]),
        );
      case 2:
        return FormatMetadata_Excel(
          field0: dco_decode_box_autoadd_excel_metadata(raw[1]),
        );
      case 3:
        return FormatMetadata_Email(
          field0: dco_decode_box_autoadd_email_metadata(raw[1]),
        );
      case 4:
        return FormatMetadata_Pptx(
          field0: dco_decode_box_autoadd_pptx_metadata(raw[1]),
        );
      case 5:
        return FormatMetadata_Archive(
          field0: dco_decode_box_autoadd_archive_metadata(raw[1]),
        );
      case 6:
        return FormatMetadata_Image(
          field0: dco_decode_box_autoadd_image_metadata(raw[1]),
        );
      case 7:
        return FormatMetadata_Xml(
          field0: dco_decode_box_autoadd_xml_metadata(raw[1]),
        );
      case 8:
        return FormatMetadata_Text(
          field0: dco_decode_box_autoadd_text_metadata(raw[1]),
        );
      case 9:
        return FormatMetadata_Html(
          field0: dco_decode_box_autoadd_html_metadata(raw[1]),
        );
      case 10:
        return FormatMetadata_Ocr(
          field0: dco_decode_box_autoadd_ocr_metadata(raw[1]),
        );
      case 11:
        return FormatMetadata_Csv(
          field0: dco_decode_box_autoadd_csv_metadata(raw[1]),
        );
      case 12:
        return FormatMetadata_Bibtex(
          field0: dco_decode_box_autoadd_bibtex_metadata(raw[1]),
        );
      case 13:
        return FormatMetadata_Citation(
          field0: dco_decode_box_autoadd_citation_metadata(raw[1]),
        );
      case 14:
        return FormatMetadata_FictionBook(
          field0: dco_decode_box_autoadd_fiction_book_metadata(raw[1]),
        );
      case 15:
        return FormatMetadata_Dbf(
          field0: dco_decode_box_autoadd_dbf_metadata(raw[1]),
        );
      case 16:
        return FormatMetadata_Jats(
          field0: dco_decode_box_autoadd_jats_metadata(raw[1]),
        );
      case 17:
        return FormatMetadata_Epub(
          field0: dco_decode_box_autoadd_epub_metadata(raw[1]),
        );
      case 18:
        return FormatMetadata_Pst(
          field0: dco_decode_box_autoadd_pst_metadata(raw[1]),
        );
      case 19:
        return FormatMetadata_Code(field0: dco_decode_String(raw[1]));
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  FormattedBlock dco_decode_formatted_block(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return FormattedBlock(
      blockType: dco_decode_block_type(arr[0]),
      level: dco_decode_opt_box_autoadd_i_64(arr[1]),
      inlineContent: dco_decode_list_inline_element(arr[2]),
      attributes: dco_decode_opt_String(arr[3]),
      language: dco_decode_opt_String(arr[4]),
      code: dco_decode_opt_String(arr[5]),
      children: dco_decode_list_formatted_block(arr[6]),
    );
  }

  @protected
  GridCell dco_decode_grid_cell(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return GridCell(
      content: dco_decode_String(arr[0]),
      row: dco_decode_i_64(arr[1]),
      col: dco_decode_i_64(arr[2]),
      rowSpan: dco_decode_i_64(arr[3]),
      colSpan: dco_decode_i_64(arr[4]),
      isHeader: dco_decode_bool(arr[5]),
      bbox: dco_decode_opt_box_autoadd_bounding_box(arr[6]),
    );
  }

  @protected
  HeaderMetadata dco_decode_header_metadata(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 HeaderMetadata(
      level: dco_decode_i_64(arr[0]),
      text: dco_decode_String(arr[1]),
      id: dco_decode_opt_String(arr[2]),
      depth: dco_decode_i_64(arr[3]),
      htmlOffset: dco_decode_i_64(arr[4]),
    );
  }

  @protected
  HeadingContext dco_decode_heading_context(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 HeadingContext(headings: dco_decode_list_heading_level(arr[0]));
  }

  @protected
  HeadingLevel dco_decode_heading_level(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 HeadingLevel(
      level: dco_decode_i_64(arr[0]),
      text: dco_decode_String(arr[1]),
    );
  }

  @protected
  HierarchicalBlock dco_decode_hierarchical_block(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 HierarchicalBlock(
      text: dco_decode_String(arr[0]),
      fontSize: dco_decode_f_64(arr[1]),
      level: dco_decode_String(arr[2]),
      bbox: dco_decode_opt_list_prim_f_64_strict(arr[3]),
    );
  }

  @protected
  HierarchyConfig dco_decode_hierarchy_config(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 HierarchyConfig(
      enabled: dco_decode_bool(arr[0]),
      kClusters: dco_decode_i_64(arr[1]),
      includeBbox: dco_decode_bool(arr[2]),
      ocrCoverageThreshold: dco_decode_opt_box_autoadd_f_64(arr[3]),
    );
  }

  @protected
  HtmlMetadata dco_decode_html_metadata(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 15)
      throw Exception('unexpected arr length: expect 15 but see ${arr.length}');
    return HtmlMetadata(
      title: dco_decode_opt_String(arr[0]),
      description: dco_decode_opt_String(arr[1]),
      keywords: dco_decode_list_String(arr[2]),
      author: dco_decode_opt_String(arr[3]),
      canonicalUrl: dco_decode_opt_String(arr[4]),
      baseHref: dco_decode_opt_String(arr[5]),
      language: dco_decode_opt_String(arr[6]),
      textDirection: dco_decode_opt_box_autoadd_text_direction(arr[7]),
      openGraph: dco_decode_Map_String_String_None(arr[8]),
      twitterCard: dco_decode_Map_String_String_None(arr[9]),
      metaTags: dco_decode_Map_String_String_None(arr[10]),
      headers: dco_decode_list_header_metadata(arr[11]),
      links: dco_decode_list_link_metadata(arr[12]),
      images: dco_decode_list_image_metadata_type(arr[13]),
      structuredData: dco_decode_list_structured_data(arr[14]),
    );
  }

  @protected
  HtmlOutputConfig dco_decode_html_output_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 HtmlOutputConfig(
      css: dco_decode_opt_String(arr[0]),
      cssFile: dco_decode_opt_String(arr[1]),
      theme: dco_decode_html_theme(arr[2]),
      classPrefix: dco_decode_String(arr[3]),
      embedCss: dco_decode_bool(arr[4]),
    );
  }

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

  @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
  ImageExtractionConfig dco_decode_image_extraction_config(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 ImageExtractionConfig(
      extractImages: dco_decode_bool(arr[0]),
      targetDpi: dco_decode_i_64(arr[1]),
      maxImageDimension: dco_decode_i_64(arr[2]),
      injectPlaceholders: dco_decode_bool(arr[3]),
      autoAdjustDpi: dco_decode_bool(arr[4]),
      minDpi: dco_decode_i_64(arr[5]),
      maxDpi: dco_decode_i_64(arr[6]),
      maxImagesPerPage: dco_decode_opt_box_autoadd_i_64(arr[7]),
      classify: dco_decode_bool(arr[8]),
      includePageRasters: dco_decode_bool(arr[9]),
      runOcrOnImages: dco_decode_bool(arr[10]),
      ocrTextOnly: dco_decode_bool(arr[11]),
      appendOcrText: dco_decode_bool(arr[12]),
    );
  }

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

  @protected
  ImageMetadata dco_decode_image_metadata(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 ImageMetadata(
      width: dco_decode_i_64(arr[0]),
      height: dco_decode_i_64(arr[1]),
      format: dco_decode_String(arr[2]),
      exif: dco_decode_Map_String_String_None(arr[3]),
    );
  }

  @protected
  ImageMetadataType dco_decode_image_metadata_type(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 ImageMetadataType(
      src: dco_decode_String(arr[0]),
      alt: dco_decode_opt_String(arr[1]),
      title: dco_decode_opt_String(arr[2]),
      dimensions: dco_decode_opt_list_prim_i_64_strict(arr[3]),
      imageType: dco_decode_image_type(arr[4]),
      attributes: dco_decode_list_list_String(arr[5]),
    );
  }

  @protected
  ImagePreprocessingConfig dco_decode_image_preprocessing_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return ImagePreprocessingConfig(
      targetDpi: dco_decode_i_64(arr[0]),
      autoRotate: dco_decode_bool(arr[1]),
      deskew: dco_decode_bool(arr[2]),
      denoise: dco_decode_bool(arr[3]),
      contrastEnhance: dco_decode_bool(arr[4]),
      binarizationMethod: dco_decode_String(arr[5]),
      invertColors: dco_decode_bool(arr[6]),
    );
  }

  @protected
  ImagePreprocessingMetadata dco_decode_image_preprocessing_metadata(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 12)
      throw Exception('unexpected arr length: expect 12 but see ${arr.length}');
    return ImagePreprocessingMetadata(
      originalDimensions: dco_decode_list_prim_i_64_strict(arr[0]),
      originalDpi: dco_decode_list_prim_f_64_strict(arr[1]),
      targetDpi: dco_decode_i_64(arr[2]),
      scaleFactor: dco_decode_f_64(arr[3]),
      autoAdjusted: dco_decode_bool(arr[4]),
      finalDpi: dco_decode_i_64(arr[5]),
      newDimensions: dco_decode_opt_list_prim_i_64_strict(arr[6]),
      resampleMethod: dco_decode_String(arr[7]),
      dimensionClamped: dco_decode_bool(arr[8]),
      calculatedDpi: dco_decode_opt_box_autoadd_i_64(arr[9]),
      skippedResize: dco_decode_bool(arr[10]),
      resizeError: dco_decode_opt_String(arr[11]),
    );
  }

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

  @protected
  InlineElement dco_decode_inline_element(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 InlineElement(
      elementType: dco_decode_inline_type(arr[0]),
      content: dco_decode_String(arr[1]),
      attributes: dco_decode_opt_String(arr[2]),
      metadata: dco_decode_opt_Map_String_String_None(arr[3]),
    );
  }

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

  @protected
  InternalDocumentBridge dco_decode_internal_document_bridge(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 InternalDocumentBridge(json: dco_decode_String(arr[0]));
  }

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

  @protected
  JatsMetadata dco_decode_jats_metadata(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 JatsMetadata(
      copyright: dco_decode_opt_String(arr[0]),
      license: dco_decode_opt_String(arr[1]),
      historyDates: dco_decode_Map_String_String_None(arr[2]),
      contributorRoles: dco_decode_list_contributor_role(arr[3]),
    );
  }

  @protected
  Keyword dco_decode_keyword(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 Keyword(
      text: dco_decode_String(arr[0]),
      score: dco_decode_f_64(arr[1]),
      algorithm: dco_decode_keyword_algorithm(arr[2]),
      positions: dco_decode_opt_list_prim_i_64_strict(arr[3]),
    );
  }

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

  @protected
  KeywordConfig dco_decode_keyword_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return KeywordConfig(
      algorithm: dco_decode_keyword_algorithm(arr[0]),
      maxKeywords: dco_decode_i_64(arr[1]),
      minScore: dco_decode_f_64(arr[2]),
      ngramRange: dco_decode_list_prim_i_64_strict(arr[3]),
      language: dco_decode_opt_String(arr[4]),
      yakeParams: dco_decode_opt_box_autoadd_yake_params(arr[5]),
      rakeParams: dco_decode_opt_box_autoadd_rake_params(arr[6]),
    );
  }

  @protected
  LanguageDetectionConfig dco_decode_language_detection_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 LanguageDetectionConfig(
      enabled: dco_decode_bool(arr[0]),
      minConfidence: dco_decode_f_64(arr[1]),
      detectMultiple: dco_decode_bool(arr[2]),
    );
  }

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

  @protected
  LayoutDetection dco_decode_layout_detection(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 LayoutDetection(
      className: dco_decode_layout_class(arr[0]),
      confidence: dco_decode_f_64(arr[1]),
      bbox: dco_decode_b_box(arr[2]),
    );
  }

  @protected
  LayoutDetectionConfig dco_decode_layout_detection_config(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 LayoutDetectionConfig(
      confidenceThreshold: dco_decode_opt_box_autoadd_f_64(arr[0]),
      applyHeuristics: dco_decode_bool(arr[1]),
      tableModel: dco_decode_table_model(arr[2]),
      acceleration: dco_decode_opt_box_autoadd_acceleration_config(arr[3]),
    );
  }

  @protected
  LayoutRegion dco_decode_layout_region(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 LayoutRegion(
      className: dco_decode_String(arr[0]),
      confidence: dco_decode_f_64(arr[1]),
      boundingBox: dco_decode_bounding_box(arr[2]),
      areaFraction: dco_decode_f_64(arr[3]),
    );
  }

  @protected
  LinkMetadata dco_decode_link_metadata(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 LinkMetadata(
      href: dco_decode_String(arr[0]),
      text: dco_decode_String(arr[1]),
      title: dco_decode_opt_String(arr[2]),
      linkType: dco_decode_link_type(arr[3]),
      rel: dco_decode_list_String(arr[4]),
      attributes: dco_decode_list_list_String(arr[5]),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @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<ProcessingWarning> dco_decode_list_processing_warning(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_processing_warning).toList();
  }

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

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

  @protected
  List<(String, List<String>)> dco_decode_list_record_string_list_string(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>)
        .map(dco_decode_record_string_list_string)
        .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<StructuredData> dco_decode_list_structured_data(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return (raw as List<dynamic>).map(dco_decode_structured_data).toList();
  }

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

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

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

  @protected
  LlmConfig dco_decode_llm_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return LlmConfig(
      model: dco_decode_String(arr[0]),
      apiKey: dco_decode_opt_String(arr[1]),
      baseUrl: dco_decode_opt_String(arr[2]),
      timeoutSecs: dco_decode_opt_box_autoadd_i_64(arr[3]),
      maxRetries: dco_decode_opt_box_autoadd_i_64(arr[4]),
      temperature: dco_decode_opt_box_autoadd_f_64(arr[5]),
      maxTokens: dco_decode_opt_box_autoadd_i_64(arr[6]),
    );
  }

  @protected
  LlmUsage dco_decode_llm_usage(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return LlmUsage(
      model: dco_decode_String(arr[0]),
      source: dco_decode_String(arr[1]),
      inputTokens: dco_decode_opt_box_autoadd_i_64(arr[2]),
      outputTokens: dco_decode_opt_box_autoadd_i_64(arr[3]),
      totalTokens: dco_decode_opt_box_autoadd_i_64(arr[4]),
      estimatedCost: dco_decode_opt_box_autoadd_f_64(arr[5]),
      finishReason: dco_decode_opt_String(arr[6]),
    );
  }

  @protected
  Metadata dco_decode_metadata(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 22)
      throw Exception('unexpected arr length: expect 22 but see ${arr.length}');
    return Metadata(
      title: dco_decode_opt_String(arr[0]),
      subject: dco_decode_opt_String(arr[1]),
      authors: dco_decode_opt_list_String(arr[2]),
      keywords: dco_decode_opt_list_String(arr[3]),
      language: dco_decode_opt_String(arr[4]),
      createdAt: dco_decode_opt_String(arr[5]),
      modifiedAt: dco_decode_opt_String(arr[6]),
      createdBy: dco_decode_opt_String(arr[7]),
      modifiedBy: dco_decode_opt_String(arr[8]),
      pages: dco_decode_opt_box_autoadd_page_structure(arr[9]),
      format: dco_decode_opt_box_autoadd_format_metadata(arr[10]),
      imagePreprocessing:
          dco_decode_opt_box_autoadd_image_preprocessing_metadata(arr[11]),
      jsonSchema: dco_decode_opt_String(arr[12]),
      error: dco_decode_opt_box_autoadd_error_metadata(arr[13]),
      extractionDurationMs: dco_decode_opt_box_autoadd_i_64(arr[14]),
      category: dco_decode_opt_String(arr[15]),
      tags: dco_decode_opt_list_String(arr[16]),
      documentVersion: dco_decode_opt_String(arr[17]),
      abstractText: dco_decode_opt_String(arr[18]),
      outputFormat: dco_decode_opt_String(arr[19]),
      ocrUsed: dco_decode_bool(arr[20]),
      additional: dco_decode_Map_String_String_None(arr[21]),
    );
  }

  @protected
  ModelPaths dco_decode_model_paths(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 ModelPaths(
      detModel: dco_decode_String(arr[0]),
      clsModel: dco_decode_String(arr[1]),
      recModel: dco_decode_String(arr[2]),
      dictFile: dco_decode_String(arr[3]),
    );
  }

  @protected
  NodeContent dco_decode_node_content(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return NodeContent_Title(text: dco_decode_String(raw[1]));
      case 1:
        return NodeContent_Heading(
          level: dco_decode_i_64(raw[1]),
          text: dco_decode_String(raw[2]),
        );
      case 2:
        return NodeContent_Paragraph(text: dco_decode_String(raw[1]));
      case 3:
        return NodeContent_List(ordered: dco_decode_bool(raw[1]));
      case 4:
        return NodeContent_ListItem(text: dco_decode_String(raw[1]));
      case 5:
        return NodeContent_Table(
          grid: dco_decode_box_autoadd_table_grid(raw[1]),
        );
      case 6:
        return NodeContent_Image(
          description: dco_decode_String(raw[1]),
          imageIndex: dco_decode_i_64(raw[2]),
          src: dco_decode_String(raw[3]),
        );
      case 7:
        return NodeContent_Code(
          text: dco_decode_String(raw[1]),
          language: dco_decode_String(raw[2]),
        );
      case 8:
        return NodeContent_Quote();
      case 9:
        return NodeContent_Formula(text: dco_decode_String(raw[1]));
      case 10:
        return NodeContent_Footnote(text: dco_decode_String(raw[1]));
      case 11:
        return NodeContent_Group(
          label: dco_decode_String(raw[1]),
          headingLevel: dco_decode_i_64(raw[2]),
          headingText: dco_decode_String(raw[3]),
        );
      case 12:
        return NodeContent_PageBreak();
      case 13:
        return NodeContent_Slide(
          number: dco_decode_i_64(raw[1]),
          title: dco_decode_String(raw[2]),
        );
      case 14:
        return NodeContent_DefinitionList();
      case 15:
        return NodeContent_DefinitionItem(
          term: dco_decode_String(raw[1]),
          definition: dco_decode_String(raw[2]),
        );
      case 16:
        return NodeContent_Citation(
          key: dco_decode_String(raw[1]),
          text: dco_decode_String(raw[2]),
        );
      case 17:
        return NodeContent_Admonition(
          kind: dco_decode_String(raw[1]),
          title: dco_decode_String(raw[2]),
        );
      case 18:
        return NodeContent_RawBlock(
          format: dco_decode_String(raw[1]),
          content: dco_decode_String(raw[2]),
        );
      case 19:
        return NodeContent_MetadataBlock(
          entries: dco_decode_list_list_String(raw[1]),
        );
      default:
        throw Exception("unreachable");
    }
  }

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

  @protected
  OcrBoundingGeometry dco_decode_ocr_bounding_geometry(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return OcrBoundingGeometry_Rectangle(
          left: dco_decode_i_64(raw[1]),
          top: dco_decode_i_64(raw[2]),
          width: dco_decode_i_64(raw[3]),
          height: dco_decode_i_64(raw[4]),
        );
      case 1:
        return OcrBoundingGeometry_Quadrilateral(
          points: dco_decode_String(raw[1]),
        );
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  OcrConfidence dco_decode_ocr_confidence(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 OcrConfidence(
      detection: dco_decode_opt_box_autoadd_f_64(arr[0]),
      recognition: dco_decode_f_64(arr[1]),
    );
  }

  @protected
  OcrConfig dco_decode_ocr_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 15)
      throw Exception('unexpected arr length: expect 15 but see ${arr.length}');
    return OcrConfig(
      enabled: dco_decode_bool(arr[0]),
      backend: dco_decode_String(arr[1]),
      language: dco_decode_String(arr[2]),
      tesseractConfig: dco_decode_opt_box_autoadd_tesseract_config(arr[3]),
      outputFormat: dco_decode_opt_box_autoadd_output_format(arr[4]),
      paddleOcrConfig: dco_decode_opt_String(arr[5]),
      backendOptions: dco_decode_opt_String(arr[6]),
      elementConfig: dco_decode_opt_box_autoadd_ocr_element_config(arr[7]),
      qualityThresholds: dco_decode_opt_box_autoadd_ocr_quality_thresholds(
        arr[8],
      ),
      pipeline: dco_decode_opt_box_autoadd_ocr_pipeline_config(arr[9]),
      autoRotate: dco_decode_bool(arr[10]),
      vlmConfig: dco_decode_opt_box_autoadd_llm_config(arr[11]),
      vlmPrompt: dco_decode_opt_String(arr[12]),
      acceleration: dco_decode_opt_box_autoadd_acceleration_config(arr[13]),
      tessdataBytes: dco_decode_opt_Map_String_list_prim_u_8_strict_None(
        arr[14],
      ),
    );
  }

  @protected
  OcrElement dco_decode_ocr_element(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 8)
      throw Exception('unexpected arr length: expect 8 but see ${arr.length}');
    return OcrElement(
      text: dco_decode_String(arr[0]),
      geometry: dco_decode_ocr_bounding_geometry(arr[1]),
      confidence: dco_decode_ocr_confidence(arr[2]),
      level: dco_decode_ocr_element_level(arr[3]),
      rotation: dco_decode_opt_box_autoadd_ocr_rotation(arr[4]),
      pageNumber: dco_decode_i_64(arr[5]),
      parentId: dco_decode_opt_String(arr[6]),
      backendMetadata: dco_decode_Map_String_String_None(arr[7]),
    );
  }

  @protected
  OcrElementConfig dco_decode_ocr_element_config(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 OcrElementConfig(
      includeElements: dco_decode_bool(arr[0]),
      minLevel: dco_decode_ocr_element_level(arr[1]),
      minConfidence: dco_decode_f_64(arr[2]),
      buildHierarchy: dco_decode_bool(arr[3]),
    );
  }

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

  @protected
  OcrExtractionResult dco_decode_ocr_extraction_result(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 OcrExtractionResult(
      content: dco_decode_String(arr[0]),
      mimeType: dco_decode_String(arr[1]),
      metadata: dco_decode_Map_String_String_None(arr[2]),
      tables: dco_decode_list_ocr_table(arr[3]),
      ocrElements: dco_decode_opt_list_ocr_element(arr[4]),
      internalDocument: dco_decode_opt_String(arr[5]),
    );
  }

  @protected
  OcrMetadata dco_decode_ocr_metadata(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 OcrMetadata(
      language: dco_decode_String(arr[0]),
      psm: dco_decode_i_64(arr[1]),
      outputFormat: dco_decode_String(arr[2]),
      tableCount: dco_decode_i_64(arr[3]),
      tableRows: dco_decode_opt_box_autoadd_i_64(arr[4]),
      tableCols: dco_decode_opt_box_autoadd_i_64(arr[5]),
    );
  }

  @protected
  OcrPipelineConfig dco_decode_ocr_pipeline_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 OcrPipelineConfig(
      stages: dco_decode_list_ocr_pipeline_stage(arr[0]),
      qualityThresholds: dco_decode_ocr_quality_thresholds(arr[1]),
    );
  }

  @protected
  OcrPipelineStage dco_decode_ocr_pipeline_stage(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return OcrPipelineStage(
      backend: dco_decode_String(arr[0]),
      priority: dco_decode_i_64(arr[1]),
      language: dco_decode_opt_String(arr[2]),
      tesseractConfig: dco_decode_opt_box_autoadd_tesseract_config(arr[3]),
      paddleOcrConfig: dco_decode_opt_String(arr[4]),
      vlmConfig: dco_decode_opt_box_autoadd_llm_config(arr[5]),
      backendOptions: dco_decode_opt_String(arr[6]),
    );
  }

  @protected
  OcrQualityThresholds dco_decode_ocr_quality_thresholds(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 16)
      throw Exception('unexpected arr length: expect 16 but see ${arr.length}');
    return OcrQualityThresholds(
      minTotalNonWhitespace: dco_decode_i_64(arr[0]),
      minNonWhitespacePerPage: dco_decode_f_64(arr[1]),
      minMeaningfulWordLen: dco_decode_i_64(arr[2]),
      minMeaningfulWords: dco_decode_i_64(arr[3]),
      minAlnumRatio: dco_decode_f_64(arr[4]),
      minGarbageChars: dco_decode_i_64(arr[5]),
      maxFragmentedWordRatio: dco_decode_f_64(arr[6]),
      criticalFragmentedWordRatio: dco_decode_f_64(arr[7]),
      minAvgWordLength: dco_decode_f_64(arr[8]),
      minWordsForAvgLengthCheck: dco_decode_i_64(arr[9]),
      minConsecutiveRepeatRatio: dco_decode_f_64(arr[10]),
      minWordsForRepeatCheck: dco_decode_i_64(arr[11]),
      substantiveMinChars: dco_decode_i_64(arr[12]),
      nonTextMinChars: dco_decode_i_64(arr[13]),
      alnumWsRatioThreshold: dco_decode_f_64(arr[14]),
      pipelineMinQuality: dco_decode_f_64(arr[15]),
    );
  }

  @protected
  OcrRotation dco_decode_ocr_rotation(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 OcrRotation(
      angleDegrees: dco_decode_f_64(arr[0]),
      confidence: dco_decode_opt_box_autoadd_f_64(arr[1]),
    );
  }

  @protected
  OcrTable dco_decode_ocr_table(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 OcrTable(
      cells: dco_decode_list_list_String(arr[0]),
      markdown: dco_decode_String(arr[1]),
      pageNumber: dco_decode_i_64(arr[2]),
      boundingBox: dco_decode_opt_box_autoadd_ocr_table_bounding_box(arr[3]),
    );
  }

  @protected
  OcrTableBoundingBox dco_decode_ocr_table_bounding_box(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 OcrTableBoundingBox(
      left: dco_decode_i_64(arr[0]),
      top: dco_decode_i_64(arr[1]),
      right: dco_decode_i_64(arr[2]),
      bottom: dco_decode_i_64(arr[3]),
    );
  }

  @protected
  Map<String, String>? dco_decode_opt_Map_String_String_None(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_Map_String_String_None(raw);
  }

  @protected
  Map<String, PlatformInt64>? dco_decode_opt_Map_String_i_64_None(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_Map_String_i_64_None(raw);
  }

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

  @protected
  Map<String, Uint8List>? dco_decode_opt_Map_String_list_prim_u_8_strict_None(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null
        ? null
        : dco_decode_Map_String_list_prim_u_8_strict_None(raw);
  }

  @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
  AccelerationConfig? dco_decode_opt_box_autoadd_acceleration_config(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_acceleration_config(raw);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  HtmlOutputConfig? dco_decode_opt_box_autoadd_html_output_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null ? null : dco_decode_box_autoadd_html_output_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
  ImageExtractionConfig? dco_decode_opt_box_autoadd_image_extraction_config(
    dynamic raw,
  ) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return raw == null
        ? null
        : dco_decode_box_autoadd_image_extraction_config(raw);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  OrientationResult dco_decode_orientation_result(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 OrientationResult(
      degrees: dco_decode_i_64(arr[0]),
      confidence: dco_decode_f_64(arr[1]),
    );
  }

  @protected
  OutputFormat dco_decode_output_format(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return OutputFormat_Plain();
      case 1:
        return OutputFormat_Markdown();
      case 2:
        return OutputFormat_Djot();
      case 3:
        return OutputFormat_Html();
      case 4:
        return OutputFormat_Json();
      case 5:
        return OutputFormat_Structured();
      case 6:
        return OutputFormat_Custom(field0: dco_decode_String(raw[1]));
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  PaddleOcrConfig dco_decode_paddle_ocr_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 12)
      throw Exception('unexpected arr length: expect 12 but see ${arr.length}');
    return PaddleOcrConfig(
      language: dco_decode_String(arr[0]),
      cacheDir: dco_decode_opt_String(arr[1]),
      useAngleCls: dco_decode_bool(arr[2]),
      enableTableDetection: dco_decode_bool(arr[3]),
      detDbThresh: dco_decode_f_64(arr[4]),
      detDbBoxThresh: dco_decode_f_64(arr[5]),
      detDbUnclipRatio: dco_decode_f_64(arr[6]),
      detLimitSideLen: dco_decode_i_64(arr[7]),
      recBatchNum: dco_decode_i_64(arr[8]),
      padding: dco_decode_i_64(arr[9]),
      dropScore: dco_decode_f_64(arr[10]),
      modelTier: dco_decode_String(arr[11]),
    );
  }

  @protected
  PageBoundary dco_decode_page_boundary(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 PageBoundary(
      byteStart: dco_decode_i_64(arr[0]),
      byteEnd: dco_decode_i_64(arr[1]),
      pageNumber: dco_decode_i_64(arr[2]),
    );
  }

  @protected
  PageConfig dco_decode_page_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 PageConfig(
      extractPages: dco_decode_bool(arr[0]),
      insertPageMarkers: dco_decode_bool(arr[1]),
      markerFormat: dco_decode_String(arr[2]),
    );
  }

  @protected
  PageContent dco_decode_page_content(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 PageContent(
      pageNumber: dco_decode_i_64(arr[0]),
      content: dco_decode_String(arr[1]),
      tables: dco_decode_list_table(arr[2]),
      imageIndices: dco_decode_list_prim_i_64_strict(arr[3]),
      hierarchy: dco_decode_opt_box_autoadd_page_hierarchy(arr[4]),
      isBlank: dco_decode_opt_box_autoadd_bool(arr[5]),
      layoutRegions: dco_decode_opt_list_layout_region(arr[6]),
      speakerNotes: dco_decode_opt_String(arr[7]),
      sectionName: dco_decode_opt_String(arr[8]),
      sheetName: dco_decode_opt_String(arr[9]),
    );
  }

  @protected
  PageHierarchy dco_decode_page_hierarchy(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 PageHierarchy(
      blockCount: dco_decode_i_64(arr[0]),
      blocks: dco_decode_list_hierarchical_block(arr[1]),
    );
  }

  @protected
  PageInfo dco_decode_page_info(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 8)
      throw Exception('unexpected arr length: expect 8 but see ${arr.length}');
    return PageInfo(
      number: dco_decode_i_64(arr[0]),
      title: dco_decode_opt_String(arr[1]),
      dimensions: dco_decode_opt_list_prim_f_64_strict(arr[2]),
      imageCount: dco_decode_opt_box_autoadd_i_64(arr[3]),
      tableCount: dco_decode_opt_box_autoadd_i_64(arr[4]),
      hidden: dco_decode_opt_box_autoadd_bool(arr[5]),
      isBlank: dco_decode_opt_box_autoadd_bool(arr[6]),
      hasVectorGraphics: dco_decode_bool(arr[7]),
    );
  }

  @protected
  PageStructure dco_decode_page_structure(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 PageStructure(
      totalCount: dco_decode_i_64(arr[0]),
      unitType: dco_decode_page_unit_type(arr[1]),
      boundaries: dco_decode_opt_list_page_boundary(arr[2]),
      pages: dco_decode_opt_list_page_info(arr[3]),
    );
  }

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

  @protected
  PdfAnnotation dco_decode_pdf_annotation(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 PdfAnnotation(
      annotationType: dco_decode_pdf_annotation_type(arr[0]),
      content: dco_decode_opt_String(arr[1]),
      pageNumber: dco_decode_i_64(arr[2]),
      boundingBox: dco_decode_opt_box_autoadd_bounding_box(arr[3]),
    );
  }

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

  @protected
  PdfConfig dco_decode_pdf_config(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 PdfConfig(
      extractImages: dco_decode_bool(arr[0]),
      extractTables: dco_decode_bool(arr[1]),
      passwords: dco_decode_opt_list_String(arr[2]),
      extractMetadata: dco_decode_bool(arr[3]),
      hierarchy: dco_decode_opt_box_autoadd_hierarchy_config(arr[4]),
      extractAnnotations: dco_decode_bool(arr[5]),
      topMarginFraction: dco_decode_opt_box_autoadd_f_64(arr[6]),
      bottomMarginFraction: dco_decode_opt_box_autoadd_f_64(arr[7]),
      allowSingleColumnTables: dco_decode_bool(arr[8]),
      ocrInlineImages: dco_decode_bool(arr[9]),
    );
  }

  @protected
  PdfMetadata dco_decode_pdf_metadata(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 PdfMetadata(
      pdfVersion: dco_decode_opt_String(arr[0]),
      producer: dco_decode_opt_String(arr[1]),
      isEncrypted: dco_decode_opt_box_autoadd_bool(arr[2]),
      width: dco_decode_opt_box_autoadd_i_64(arr[3]),
      height: dco_decode_opt_box_autoadd_i_64(arr[4]),
      pageCount: dco_decode_opt_box_autoadd_i_64(arr[5]),
    );
  }

  @protected
  PostProcessorConfig dco_decode_post_processor_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 PostProcessorConfig(
      enabled: dco_decode_bool(arr[0]),
      enabledProcessors: dco_decode_opt_list_String(arr[1]),
      disabledProcessors: dco_decode_opt_list_String(arr[2]),
      enabledSet: dco_decode_opt_list_String(arr[3]),
      disabledSet: dco_decode_opt_list_String(arr[4]),
    );
  }

  @protected
  PptxAppProperties dco_decode_pptx_app_properties(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 15)
      throw Exception('unexpected arr length: expect 15 but see ${arr.length}');
    return PptxAppProperties(
      application: dco_decode_opt_String(arr[0]),
      appVersion: dco_decode_opt_String(arr[1]),
      totalTime: dco_decode_opt_box_autoadd_i_64(arr[2]),
      company: dco_decode_opt_String(arr[3]),
      docSecurity: dco_decode_opt_box_autoadd_i_64(arr[4]),
      scaleCrop: dco_decode_opt_box_autoadd_bool(arr[5]),
      linksUpToDate: dco_decode_opt_box_autoadd_bool(arr[6]),
      sharedDoc: dco_decode_opt_box_autoadd_bool(arr[7]),
      hyperlinksChanged: dco_decode_opt_box_autoadd_bool(arr[8]),
      slides: dco_decode_opt_box_autoadd_i_64(arr[9]),
      notes: dco_decode_opt_box_autoadd_i_64(arr[10]),
      hiddenSlides: dco_decode_opt_box_autoadd_i_64(arr[11]),
      multimediaClips: dco_decode_opt_box_autoadd_i_64(arr[12]),
      presentationFormat: dco_decode_opt_String(arr[13]),
      slideTitles: dco_decode_list_String(arr[14]),
    );
  }

  @protected
  PptxExtractionResult dco_decode_pptx_extraction_result(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 12)
      throw Exception('unexpected arr length: expect 12 but see ${arr.length}');
    return PptxExtractionResult(
      content: dco_decode_String(arr[0]),
      metadata: dco_decode_pptx_metadata(arr[1]),
      slideCount: dco_decode_i_64(arr[2]),
      imageCount: dco_decode_i_64(arr[3]),
      tableCount: dco_decode_i_64(arr[4]),
      images: dco_decode_list_extracted_image(arr[5]),
      pageStructure: dco_decode_opt_box_autoadd_page_structure(arr[6]),
      pageContents: dco_decode_opt_list_page_content(arr[7]),
      document: dco_decode_opt_box_autoadd_document_structure(arr[8]),
      hyperlinks: dco_decode_list_String(arr[9]),
      officeMetadata: dco_decode_Map_String_String_None(arr[10]),
      revisions: dco_decode_opt_list_document_revision(arr[11]),
    );
  }

  @protected
  PptxMetadata dco_decode_pptx_metadata(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 PptxMetadata(
      slideCount: dco_decode_i_64(arr[0]),
      slideNames: dco_decode_list_String(arr[1]),
      imageCount: dco_decode_opt_box_autoadd_i_64(arr[2]),
      tableCount: dco_decode_opt_box_autoadd_i_64(arr[3]),
    );
  }

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

  @protected
  ProcessingWarning dco_decode_processing_warning(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 ProcessingWarning(
      source: dco_decode_String(arr[0]),
      message: dco_decode_String(arr[1]),
    );
  }

  @protected
  PstMetadata dco_decode_pst_metadata(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 PstMetadata(messageCount: dco_decode_i_64(arr[0]));
  }

  @protected
  RakeParams dco_decode_rake_params(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 RakeParams(
      minWordLength: dco_decode_i_64(arr[0]),
      maxWordsPerPhrase: dco_decode_i_64(arr[1]),
    );
  }

  @protected
  RecognizedTable dco_decode_recognized_table(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 RecognizedTable(
      detectionBbox: dco_decode_b_box(arr[0]),
      cells: dco_decode_list_list_String(arr[1]),
      markdown: dco_decode_String(arr[2]),
    );
  }

  @protected
  (String, PlatformInt64) dco_decode_record_string_i_64(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_i_64(arr[1]));
  }

  @protected
  (String, Uint8List) dco_decode_record_string_list_prim_u_8_strict(
    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_list_prim_u_8_strict(arr[1]));
  }

  @protected
  (String, List<String>) dco_decode_record_string_list_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_list_String(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
  ReductionLevel dco_decode_reduction_level(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return ReductionLevel.values[raw as int];
  }

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

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

  @protected
  RevisionAnchor dco_decode_revision_anchor(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    switch (raw[0]) {
      case 0:
        return RevisionAnchor_Paragraph(index: dco_decode_i_64(raw[1]));
      case 1:
        return RevisionAnchor_TableCell(
          row: dco_decode_i_64(raw[1]),
          col: dco_decode_i_64(raw[2]),
          tableIndex: dco_decode_i_64(raw[3]),
        );
      case 2:
        return RevisionAnchor_Page(index: dco_decode_i_64(raw[1]));
      case 3:
        return RevisionAnchor_Slide(index: dco_decode_i_64(raw[1]));
      case 4:
        return RevisionAnchor_Sheet(
          index: dco_decode_i_64(raw[1]),
          name: dco_decode_String(raw[2]),
        );
      default:
        throw Exception("unreachable");
    }
  }

  @protected
  RevisionDelta dco_decode_revision_delta(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 RevisionDelta(
      content: dco_decode_list_diff_line(arr[0]),
      tableChanges: dco_decode_list_cell_change(arr[1]),
    );
  }

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

  @protected
  SecurityLimits dco_decode_security_limits(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 9)
      throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
    return SecurityLimits(
      maxArchiveSize: dco_decode_i_64(arr[0]),
      maxCompressionRatio: dco_decode_i_64(arr[1]),
      maxFilesInArchive: dco_decode_i_64(arr[2]),
      maxNestingDepth: dco_decode_i_64(arr[3]),
      maxEntityLength: dco_decode_i_64(arr[4]),
      maxContentSize: dco_decode_i_64(arr[5]),
      maxIterations: dco_decode_i_64(arr[6]),
      maxXmlDepth: dco_decode_i_64(arr[7]),
      maxTableCells: dco_decode_i_64(arr[8]),
    );
  }

  @protected
  ServerConfig dco_decode_server_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 ServerConfig(
      host: dco_decode_String(arr[0]),
      port: dco_decode_i_64(arr[1]),
      corsOrigins: dco_decode_list_String(arr[2]),
      maxRequestBodyBytes: dco_decode_i_64(arr[3]),
      maxMultipartFieldBytes: dco_decode_i_64(arr[4]),
    );
  }

  @protected
  StructuredData dco_decode_structured_data(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 StructuredData(
      dataType: dco_decode_structured_data_type(arr[0]),
      rawJson: dco_decode_String(arr[1]),
      schemaType: dco_decode_opt_String(arr[2]),
    );
  }

  @protected
  StructuredDataResult dco_decode_structured_data_result(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 StructuredDataResult(
      content: dco_decode_String(arr[0]),
      format: dco_decode_String(arr[1]),
      metadata: dco_decode_Map_String_String_None(arr[2]),
      textFields: dco_decode_list_String(arr[3]),
    );
  }

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

  @protected
  StructuredExtractionConfig dco_decode_structured_extraction_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 StructuredExtractionConfig(
      schema: dco_decode_String(arr[0]),
      schemaName: dco_decode_String(arr[1]),
      schemaDescription: dco_decode_opt_String(arr[2]),
      strict: dco_decode_bool(arr[3]),
      prompt: dco_decode_opt_String(arr[4]),
      llm: dco_decode_llm_config(arr[5]),
    );
  }

  @protected
  SupportedFormat dco_decode_supported_format(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 SupportedFormat(
      extension_: dco_decode_String(arr[0]),
      mimeType: dco_decode_String(arr[1]),
    );
  }

  @protected
  Table dco_decode_table(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 Table(
      cells: dco_decode_list_list_String(arr[0]),
      markdown: dco_decode_String(arr[1]),
      pageNumber: dco_decode_i_64(arr[2]),
      boundingBox: dco_decode_opt_box_autoadd_bounding_box(arr[3]),
    );
  }

  @protected
  TableCell dco_decode_table_cell(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 TableCell(
      content: dco_decode_String(arr[0]),
      rowSpan: dco_decode_i_64(arr[1]),
      colSpan: dco_decode_i_64(arr[2]),
      isHeader: dco_decode_bool(arr[3]),
    );
  }

  @protected
  TableDiff dco_decode_table_diff(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 TableDiff(
      fromIndex: dco_decode_i_64(arr[0]),
      toIndex: dco_decode_i_64(arr[1]),
      cellChanges: dco_decode_list_cell_change(arr[2]),
    );
  }

  @protected
  TableGrid dco_decode_table_grid(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 TableGrid(
      rows: dco_decode_i_64(arr[0]),
      cols: dco_decode_i_64(arr[1]),
      cells: dco_decode_list_grid_cell(arr[2]),
    );
  }

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

  @protected
  TesseractConfig dco_decode_tesseract_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 21)
      throw Exception('unexpected arr length: expect 21 but see ${arr.length}');
    return TesseractConfig(
      language: dco_decode_String(arr[0]),
      psm: dco_decode_i_64(arr[1]),
      outputFormat: dco_decode_String(arr[2]),
      oem: dco_decode_i_64(arr[3]),
      minConfidence: dco_decode_f_64(arr[4]),
      preprocessing: dco_decode_opt_box_autoadd_image_preprocessing_config(
        arr[5],
      ),
      enableTableDetection: dco_decode_bool(arr[6]),
      tableMinConfidence: dco_decode_f_64(arr[7]),
      tableColumnThreshold: dco_decode_i_64(arr[8]),
      tableRowThresholdRatio: dco_decode_f_64(arr[9]),
      useCache: dco_decode_bool(arr[10]),
      classifyUsePreAdaptedTemplates: dco_decode_bool(arr[11]),
      languageModelNgramOn: dco_decode_bool(arr[12]),
      tesseditDontBlkrejGoodWds: dco_decode_bool(arr[13]),
      tesseditDontRowrejGoodWds: dco_decode_bool(arr[14]),
      tesseditEnableDictCorrection: dco_decode_bool(arr[15]),
      tesseditCharWhitelist: dco_decode_String(arr[16]),
      tesseditCharBlacklist: dco_decode_String(arr[17]),
      tesseditUsePrimaryParamsModel: dco_decode_bool(arr[18]),
      textordSpaceSizeIsVariable: dco_decode_bool(arr[19]),
      thresholdingMethod: dco_decode_bool(arr[20]),
    );
  }

  @protected
  TextAnnotation dco_decode_text_annotation(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 TextAnnotation(
      start: dco_decode_i_64(arr[0]),
      end: dco_decode_i_64(arr[1]),
      kind: dco_decode_annotation_kind(arr[2]),
    );
  }

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

  @protected
  TextExtractionResult dco_decode_text_extraction_result(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 7)
      throw Exception('unexpected arr length: expect 7 but see ${arr.length}');
    return TextExtractionResult(
      content: dco_decode_String(arr[0]),
      lineCount: dco_decode_i_64(arr[1]),
      wordCount: dco_decode_i_64(arr[2]),
      characterCount: dco_decode_i_64(arr[3]),
      headers: dco_decode_opt_list_String(arr[4]),
      links: dco_decode_opt_list_list_String(arr[5]),
      codeBlocks: dco_decode_opt_list_list_String(arr[6]),
    );
  }

  @protected
  TextMetadata dco_decode_text_metadata(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 TextMetadata(
      lineCount: dco_decode_i_64(arr[0]),
      wordCount: dco_decode_i_64(arr[1]),
      characterCount: dco_decode_i_64(arr[2]),
      headers: dco_decode_opt_list_String(arr[3]),
      links: dco_decode_opt_list_list_String(arr[4]),
      codeBlocks: dco_decode_opt_list_list_String(arr[5]),
    );
  }

  @protected
  TokenReductionConfig dco_decode_token_reduction_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 11)
      throw Exception('unexpected arr length: expect 11 but see ${arr.length}');
    return TokenReductionConfig(
      level: dco_decode_reduction_level(arr[0]),
      languageHint: dco_decode_opt_String(arr[1]),
      preserveMarkdown: dco_decode_bool(arr[2]),
      preserveCode: dco_decode_bool(arr[3]),
      semanticThreshold: dco_decode_f_64(arr[4]),
      enableParallel: dco_decode_bool(arr[5]),
      useSimd: dco_decode_bool(arr[6]),
      customStopwords: dco_decode_opt_Map_String_list_String_None(arr[7]),
      preservePatterns: dco_decode_list_String(arr[8]),
      targetReduction: dco_decode_opt_box_autoadd_f_64(arr[9]),
      enableSemanticClustering: dco_decode_bool(arr[10]),
    );
  }

  @protected
  TokenReductionOptions dco_decode_token_reduction_options(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 TokenReductionOptions(
      mode: dco_decode_String(arr[0]),
      preserveImportantWords: dco_decode_bool(arr[1]),
    );
  }

  @protected
  TreeSitterConfig dco_decode_tree_sitter_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 TreeSitterConfig(
      enabled: dco_decode_bool(arr[0]),
      cacheDir: dco_decode_opt_String(arr[1]),
      languages: dco_decode_opt_list_String(arr[2]),
      groups: dco_decode_opt_list_String(arr[3]),
      process: dco_decode_tree_sitter_process_config(arr[4]),
    );
  }

  @protected
  TreeSitterProcessConfig dco_decode_tree_sitter_process_config(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 9)
      throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
    return TreeSitterProcessConfig(
      structure: dco_decode_bool(arr[0]),
      imports: dco_decode_bool(arr[1]),
      exports: dco_decode_bool(arr[2]),
      comments: dco_decode_bool(arr[3]),
      docstrings: dco_decode_bool(arr[4]),
      symbols: dco_decode_bool(arr[5]),
      diagnostics: dco_decode_bool(arr[6]),
      chunkMaxSize: dco_decode_opt_box_autoadd_i_64(arr[7]),
      contentMode: dco_decode_code_content_mode(arr[8]),
    );
  }

  @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
  UriKind dco_decode_uri_kind(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    return UriKind.values[raw as int];
  }

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

  @protected
  XlsxAppProperties dco_decode_xlsx_app_properties(dynamic raw) {
    // Codec=Dco (DartCObject based), see doc to use other codecs
    final arr = raw as List<dynamic>;
    if (arr.length != 9)
      throw Exception('unexpected arr length: expect 9 but see ${arr.length}');
    return XlsxAppProperties(
      application: dco_decode_opt_String(arr[0]),
      appVersion: dco_decode_opt_String(arr[1]),
      docSecurity: dco_decode_opt_box_autoadd_i_64(arr[2]),
      scaleCrop: dco_decode_opt_box_autoadd_bool(arr[3]),
      linksUpToDate: dco_decode_opt_box_autoadd_bool(arr[4]),
      sharedDoc: dco_decode_opt_box_autoadd_bool(arr[5]),
      hyperlinksChanged: dco_decode_opt_box_autoadd_bool(arr[6]),
      company: dco_decode_opt_String(arr[7]),
      worksheetNames: dco_decode_list_String(arr[8]),
    );
  }

  @protected
  XmlExtractionResult dco_decode_xml_extraction_result(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 XmlExtractionResult(
      content: dco_decode_String(arr[0]),
      elementCount: dco_decode_i_64(arr[1]),
      uniqueElements: dco_decode_list_String(arr[2]),
    );
  }

  @protected
  XmlMetadata dco_decode_xml_metadata(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 XmlMetadata(
      elementCount: dco_decode_i_64(arr[0]),
      uniqueElements: dco_decode_list_String(arr[1]),
    );
  }

  @protected
  YakeParams dco_decode_yake_params(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 YakeParams(windowSize: dco_decode_i_64(arr[0]));
  }

  @protected
  YearRange dco_decode_year_range(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 YearRange(
      min: dco_decode_opt_box_autoadd_i_64(arr[0]),
      max: dco_decode_opt_box_autoadd_i_64(arr[1]),
      years: dco_decode_list_prim_i_64_strict(arr[2]),
    );
  }

  @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
  ArcDocumentExtractor
  sse_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return ArcDocumentExtractorImpl.frbInternalSseDecode(
      sse_decode_usize(deserializer),
      sse_decode_i_32(deserializer),
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  Object sse_decode_DartOpaque(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_isize(deserializer);
    return decodeDartOpaque(inner, generalizedFrbRustBinding);
  }

  @protected
  Map<String, String> sse_decode_Map_String_String_None(
    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
  Map<String, PlatformInt64> sse_decode_Map_String_i_64_None(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_list_record_string_i_64(deserializer);
    return Map.fromEntries(inner.map((e) => MapEntry(e.$1, e.$2)));
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  ValidatorDartImpl
  sse_decode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return ValidatorDartImplImpl.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
  AccelerationConfig sse_decode_acceleration_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_provider = sse_decode_execution_provider_type(deserializer);
    var var_deviceId = sse_decode_i_64(deserializer);
    return AccelerationConfig(provider: var_provider, deviceId: var_deviceId);
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        return AnnotationKind_Bold();
      case 1:
        return AnnotationKind_Italic();
      case 2:
        return AnnotationKind_Underline();
      case 3:
        return AnnotationKind_Strikethrough();
      case 4:
        return AnnotationKind_Code();
      case 5:
        return AnnotationKind_Subscript();
      case 6:
        return AnnotationKind_Superscript();
      case 7:
        var var_url = sse_decode_String(deserializer);
        var var_title = sse_decode_String(deserializer);
        return AnnotationKind_Link(url: var_url, title: var_title);
      case 8:
        return AnnotationKind_Highlight();
      case 9:
        var var_value = sse_decode_String(deserializer);
        return AnnotationKind_Color(value: var_value);
      case 10:
        var var_value = sse_decode_String(deserializer);
        return AnnotationKind_FontSize(value: var_value);
      case 11:
        var var_name = sse_decode_String(deserializer);
        var var_value = sse_decode_String(deserializer);
        return AnnotationKind_Custom(name: var_name, value: var_value);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  ArchiveEntry sse_decode_archive_entry(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_path = sse_decode_String(deserializer);
    var var_mimeType = sse_decode_String(deserializer);
    var var_result = sse_decode_extraction_result(deserializer);
    return ArchiveEntry(
      path: var_path,
      mimeType: var_mimeType,
      result: var_result,
    );
  }

  @protected
  ArchiveMetadata sse_decode_archive_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_format = sse_decode_String(deserializer);
    var var_fileCount = sse_decode_i_64(deserializer);
    var var_fileList = sse_decode_list_String(deserializer);
    var var_totalSize = sse_decode_i_64(deserializer);
    var var_compressedSize = sse_decode_opt_box_autoadd_i_64(deserializer);
    return ArchiveMetadata(
      format: var_format,
      fileCount: var_fileCount,
      fileList: var_fileList,
      totalSize: var_totalSize,
      compressedSize: var_compressedSize,
    );
  }

  @protected
  BBox sse_decode_b_box(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_x1 = sse_decode_f_64(deserializer);
    var var_y1 = sse_decode_f_64(deserializer);
    var var_x2 = sse_decode_f_64(deserializer);
    var var_y2 = sse_decode_f_64(deserializer);
    return BBox(x1: var_x1, y1: var_y1, x2: var_x2, y2: var_y2);
  }

  @protected
  BatchBytesItem sse_decode_batch_bytes_item(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_list_prim_u_8_strict(deserializer);
    var var_mimeType = sse_decode_String(deserializer);
    var var_config = sse_decode_opt_box_autoadd_file_extraction_config(
      deserializer,
    );
    return BatchBytesItem(
      content: var_content,
      mimeType: var_mimeType,
      config: var_config,
    );
  }

  @protected
  BatchFileItem sse_decode_batch_file_item(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_path = sse_decode_String(deserializer);
    var var_config = sse_decode_opt_box_autoadd_file_extraction_config(
      deserializer,
    );
    return BatchFileItem(path: var_path, config: var_config);
  }

  @protected
  BibtexMetadata sse_decode_bibtex_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_entryCount = sse_decode_i_64(deserializer);
    var var_citationKeys = sse_decode_list_String(deserializer);
    var var_authors = sse_decode_list_String(deserializer);
    var var_yearRange = sse_decode_opt_box_autoadd_year_range(deserializer);
    var var_entryTypes = sse_decode_opt_Map_String_i_64_None(deserializer);
    return BibtexMetadata(
      entryCount: var_entryCount,
      citationKeys: var_citationKeys,
      authors: var_authors,
      yearRange: var_yearRange,
      entryTypes: var_entryTypes,
    );
  }

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

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

  @protected
  BoundingBox sse_decode_bounding_box(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_x0 = sse_decode_f_64(deserializer);
    var var_y0 = sse_decode_f_64(deserializer);
    var var_x1 = sse_decode_f_64(deserializer);
    var var_y1 = sse_decode_f_64(deserializer);
    return BoundingBox(x0: var_x0, y0: var_y0, x1: var_x1, y1: var_y1);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  HtmlOutputConfig sse_decode_box_autoadd_html_output_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_html_output_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
  ImageExtractionConfig sse_decode_box_autoadd_image_extraction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return (sse_decode_image_extraction_config(deserializer));
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  CacheStats sse_decode_cache_stats(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_totalFiles = sse_decode_i_64(deserializer);
    var var_totalSizeMb = sse_decode_f_64(deserializer);
    var var_availableSpaceMb = sse_decode_f_64(deserializer);
    var var_oldestFileAgeDays = sse_decode_f_64(deserializer);
    var var_newestFileAgeDays = sse_decode_f_64(deserializer);
    return CacheStats(
      totalFiles: var_totalFiles,
      totalSizeMb: var_totalSizeMb,
      availableSpaceMb: var_availableSpaceMb,
      oldestFileAgeDays: var_oldestFileAgeDays,
      newestFileAgeDays: var_newestFileAgeDays,
    );
  }

  @protected
  CellChange sse_decode_cell_change(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_row = sse_decode_i_64(deserializer);
    var var_col = sse_decode_i_64(deserializer);
    var var_from = sse_decode_String(deserializer);
    var var_to = sse_decode_String(deserializer);
    return CellChange(row: var_row, col: var_col, from: var_from, to: var_to);
  }

  @protected
  Chunk sse_decode_chunk(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_chunkType = sse_decode_chunk_type(deserializer);
    var var_embedding = sse_decode_opt_list_prim_f_64_strict(deserializer);
    var var_metadata = sse_decode_chunk_metadata(deserializer);
    return Chunk(
      content: var_content,
      chunkType: var_chunkType,
      embedding: var_embedding,
      metadata: var_metadata,
    );
  }

  @protected
  ChunkMetadata sse_decode_chunk_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_byteStart = sse_decode_i_64(deserializer);
    var var_byteEnd = sse_decode_i_64(deserializer);
    var var_tokenCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_chunkIndex = sse_decode_i_64(deserializer);
    var var_totalChunks = sse_decode_i_64(deserializer);
    var var_firstPage = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_lastPage = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_headingContext = sse_decode_opt_box_autoadd_heading_context(
      deserializer,
    );
    var var_imageIndices = sse_decode_list_prim_i_64_strict(deserializer);
    return ChunkMetadata(
      byteStart: var_byteStart,
      byteEnd: var_byteEnd,
      tokenCount: var_tokenCount,
      chunkIndex: var_chunkIndex,
      totalChunks: var_totalChunks,
      firstPage: var_firstPage,
      lastPage: var_lastPage,
      headingContext: var_headingContext,
      imageIndices: var_imageIndices,
    );
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        return ChunkSizing_Characters();
      case 1:
        var var_model = sse_decode_String(deserializer);
        var var_cacheDir = sse_decode_String(deserializer);
        return ChunkSizing_Tokenizer(model: var_model, cacheDir: var_cacheDir);
      default:
        throw UnimplementedError('');
    }
  }

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

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

  @protected
  ChunkingConfig sse_decode_chunking_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_maxCharacters = sse_decode_i_64(deserializer);
    var var_overlap = sse_decode_i_64(deserializer);
    var var_trim = sse_decode_bool(deserializer);
    var var_chunkerType = sse_decode_chunker_type(deserializer);
    var var_embedding = sse_decode_opt_box_autoadd_embedding_config(
      deserializer,
    );
    var var_preset = sse_decode_opt_String(deserializer);
    var var_sizing = sse_decode_chunk_sizing(deserializer);
    var var_prependHeadingContext = sse_decode_bool(deserializer);
    var var_topicThreshold = sse_decode_opt_box_autoadd_f_64(deserializer);
    return ChunkingConfig(
      maxCharacters: var_maxCharacters,
      overlap: var_overlap,
      trim: var_trim,
      chunkerType: var_chunkerType,
      embedding: var_embedding,
      preset: var_preset,
      sizing: var_sizing,
      prependHeadingContext: var_prependHeadingContext,
      topicThreshold: var_topicThreshold,
    );
  }

  @protected
  CitationMetadata sse_decode_citation_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_citationCount = sse_decode_i_64(deserializer);
    var var_format = sse_decode_opt_String(deserializer);
    var var_authors = sse_decode_list_String(deserializer);
    var var_yearRange = sse_decode_opt_box_autoadd_year_range(deserializer);
    var var_dois = sse_decode_list_String(deserializer);
    var var_keywords = sse_decode_list_String(deserializer);
    return CitationMetadata(
      citationCount: var_citationCount,
      format: var_format,
      authors: var_authors,
      yearRange: var_yearRange,
      dois: var_dois,
      keywords: var_keywords,
    );
  }

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

  @protected
  ContentFilterConfig sse_decode_content_filter_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_includeHeaders = sse_decode_bool(deserializer);
    var var_includeFooters = sse_decode_bool(deserializer);
    var var_stripRepeatingText = sse_decode_bool(deserializer);
    var var_includeWatermarks = sse_decode_bool(deserializer);
    return ContentFilterConfig(
      includeHeaders: var_includeHeaders,
      includeFooters: var_includeFooters,
      stripRepeatingText: var_stripRepeatingText,
      includeWatermarks: var_includeWatermarks,
    );
  }

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

  @protected
  ContributorRole sse_decode_contributor_role(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_role = sse_decode_opt_String(deserializer);
    return ContributorRole(name: var_name, role: var_role);
  }

  @protected
  CoreProperties sse_decode_core_properties(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_title = sse_decode_opt_String(deserializer);
    var var_subject = sse_decode_opt_String(deserializer);
    var var_creator = sse_decode_opt_String(deserializer);
    var var_keywords = sse_decode_opt_String(deserializer);
    var var_description = sse_decode_opt_String(deserializer);
    var var_lastModifiedBy = sse_decode_opt_String(deserializer);
    var var_revision = sse_decode_opt_String(deserializer);
    var var_created = sse_decode_opt_String(deserializer);
    var var_modified = sse_decode_opt_String(deserializer);
    var var_category = sse_decode_opt_String(deserializer);
    var var_contentStatus = sse_decode_opt_String(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_identifier = sse_decode_opt_String(deserializer);
    var var_version = sse_decode_opt_String(deserializer);
    var var_lastPrinted = sse_decode_opt_String(deserializer);
    return CoreProperties(
      title: var_title,
      subject: var_subject,
      creator: var_creator,
      keywords: var_keywords,
      description: var_description,
      lastModifiedBy: var_lastModifiedBy,
      revision: var_revision,
      created: var_created,
      modified: var_modified,
      category: var_category,
      contentStatus: var_contentStatus,
      language: var_language,
      identifier: var_identifier,
      version: var_version,
      lastPrinted: var_lastPrinted,
    );
  }

  @protected
  CsvMetadata sse_decode_csv_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_rowCount = sse_decode_i_64(deserializer);
    var var_columnCount = sse_decode_i_64(deserializer);
    var var_delimiter = sse_decode_opt_String(deserializer);
    var var_hasHeader = sse_decode_bool(deserializer);
    var var_columnTypes = sse_decode_opt_list_String(deserializer);
    return CsvMetadata(
      rowCount: var_rowCount,
      columnCount: var_columnCount,
      delimiter: var_delimiter,
      hasHeader: var_hasHeader,
      columnTypes: var_columnTypes,
    );
  }

  @protected
  DbfFieldInfo sse_decode_dbf_field_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_fieldType = sse_decode_String(deserializer);
    return DbfFieldInfo(name: var_name, fieldType: var_fieldType);
  }

  @protected
  DbfMetadata sse_decode_dbf_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_recordCount = sse_decode_i_64(deserializer);
    var var_fieldCount = sse_decode_i_64(deserializer);
    var var_fields = sse_decode_list_dbf_field_info(deserializer);
    return DbfMetadata(
      recordCount: var_recordCount,
      fieldCount: var_fieldCount,
      fields: var_fields,
    );
  }

  @protected
  DetectResponse sse_decode_detect_response(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_mimeType = sse_decode_String(deserializer);
    var var_filename = sse_decode_opt_String(deserializer);
    return DetectResponse(mimeType: var_mimeType, filename: var_filename);
  }

  @protected
  DetectionResult sse_decode_detection_result(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_pageWidth = sse_decode_i_64(deserializer);
    var var_pageHeight = sse_decode_i_64(deserializer);
    var var_detections = sse_decode_list_layout_detection(deserializer);
    return DetectionResult(
      pageWidth: var_pageWidth,
      pageHeight: var_pageHeight,
      detections: var_detections,
    );
  }

  @protected
  DiffHunk sse_decode_diff_hunk(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_fromLine = sse_decode_i_64(deserializer);
    var var_fromCount = sse_decode_i_64(deserializer);
    var var_toLine = sse_decode_i_64(deserializer);
    var var_toCount = sse_decode_i_64(deserializer);
    var var_lines = sse_decode_list_diff_line(deserializer);
    return DiffHunk(
      fromLine: var_fromLine,
      fromCount: var_fromCount,
      toLine: var_toLine,
      toCount: var_toCount,
      lines: var_lines,
    );
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_field0 = sse_decode_String(deserializer);
        return DiffLine_Context(field0: var_field0);
      case 1:
        var var_field0 = sse_decode_String(deserializer);
        return DiffLine_Added(field0: var_field0);
      case 2:
        var var_field0 = sse_decode_String(deserializer);
        return DiffLine_Removed(field0: var_field0);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  DiffOptions sse_decode_diff_options(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_includeMetadata = sse_decode_bool(deserializer);
    var var_includeEmbedded = sse_decode_bool(deserializer);
    var var_maxContentChars = sse_decode_opt_box_autoadd_i_64(deserializer);
    return DiffOptions(
      includeMetadata: var_includeMetadata,
      includeEmbedded: var_includeEmbedded,
      maxContentChars: var_maxContentChars,
    );
  }

  @protected
  DjotContent sse_decode_djot_content(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_plainText = sse_decode_String(deserializer);
    var var_blocks = sse_decode_list_formatted_block(deserializer);
    var var_metadata = sse_decode_metadata(deserializer);
    var var_tables = sse_decode_list_table(deserializer);
    var var_images = sse_decode_list_djot_image(deserializer);
    var var_links = sse_decode_list_djot_link(deserializer);
    var var_footnotes = sse_decode_list_footnote(deserializer);
    var var_attributes = sse_decode_list_String(deserializer);
    return DjotContent(
      plainText: var_plainText,
      blocks: var_blocks,
      metadata: var_metadata,
      tables: var_tables,
      images: var_images,
      links: var_links,
      footnotes: var_footnotes,
      attributes: var_attributes,
    );
  }

  @protected
  DjotImage sse_decode_djot_image(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_src = sse_decode_String(deserializer);
    var var_alt = sse_decode_String(deserializer);
    var var_title = sse_decode_opt_String(deserializer);
    var var_attributes = sse_decode_opt_String(deserializer);
    return DjotImage(
      src: var_src,
      alt: var_alt,
      title: var_title,
      attributes: var_attributes,
    );
  }

  @protected
  DjotLink sse_decode_djot_link(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_url = sse_decode_String(deserializer);
    var var_text = sse_decode_String(deserializer);
    var var_title = sse_decode_opt_String(deserializer);
    var var_attributes = sse_decode_opt_String(deserializer);
    return DjotLink(
      url: var_url,
      text: var_text,
      title: var_title,
      attributes: var_attributes,
    );
  }

  @protected
  DocumentNode sse_decode_document_node(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_id = sse_decode_String(deserializer);
    var var_content = sse_decode_node_content(deserializer);
    var var_parent = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_children = sse_decode_list_prim_i_64_strict(deserializer);
    var var_contentLayer = sse_decode_content_layer(deserializer);
    var var_page = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_pageEnd = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_bbox = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    var var_annotations = sse_decode_list_text_annotation(deserializer);
    var var_attributes = sse_decode_opt_Map_String_String_None(deserializer);
    return DocumentNode(
      id: var_id,
      content: var_content,
      parent: var_parent,
      children: var_children,
      contentLayer: var_contentLayer,
      page: var_page,
      pageEnd: var_pageEnd,
      bbox: var_bbox,
      annotations: var_annotations,
      attributes: var_attributes,
    );
  }

  @protected
  DocumentRelationship sse_decode_document_relationship(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_source = sse_decode_i_64(deserializer);
    var var_target = sse_decode_i_64(deserializer);
    var var_kind = sse_decode_relationship_kind(deserializer);
    return DocumentRelationship(
      source: var_source,
      target: var_target,
      kind: var_kind,
    );
  }

  @protected
  DocumentRevision sse_decode_document_revision(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_revisionId = sse_decode_String(deserializer);
    var var_author = sse_decode_opt_String(deserializer);
    var var_timestamp = sse_decode_opt_String(deserializer);
    var var_kind = sse_decode_revision_kind(deserializer);
    var var_anchor = sse_decode_opt_box_autoadd_revision_anchor(deserializer);
    var var_delta = sse_decode_revision_delta(deserializer);
    return DocumentRevision(
      revisionId: var_revisionId,
      author: var_author,
      timestamp: var_timestamp,
      kind: var_kind,
      anchor: var_anchor,
      delta: var_delta,
    );
  }

  @protected
  DocumentStructure sse_decode_document_structure(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_nodes = sse_decode_list_document_node(deserializer);
    var var_sourceFormat = sse_decode_opt_String(deserializer);
    var var_relationships = sse_decode_list_document_relationship(deserializer);
    var var_nodeTypes = sse_decode_list_String(deserializer);
    return DocumentStructure(
      nodes: var_nodes,
      sourceFormat: var_sourceFormat,
      relationships: var_relationships,
      nodeTypes: var_nodeTypes,
    );
  }

  @protected
  DocxAppProperties sse_decode_docx_app_properties(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_application = sse_decode_opt_String(deserializer);
    var var_appVersion = sse_decode_opt_String(deserializer);
    var var_template = sse_decode_opt_String(deserializer);
    var var_totalTime = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_pages = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_words = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_characters = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_charactersWithSpaces = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    var var_lines = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_paragraphs = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_company = sse_decode_opt_String(deserializer);
    var var_docSecurity = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_scaleCrop = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_linksUpToDate = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_sharedDoc = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_hyperlinksChanged = sse_decode_opt_box_autoadd_bool(deserializer);
    return DocxAppProperties(
      application: var_application,
      appVersion: var_appVersion,
      template: var_template,
      totalTime: var_totalTime,
      pages: var_pages,
      words: var_words,
      characters: var_characters,
      charactersWithSpaces: var_charactersWithSpaces,
      lines: var_lines,
      paragraphs: var_paragraphs,
      company: var_company,
      docSecurity: var_docSecurity,
      scaleCrop: var_scaleCrop,
      linksUpToDate: var_linksUpToDate,
      sharedDoc: var_sharedDoc,
      hyperlinksChanged: var_hyperlinksChanged,
    );
  }

  @protected
  DocxMetadata sse_decode_docx_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_coreProperties = sse_decode_opt_box_autoadd_core_properties(
      deserializer,
    );
    var var_appProperties = sse_decode_opt_box_autoadd_docx_app_properties(
      deserializer,
    );
    var var_customProperties = sse_decode_opt_Map_String_String_None(
      deserializer,
    );
    return DocxMetadata(
      coreProperties: var_coreProperties,
      appProperties: var_appProperties,
      customProperties: var_customProperties,
    );
  }

  @protected
  Element sse_decode_element(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_elementId = sse_decode_String(deserializer);
    var var_elementType = sse_decode_element_type(deserializer);
    var var_text = sse_decode_String(deserializer);
    var var_metadata = sse_decode_element_metadata(deserializer);
    return Element(
      elementId: var_elementId,
      elementType: var_elementType,
      text: var_text,
      metadata: var_metadata,
    );
  }

  @protected
  ElementMetadata sse_decode_element_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_pageNumber = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_filename = sse_decode_opt_String(deserializer);
    var var_coordinates = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    var var_elementIndex = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_additional = sse_decode_Map_String_String_None(deserializer);
    return ElementMetadata(
      pageNumber: var_pageNumber,
      filename: var_filename,
      coordinates: var_coordinates,
      elementIndex: var_elementIndex,
      additional: var_additional,
    );
  }

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

  @protected
  EmailAttachment sse_decode_email_attachment(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_opt_String(deserializer);
    var var_filename = sse_decode_opt_String(deserializer);
    var var_mimeType = sse_decode_opt_String(deserializer);
    var var_size = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_isImage = sse_decode_bool(deserializer);
    var var_data = sse_decode_opt_list_prim_u_8_strict(deserializer);
    return EmailAttachment(
      name: var_name,
      filename: var_filename,
      mimeType: var_mimeType,
      size: var_size,
      isImage: var_isImage,
      data: var_data,
    );
  }

  @protected
  EmailConfig sse_decode_email_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_msgFallbackCodepage = sse_decode_opt_box_autoadd_i_64(deserializer);
    return EmailConfig(msgFallbackCodepage: var_msgFallbackCodepage);
  }

  @protected
  EmailExtractionResult sse_decode_email_extraction_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_subject = sse_decode_opt_String(deserializer);
    var var_fromEmail = sse_decode_opt_String(deserializer);
    var var_toEmails = sse_decode_list_String(deserializer);
    var var_ccEmails = sse_decode_list_String(deserializer);
    var var_bccEmails = sse_decode_list_String(deserializer);
    var var_date = sse_decode_opt_String(deserializer);
    var var_messageId = sse_decode_opt_String(deserializer);
    var var_plainText = sse_decode_opt_String(deserializer);
    var var_htmlContent = sse_decode_opt_String(deserializer);
    var var_content = sse_decode_String(deserializer);
    var var_attachments = sse_decode_list_email_attachment(deserializer);
    var var_metadata = sse_decode_Map_String_String_None(deserializer);
    return EmailExtractionResult(
      subject: var_subject,
      fromEmail: var_fromEmail,
      toEmails: var_toEmails,
      ccEmails: var_ccEmails,
      bccEmails: var_bccEmails,
      date: var_date,
      messageId: var_messageId,
      plainText: var_plainText,
      htmlContent: var_htmlContent,
      content: var_content,
      attachments: var_attachments,
      metadata: var_metadata,
    );
  }

  @protected
  EmailMetadata sse_decode_email_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_fromEmail = sse_decode_opt_String(deserializer);
    var var_fromName = sse_decode_opt_String(deserializer);
    var var_toEmails = sse_decode_list_String(deserializer);
    var var_ccEmails = sse_decode_list_String(deserializer);
    var var_bccEmails = sse_decode_list_String(deserializer);
    var var_messageId = sse_decode_opt_String(deserializer);
    var var_attachments = sse_decode_list_String(deserializer);
    return EmailMetadata(
      fromEmail: var_fromEmail,
      fromName: var_fromName,
      toEmails: var_toEmails,
      ccEmails: var_ccEmails,
      bccEmails: var_bccEmails,
      messageId: var_messageId,
      attachments: var_attachments,
    );
  }

  @protected
  EmbeddedChanges sse_decode_embedded_changes(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_added = sse_decode_list_archive_entry(deserializer);
    var var_removed = sse_decode_list_archive_entry(deserializer);
    var var_changed = sse_decode_list_embedded_diff(deserializer);
    return EmbeddedChanges(
      added: var_added,
      removed: var_removed,
      changed: var_changed,
    );
  }

  @protected
  EmbeddedDiff sse_decode_embedded_diff(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_path = sse_decode_String(deserializer);
    var var_diff = sse_decode_extraction_diff(deserializer);
    return EmbeddedDiff(path: var_path, diff: var_diff);
  }

  @protected
  EmbeddedFile sse_decode_embedded_file(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_data = sse_decode_list_prim_u_8_strict(deserializer);
    var var_compressedSize = sse_decode_i_64(deserializer);
    var var_mimeType = sse_decode_opt_String(deserializer);
    return EmbeddedFile(
      name: var_name,
      data: var_data,
      compressedSize: var_compressedSize,
      mimeType: var_mimeType,
    );
  }

  @protected
  EmbeddingConfig sse_decode_embedding_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_model = sse_decode_embedding_model_type(deserializer);
    var var_normalize = sse_decode_bool(deserializer);
    var var_batchSize = sse_decode_i_64(deserializer);
    var var_showDownloadProgress = sse_decode_bool(deserializer);
    var var_cacheDir = sse_decode_opt_String(deserializer);
    var var_acceleration = sse_decode_opt_box_autoadd_acceleration_config(
      deserializer,
    );
    var var_maxEmbedDurationSecs = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    return EmbeddingConfig(
      model: var_model,
      normalize: var_normalize,
      batchSize: var_batchSize,
      showDownloadProgress: var_showDownloadProgress,
      cacheDir: var_cacheDir,
      acceleration: var_acceleration,
      maxEmbedDurationSecs: var_maxEmbedDurationSecs,
    );
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_name = sse_decode_String(deserializer);
        return EmbeddingModelType_Preset(name: var_name);
      case 1:
        var var_modelId = sse_decode_String(deserializer);
        var var_dimensions = sse_decode_i_64(deserializer);
        return EmbeddingModelType_Custom(
          modelId: var_modelId,
          dimensions: var_dimensions,
        );
      case 2:
        var var_llm = sse_decode_box_autoadd_llm_config(deserializer);
        return EmbeddingModelType_Llm(llm: var_llm);
      case 3:
        var var_name = sse_decode_String(deserializer);
        return EmbeddingModelType_Plugin(name: var_name);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  EmbeddingPreset sse_decode_embedding_preset(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_chunkSize = sse_decode_i_64(deserializer);
    var var_overlap = sse_decode_i_64(deserializer);
    var var_modelRepo = sse_decode_String(deserializer);
    var var_pooling = sse_decode_String(deserializer);
    var var_modelFile = sse_decode_String(deserializer);
    var var_dimensions = sse_decode_i_64(deserializer);
    var var_description = sse_decode_String(deserializer);
    return EmbeddingPreset(
      name: var_name,
      chunkSize: var_chunkSize,
      overlap: var_overlap,
      modelRepo: var_modelRepo,
      pooling: var_pooling,
      modelFile: var_modelFile,
      dimensions: var_dimensions,
      description: var_description,
    );
  }

  @protected
  EpubMetadata sse_decode_epub_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_coverage = sse_decode_opt_String(deserializer);
    var var_dcFormat = sse_decode_opt_String(deserializer);
    var var_relation = sse_decode_opt_String(deserializer);
    var var_source = sse_decode_opt_String(deserializer);
    var var_dcType = sse_decode_opt_String(deserializer);
    var var_coverImage = sse_decode_opt_String(deserializer);
    return EpubMetadata(
      coverage: var_coverage,
      dcFormat: var_dcFormat,
      relation: var_relation,
      source: var_source,
      dcType: var_dcType,
      coverImage: var_coverImage,
    );
  }

  @protected
  ErrorMetadata sse_decode_error_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_errorType = sse_decode_String(deserializer);
    var var_message = sse_decode_String(deserializer);
    return ErrorMetadata(errorType: var_errorType, message: var_message);
  }

  @protected
  ExcelMetadata sse_decode_excel_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_sheetCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_sheetNames = sse_decode_opt_list_String(deserializer);
    return ExcelMetadata(
      sheetCount: var_sheetCount,
      sheetNames: var_sheetNames,
    );
  }

  @protected
  ExcelSheet sse_decode_excel_sheet(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_name = sse_decode_String(deserializer);
    var var_markdown = sse_decode_String(deserializer);
    var var_rowCount = sse_decode_i_64(deserializer);
    var var_colCount = sse_decode_i_64(deserializer);
    var var_cellCount = sse_decode_i_64(deserializer);
    var var_tableCells = sse_decode_opt_list_list_String(deserializer);
    return ExcelSheet(
      name: var_name,
      markdown: var_markdown,
      rowCount: var_rowCount,
      colCount: var_colCount,
      cellCount: var_cellCount,
      tableCells: var_tableCells,
    );
  }

  @protected
  ExcelWorkbook sse_decode_excel_workbook(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_sheets = sse_decode_list_excel_sheet(deserializer);
    var var_metadata = sse_decode_Map_String_String_None(deserializer);
    var var_revisions = sse_decode_opt_list_document_revision(deserializer);
    return ExcelWorkbook(
      sheets: var_sheets,
      metadata: var_metadata,
      revisions: var_revisions,
    );
  }

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

  @protected
  ExtractedImage sse_decode_extracted_image(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_data = sse_decode_list_prim_u_8_strict(deserializer);
    var var_format = sse_decode_String(deserializer);
    var var_imageIndex = sse_decode_i_64(deserializer);
    var var_pageNumber = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_width = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_height = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_colorspace = sse_decode_opt_String(deserializer);
    var var_bitsPerComponent = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_isMask = sse_decode_bool(deserializer);
    var var_description = sse_decode_opt_String(deserializer);
    var var_ocrResult = sse_decode_opt_box_autoadd_extraction_result(
      deserializer,
    );
    var var_boundingBox = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    var var_sourcePath = sse_decode_opt_String(deserializer);
    var var_imageKind = sse_decode_opt_box_autoadd_image_kind(deserializer);
    var var_kindConfidence = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_clusterId = sse_decode_opt_box_autoadd_i_64(deserializer);
    return ExtractedImage(
      data: var_data,
      format: var_format,
      imageIndex: var_imageIndex,
      pageNumber: var_pageNumber,
      width: var_width,
      height: var_height,
      colorspace: var_colorspace,
      bitsPerComponent: var_bitsPerComponent,
      isMask: var_isMask,
      description: var_description,
      ocrResult: var_ocrResult,
      boundingBox: var_boundingBox,
      sourcePath: var_sourcePath,
      imageKind: var_imageKind,
      kindConfidence: var_kindConfidence,
      clusterId: var_clusterId,
    );
  }

  @protected
  ExtractedUri sse_decode_extracted_uri(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_url = sse_decode_String(deserializer);
    var var_label = sse_decode_opt_String(deserializer);
    var var_page = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_kind = sse_decode_uri_kind(deserializer);
    return ExtractedUri(
      url: var_url,
      label: var_label,
      page: var_page,
      kind: var_kind,
    );
  }

  @protected
  ExtractionConfig sse_decode_extraction_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_useCache = sse_decode_bool(deserializer);
    var var_enableQualityProcessing = sse_decode_bool(deserializer);
    var var_ocr = sse_decode_opt_box_autoadd_ocr_config(deserializer);
    var var_forceOcr = sse_decode_bool(deserializer);
    var var_forceOcrPages = sse_decode_opt_list_prim_i_64_strict(deserializer);
    var var_disableOcr = sse_decode_bool(deserializer);
    var var_chunking = sse_decode_opt_box_autoadd_chunking_config(deserializer);
    var var_contentFilter = sse_decode_opt_box_autoadd_content_filter_config(
      deserializer,
    );
    var var_images = sse_decode_opt_box_autoadd_image_extraction_config(
      deserializer,
    );
    var var_pdfOptions = sse_decode_opt_box_autoadd_pdf_config(deserializer);
    var var_tokenReduction = sse_decode_opt_box_autoadd_token_reduction_options(
      deserializer,
    );
    var var_languageDetection =
        sse_decode_opt_box_autoadd_language_detection_config(deserializer);
    var var_pages = sse_decode_opt_box_autoadd_page_config(deserializer);
    var var_keywords = sse_decode_opt_box_autoadd_keyword_config(deserializer);
    var var_postprocessor = sse_decode_opt_box_autoadd_post_processor_config(
      deserializer,
    );
    var var_htmlOptions = sse_decode_opt_String(deserializer);
    var var_htmlOutput = sse_decode_opt_box_autoadd_html_output_config(
      deserializer,
    );
    var var_extractionTimeoutSecs = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    var var_maxConcurrentExtractions = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    var var_resultFormat = sse_decode_result_format(deserializer);
    var var_securityLimits = sse_decode_opt_box_autoadd_security_limits(
      deserializer,
    );
    var var_maxEmbeddedFileBytes = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    var var_outputFormat = sse_decode_output_format(deserializer);
    var var_layout = sse_decode_opt_box_autoadd_layout_detection_config(
      deserializer,
    );
    var var_useLayoutForMarkdown = sse_decode_bool(deserializer);
    var var_includeDocumentStructure = sse_decode_bool(deserializer);
    var var_acceleration = sse_decode_opt_box_autoadd_acceleration_config(
      deserializer,
    );
    var var_cacheNamespace = sse_decode_opt_String(deserializer);
    var var_cacheTtlSecs = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_email = sse_decode_opt_box_autoadd_email_config(deserializer);
    var var_concurrency = sse_decode_opt_String(deserializer);
    var var_maxArchiveDepth = sse_decode_i_64(deserializer);
    var var_treeSitter = sse_decode_opt_box_autoadd_tree_sitter_config(
      deserializer,
    );
    var var_structuredExtraction =
        sse_decode_opt_box_autoadd_structured_extraction_config(deserializer);
    var var_cancelToken = sse_decode_opt_String(deserializer);
    return ExtractionConfig(
      useCache: var_useCache,
      enableQualityProcessing: var_enableQualityProcessing,
      ocr: var_ocr,
      forceOcr: var_forceOcr,
      forceOcrPages: var_forceOcrPages,
      disableOcr: var_disableOcr,
      chunking: var_chunking,
      contentFilter: var_contentFilter,
      images: var_images,
      pdfOptions: var_pdfOptions,
      tokenReduction: var_tokenReduction,
      languageDetection: var_languageDetection,
      pages: var_pages,
      keywords: var_keywords,
      postprocessor: var_postprocessor,
      htmlOptions: var_htmlOptions,
      htmlOutput: var_htmlOutput,
      extractionTimeoutSecs: var_extractionTimeoutSecs,
      maxConcurrentExtractions: var_maxConcurrentExtractions,
      resultFormat: var_resultFormat,
      securityLimits: var_securityLimits,
      maxEmbeddedFileBytes: var_maxEmbeddedFileBytes,
      outputFormat: var_outputFormat,
      layout: var_layout,
      useLayoutForMarkdown: var_useLayoutForMarkdown,
      includeDocumentStructure: var_includeDocumentStructure,
      acceleration: var_acceleration,
      cacheNamespace: var_cacheNamespace,
      cacheTtlSecs: var_cacheTtlSecs,
      email: var_email,
      concurrency: var_concurrency,
      maxArchiveDepth: var_maxArchiveDepth,
      treeSitter: var_treeSitter,
      structuredExtraction: var_structuredExtraction,
      cancelToken: var_cancelToken,
    );
  }

  @protected
  ExtractionDiff sse_decode_extraction_diff(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_contentDiff = sse_decode_list_diff_hunk(deserializer);
    var var_tablesAdded = sse_decode_list_table(deserializer);
    var var_tablesRemoved = sse_decode_list_table(deserializer);
    var var_tablesChanged = sse_decode_list_table_diff(deserializer);
    var var_metadataChanged = sse_decode_String(deserializer);
    var var_embeddedChanges = sse_decode_embedded_changes(deserializer);
    return ExtractionDiff(
      contentDiff: var_contentDiff,
      tablesAdded: var_tablesAdded,
      tablesRemoved: var_tablesRemoved,
      tablesChanged: var_tablesChanged,
      metadataChanged: var_metadataChanged,
      embeddedChanges: var_embeddedChanges,
    );
  }

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

  @protected
  ExtractionResult sse_decode_extraction_result(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_mimeType = sse_decode_String(deserializer);
    var var_metadata = sse_decode_metadata(deserializer);
    var var_extractionMethod = sse_decode_opt_box_autoadd_extraction_method(
      deserializer,
    );
    var var_tables = sse_decode_list_table(deserializer);
    var var_detectedLanguages = sse_decode_opt_list_String(deserializer);
    var var_chunks = sse_decode_opt_list_chunk(deserializer);
    var var_images = sse_decode_opt_list_extracted_image(deserializer);
    var var_pages = sse_decode_opt_list_page_content(deserializer);
    var var_elements = sse_decode_opt_list_element(deserializer);
    var var_djotContent = sse_decode_opt_box_autoadd_djot_content(deserializer);
    var var_ocrElements = sse_decode_opt_list_ocr_element(deserializer);
    var var_document = sse_decode_opt_box_autoadd_document_structure(
      deserializer,
    );
    var var_extractedKeywords = sse_decode_opt_list_keyword(deserializer);
    var var_qualityScore = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_processingWarnings = sse_decode_list_processing_warning(
      deserializer,
    );
    var var_annotations = sse_decode_opt_list_pdf_annotation(deserializer);
    var var_children = sse_decode_opt_list_archive_entry(deserializer);
    var var_uris = sse_decode_opt_list_extracted_uri(deserializer);
    var var_revisions = sse_decode_opt_list_document_revision(deserializer);
    var var_structuredOutput = sse_decode_opt_String(deserializer);
    var var_codeIntelligence = sse_decode_opt_String(deserializer);
    var var_llmUsage = sse_decode_opt_list_llm_usage(deserializer);
    var var_formattedContent = sse_decode_opt_String(deserializer);
    var var_ocrInternalDocument = sse_decode_opt_String(deserializer);
    return ExtractionResult(
      content: var_content,
      mimeType: var_mimeType,
      metadata: var_metadata,
      extractionMethod: var_extractionMethod,
      tables: var_tables,
      detectedLanguages: var_detectedLanguages,
      chunks: var_chunks,
      images: var_images,
      pages: var_pages,
      elements: var_elements,
      djotContent: var_djotContent,
      ocrElements: var_ocrElements,
      document: var_document,
      extractedKeywords: var_extractedKeywords,
      qualityScore: var_qualityScore,
      processingWarnings: var_processingWarnings,
      annotations: var_annotations,
      children: var_children,
      uris: var_uris,
      revisions: var_revisions,
      structuredOutput: var_structuredOutput,
      codeIntelligence: var_codeIntelligence,
      llmUsage: var_llmUsage,
      formattedContent: var_formattedContent,
      ocrInternalDocument: var_ocrInternalDocument,
    );
  }

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

  @protected
  FictionBookMetadata sse_decode_fiction_book_metadata(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_genres = sse_decode_list_String(deserializer);
    var var_sequences = sse_decode_list_String(deserializer);
    var var_annotation = sse_decode_opt_String(deserializer);
    return FictionBookMetadata(
      genres: var_genres,
      sequences: var_sequences,
      annotation: var_annotation,
    );
  }

  @protected
  FileExtractionConfig sse_decode_file_extraction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enableQualityProcessing = sse_decode_opt_box_autoadd_bool(
      deserializer,
    );
    var var_ocr = sse_decode_opt_box_autoadd_ocr_config(deserializer);
    var var_forceOcr = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_forceOcrPages = sse_decode_opt_list_prim_i_64_strict(deserializer);
    var var_disableOcr = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_chunking = sse_decode_opt_box_autoadd_chunking_config(deserializer);
    var var_contentFilter = sse_decode_opt_box_autoadd_content_filter_config(
      deserializer,
    );
    var var_images = sse_decode_opt_box_autoadd_image_extraction_config(
      deserializer,
    );
    var var_pdfOptions = sse_decode_opt_box_autoadd_pdf_config(deserializer);
    var var_tokenReduction = sse_decode_opt_box_autoadd_token_reduction_options(
      deserializer,
    );
    var var_languageDetection =
        sse_decode_opt_box_autoadd_language_detection_config(deserializer);
    var var_pages = sse_decode_opt_box_autoadd_page_config(deserializer);
    var var_keywords = sse_decode_opt_box_autoadd_keyword_config(deserializer);
    var var_postprocessor = sse_decode_opt_box_autoadd_post_processor_config(
      deserializer,
    );
    var var_htmlOptions = sse_decode_opt_String(deserializer);
    var var_resultFormat = sse_decode_opt_box_autoadd_result_format(
      deserializer,
    );
    var var_outputFormat = sse_decode_opt_box_autoadd_output_format(
      deserializer,
    );
    var var_includeDocumentStructure = sse_decode_opt_box_autoadd_bool(
      deserializer,
    );
    var var_layout = sse_decode_opt_box_autoadd_layout_detection_config(
      deserializer,
    );
    var var_timeoutSecs = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_treeSitter = sse_decode_opt_box_autoadd_tree_sitter_config(
      deserializer,
    );
    var var_structuredExtraction =
        sse_decode_opt_box_autoadd_structured_extraction_config(deserializer);
    return FileExtractionConfig(
      enableQualityProcessing: var_enableQualityProcessing,
      ocr: var_ocr,
      forceOcr: var_forceOcr,
      forceOcrPages: var_forceOcrPages,
      disableOcr: var_disableOcr,
      chunking: var_chunking,
      contentFilter: var_contentFilter,
      images: var_images,
      pdfOptions: var_pdfOptions,
      tokenReduction: var_tokenReduction,
      languageDetection: var_languageDetection,
      pages: var_pages,
      keywords: var_keywords,
      postprocessor: var_postprocessor,
      htmlOptions: var_htmlOptions,
      resultFormat: var_resultFormat,
      outputFormat: var_outputFormat,
      includeDocumentStructure: var_includeDocumentStructure,
      layout: var_layout,
      timeoutSecs: var_timeoutSecs,
      treeSitter: var_treeSitter,
      structuredExtraction: var_structuredExtraction,
    );
  }

  @protected
  Footnote sse_decode_footnote(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_label = sse_decode_String(deserializer);
    var var_content = sse_decode_list_formatted_block(deserializer);
    return Footnote(label: var_label, content: var_content);
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_field0 = sse_decode_box_autoadd_pdf_metadata(deserializer);
        return FormatMetadata_Pdf(field0: var_field0);
      case 1:
        var var_field0 = sse_decode_box_autoadd_docx_metadata(deserializer);
        return FormatMetadata_Docx(field0: var_field0);
      case 2:
        var var_field0 = sse_decode_box_autoadd_excel_metadata(deserializer);
        return FormatMetadata_Excel(field0: var_field0);
      case 3:
        var var_field0 = sse_decode_box_autoadd_email_metadata(deserializer);
        return FormatMetadata_Email(field0: var_field0);
      case 4:
        var var_field0 = sse_decode_box_autoadd_pptx_metadata(deserializer);
        return FormatMetadata_Pptx(field0: var_field0);
      case 5:
        var var_field0 = sse_decode_box_autoadd_archive_metadata(deserializer);
        return FormatMetadata_Archive(field0: var_field0);
      case 6:
        var var_field0 = sse_decode_box_autoadd_image_metadata(deserializer);
        return FormatMetadata_Image(field0: var_field0);
      case 7:
        var var_field0 = sse_decode_box_autoadd_xml_metadata(deserializer);
        return FormatMetadata_Xml(field0: var_field0);
      case 8:
        var var_field0 = sse_decode_box_autoadd_text_metadata(deserializer);
        return FormatMetadata_Text(field0: var_field0);
      case 9:
        var var_field0 = sse_decode_box_autoadd_html_metadata(deserializer);
        return FormatMetadata_Html(field0: var_field0);
      case 10:
        var var_field0 = sse_decode_box_autoadd_ocr_metadata(deserializer);
        return FormatMetadata_Ocr(field0: var_field0);
      case 11:
        var var_field0 = sse_decode_box_autoadd_csv_metadata(deserializer);
        return FormatMetadata_Csv(field0: var_field0);
      case 12:
        var var_field0 = sse_decode_box_autoadd_bibtex_metadata(deserializer);
        return FormatMetadata_Bibtex(field0: var_field0);
      case 13:
        var var_field0 = sse_decode_box_autoadd_citation_metadata(deserializer);
        return FormatMetadata_Citation(field0: var_field0);
      case 14:
        var var_field0 = sse_decode_box_autoadd_fiction_book_metadata(
          deserializer,
        );
        return FormatMetadata_FictionBook(field0: var_field0);
      case 15:
        var var_field0 = sse_decode_box_autoadd_dbf_metadata(deserializer);
        return FormatMetadata_Dbf(field0: var_field0);
      case 16:
        var var_field0 = sse_decode_box_autoadd_jats_metadata(deserializer);
        return FormatMetadata_Jats(field0: var_field0);
      case 17:
        var var_field0 = sse_decode_box_autoadd_epub_metadata(deserializer);
        return FormatMetadata_Epub(field0: var_field0);
      case 18:
        var var_field0 = sse_decode_box_autoadd_pst_metadata(deserializer);
        return FormatMetadata_Pst(field0: var_field0);
      case 19:
        var var_field0 = sse_decode_String(deserializer);
        return FormatMetadata_Code(field0: var_field0);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  FormattedBlock sse_decode_formatted_block(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_blockType = sse_decode_block_type(deserializer);
    var var_level = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_inlineContent = sse_decode_list_inline_element(deserializer);
    var var_attributes = sse_decode_opt_String(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_code = sse_decode_opt_String(deserializer);
    var var_children = sse_decode_list_formatted_block(deserializer);
    return FormattedBlock(
      blockType: var_blockType,
      level: var_level,
      inlineContent: var_inlineContent,
      attributes: var_attributes,
      language: var_language,
      code: var_code,
      children: var_children,
    );
  }

  @protected
  GridCell sse_decode_grid_cell(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_row = sse_decode_i_64(deserializer);
    var var_col = sse_decode_i_64(deserializer);
    var var_rowSpan = sse_decode_i_64(deserializer);
    var var_colSpan = sse_decode_i_64(deserializer);
    var var_isHeader = sse_decode_bool(deserializer);
    var var_bbox = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    return GridCell(
      content: var_content,
      row: var_row,
      col: var_col,
      rowSpan: var_rowSpan,
      colSpan: var_colSpan,
      isHeader: var_isHeader,
      bbox: var_bbox,
    );
  }

  @protected
  HeaderMetadata sse_decode_header_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_level = sse_decode_i_64(deserializer);
    var var_text = sse_decode_String(deserializer);
    var var_id = sse_decode_opt_String(deserializer);
    var var_depth = sse_decode_i_64(deserializer);
    var var_htmlOffset = sse_decode_i_64(deserializer);
    return HeaderMetadata(
      level: var_level,
      text: var_text,
      id: var_id,
      depth: var_depth,
      htmlOffset: var_htmlOffset,
    );
  }

  @protected
  HeadingContext sse_decode_heading_context(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_headings = sse_decode_list_heading_level(deserializer);
    return HeadingContext(headings: var_headings);
  }

  @protected
  HeadingLevel sse_decode_heading_level(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_level = sse_decode_i_64(deserializer);
    var var_text = sse_decode_String(deserializer);
    return HeadingLevel(level: var_level, text: var_text);
  }

  @protected
  HierarchicalBlock sse_decode_hierarchical_block(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_text = sse_decode_String(deserializer);
    var var_fontSize = sse_decode_f_64(deserializer);
    var var_level = sse_decode_String(deserializer);
    var var_bbox = sse_decode_opt_list_prim_f_64_strict(deserializer);
    return HierarchicalBlock(
      text: var_text,
      fontSize: var_fontSize,
      level: var_level,
      bbox: var_bbox,
    );
  }

  @protected
  HierarchyConfig sse_decode_hierarchy_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enabled = sse_decode_bool(deserializer);
    var var_kClusters = sse_decode_i_64(deserializer);
    var var_includeBbox = sse_decode_bool(deserializer);
    var var_ocrCoverageThreshold = sse_decode_opt_box_autoadd_f_64(
      deserializer,
    );
    return HierarchyConfig(
      enabled: var_enabled,
      kClusters: var_kClusters,
      includeBbox: var_includeBbox,
      ocrCoverageThreshold: var_ocrCoverageThreshold,
    );
  }

  @protected
  HtmlMetadata sse_decode_html_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_title = sse_decode_opt_String(deserializer);
    var var_description = sse_decode_opt_String(deserializer);
    var var_keywords = sse_decode_list_String(deserializer);
    var var_author = sse_decode_opt_String(deserializer);
    var var_canonicalUrl = sse_decode_opt_String(deserializer);
    var var_baseHref = sse_decode_opt_String(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_textDirection = sse_decode_opt_box_autoadd_text_direction(
      deserializer,
    );
    var var_openGraph = sse_decode_Map_String_String_None(deserializer);
    var var_twitterCard = sse_decode_Map_String_String_None(deserializer);
    var var_metaTags = sse_decode_Map_String_String_None(deserializer);
    var var_headers = sse_decode_list_header_metadata(deserializer);
    var var_links = sse_decode_list_link_metadata(deserializer);
    var var_images = sse_decode_list_image_metadata_type(deserializer);
    var var_structuredData = sse_decode_list_structured_data(deserializer);
    return HtmlMetadata(
      title: var_title,
      description: var_description,
      keywords: var_keywords,
      author: var_author,
      canonicalUrl: var_canonicalUrl,
      baseHref: var_baseHref,
      language: var_language,
      textDirection: var_textDirection,
      openGraph: var_openGraph,
      twitterCard: var_twitterCard,
      metaTags: var_metaTags,
      headers: var_headers,
      links: var_links,
      images: var_images,
      structuredData: var_structuredData,
    );
  }

  @protected
  HtmlOutputConfig sse_decode_html_output_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_css = sse_decode_opt_String(deserializer);
    var var_cssFile = sse_decode_opt_String(deserializer);
    var var_theme = sse_decode_html_theme(deserializer);
    var var_classPrefix = sse_decode_String(deserializer);
    var var_embedCss = sse_decode_bool(deserializer);
    return HtmlOutputConfig(
      css: var_css,
      cssFile: var_cssFile,
      theme: var_theme,
      classPrefix: var_classPrefix,
      embedCss: var_embedCss,
    );
  }

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

  @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
  ImageExtractionConfig sse_decode_image_extraction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_extractImages = sse_decode_bool(deserializer);
    var var_targetDpi = sse_decode_i_64(deserializer);
    var var_maxImageDimension = sse_decode_i_64(deserializer);
    var var_injectPlaceholders = sse_decode_bool(deserializer);
    var var_autoAdjustDpi = sse_decode_bool(deserializer);
    var var_minDpi = sse_decode_i_64(deserializer);
    var var_maxDpi = sse_decode_i_64(deserializer);
    var var_maxImagesPerPage = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_classify = sse_decode_bool(deserializer);
    var var_includePageRasters = sse_decode_bool(deserializer);
    var var_runOcrOnImages = sse_decode_bool(deserializer);
    var var_ocrTextOnly = sse_decode_bool(deserializer);
    var var_appendOcrText = sse_decode_bool(deserializer);
    return ImageExtractionConfig(
      extractImages: var_extractImages,
      targetDpi: var_targetDpi,
      maxImageDimension: var_maxImageDimension,
      injectPlaceholders: var_injectPlaceholders,
      autoAdjustDpi: var_autoAdjustDpi,
      minDpi: var_minDpi,
      maxDpi: var_maxDpi,
      maxImagesPerPage: var_maxImagesPerPage,
      classify: var_classify,
      includePageRasters: var_includePageRasters,
      runOcrOnImages: var_runOcrOnImages,
      ocrTextOnly: var_ocrTextOnly,
      appendOcrText: var_appendOcrText,
    );
  }

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

  @protected
  ImageMetadata sse_decode_image_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_width = sse_decode_i_64(deserializer);
    var var_height = sse_decode_i_64(deserializer);
    var var_format = sse_decode_String(deserializer);
    var var_exif = sse_decode_Map_String_String_None(deserializer);
    return ImageMetadata(
      width: var_width,
      height: var_height,
      format: var_format,
      exif: var_exif,
    );
  }

  @protected
  ImageMetadataType sse_decode_image_metadata_type(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_src = sse_decode_String(deserializer);
    var var_alt = sse_decode_opt_String(deserializer);
    var var_title = sse_decode_opt_String(deserializer);
    var var_dimensions = sse_decode_opt_list_prim_i_64_strict(deserializer);
    var var_imageType = sse_decode_image_type(deserializer);
    var var_attributes = sse_decode_list_list_String(deserializer);
    return ImageMetadataType(
      src: var_src,
      alt: var_alt,
      title: var_title,
      dimensions: var_dimensions,
      imageType: var_imageType,
      attributes: var_attributes,
    );
  }

  @protected
  ImagePreprocessingConfig sse_decode_image_preprocessing_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_targetDpi = sse_decode_i_64(deserializer);
    var var_autoRotate = sse_decode_bool(deserializer);
    var var_deskew = sse_decode_bool(deserializer);
    var var_denoise = sse_decode_bool(deserializer);
    var var_contrastEnhance = sse_decode_bool(deserializer);
    var var_binarizationMethod = sse_decode_String(deserializer);
    var var_invertColors = sse_decode_bool(deserializer);
    return ImagePreprocessingConfig(
      targetDpi: var_targetDpi,
      autoRotate: var_autoRotate,
      deskew: var_deskew,
      denoise: var_denoise,
      contrastEnhance: var_contrastEnhance,
      binarizationMethod: var_binarizationMethod,
      invertColors: var_invertColors,
    );
  }

  @protected
  ImagePreprocessingMetadata sse_decode_image_preprocessing_metadata(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_originalDimensions = sse_decode_list_prim_i_64_strict(deserializer);
    var var_originalDpi = sse_decode_list_prim_f_64_strict(deserializer);
    var var_targetDpi = sse_decode_i_64(deserializer);
    var var_scaleFactor = sse_decode_f_64(deserializer);
    var var_autoAdjusted = sse_decode_bool(deserializer);
    var var_finalDpi = sse_decode_i_64(deserializer);
    var var_newDimensions = sse_decode_opt_list_prim_i_64_strict(deserializer);
    var var_resampleMethod = sse_decode_String(deserializer);
    var var_dimensionClamped = sse_decode_bool(deserializer);
    var var_calculatedDpi = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_skippedResize = sse_decode_bool(deserializer);
    var var_resizeError = sse_decode_opt_String(deserializer);
    return ImagePreprocessingMetadata(
      originalDimensions: var_originalDimensions,
      originalDpi: var_originalDpi,
      targetDpi: var_targetDpi,
      scaleFactor: var_scaleFactor,
      autoAdjusted: var_autoAdjusted,
      finalDpi: var_finalDpi,
      newDimensions: var_newDimensions,
      resampleMethod: var_resampleMethod,
      dimensionClamped: var_dimensionClamped,
      calculatedDpi: var_calculatedDpi,
      skippedResize: var_skippedResize,
      resizeError: var_resizeError,
    );
  }

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

  @protected
  InlineElement sse_decode_inline_element(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_elementType = sse_decode_inline_type(deserializer);
    var var_content = sse_decode_String(deserializer);
    var var_attributes = sse_decode_opt_String(deserializer);
    var var_metadata = sse_decode_opt_Map_String_String_None(deserializer);
    return InlineElement(
      elementType: var_elementType,
      content: var_content,
      attributes: var_attributes,
      metadata: var_metadata,
    );
  }

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

  @protected
  InternalDocumentBridge sse_decode_internal_document_bridge(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_json = sse_decode_String(deserializer);
    return InternalDocumentBridge(json: var_json);
  }

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

  @protected
  JatsMetadata sse_decode_jats_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_copyright = sse_decode_opt_String(deserializer);
    var var_license = sse_decode_opt_String(deserializer);
    var var_historyDates = sse_decode_Map_String_String_None(deserializer);
    var var_contributorRoles = sse_decode_list_contributor_role(deserializer);
    return JatsMetadata(
      copyright: var_copyright,
      license: var_license,
      historyDates: var_historyDates,
      contributorRoles: var_contributorRoles,
    );
  }

  @protected
  Keyword sse_decode_keyword(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_text = sse_decode_String(deserializer);
    var var_score = sse_decode_f_64(deserializer);
    var var_algorithm = sse_decode_keyword_algorithm(deserializer);
    var var_positions = sse_decode_opt_list_prim_i_64_strict(deserializer);
    return Keyword(
      text: var_text,
      score: var_score,
      algorithm: var_algorithm,
      positions: var_positions,
    );
  }

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

  @protected
  KeywordConfig sse_decode_keyword_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_algorithm = sse_decode_keyword_algorithm(deserializer);
    var var_maxKeywords = sse_decode_i_64(deserializer);
    var var_minScore = sse_decode_f_64(deserializer);
    var var_ngramRange = sse_decode_list_prim_i_64_strict(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_yakeParams = sse_decode_opt_box_autoadd_yake_params(deserializer);
    var var_rakeParams = sse_decode_opt_box_autoadd_rake_params(deserializer);
    return KeywordConfig(
      algorithm: var_algorithm,
      maxKeywords: var_maxKeywords,
      minScore: var_minScore,
      ngramRange: var_ngramRange,
      language: var_language,
      yakeParams: var_yakeParams,
      rakeParams: var_rakeParams,
    );
  }

  @protected
  LanguageDetectionConfig sse_decode_language_detection_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enabled = sse_decode_bool(deserializer);
    var var_minConfidence = sse_decode_f_64(deserializer);
    var var_detectMultiple = sse_decode_bool(deserializer);
    return LanguageDetectionConfig(
      enabled: var_enabled,
      minConfidence: var_minConfidence,
      detectMultiple: var_detectMultiple,
    );
  }

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

  @protected
  LayoutDetection sse_decode_layout_detection(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_className = sse_decode_layout_class(deserializer);
    var var_confidence = sse_decode_f_64(deserializer);
    var var_bbox = sse_decode_b_box(deserializer);
    return LayoutDetection(
      className: var_className,
      confidence: var_confidence,
      bbox: var_bbox,
    );
  }

  @protected
  LayoutDetectionConfig sse_decode_layout_detection_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_confidenceThreshold = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_applyHeuristics = sse_decode_bool(deserializer);
    var var_tableModel = sse_decode_table_model(deserializer);
    var var_acceleration = sse_decode_opt_box_autoadd_acceleration_config(
      deserializer,
    );
    return LayoutDetectionConfig(
      confidenceThreshold: var_confidenceThreshold,
      applyHeuristics: var_applyHeuristics,
      tableModel: var_tableModel,
      acceleration: var_acceleration,
    );
  }

  @protected
  LayoutRegion sse_decode_layout_region(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_className = sse_decode_String(deserializer);
    var var_confidence = sse_decode_f_64(deserializer);
    var var_boundingBox = sse_decode_bounding_box(deserializer);
    var var_areaFraction = sse_decode_f_64(deserializer);
    return LayoutRegion(
      className: var_className,
      confidence: var_confidence,
      boundingBox: var_boundingBox,
      areaFraction: var_areaFraction,
    );
  }

  @protected
  LinkMetadata sse_decode_link_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_href = sse_decode_String(deserializer);
    var var_text = sse_decode_String(deserializer);
    var var_title = sse_decode_opt_String(deserializer);
    var var_linkType = sse_decode_link_type(deserializer);
    var var_rel = sse_decode_list_String(deserializer);
    var var_attributes = sse_decode_list_list_String(deserializer);
    return LinkMetadata(
      href: var_href,
      text: var_text,
      title: var_title,
      linkType: var_linkType,
      rel: var_rel,
      attributes: var_attributes,
    );
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  @protected
  List<int> sse_decode_list_prim_u_8_loose(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
  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<ProcessingWarning> sse_decode_list_processing_warning(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

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

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

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

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

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

    var len_ = sse_decode_i_32(deserializer);
    var ans_ = <(String, List<String>)>[];
    for (var idx_ = 0; idx_ < len_; ++idx_) {
      ans_.add(sse_decode_record_string_list_string(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<StructuredData> sse_decode_list_structured_data(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

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

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

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

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

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

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

  @protected
  LlmConfig sse_decode_llm_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_model = sse_decode_String(deserializer);
    var var_apiKey = sse_decode_opt_String(deserializer);
    var var_baseUrl = sse_decode_opt_String(deserializer);
    var var_timeoutSecs = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_maxRetries = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_temperature = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_maxTokens = sse_decode_opt_box_autoadd_i_64(deserializer);
    return LlmConfig(
      model: var_model,
      apiKey: var_apiKey,
      baseUrl: var_baseUrl,
      timeoutSecs: var_timeoutSecs,
      maxRetries: var_maxRetries,
      temperature: var_temperature,
      maxTokens: var_maxTokens,
    );
  }

  @protected
  LlmUsage sse_decode_llm_usage(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_model = sse_decode_String(deserializer);
    var var_source = sse_decode_String(deserializer);
    var var_inputTokens = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_outputTokens = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_totalTokens = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_estimatedCost = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_finishReason = sse_decode_opt_String(deserializer);
    return LlmUsage(
      model: var_model,
      source: var_source,
      inputTokens: var_inputTokens,
      outputTokens: var_outputTokens,
      totalTokens: var_totalTokens,
      estimatedCost: var_estimatedCost,
      finishReason: var_finishReason,
    );
  }

  @protected
  Metadata sse_decode_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_title = sse_decode_opt_String(deserializer);
    var var_subject = sse_decode_opt_String(deserializer);
    var var_authors = sse_decode_opt_list_String(deserializer);
    var var_keywords = sse_decode_opt_list_String(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_createdAt = sse_decode_opt_String(deserializer);
    var var_modifiedAt = sse_decode_opt_String(deserializer);
    var var_createdBy = sse_decode_opt_String(deserializer);
    var var_modifiedBy = sse_decode_opt_String(deserializer);
    var var_pages = sse_decode_opt_box_autoadd_page_structure(deserializer);
    var var_format = sse_decode_opt_box_autoadd_format_metadata(deserializer);
    var var_imagePreprocessing =
        sse_decode_opt_box_autoadd_image_preprocessing_metadata(deserializer);
    var var_jsonSchema = sse_decode_opt_String(deserializer);
    var var_error = sse_decode_opt_box_autoadd_error_metadata(deserializer);
    var var_extractionDurationMs = sse_decode_opt_box_autoadd_i_64(
      deserializer,
    );
    var var_category = sse_decode_opt_String(deserializer);
    var var_tags = sse_decode_opt_list_String(deserializer);
    var var_documentVersion = sse_decode_opt_String(deserializer);
    var var_abstractText = sse_decode_opt_String(deserializer);
    var var_outputFormat = sse_decode_opt_String(deserializer);
    var var_ocrUsed = sse_decode_bool(deserializer);
    var var_additional = sse_decode_Map_String_String_None(deserializer);
    return Metadata(
      title: var_title,
      subject: var_subject,
      authors: var_authors,
      keywords: var_keywords,
      language: var_language,
      createdAt: var_createdAt,
      modifiedAt: var_modifiedAt,
      createdBy: var_createdBy,
      modifiedBy: var_modifiedBy,
      pages: var_pages,
      format: var_format,
      imagePreprocessing: var_imagePreprocessing,
      jsonSchema: var_jsonSchema,
      error: var_error,
      extractionDurationMs: var_extractionDurationMs,
      category: var_category,
      tags: var_tags,
      documentVersion: var_documentVersion,
      abstractText: var_abstractText,
      outputFormat: var_outputFormat,
      ocrUsed: var_ocrUsed,
      additional: var_additional,
    );
  }

  @protected
  ModelPaths sse_decode_model_paths(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_detModel = sse_decode_String(deserializer);
    var var_clsModel = sse_decode_String(deserializer);
    var var_recModel = sse_decode_String(deserializer);
    var var_dictFile = sse_decode_String(deserializer);
    return ModelPaths(
      detModel: var_detModel,
      clsModel: var_clsModel,
      recModel: var_recModel,
      dictFile: var_dictFile,
    );
  }

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Title(text: var_text);
      case 1:
        var var_level = sse_decode_i_64(deserializer);
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Heading(level: var_level, text: var_text);
      case 2:
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Paragraph(text: var_text);
      case 3:
        var var_ordered = sse_decode_bool(deserializer);
        return NodeContent_List(ordered: var_ordered);
      case 4:
        var var_text = sse_decode_String(deserializer);
        return NodeContent_ListItem(text: var_text);
      case 5:
        var var_grid = sse_decode_box_autoadd_table_grid(deserializer);
        return NodeContent_Table(grid: var_grid);
      case 6:
        var var_description = sse_decode_String(deserializer);
        var var_imageIndex = sse_decode_i_64(deserializer);
        var var_src = sse_decode_String(deserializer);
        return NodeContent_Image(
          description: var_description,
          imageIndex: var_imageIndex,
          src: var_src,
        );
      case 7:
        var var_text = sse_decode_String(deserializer);
        var var_language = sse_decode_String(deserializer);
        return NodeContent_Code(text: var_text, language: var_language);
      case 8:
        return NodeContent_Quote();
      case 9:
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Formula(text: var_text);
      case 10:
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Footnote(text: var_text);
      case 11:
        var var_label = sse_decode_String(deserializer);
        var var_headingLevel = sse_decode_i_64(deserializer);
        var var_headingText = sse_decode_String(deserializer);
        return NodeContent_Group(
          label: var_label,
          headingLevel: var_headingLevel,
          headingText: var_headingText,
        );
      case 12:
        return NodeContent_PageBreak();
      case 13:
        var var_number = sse_decode_i_64(deserializer);
        var var_title = sse_decode_String(deserializer);
        return NodeContent_Slide(number: var_number, title: var_title);
      case 14:
        return NodeContent_DefinitionList();
      case 15:
        var var_term = sse_decode_String(deserializer);
        var var_definition = sse_decode_String(deserializer);
        return NodeContent_DefinitionItem(
          term: var_term,
          definition: var_definition,
        );
      case 16:
        var var_key = sse_decode_String(deserializer);
        var var_text = sse_decode_String(deserializer);
        return NodeContent_Citation(key: var_key, text: var_text);
      case 17:
        var var_kind = sse_decode_String(deserializer);
        var var_title = sse_decode_String(deserializer);
        return NodeContent_Admonition(kind: var_kind, title: var_title);
      case 18:
        var var_format = sse_decode_String(deserializer);
        var var_content = sse_decode_String(deserializer);
        return NodeContent_RawBlock(format: var_format, content: var_content);
      case 19:
        var var_entries = sse_decode_list_list_String(deserializer);
        return NodeContent_MetadataBlock(entries: var_entries);
      default:
        throw UnimplementedError('');
    }
  }

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

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

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_left = sse_decode_i_64(deserializer);
        var var_top = sse_decode_i_64(deserializer);
        var var_width = sse_decode_i_64(deserializer);
        var var_height = sse_decode_i_64(deserializer);
        return OcrBoundingGeometry_Rectangle(
          left: var_left,
          top: var_top,
          width: var_width,
          height: var_height,
        );
      case 1:
        var var_points = sse_decode_String(deserializer);
        return OcrBoundingGeometry_Quadrilateral(points: var_points);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  OcrConfidence sse_decode_ocr_confidence(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_detection = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_recognition = sse_decode_f_64(deserializer);
    return OcrConfidence(
      detection: var_detection,
      recognition: var_recognition,
    );
  }

  @protected
  OcrConfig sse_decode_ocr_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enabled = sse_decode_bool(deserializer);
    var var_backend = sse_decode_String(deserializer);
    var var_language = sse_decode_String(deserializer);
    var var_tesseractConfig = sse_decode_opt_box_autoadd_tesseract_config(
      deserializer,
    );
    var var_outputFormat = sse_decode_opt_box_autoadd_output_format(
      deserializer,
    );
    var var_paddleOcrConfig = sse_decode_opt_String(deserializer);
    var var_backendOptions = sse_decode_opt_String(deserializer);
    var var_elementConfig = sse_decode_opt_box_autoadd_ocr_element_config(
      deserializer,
    );
    var var_qualityThresholds =
        sse_decode_opt_box_autoadd_ocr_quality_thresholds(deserializer);
    var var_pipeline = sse_decode_opt_box_autoadd_ocr_pipeline_config(
      deserializer,
    );
    var var_autoRotate = sse_decode_bool(deserializer);
    var var_vlmConfig = sse_decode_opt_box_autoadd_llm_config(deserializer);
    var var_vlmPrompt = sse_decode_opt_String(deserializer);
    var var_acceleration = sse_decode_opt_box_autoadd_acceleration_config(
      deserializer,
    );
    var var_tessdataBytes = sse_decode_opt_Map_String_list_prim_u_8_strict_None(
      deserializer,
    );
    return OcrConfig(
      enabled: var_enabled,
      backend: var_backend,
      language: var_language,
      tesseractConfig: var_tesseractConfig,
      outputFormat: var_outputFormat,
      paddleOcrConfig: var_paddleOcrConfig,
      backendOptions: var_backendOptions,
      elementConfig: var_elementConfig,
      qualityThresholds: var_qualityThresholds,
      pipeline: var_pipeline,
      autoRotate: var_autoRotate,
      vlmConfig: var_vlmConfig,
      vlmPrompt: var_vlmPrompt,
      acceleration: var_acceleration,
      tessdataBytes: var_tessdataBytes,
    );
  }

  @protected
  OcrElement sse_decode_ocr_element(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_text = sse_decode_String(deserializer);
    var var_geometry = sse_decode_ocr_bounding_geometry(deserializer);
    var var_confidence = sse_decode_ocr_confidence(deserializer);
    var var_level = sse_decode_ocr_element_level(deserializer);
    var var_rotation = sse_decode_opt_box_autoadd_ocr_rotation(deserializer);
    var var_pageNumber = sse_decode_i_64(deserializer);
    var var_parentId = sse_decode_opt_String(deserializer);
    var var_backendMetadata = sse_decode_Map_String_String_None(deserializer);
    return OcrElement(
      text: var_text,
      geometry: var_geometry,
      confidence: var_confidence,
      level: var_level,
      rotation: var_rotation,
      pageNumber: var_pageNumber,
      parentId: var_parentId,
      backendMetadata: var_backendMetadata,
    );
  }

  @protected
  OcrElementConfig sse_decode_ocr_element_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_includeElements = sse_decode_bool(deserializer);
    var var_minLevel = sse_decode_ocr_element_level(deserializer);
    var var_minConfidence = sse_decode_f_64(deserializer);
    var var_buildHierarchy = sse_decode_bool(deserializer);
    return OcrElementConfig(
      includeElements: var_includeElements,
      minLevel: var_minLevel,
      minConfidence: var_minConfidence,
      buildHierarchy: var_buildHierarchy,
    );
  }

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

  @protected
  OcrExtractionResult sse_decode_ocr_extraction_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_mimeType = sse_decode_String(deserializer);
    var var_metadata = sse_decode_Map_String_String_None(deserializer);
    var var_tables = sse_decode_list_ocr_table(deserializer);
    var var_ocrElements = sse_decode_opt_list_ocr_element(deserializer);
    var var_internalDocument = sse_decode_opt_String(deserializer);
    return OcrExtractionResult(
      content: var_content,
      mimeType: var_mimeType,
      metadata: var_metadata,
      tables: var_tables,
      ocrElements: var_ocrElements,
      internalDocument: var_internalDocument,
    );
  }

  @protected
  OcrMetadata sse_decode_ocr_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_language = sse_decode_String(deserializer);
    var var_psm = sse_decode_i_64(deserializer);
    var var_outputFormat = sse_decode_String(deserializer);
    var var_tableCount = sse_decode_i_64(deserializer);
    var var_tableRows = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_tableCols = sse_decode_opt_box_autoadd_i_64(deserializer);
    return OcrMetadata(
      language: var_language,
      psm: var_psm,
      outputFormat: var_outputFormat,
      tableCount: var_tableCount,
      tableRows: var_tableRows,
      tableCols: var_tableCols,
    );
  }

  @protected
  OcrPipelineConfig sse_decode_ocr_pipeline_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_stages = sse_decode_list_ocr_pipeline_stage(deserializer);
    var var_qualityThresholds = sse_decode_ocr_quality_thresholds(deserializer);
    return OcrPipelineConfig(
      stages: var_stages,
      qualityThresholds: var_qualityThresholds,
    );
  }

  @protected
  OcrPipelineStage sse_decode_ocr_pipeline_stage(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_backend = sse_decode_String(deserializer);
    var var_priority = sse_decode_i_64(deserializer);
    var var_language = sse_decode_opt_String(deserializer);
    var var_tesseractConfig = sse_decode_opt_box_autoadd_tesseract_config(
      deserializer,
    );
    var var_paddleOcrConfig = sse_decode_opt_String(deserializer);
    var var_vlmConfig = sse_decode_opt_box_autoadd_llm_config(deserializer);
    var var_backendOptions = sse_decode_opt_String(deserializer);
    return OcrPipelineStage(
      backend: var_backend,
      priority: var_priority,
      language: var_language,
      tesseractConfig: var_tesseractConfig,
      paddleOcrConfig: var_paddleOcrConfig,
      vlmConfig: var_vlmConfig,
      backendOptions: var_backendOptions,
    );
  }

  @protected
  OcrQualityThresholds sse_decode_ocr_quality_thresholds(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_minTotalNonWhitespace = sse_decode_i_64(deserializer);
    var var_minNonWhitespacePerPage = sse_decode_f_64(deserializer);
    var var_minMeaningfulWordLen = sse_decode_i_64(deserializer);
    var var_minMeaningfulWords = sse_decode_i_64(deserializer);
    var var_minAlnumRatio = sse_decode_f_64(deserializer);
    var var_minGarbageChars = sse_decode_i_64(deserializer);
    var var_maxFragmentedWordRatio = sse_decode_f_64(deserializer);
    var var_criticalFragmentedWordRatio = sse_decode_f_64(deserializer);
    var var_minAvgWordLength = sse_decode_f_64(deserializer);
    var var_minWordsForAvgLengthCheck = sse_decode_i_64(deserializer);
    var var_minConsecutiveRepeatRatio = sse_decode_f_64(deserializer);
    var var_minWordsForRepeatCheck = sse_decode_i_64(deserializer);
    var var_substantiveMinChars = sse_decode_i_64(deserializer);
    var var_nonTextMinChars = sse_decode_i_64(deserializer);
    var var_alnumWsRatioThreshold = sse_decode_f_64(deserializer);
    var var_pipelineMinQuality = sse_decode_f_64(deserializer);
    return OcrQualityThresholds(
      minTotalNonWhitespace: var_minTotalNonWhitespace,
      minNonWhitespacePerPage: var_minNonWhitespacePerPage,
      minMeaningfulWordLen: var_minMeaningfulWordLen,
      minMeaningfulWords: var_minMeaningfulWords,
      minAlnumRatio: var_minAlnumRatio,
      minGarbageChars: var_minGarbageChars,
      maxFragmentedWordRatio: var_maxFragmentedWordRatio,
      criticalFragmentedWordRatio: var_criticalFragmentedWordRatio,
      minAvgWordLength: var_minAvgWordLength,
      minWordsForAvgLengthCheck: var_minWordsForAvgLengthCheck,
      minConsecutiveRepeatRatio: var_minConsecutiveRepeatRatio,
      minWordsForRepeatCheck: var_minWordsForRepeatCheck,
      substantiveMinChars: var_substantiveMinChars,
      nonTextMinChars: var_nonTextMinChars,
      alnumWsRatioThreshold: var_alnumWsRatioThreshold,
      pipelineMinQuality: var_pipelineMinQuality,
    );
  }

  @protected
  OcrRotation sse_decode_ocr_rotation(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_angleDegrees = sse_decode_f_64(deserializer);
    var var_confidence = sse_decode_opt_box_autoadd_f_64(deserializer);
    return OcrRotation(
      angleDegrees: var_angleDegrees,
      confidence: var_confidence,
    );
  }

  @protected
  OcrTable sse_decode_ocr_table(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_cells = sse_decode_list_list_String(deserializer);
    var var_markdown = sse_decode_String(deserializer);
    var var_pageNumber = sse_decode_i_64(deserializer);
    var var_boundingBox = sse_decode_opt_box_autoadd_ocr_table_bounding_box(
      deserializer,
    );
    return OcrTable(
      cells: var_cells,
      markdown: var_markdown,
      pageNumber: var_pageNumber,
      boundingBox: var_boundingBox,
    );
  }

  @protected
  OcrTableBoundingBox sse_decode_ocr_table_bounding_box(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_left = sse_decode_i_64(deserializer);
    var var_top = sse_decode_i_64(deserializer);
    var var_right = sse_decode_i_64(deserializer);
    var var_bottom = sse_decode_i_64(deserializer);
    return OcrTableBoundingBox(
      left: var_left,
      top: var_top,
      right: var_right,
      bottom: var_bottom,
    );
  }

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

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

  @protected
  Map<String, PlatformInt64>? sse_decode_opt_Map_String_i_64_None(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

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

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

  @protected
  Map<String, Uint8List>? sse_decode_opt_Map_String_list_prim_u_8_strict_None(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

  @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
  AccelerationConfig? sse_decode_opt_box_autoadd_acceleration_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_html_output_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
  ImageExtractionConfig? sse_decode_opt_box_autoadd_image_extraction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

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

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

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

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

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

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

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_image_preprocessing_metadata(
        deserializer,
      ));
    } else {
      return null;
    }
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_box_autoadd_structured_extraction_config(
        deserializer,
      ));
    } else {
      return null;
    }
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_ocr_element(deserializer));
    } else {
      return null;
    }
  }

  @protected
  List<PageBoundary>? sse_decode_opt_list_page_boundary(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_page_boundary(deserializer));
    } else {
      return null;
    }
  }

  @protected
  List<PageContent>? sse_decode_opt_list_page_content(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_page_content(deserializer));
    } else {
      return null;
    }
  }

  @protected
  List<PageInfo>? sse_decode_opt_list_page_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_page_info(deserializer));
    } else {
      return null;
    }
  }

  @protected
  List<PdfAnnotation>? sse_decode_opt_list_pdf_annotation(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_pdf_annotation(deserializer));
    } else {
      return null;
    }
  }

  @protected
  Float64List? sse_decode_opt_list_prim_f_64_strict(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_prim_f_64_strict(deserializer));
    } else {
      return null;
    }
  }

  @protected
  Int64List? sse_decode_opt_list_prim_i_64_strict(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_prim_i_64_strict(deserializer));
    } else {
      return null;
    }
  }

  @protected
  Uint8List? sse_decode_opt_list_prim_u_8_strict(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    if (sse_decode_bool(deserializer)) {
      return (sse_decode_list_prim_u_8_strict(deserializer));
    } else {
      return null;
    }
  }

  @protected
  OrientationResult sse_decode_orientation_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_degrees = sse_decode_i_64(deserializer);
    var var_confidence = sse_decode_f_64(deserializer);
    return OrientationResult(degrees: var_degrees, confidence: var_confidence);
  }

  @protected
  OutputFormat sse_decode_output_format(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        return OutputFormat_Plain();
      case 1:
        return OutputFormat_Markdown();
      case 2:
        return OutputFormat_Djot();
      case 3:
        return OutputFormat_Html();
      case 4:
        return OutputFormat_Json();
      case 5:
        return OutputFormat_Structured();
      case 6:
        var var_field0 = sse_decode_String(deserializer);
        return OutputFormat_Custom(field0: var_field0);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  PaddleOcrConfig sse_decode_paddle_ocr_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_language = sse_decode_String(deserializer);
    var var_cacheDir = sse_decode_opt_String(deserializer);
    var var_useAngleCls = sse_decode_bool(deserializer);
    var var_enableTableDetection = sse_decode_bool(deserializer);
    var var_detDbThresh = sse_decode_f_64(deserializer);
    var var_detDbBoxThresh = sse_decode_f_64(deserializer);
    var var_detDbUnclipRatio = sse_decode_f_64(deserializer);
    var var_detLimitSideLen = sse_decode_i_64(deserializer);
    var var_recBatchNum = sse_decode_i_64(deserializer);
    var var_padding = sse_decode_i_64(deserializer);
    var var_dropScore = sse_decode_f_64(deserializer);
    var var_modelTier = sse_decode_String(deserializer);
    return PaddleOcrConfig(
      language: var_language,
      cacheDir: var_cacheDir,
      useAngleCls: var_useAngleCls,
      enableTableDetection: var_enableTableDetection,
      detDbThresh: var_detDbThresh,
      detDbBoxThresh: var_detDbBoxThresh,
      detDbUnclipRatio: var_detDbUnclipRatio,
      detLimitSideLen: var_detLimitSideLen,
      recBatchNum: var_recBatchNum,
      padding: var_padding,
      dropScore: var_dropScore,
      modelTier: var_modelTier,
    );
  }

  @protected
  PageBoundary sse_decode_page_boundary(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_byteStart = sse_decode_i_64(deserializer);
    var var_byteEnd = sse_decode_i_64(deserializer);
    var var_pageNumber = sse_decode_i_64(deserializer);
    return PageBoundary(
      byteStart: var_byteStart,
      byteEnd: var_byteEnd,
      pageNumber: var_pageNumber,
    );
  }

  @protected
  PageConfig sse_decode_page_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_extractPages = sse_decode_bool(deserializer);
    var var_insertPageMarkers = sse_decode_bool(deserializer);
    var var_markerFormat = sse_decode_String(deserializer);
    return PageConfig(
      extractPages: var_extractPages,
      insertPageMarkers: var_insertPageMarkers,
      markerFormat: var_markerFormat,
    );
  }

  @protected
  PageContent sse_decode_page_content(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_pageNumber = sse_decode_i_64(deserializer);
    var var_content = sse_decode_String(deserializer);
    var var_tables = sse_decode_list_table(deserializer);
    var var_imageIndices = sse_decode_list_prim_i_64_strict(deserializer);
    var var_hierarchy = sse_decode_opt_box_autoadd_page_hierarchy(deserializer);
    var var_isBlank = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_layoutRegions = sse_decode_opt_list_layout_region(deserializer);
    var var_speakerNotes = sse_decode_opt_String(deserializer);
    var var_sectionName = sse_decode_opt_String(deserializer);
    var var_sheetName = sse_decode_opt_String(deserializer);
    return PageContent(
      pageNumber: var_pageNumber,
      content: var_content,
      tables: var_tables,
      imageIndices: var_imageIndices,
      hierarchy: var_hierarchy,
      isBlank: var_isBlank,
      layoutRegions: var_layoutRegions,
      speakerNotes: var_speakerNotes,
      sectionName: var_sectionName,
      sheetName: var_sheetName,
    );
  }

  @protected
  PageHierarchy sse_decode_page_hierarchy(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_blockCount = sse_decode_i_64(deserializer);
    var var_blocks = sse_decode_list_hierarchical_block(deserializer);
    return PageHierarchy(blockCount: var_blockCount, blocks: var_blocks);
  }

  @protected
  PageInfo sse_decode_page_info(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_number = sse_decode_i_64(deserializer);
    var var_title = sse_decode_opt_String(deserializer);
    var var_dimensions = sse_decode_opt_list_prim_f_64_strict(deserializer);
    var var_imageCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_tableCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_hidden = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_isBlank = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_hasVectorGraphics = sse_decode_bool(deserializer);
    return PageInfo(
      number: var_number,
      title: var_title,
      dimensions: var_dimensions,
      imageCount: var_imageCount,
      tableCount: var_tableCount,
      hidden: var_hidden,
      isBlank: var_isBlank,
      hasVectorGraphics: var_hasVectorGraphics,
    );
  }

  @protected
  PageStructure sse_decode_page_structure(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_totalCount = sse_decode_i_64(deserializer);
    var var_unitType = sse_decode_page_unit_type(deserializer);
    var var_boundaries = sse_decode_opt_list_page_boundary(deserializer);
    var var_pages = sse_decode_opt_list_page_info(deserializer);
    return PageStructure(
      totalCount: var_totalCount,
      unitType: var_unitType,
      boundaries: var_boundaries,
      pages: var_pages,
    );
  }

  @protected
  PageUnitType sse_decode_page_unit_type(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return PageUnitType.values[inner];
  }

  @protected
  PdfAnnotation sse_decode_pdf_annotation(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_annotationType = sse_decode_pdf_annotation_type(deserializer);
    var var_content = sse_decode_opt_String(deserializer);
    var var_pageNumber = sse_decode_i_64(deserializer);
    var var_boundingBox = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    return PdfAnnotation(
      annotationType: var_annotationType,
      content: var_content,
      pageNumber: var_pageNumber,
      boundingBox: var_boundingBox,
    );
  }

  @protected
  PdfAnnotationType sse_decode_pdf_annotation_type(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return PdfAnnotationType.values[inner];
  }

  @protected
  PdfConfig sse_decode_pdf_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_extractImages = sse_decode_bool(deserializer);
    var var_extractTables = sse_decode_bool(deserializer);
    var var_passwords = sse_decode_opt_list_String(deserializer);
    var var_extractMetadata = sse_decode_bool(deserializer);
    var var_hierarchy = sse_decode_opt_box_autoadd_hierarchy_config(
      deserializer,
    );
    var var_extractAnnotations = sse_decode_bool(deserializer);
    var var_topMarginFraction = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_bottomMarginFraction = sse_decode_opt_box_autoadd_f_64(
      deserializer,
    );
    var var_allowSingleColumnTables = sse_decode_bool(deserializer);
    var var_ocrInlineImages = sse_decode_bool(deserializer);
    return PdfConfig(
      extractImages: var_extractImages,
      extractTables: var_extractTables,
      passwords: var_passwords,
      extractMetadata: var_extractMetadata,
      hierarchy: var_hierarchy,
      extractAnnotations: var_extractAnnotations,
      topMarginFraction: var_topMarginFraction,
      bottomMarginFraction: var_bottomMarginFraction,
      allowSingleColumnTables: var_allowSingleColumnTables,
      ocrInlineImages: var_ocrInlineImages,
    );
  }

  @protected
  PdfMetadata sse_decode_pdf_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_pdfVersion = sse_decode_opt_String(deserializer);
    var var_producer = sse_decode_opt_String(deserializer);
    var var_isEncrypted = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_width = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_height = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_pageCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    return PdfMetadata(
      pdfVersion: var_pdfVersion,
      producer: var_producer,
      isEncrypted: var_isEncrypted,
      width: var_width,
      height: var_height,
      pageCount: var_pageCount,
    );
  }

  @protected
  PostProcessorConfig sse_decode_post_processor_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enabled = sse_decode_bool(deserializer);
    var var_enabledProcessors = sse_decode_opt_list_String(deserializer);
    var var_disabledProcessors = sse_decode_opt_list_String(deserializer);
    var var_enabledSet = sse_decode_opt_list_String(deserializer);
    var var_disabledSet = sse_decode_opt_list_String(deserializer);
    return PostProcessorConfig(
      enabled: var_enabled,
      enabledProcessors: var_enabledProcessors,
      disabledProcessors: var_disabledProcessors,
      enabledSet: var_enabledSet,
      disabledSet: var_disabledSet,
    );
  }

  @protected
  PptxAppProperties sse_decode_pptx_app_properties(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_application = sse_decode_opt_String(deserializer);
    var var_appVersion = sse_decode_opt_String(deserializer);
    var var_totalTime = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_company = sse_decode_opt_String(deserializer);
    var var_docSecurity = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_scaleCrop = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_linksUpToDate = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_sharedDoc = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_hyperlinksChanged = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_slides = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_notes = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_hiddenSlides = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_multimediaClips = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_presentationFormat = sse_decode_opt_String(deserializer);
    var var_slideTitles = sse_decode_list_String(deserializer);
    return PptxAppProperties(
      application: var_application,
      appVersion: var_appVersion,
      totalTime: var_totalTime,
      company: var_company,
      docSecurity: var_docSecurity,
      scaleCrop: var_scaleCrop,
      linksUpToDate: var_linksUpToDate,
      sharedDoc: var_sharedDoc,
      hyperlinksChanged: var_hyperlinksChanged,
      slides: var_slides,
      notes: var_notes,
      hiddenSlides: var_hiddenSlides,
      multimediaClips: var_multimediaClips,
      presentationFormat: var_presentationFormat,
      slideTitles: var_slideTitles,
    );
  }

  @protected
  PptxExtractionResult sse_decode_pptx_extraction_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_metadata = sse_decode_pptx_metadata(deserializer);
    var var_slideCount = sse_decode_i_64(deserializer);
    var var_imageCount = sse_decode_i_64(deserializer);
    var var_tableCount = sse_decode_i_64(deserializer);
    var var_images = sse_decode_list_extracted_image(deserializer);
    var var_pageStructure = sse_decode_opt_box_autoadd_page_structure(
      deserializer,
    );
    var var_pageContents = sse_decode_opt_list_page_content(deserializer);
    var var_document = sse_decode_opt_box_autoadd_document_structure(
      deserializer,
    );
    var var_hyperlinks = sse_decode_list_String(deserializer);
    var var_officeMetadata = sse_decode_Map_String_String_None(deserializer);
    var var_revisions = sse_decode_opt_list_document_revision(deserializer);
    return PptxExtractionResult(
      content: var_content,
      metadata: var_metadata,
      slideCount: var_slideCount,
      imageCount: var_imageCount,
      tableCount: var_tableCount,
      images: var_images,
      pageStructure: var_pageStructure,
      pageContents: var_pageContents,
      document: var_document,
      hyperlinks: var_hyperlinks,
      officeMetadata: var_officeMetadata,
      revisions: var_revisions,
    );
  }

  @protected
  PptxMetadata sse_decode_pptx_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_slideCount = sse_decode_i_64(deserializer);
    var var_slideNames = sse_decode_list_String(deserializer);
    var var_imageCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_tableCount = sse_decode_opt_box_autoadd_i_64(deserializer);
    return PptxMetadata(
      slideCount: var_slideCount,
      slideNames: var_slideNames,
      imageCount: var_imageCount,
      tableCount: var_tableCount,
    );
  }

  @protected
  ProcessingStage sse_decode_processing_stage(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return ProcessingStage.values[inner];
  }

  @protected
  ProcessingWarning sse_decode_processing_warning(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_source = sse_decode_String(deserializer);
    var var_message = sse_decode_String(deserializer);
    return ProcessingWarning(source: var_source, message: var_message);
  }

  @protected
  PstMetadata sse_decode_pst_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_messageCount = sse_decode_i_64(deserializer);
    return PstMetadata(messageCount: var_messageCount);
  }

  @protected
  RakeParams sse_decode_rake_params(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_minWordLength = sse_decode_i_64(deserializer);
    var var_maxWordsPerPhrase = sse_decode_i_64(deserializer);
    return RakeParams(
      minWordLength: var_minWordLength,
      maxWordsPerPhrase: var_maxWordsPerPhrase,
    );
  }

  @protected
  RecognizedTable sse_decode_recognized_table(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_detectionBbox = sse_decode_b_box(deserializer);
    var var_cells = sse_decode_list_list_String(deserializer);
    var var_markdown = sse_decode_String(deserializer);
    return RecognizedTable(
      detectionBbox: var_detectionBbox,
      cells: var_cells,
      markdown: var_markdown,
    );
  }

  @protected
  (String, PlatformInt64) sse_decode_record_string_i_64(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_field0 = sse_decode_String(deserializer);
    var var_field1 = sse_decode_i_64(deserializer);
    return (var_field0, var_field1);
  }

  @protected
  (String, Uint8List) sse_decode_record_string_list_prim_u_8_strict(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_field0 = sse_decode_String(deserializer);
    var var_field1 = sse_decode_list_prim_u_8_strict(deserializer);
    return (var_field0, var_field1);
  }

  @protected
  (String, List<String>) sse_decode_record_string_list_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_list_String(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
  ReductionLevel sse_decode_reduction_level(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return ReductionLevel.values[inner];
  }

  @protected
  RelationshipKind sse_decode_relationship_kind(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return RelationshipKind.values[inner];
  }

  @protected
  ResultFormat sse_decode_result_format(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return ResultFormat.values[inner];
  }

  @protected
  RevisionAnchor sse_decode_revision_anchor(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    var tag_ = sse_decode_i_32(deserializer);
    switch (tag_) {
      case 0:
        var var_index = sse_decode_i_64(deserializer);
        return RevisionAnchor_Paragraph(index: var_index);
      case 1:
        var var_row = sse_decode_i_64(deserializer);
        var var_col = sse_decode_i_64(deserializer);
        var var_tableIndex = sse_decode_i_64(deserializer);
        return RevisionAnchor_TableCell(
          row: var_row,
          col: var_col,
          tableIndex: var_tableIndex,
        );
      case 2:
        var var_index = sse_decode_i_64(deserializer);
        return RevisionAnchor_Page(index: var_index);
      case 3:
        var var_index = sse_decode_i_64(deserializer);
        return RevisionAnchor_Slide(index: var_index);
      case 4:
        var var_index = sse_decode_i_64(deserializer);
        var var_name = sse_decode_String(deserializer);
        return RevisionAnchor_Sheet(index: var_index, name: var_name);
      default:
        throw UnimplementedError('');
    }
  }

  @protected
  RevisionDelta sse_decode_revision_delta(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_list_diff_line(deserializer);
    var var_tableChanges = sse_decode_list_cell_change(deserializer);
    return RevisionDelta(content: var_content, tableChanges: var_tableChanges);
  }

  @protected
  RevisionKind sse_decode_revision_kind(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return RevisionKind.values[inner];
  }

  @protected
  SecurityLimits sse_decode_security_limits(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_maxArchiveSize = sse_decode_i_64(deserializer);
    var var_maxCompressionRatio = sse_decode_i_64(deserializer);
    var var_maxFilesInArchive = sse_decode_i_64(deserializer);
    var var_maxNestingDepth = sse_decode_i_64(deserializer);
    var var_maxEntityLength = sse_decode_i_64(deserializer);
    var var_maxContentSize = sse_decode_i_64(deserializer);
    var var_maxIterations = sse_decode_i_64(deserializer);
    var var_maxXmlDepth = sse_decode_i_64(deserializer);
    var var_maxTableCells = sse_decode_i_64(deserializer);
    return SecurityLimits(
      maxArchiveSize: var_maxArchiveSize,
      maxCompressionRatio: var_maxCompressionRatio,
      maxFilesInArchive: var_maxFilesInArchive,
      maxNestingDepth: var_maxNestingDepth,
      maxEntityLength: var_maxEntityLength,
      maxContentSize: var_maxContentSize,
      maxIterations: var_maxIterations,
      maxXmlDepth: var_maxXmlDepth,
      maxTableCells: var_maxTableCells,
    );
  }

  @protected
  ServerConfig sse_decode_server_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_host = sse_decode_String(deserializer);
    var var_port = sse_decode_i_64(deserializer);
    var var_corsOrigins = sse_decode_list_String(deserializer);
    var var_maxRequestBodyBytes = sse_decode_i_64(deserializer);
    var var_maxMultipartFieldBytes = sse_decode_i_64(deserializer);
    return ServerConfig(
      host: var_host,
      port: var_port,
      corsOrigins: var_corsOrigins,
      maxRequestBodyBytes: var_maxRequestBodyBytes,
      maxMultipartFieldBytes: var_maxMultipartFieldBytes,
    );
  }

  @protected
  StructuredData sse_decode_structured_data(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_dataType = sse_decode_structured_data_type(deserializer);
    var var_rawJson = sse_decode_String(deserializer);
    var var_schemaType = sse_decode_opt_String(deserializer);
    return StructuredData(
      dataType: var_dataType,
      rawJson: var_rawJson,
      schemaType: var_schemaType,
    );
  }

  @protected
  StructuredDataResult sse_decode_structured_data_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_format = sse_decode_String(deserializer);
    var var_metadata = sse_decode_Map_String_String_None(deserializer);
    var var_textFields = sse_decode_list_String(deserializer);
    return StructuredDataResult(
      content: var_content,
      format: var_format,
      metadata: var_metadata,
      textFields: var_textFields,
    );
  }

  @protected
  StructuredDataType sse_decode_structured_data_type(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return StructuredDataType.values[inner];
  }

  @protected
  StructuredExtractionConfig sse_decode_structured_extraction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_schema = sse_decode_String(deserializer);
    var var_schemaName = sse_decode_String(deserializer);
    var var_schemaDescription = sse_decode_opt_String(deserializer);
    var var_strict = sse_decode_bool(deserializer);
    var var_prompt = sse_decode_opt_String(deserializer);
    var var_llm = sse_decode_llm_config(deserializer);
    return StructuredExtractionConfig(
      schema: var_schema,
      schemaName: var_schemaName,
      schemaDescription: var_schemaDescription,
      strict: var_strict,
      prompt: var_prompt,
      llm: var_llm,
    );
  }

  @protected
  SupportedFormat sse_decode_supported_format(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_extension_ = sse_decode_String(deserializer);
    var var_mimeType = sse_decode_String(deserializer);
    return SupportedFormat(extension_: var_extension_, mimeType: var_mimeType);
  }

  @protected
  Table sse_decode_table(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_cells = sse_decode_list_list_String(deserializer);
    var var_markdown = sse_decode_String(deserializer);
    var var_pageNumber = sse_decode_i_64(deserializer);
    var var_boundingBox = sse_decode_opt_box_autoadd_bounding_box(deserializer);
    return Table(
      cells: var_cells,
      markdown: var_markdown,
      pageNumber: var_pageNumber,
      boundingBox: var_boundingBox,
    );
  }

  @protected
  TableCell sse_decode_table_cell(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_rowSpan = sse_decode_i_64(deserializer);
    var var_colSpan = sse_decode_i_64(deserializer);
    var var_isHeader = sse_decode_bool(deserializer);
    return TableCell(
      content: var_content,
      rowSpan: var_rowSpan,
      colSpan: var_colSpan,
      isHeader: var_isHeader,
    );
  }

  @protected
  TableDiff sse_decode_table_diff(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_fromIndex = sse_decode_i_64(deserializer);
    var var_toIndex = sse_decode_i_64(deserializer);
    var var_cellChanges = sse_decode_list_cell_change(deserializer);
    return TableDiff(
      fromIndex: var_fromIndex,
      toIndex: var_toIndex,
      cellChanges: var_cellChanges,
    );
  }

  @protected
  TableGrid sse_decode_table_grid(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_rows = sse_decode_i_64(deserializer);
    var var_cols = sse_decode_i_64(deserializer);
    var var_cells = sse_decode_list_grid_cell(deserializer);
    return TableGrid(rows: var_rows, cols: var_cols, cells: var_cells);
  }

  @protected
  TableModel sse_decode_table_model(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return TableModel.values[inner];
  }

  @protected
  TesseractConfig sse_decode_tesseract_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_language = sse_decode_String(deserializer);
    var var_psm = sse_decode_i_64(deserializer);
    var var_outputFormat = sse_decode_String(deserializer);
    var var_oem = sse_decode_i_64(deserializer);
    var var_minConfidence = sse_decode_f_64(deserializer);
    var var_preprocessing =
        sse_decode_opt_box_autoadd_image_preprocessing_config(deserializer);
    var var_enableTableDetection = sse_decode_bool(deserializer);
    var var_tableMinConfidence = sse_decode_f_64(deserializer);
    var var_tableColumnThreshold = sse_decode_i_64(deserializer);
    var var_tableRowThresholdRatio = sse_decode_f_64(deserializer);
    var var_useCache = sse_decode_bool(deserializer);
    var var_classifyUsePreAdaptedTemplates = sse_decode_bool(deserializer);
    var var_languageModelNgramOn = sse_decode_bool(deserializer);
    var var_tesseditDontBlkrejGoodWds = sse_decode_bool(deserializer);
    var var_tesseditDontRowrejGoodWds = sse_decode_bool(deserializer);
    var var_tesseditEnableDictCorrection = sse_decode_bool(deserializer);
    var var_tesseditCharWhitelist = sse_decode_String(deserializer);
    var var_tesseditCharBlacklist = sse_decode_String(deserializer);
    var var_tesseditUsePrimaryParamsModel = sse_decode_bool(deserializer);
    var var_textordSpaceSizeIsVariable = sse_decode_bool(deserializer);
    var var_thresholdingMethod = sse_decode_bool(deserializer);
    return TesseractConfig(
      language: var_language,
      psm: var_psm,
      outputFormat: var_outputFormat,
      oem: var_oem,
      minConfidence: var_minConfidence,
      preprocessing: var_preprocessing,
      enableTableDetection: var_enableTableDetection,
      tableMinConfidence: var_tableMinConfidence,
      tableColumnThreshold: var_tableColumnThreshold,
      tableRowThresholdRatio: var_tableRowThresholdRatio,
      useCache: var_useCache,
      classifyUsePreAdaptedTemplates: var_classifyUsePreAdaptedTemplates,
      languageModelNgramOn: var_languageModelNgramOn,
      tesseditDontBlkrejGoodWds: var_tesseditDontBlkrejGoodWds,
      tesseditDontRowrejGoodWds: var_tesseditDontRowrejGoodWds,
      tesseditEnableDictCorrection: var_tesseditEnableDictCorrection,
      tesseditCharWhitelist: var_tesseditCharWhitelist,
      tesseditCharBlacklist: var_tesseditCharBlacklist,
      tesseditUsePrimaryParamsModel: var_tesseditUsePrimaryParamsModel,
      textordSpaceSizeIsVariable: var_textordSpaceSizeIsVariable,
      thresholdingMethod: var_thresholdingMethod,
    );
  }

  @protected
  TextAnnotation sse_decode_text_annotation(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_start = sse_decode_i_64(deserializer);
    var var_end = sse_decode_i_64(deserializer);
    var var_kind = sse_decode_annotation_kind(deserializer);
    return TextAnnotation(start: var_start, end: var_end, kind: var_kind);
  }

  @protected
  TextDirection sse_decode_text_direction(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return TextDirection.values[inner];
  }

  @protected
  TextExtractionResult sse_decode_text_extraction_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_lineCount = sse_decode_i_64(deserializer);
    var var_wordCount = sse_decode_i_64(deserializer);
    var var_characterCount = sse_decode_i_64(deserializer);
    var var_headers = sse_decode_opt_list_String(deserializer);
    var var_links = sse_decode_opt_list_list_String(deserializer);
    var var_codeBlocks = sse_decode_opt_list_list_String(deserializer);
    return TextExtractionResult(
      content: var_content,
      lineCount: var_lineCount,
      wordCount: var_wordCount,
      characterCount: var_characterCount,
      headers: var_headers,
      links: var_links,
      codeBlocks: var_codeBlocks,
    );
  }

  @protected
  TextMetadata sse_decode_text_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_lineCount = sse_decode_i_64(deserializer);
    var var_wordCount = sse_decode_i_64(deserializer);
    var var_characterCount = sse_decode_i_64(deserializer);
    var var_headers = sse_decode_opt_list_String(deserializer);
    var var_links = sse_decode_opt_list_list_String(deserializer);
    var var_codeBlocks = sse_decode_opt_list_list_String(deserializer);
    return TextMetadata(
      lineCount: var_lineCount,
      wordCount: var_wordCount,
      characterCount: var_characterCount,
      headers: var_headers,
      links: var_links,
      codeBlocks: var_codeBlocks,
    );
  }

  @protected
  TokenReductionConfig sse_decode_token_reduction_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_level = sse_decode_reduction_level(deserializer);
    var var_languageHint = sse_decode_opt_String(deserializer);
    var var_preserveMarkdown = sse_decode_bool(deserializer);
    var var_preserveCode = sse_decode_bool(deserializer);
    var var_semanticThreshold = sse_decode_f_64(deserializer);
    var var_enableParallel = sse_decode_bool(deserializer);
    var var_useSimd = sse_decode_bool(deserializer);
    var var_customStopwords = sse_decode_opt_Map_String_list_String_None(
      deserializer,
    );
    var var_preservePatterns = sse_decode_list_String(deserializer);
    var var_targetReduction = sse_decode_opt_box_autoadd_f_64(deserializer);
    var var_enableSemanticClustering = sse_decode_bool(deserializer);
    return TokenReductionConfig(
      level: var_level,
      languageHint: var_languageHint,
      preserveMarkdown: var_preserveMarkdown,
      preserveCode: var_preserveCode,
      semanticThreshold: var_semanticThreshold,
      enableParallel: var_enableParallel,
      useSimd: var_useSimd,
      customStopwords: var_customStopwords,
      preservePatterns: var_preservePatterns,
      targetReduction: var_targetReduction,
      enableSemanticClustering: var_enableSemanticClustering,
    );
  }

  @protected
  TokenReductionOptions sse_decode_token_reduction_options(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_mode = sse_decode_String(deserializer);
    var var_preserveImportantWords = sse_decode_bool(deserializer);
    return TokenReductionOptions(
      mode: var_mode,
      preserveImportantWords: var_preserveImportantWords,
    );
  }

  @protected
  TreeSitterConfig sse_decode_tree_sitter_config(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_enabled = sse_decode_bool(deserializer);
    var var_cacheDir = sse_decode_opt_String(deserializer);
    var var_languages = sse_decode_opt_list_String(deserializer);
    var var_groups = sse_decode_opt_list_String(deserializer);
    var var_process = sse_decode_tree_sitter_process_config(deserializer);
    return TreeSitterConfig(
      enabled: var_enabled,
      cacheDir: var_cacheDir,
      languages: var_languages,
      groups: var_groups,
      process: var_process,
    );
  }

  @protected
  TreeSitterProcessConfig sse_decode_tree_sitter_process_config(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_structure = sse_decode_bool(deserializer);
    var var_imports = sse_decode_bool(deserializer);
    var var_exports = sse_decode_bool(deserializer);
    var var_comments = sse_decode_bool(deserializer);
    var var_docstrings = sse_decode_bool(deserializer);
    var var_symbols = sse_decode_bool(deserializer);
    var var_diagnostics = sse_decode_bool(deserializer);
    var var_chunkMaxSize = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_contentMode = sse_decode_code_content_mode(deserializer);
    return TreeSitterProcessConfig(
      structure: var_structure,
      imports: var_imports,
      exports: var_exports,
      comments: var_comments,
      docstrings: var_docstrings,
      symbols: var_symbols,
      diagnostics: var_diagnostics,
      chunkMaxSize: var_chunkMaxSize,
      contentMode: var_contentMode,
    );
  }

  @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
  UriKind sse_decode_uri_kind(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var inner = sse_decode_i_32(deserializer);
    return UriKind.values[inner];
  }

  @protected
  BigInt sse_decode_usize(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    return deserializer.buffer.getBigUint64();
  }

  @protected
  XlsxAppProperties sse_decode_xlsx_app_properties(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_application = sse_decode_opt_String(deserializer);
    var var_appVersion = sse_decode_opt_String(deserializer);
    var var_docSecurity = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_scaleCrop = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_linksUpToDate = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_sharedDoc = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_hyperlinksChanged = sse_decode_opt_box_autoadd_bool(deserializer);
    var var_company = sse_decode_opt_String(deserializer);
    var var_worksheetNames = sse_decode_list_String(deserializer);
    return XlsxAppProperties(
      application: var_application,
      appVersion: var_appVersion,
      docSecurity: var_docSecurity,
      scaleCrop: var_scaleCrop,
      linksUpToDate: var_linksUpToDate,
      sharedDoc: var_sharedDoc,
      hyperlinksChanged: var_hyperlinksChanged,
      company: var_company,
      worksheetNames: var_worksheetNames,
    );
  }

  @protected
  XmlExtractionResult sse_decode_xml_extraction_result(
    SseDeserializer deserializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_content = sse_decode_String(deserializer);
    var var_elementCount = sse_decode_i_64(deserializer);
    var var_uniqueElements = sse_decode_list_String(deserializer);
    return XmlExtractionResult(
      content: var_content,
      elementCount: var_elementCount,
      uniqueElements: var_uniqueElements,
    );
  }

  @protected
  XmlMetadata sse_decode_xml_metadata(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_elementCount = sse_decode_i_64(deserializer);
    var var_uniqueElements = sse_decode_list_String(deserializer);
    return XmlMetadata(
      elementCount: var_elementCount,
      uniqueElements: var_uniqueElements,
    );
  }

  @protected
  YakeParams sse_decode_yake_params(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_windowSize = sse_decode_i_64(deserializer);
    return YakeParams(windowSize: var_windowSize);
  }

  @protected
  YearRange sse_decode_year_range(SseDeserializer deserializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    var var_min = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_max = sse_decode_opt_box_autoadd_i_64(deserializer);
    var var_years = sse_decode_list_prim_i_64_strict(deserializer);
    return YearRange(min: var_min, max: var_max, years: var_years);
  }

  @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_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync(
    ArcDocumentExtractor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcDocumentExtractorImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync(
    ArcEmbeddingBackend self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcEmbeddingBackendImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync(
    ArcOcrBackend self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcOcrBackendImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync(
    ArcPostProcessor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcPostProcessorImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync(
    ArcRenderer self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcRendererImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync(
    ArcValidator self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcValidatorImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
    DocumentExtractorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as DocumentExtractorDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
    EmbeddingBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as EmbeddingBackendDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
    OcrBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as OcrBackendDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
    PostProcessorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as PostProcessorDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
    RendererDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as RendererDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    ValidatorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ValidatorDartImplImpl).frbInternalSseEncode(move: true),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
    DocumentExtractorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as DocumentExtractorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
    EmbeddingBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as EmbeddingBackendDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
    OcrBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as OcrBackendDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
    PostProcessorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as PostProcessorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
    RendererDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as RendererDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_RefMut_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    ValidatorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ValidatorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
    DocumentExtractorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as DocumentExtractorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
    EmbeddingBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as EmbeddingBackendDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
    OcrBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as OcrBackendDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
    PostProcessorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as PostProcessorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
    RendererDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as RendererDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void
  sse_encode_Auto_Ref_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    ValidatorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ValidatorDartImplImpl).frbInternalSseEncode(move: false),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs_String_Output_bool_AnyhowException(
    FutureOr<bool> Function(String) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_String_Output_bool_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs_String_String_Output_bool_AnyhowException(
    FutureOr<bool> Function(String, String) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_String_String_Output_bool_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_String_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    FutureOr<InternalDocumentBridge> Function(String, String, ExtractionConfig)
    self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_String_String_extraction_config_Output_internal_document_bridge_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
    FutureOr<ExtractionResult> Function(String, OcrConfig) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_String_ocr_config_Output_extraction_result_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs__Output_bool_AnyhowException(
    FutureOr<bool> Function() self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs__Output_bool_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs__Output_i_64_AnyhowException(
    FutureOr<PlatformInt64> Function() self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs__Output_i_64_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs__Output_list_String_AnyhowException(
    FutureOr<List<String>> Function() self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs__Output_list_String_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs__Output_ocr_backend_type_AnyhowException(
    FutureOr<OcrBackendType> Function() self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs__Output_ocr_backend_type_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs__Output_processing_stage_AnyhowException(
    FutureOr<ProcessingStage> Function() self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs__Output_processing_stage_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void sse_encode_DartFn_Inputs_extraction_result_Output_i_64_AnyhowException(
    FutureOr<PlatformInt64> Function(ExtractionResult) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_extraction_result_Output_i_64_AnyhowException(self),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
    FutureOr<bool> Function(ExtractionResult, ExtractionConfig) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_extraction_result_extraction_config_Output_bool_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
    FutureOr<void> Function(ExtractionResult, ExtractionConfig) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_extraction_result_extraction_config_Output_unit_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_internal_document_bridge_Output_String_AnyhowException(
    FutureOr<String> Function(InternalDocumentBridge) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_internal_document_bridge_Output_String_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_list_String_Output_list_list_prim_f_64_strict_AnyhowException(
    FutureOr<List<Float64List>> Function(List<String>) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_list_String_Output_list_list_prim_f_64_strict_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_list_prim_u_8_strict_String_extraction_config_Output_internal_document_bridge_AnyhowException(
    FutureOr<InternalDocumentBridge> Function(
      Uint8List,
      String,
      ExtractionConfig,
    )
    self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_list_prim_u_8_strict_String_extraction_config_Output_internal_document_bridge_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void
  sse_encode_DartFn_Inputs_list_prim_u_8_strict_ocr_config_Output_extraction_result_AnyhowException(
    FutureOr<ExtractionResult> Function(Uint8List, OcrConfig) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_DartOpaque(
      encode_DartFn_Inputs_list_prim_u_8_strict_ocr_config_Output_extraction_result_AnyhowException(
        self,
      ),
      serializer,
    );
  }

  @protected
  void sse_encode_DartOpaque(Object self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_isize(
      PlatformPointerUtil.ptrToPlatformInt64(
        encodeDartOpaque(
          self,
          portManager.dartHandlerPort,
          generalizedFrbRustBinding,
        ),
      ),
      serializer,
    );
  }

  @protected
  void sse_encode_Map_String_String_None(
    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_Map_String_i_64_None(
    Map<String, PlatformInt64> self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_record_string_i_64(
      self.entries.map((e) => (e.key, e.value)).toList(),
      serializer,
    );
  }

  @protected
  void sse_encode_Map_String_list_String_None(
    Map<String, List<String>> self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_record_string_list_string(
      self.entries.map((e) => (e.key, e.value)).toList(),
      serializer,
    );
  }

  @protected
  void sse_encode_Map_String_list_prim_u_8_strict_None(
    Map<String, Uint8List> self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_record_string_list_prim_u_8_strict(
      self.entries.map((e) => (e.key, e.value)).toList(),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynDocumentExtractorSendSync(
    ArcDocumentExtractor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcDocumentExtractorImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynEmbeddingBackendSendSync(
    ArcEmbeddingBackend self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcEmbeddingBackendImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynOcrBackendSendSync(
    ArcOcrBackend self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcOcrBackendImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynPostProcessorSendSync(
    ArcPostProcessor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcPostProcessorImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynRendererSendSync(
    ArcRenderer self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcRendererImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerArcdynValidatorSendSync(
    ArcValidator self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ArcValidatorImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerDocumentExtractorDartImpl(
    DocumentExtractorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as DocumentExtractorDartImplImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerEmbeddingBackendDartImpl(
    EmbeddingBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as EmbeddingBackendDartImplImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerOcrBackendDartImpl(
    OcrBackendDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as OcrBackendDartImplImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerPostProcessorDartImpl(
    PostProcessorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as PostProcessorDartImplImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerRendererDartImpl(
    RendererDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as RendererDartImplImpl).frbInternalSseEncode(move: null),
      serializer,
    );
  }

  @protected
  void
  sse_encode_RustOpaque_flutter_rust_bridgefor_generatedRustAutoOpaqueInnerValidatorDartImpl(
    ValidatorDartImpl self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_usize(
      (self as ValidatorDartImplImpl).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_acceleration_config(
    AccelerationConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_execution_provider_type(self.provider, serializer);
    sse_encode_i_64(self.deviceId, serializer);
  }

  @protected
  void sse_encode_annotation_kind(
    AnnotationKind self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case AnnotationKind_Bold():
        sse_encode_i_32(0, serializer);
      case AnnotationKind_Italic():
        sse_encode_i_32(1, serializer);
      case AnnotationKind_Underline():
        sse_encode_i_32(2, serializer);
      case AnnotationKind_Strikethrough():
        sse_encode_i_32(3, serializer);
      case AnnotationKind_Code():
        sse_encode_i_32(4, serializer);
      case AnnotationKind_Subscript():
        sse_encode_i_32(5, serializer);
      case AnnotationKind_Superscript():
        sse_encode_i_32(6, serializer);
      case AnnotationKind_Link(url: final url, title: final title):
        sse_encode_i_32(7, serializer);
        sse_encode_String(url, serializer);
        sse_encode_String(title, serializer);
      case AnnotationKind_Highlight():
        sse_encode_i_32(8, serializer);
      case AnnotationKind_Color(value: final value):
        sse_encode_i_32(9, serializer);
        sse_encode_String(value, serializer);
      case AnnotationKind_FontSize(value: final value):
        sse_encode_i_32(10, serializer);
        sse_encode_String(value, serializer);
      case AnnotationKind_Custom(name: final name, value: final value):
        sse_encode_i_32(11, serializer);
        sse_encode_String(name, serializer);
        sse_encode_String(value, serializer);
    }
  }

  @protected
  void sse_encode_archive_entry(ArchiveEntry self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.path, serializer);
    sse_encode_String(self.mimeType, serializer);
    sse_encode_extraction_result(self.result, serializer);
  }

  @protected
  void sse_encode_archive_metadata(
    ArchiveMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.format, serializer);
    sse_encode_i_64(self.fileCount, serializer);
    sse_encode_list_String(self.fileList, serializer);
    sse_encode_i_64(self.totalSize, serializer);
    sse_encode_opt_box_autoadd_i_64(self.compressedSize, serializer);
  }

  @protected
  void sse_encode_b_box(BBox self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_f_64(self.x1, serializer);
    sse_encode_f_64(self.y1, serializer);
    sse_encode_f_64(self.x2, serializer);
    sse_encode_f_64(self.y2, serializer);
  }

  @protected
  void sse_encode_batch_bytes_item(
    BatchBytesItem self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_prim_u_8_strict(self.content, serializer);
    sse_encode_String(self.mimeType, serializer);
    sse_encode_opt_box_autoadd_file_extraction_config(self.config, serializer);
  }

  @protected
  void sse_encode_batch_file_item(
    BatchFileItem self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.path, serializer);
    sse_encode_opt_box_autoadd_file_extraction_config(self.config, serializer);
  }

  @protected
  void sse_encode_bibtex_metadata(
    BibtexMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.entryCount, serializer);
    sse_encode_list_String(self.citationKeys, serializer);
    sse_encode_list_String(self.authors, serializer);
    sse_encode_opt_box_autoadd_year_range(self.yearRange, serializer);
    sse_encode_opt_Map_String_i_64_None(self.entryTypes, serializer);
  }

  @protected
  void sse_encode_block_type(BlockType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, 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_bounding_box(BoundingBox self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_f_64(self.x0, serializer);
    sse_encode_f_64(self.y0, serializer);
    sse_encode_f_64(self.x1, serializer);
    sse_encode_f_64(self.y1, serializer);
  }

  @protected
  void sse_encode_box_autoadd_acceleration_config(
    AccelerationConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_acceleration_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_archive_metadata(
    ArchiveMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_archive_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_bibtex_metadata(
    BibtexMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bibtex_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_bool(bool self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_bounding_box(
    BoundingBox self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bounding_box(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_chunking_config(
    ChunkingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_chunking_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_citation_metadata(
    CitationMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_citation_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_content_filter_config(
    ContentFilterConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_content_filter_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_core_properties(
    CoreProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_core_properties(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_csv_metadata(
    CsvMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_csv_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_dbf_metadata(
    DbfMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_dbf_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_diff_options(
    DiffOptions self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_diff_options(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_djot_content(
    DjotContent self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_djot_content(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_document_structure(
    DocumentStructure self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_document_structure(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_docx_app_properties(
    DocxAppProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_docx_app_properties(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_docx_metadata(
    DocxMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_docx_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_email_config(
    EmailConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_email_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_email_metadata(
    EmailMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_email_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_embedding_config(
    EmbeddingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_embedding_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_embedding_preset(
    EmbeddingPreset self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_embedding_preset(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_epub_metadata(
    EpubMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_epub_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_error_metadata(
    ErrorMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_error_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_excel_metadata(
    ExcelMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_excel_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_extraction_config(
    ExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_extraction_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_extraction_method(
    ExtractionMethod self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_extraction_method(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_extraction_result(
    ExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_extraction_result(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_f_64(double self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_f_64(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_fiction_book_metadata(
    FictionBookMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_fiction_book_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_file_extraction_config(
    FileExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_file_extraction_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_format_metadata(
    FormatMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_format_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_heading_context(
    HeadingContext self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_heading_context(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_hierarchy_config(
    HierarchyConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_hierarchy_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_html_metadata(
    HtmlMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_html_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_html_output_config(
    HtmlOutputConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_html_output_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_image_extraction_config(
    ImageExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_image_extraction_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_image_kind(
    ImageKind self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_image_kind(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_image_metadata(
    ImageMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_image_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_image_preprocessing_config(
    ImagePreprocessingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_image_preprocessing_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_image_preprocessing_metadata(
    ImagePreprocessingMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_image_preprocessing_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_jats_metadata(
    JatsMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_jats_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_keyword_config(
    KeywordConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_keyword_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_language_detection_config(
    LanguageDetectionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_language_detection_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_layout_detection_config(
    LayoutDetectionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_layout_detection_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_llm_config(
    LlmConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_llm_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_config(
    OcrConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_element_config(
    OcrElementConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_element_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_metadata(
    OcrMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_pipeline_config(
    OcrPipelineConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_pipeline_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_quality_thresholds(
    OcrQualityThresholds self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_quality_thresholds(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_rotation(
    OcrRotation self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_rotation(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_ocr_table_bounding_box(
    OcrTableBoundingBox self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_ocr_table_bounding_box(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_output_format(
    OutputFormat self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_output_format(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_page_config(
    PageConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_page_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_page_hierarchy(
    PageHierarchy self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_page_hierarchy(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_page_structure(
    PageStructure self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_page_structure(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_pdf_config(
    PdfConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_pdf_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_pdf_metadata(
    PdfMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_pdf_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_post_processor_config(
    PostProcessorConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_post_processor_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_pptx_metadata(
    PptxMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_pptx_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_pst_metadata(
    PstMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_pst_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_rake_params(
    RakeParams self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_rake_params(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_result_format(
    ResultFormat self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_result_format(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_revision_anchor(
    RevisionAnchor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_revision_anchor(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_security_limits(
    SecurityLimits self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_security_limits(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_structured_extraction_config(
    StructuredExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_structured_extraction_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_table_grid(
    TableGrid self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_table_grid(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_tesseract_config(
    TesseractConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_tesseract_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_text_direction(
    TextDirection self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_text_direction(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_text_metadata(
    TextMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_text_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_token_reduction_options(
    TokenReductionOptions self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_token_reduction_options(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_tree_sitter_config(
    TreeSitterConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_tree_sitter_config(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_xml_metadata(
    XmlMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_xml_metadata(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_yake_params(
    YakeParams self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_yake_params(self, serializer);
  }

  @protected
  void sse_encode_box_autoadd_year_range(
    YearRange self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_year_range(self, serializer);
  }

  @protected
  void sse_encode_cache_stats(CacheStats self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.totalFiles, serializer);
    sse_encode_f_64(self.totalSizeMb, serializer);
    sse_encode_f_64(self.availableSpaceMb, serializer);
    sse_encode_f_64(self.oldestFileAgeDays, serializer);
    sse_encode_f_64(self.newestFileAgeDays, serializer);
  }

  @protected
  void sse_encode_cell_change(CellChange self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.row, serializer);
    sse_encode_i_64(self.col, serializer);
    sse_encode_String(self.from, serializer);
    sse_encode_String(self.to, serializer);
  }

  @protected
  void sse_encode_chunk(Chunk self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_chunk_type(self.chunkType, serializer);
    sse_encode_opt_list_prim_f_64_strict(self.embedding, serializer);
    sse_encode_chunk_metadata(self.metadata, serializer);
  }

  @protected
  void sse_encode_chunk_metadata(ChunkMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.byteStart, serializer);
    sse_encode_i_64(self.byteEnd, serializer);
    sse_encode_opt_box_autoadd_i_64(self.tokenCount, serializer);
    sse_encode_i_64(self.chunkIndex, serializer);
    sse_encode_i_64(self.totalChunks, serializer);
    sse_encode_opt_box_autoadd_i_64(self.firstPage, serializer);
    sse_encode_opt_box_autoadd_i_64(self.lastPage, serializer);
    sse_encode_opt_box_autoadd_heading_context(self.headingContext, serializer);
    sse_encode_list_prim_i_64_strict(self.imageIndices, serializer);
  }

  @protected
  void sse_encode_chunk_sizing(ChunkSizing self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case ChunkSizing_Characters():
        sse_encode_i_32(0, serializer);
      case ChunkSizing_Tokenizer(model: final model, cacheDir: final cacheDir):
        sse_encode_i_32(1, serializer);
        sse_encode_String(model, serializer);
        sse_encode_String(cacheDir, serializer);
    }
  }

  @protected
  void sse_encode_chunk_type(ChunkType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_chunker_type(ChunkerType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_chunking_config(
    ChunkingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.maxCharacters, serializer);
    sse_encode_i_64(self.overlap, serializer);
    sse_encode_bool(self.trim, serializer);
    sse_encode_chunker_type(self.chunkerType, serializer);
    sse_encode_opt_box_autoadd_embedding_config(self.embedding, serializer);
    sse_encode_opt_String(self.preset, serializer);
    sse_encode_chunk_sizing(self.sizing, serializer);
    sse_encode_bool(self.prependHeadingContext, serializer);
    sse_encode_opt_box_autoadd_f_64(self.topicThreshold, serializer);
  }

  @protected
  void sse_encode_citation_metadata(
    CitationMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.citationCount, serializer);
    sse_encode_opt_String(self.format, serializer);
    sse_encode_list_String(self.authors, serializer);
    sse_encode_opt_box_autoadd_year_range(self.yearRange, serializer);
    sse_encode_list_String(self.dois, serializer);
    sse_encode_list_String(self.keywords, serializer);
  }

  @protected
  void sse_encode_code_content_mode(
    CodeContentMode self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_content_filter_config(
    ContentFilterConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.includeHeaders, serializer);
    sse_encode_bool(self.includeFooters, serializer);
    sse_encode_bool(self.stripRepeatingText, serializer);
    sse_encode_bool(self.includeWatermarks, serializer);
  }

  @protected
  void sse_encode_content_layer(ContentLayer self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_contributor_role(
    ContributorRole self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_opt_String(self.role, serializer);
  }

  @protected
  void sse_encode_core_properties(
    CoreProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_String(self.subject, serializer);
    sse_encode_opt_String(self.creator, serializer);
    sse_encode_opt_String(self.keywords, serializer);
    sse_encode_opt_String(self.description, serializer);
    sse_encode_opt_String(self.lastModifiedBy, serializer);
    sse_encode_opt_String(self.revision, serializer);
    sse_encode_opt_String(self.created, serializer);
    sse_encode_opt_String(self.modified, serializer);
    sse_encode_opt_String(self.category, serializer);
    sse_encode_opt_String(self.contentStatus, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_String(self.identifier, serializer);
    sse_encode_opt_String(self.version, serializer);
    sse_encode_opt_String(self.lastPrinted, serializer);
  }

  @protected
  void sse_encode_csv_metadata(CsvMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.rowCount, serializer);
    sse_encode_i_64(self.columnCount, serializer);
    sse_encode_opt_String(self.delimiter, serializer);
    sse_encode_bool(self.hasHeader, serializer);
    sse_encode_opt_list_String(self.columnTypes, serializer);
  }

  @protected
  void sse_encode_dbf_field_info(DbfFieldInfo self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_String(self.fieldType, serializer);
  }

  @protected
  void sse_encode_dbf_metadata(DbfMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.recordCount, serializer);
    sse_encode_i_64(self.fieldCount, serializer);
    sse_encode_list_dbf_field_info(self.fields, serializer);
  }

  @protected
  void sse_encode_detect_response(
    DetectResponse self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.mimeType, serializer);
    sse_encode_opt_String(self.filename, serializer);
  }

  @protected
  void sse_encode_detection_result(
    DetectionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.pageWidth, serializer);
    sse_encode_i_64(self.pageHeight, serializer);
    sse_encode_list_layout_detection(self.detections, serializer);
  }

  @protected
  void sse_encode_diff_hunk(DiffHunk self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.fromLine, serializer);
    sse_encode_i_64(self.fromCount, serializer);
    sse_encode_i_64(self.toLine, serializer);
    sse_encode_i_64(self.toCount, serializer);
    sse_encode_list_diff_line(self.lines, serializer);
  }

  @protected
  void sse_encode_diff_line(DiffLine self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case DiffLine_Context(field0: final field0):
        sse_encode_i_32(0, serializer);
        sse_encode_String(field0, serializer);
      case DiffLine_Added(field0: final field0):
        sse_encode_i_32(1, serializer);
        sse_encode_String(field0, serializer);
      case DiffLine_Removed(field0: final field0):
        sse_encode_i_32(2, serializer);
        sse_encode_String(field0, serializer);
    }
  }

  @protected
  void sse_encode_diff_options(DiffOptions self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.includeMetadata, serializer);
    sse_encode_bool(self.includeEmbedded, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxContentChars, serializer);
  }

  @protected
  void sse_encode_djot_content(DjotContent self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.plainText, serializer);
    sse_encode_list_formatted_block(self.blocks, serializer);
    sse_encode_metadata(self.metadata, serializer);
    sse_encode_list_table(self.tables, serializer);
    sse_encode_list_djot_image(self.images, serializer);
    sse_encode_list_djot_link(self.links, serializer);
    sse_encode_list_footnote(self.footnotes, serializer);
    sse_encode_list_String(self.attributes, serializer);
  }

  @protected
  void sse_encode_djot_image(DjotImage self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.src, serializer);
    sse_encode_String(self.alt, serializer);
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_String(self.attributes, serializer);
  }

  @protected
  void sse_encode_djot_link(DjotLink self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.url, serializer);
    sse_encode_String(self.text, serializer);
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_String(self.attributes, serializer);
  }

  @protected
  void sse_encode_document_node(DocumentNode self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.id, serializer);
    sse_encode_node_content(self.content, serializer);
    sse_encode_opt_box_autoadd_i_64(self.parent, serializer);
    sse_encode_list_prim_i_64_strict(self.children, serializer);
    sse_encode_content_layer(self.contentLayer, serializer);
    sse_encode_opt_box_autoadd_i_64(self.page, serializer);
    sse_encode_opt_box_autoadd_i_64(self.pageEnd, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.bbox, serializer);
    sse_encode_list_text_annotation(self.annotations, serializer);
    sse_encode_opt_Map_String_String_None(self.attributes, serializer);
  }

  @protected
  void sse_encode_document_relationship(
    DocumentRelationship self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.source, serializer);
    sse_encode_i_64(self.target, serializer);
    sse_encode_relationship_kind(self.kind, serializer);
  }

  @protected
  void sse_encode_document_revision(
    DocumentRevision self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.revisionId, serializer);
    sse_encode_opt_String(self.author, serializer);
    sse_encode_opt_String(self.timestamp, serializer);
    sse_encode_revision_kind(self.kind, serializer);
    sse_encode_opt_box_autoadd_revision_anchor(self.anchor, serializer);
    sse_encode_revision_delta(self.delta, serializer);
  }

  @protected
  void sse_encode_document_structure(
    DocumentStructure self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_document_node(self.nodes, serializer);
    sse_encode_opt_String(self.sourceFormat, serializer);
    sse_encode_list_document_relationship(self.relationships, serializer);
    sse_encode_list_String(self.nodeTypes, serializer);
  }

  @protected
  void sse_encode_docx_app_properties(
    DocxAppProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.application, serializer);
    sse_encode_opt_String(self.appVersion, serializer);
    sse_encode_opt_String(self.template, serializer);
    sse_encode_opt_box_autoadd_i_64(self.totalTime, serializer);
    sse_encode_opt_box_autoadd_i_64(self.pages, serializer);
    sse_encode_opt_box_autoadd_i_64(self.words, serializer);
    sse_encode_opt_box_autoadd_i_64(self.characters, serializer);
    sse_encode_opt_box_autoadd_i_64(self.charactersWithSpaces, serializer);
    sse_encode_opt_box_autoadd_i_64(self.lines, serializer);
    sse_encode_opt_box_autoadd_i_64(self.paragraphs, serializer);
    sse_encode_opt_String(self.company, serializer);
    sse_encode_opt_box_autoadd_i_64(self.docSecurity, serializer);
    sse_encode_opt_box_autoadd_bool(self.scaleCrop, serializer);
    sse_encode_opt_box_autoadd_bool(self.linksUpToDate, serializer);
    sse_encode_opt_box_autoadd_bool(self.sharedDoc, serializer);
    sse_encode_opt_box_autoadd_bool(self.hyperlinksChanged, serializer);
  }

  @protected
  void sse_encode_docx_metadata(DocxMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_core_properties(self.coreProperties, serializer);
    sse_encode_opt_box_autoadd_docx_app_properties(
      self.appProperties,
      serializer,
    );
    sse_encode_opt_Map_String_String_None(self.customProperties, serializer);
  }

  @protected
  void sse_encode_element(Element self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.elementId, serializer);
    sse_encode_element_type(self.elementType, serializer);
    sse_encode_String(self.text, serializer);
    sse_encode_element_metadata(self.metadata, serializer);
  }

  @protected
  void sse_encode_element_metadata(
    ElementMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_i_64(self.pageNumber, serializer);
    sse_encode_opt_String(self.filename, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.coordinates, serializer);
    sse_encode_opt_box_autoadd_i_64(self.elementIndex, serializer);
    sse_encode_Map_String_String_None(self.additional, serializer);
  }

  @protected
  void sse_encode_element_type(ElementType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_email_attachment(
    EmailAttachment self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.name, serializer);
    sse_encode_opt_String(self.filename, serializer);
    sse_encode_opt_String(self.mimeType, serializer);
    sse_encode_opt_box_autoadd_i_64(self.size, serializer);
    sse_encode_bool(self.isImage, serializer);
    sse_encode_opt_list_prim_u_8_strict(self.data, serializer);
  }

  @protected
  void sse_encode_email_config(EmailConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_i_64(self.msgFallbackCodepage, serializer);
  }

  @protected
  void sse_encode_email_extraction_result(
    EmailExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.subject, serializer);
    sse_encode_opt_String(self.fromEmail, serializer);
    sse_encode_list_String(self.toEmails, serializer);
    sse_encode_list_String(self.ccEmails, serializer);
    sse_encode_list_String(self.bccEmails, serializer);
    sse_encode_opt_String(self.date, serializer);
    sse_encode_opt_String(self.messageId, serializer);
    sse_encode_opt_String(self.plainText, serializer);
    sse_encode_opt_String(self.htmlContent, serializer);
    sse_encode_String(self.content, serializer);
    sse_encode_list_email_attachment(self.attachments, serializer);
    sse_encode_Map_String_String_None(self.metadata, serializer);
  }

  @protected
  void sse_encode_email_metadata(EmailMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.fromEmail, serializer);
    sse_encode_opt_String(self.fromName, serializer);
    sse_encode_list_String(self.toEmails, serializer);
    sse_encode_list_String(self.ccEmails, serializer);
    sse_encode_list_String(self.bccEmails, serializer);
    sse_encode_opt_String(self.messageId, serializer);
    sse_encode_list_String(self.attachments, serializer);
  }

  @protected
  void sse_encode_embedded_changes(
    EmbeddedChanges self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_archive_entry(self.added, serializer);
    sse_encode_list_archive_entry(self.removed, serializer);
    sse_encode_list_embedded_diff(self.changed, serializer);
  }

  @protected
  void sse_encode_embedded_diff(EmbeddedDiff self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.path, serializer);
    sse_encode_extraction_diff(self.diff, serializer);
  }

  @protected
  void sse_encode_embedded_file(EmbeddedFile self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_list_prim_u_8_strict(self.data, serializer);
    sse_encode_i_64(self.compressedSize, serializer);
    sse_encode_opt_String(self.mimeType, serializer);
  }

  @protected
  void sse_encode_embedding_config(
    EmbeddingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_embedding_model_type(self.model, serializer);
    sse_encode_bool(self.normalize, serializer);
    sse_encode_i_64(self.batchSize, serializer);
    sse_encode_bool(self.showDownloadProgress, serializer);
    sse_encode_opt_String(self.cacheDir, serializer);
    sse_encode_opt_box_autoadd_acceleration_config(
      self.acceleration,
      serializer,
    );
    sse_encode_opt_box_autoadd_i_64(self.maxEmbedDurationSecs, serializer);
  }

  @protected
  void sse_encode_embedding_model_type(
    EmbeddingModelType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case EmbeddingModelType_Preset(name: final name):
        sse_encode_i_32(0, serializer);
        sse_encode_String(name, serializer);
      case EmbeddingModelType_Custom(
        modelId: final modelId,
        dimensions: final dimensions,
      ):
        sse_encode_i_32(1, serializer);
        sse_encode_String(modelId, serializer);
        sse_encode_i_64(dimensions, serializer);
      case EmbeddingModelType_Llm(llm: final llm):
        sse_encode_i_32(2, serializer);
        sse_encode_box_autoadd_llm_config(llm, serializer);
      case EmbeddingModelType_Plugin(name: final name):
        sse_encode_i_32(3, serializer);
        sse_encode_String(name, serializer);
    }
  }

  @protected
  void sse_encode_embedding_preset(
    EmbeddingPreset self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_i_64(self.chunkSize, serializer);
    sse_encode_i_64(self.overlap, serializer);
    sse_encode_String(self.modelRepo, serializer);
    sse_encode_String(self.pooling, serializer);
    sse_encode_String(self.modelFile, serializer);
    sse_encode_i_64(self.dimensions, serializer);
    sse_encode_String(self.description, serializer);
  }

  @protected
  void sse_encode_epub_metadata(EpubMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.coverage, serializer);
    sse_encode_opt_String(self.dcFormat, serializer);
    sse_encode_opt_String(self.relation, serializer);
    sse_encode_opt_String(self.source, serializer);
    sse_encode_opt_String(self.dcType, serializer);
    sse_encode_opt_String(self.coverImage, serializer);
  }

  @protected
  void sse_encode_error_metadata(ErrorMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.errorType, serializer);
    sse_encode_String(self.message, serializer);
  }

  @protected
  void sse_encode_excel_metadata(ExcelMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_i_64(self.sheetCount, serializer);
    sse_encode_opt_list_String(self.sheetNames, serializer);
  }

  @protected
  void sse_encode_excel_sheet(ExcelSheet self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.name, serializer);
    sse_encode_String(self.markdown, serializer);
    sse_encode_i_64(self.rowCount, serializer);
    sse_encode_i_64(self.colCount, serializer);
    sse_encode_i_64(self.cellCount, serializer);
    sse_encode_opt_list_list_String(self.tableCells, serializer);
  }

  @protected
  void sse_encode_excel_workbook(ExcelWorkbook self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_excel_sheet(self.sheets, serializer);
    sse_encode_Map_String_String_None(self.metadata, serializer);
    sse_encode_opt_list_document_revision(self.revisions, serializer);
  }

  @protected
  void sse_encode_execution_provider_type(
    ExecutionProviderType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_extracted_image(
    ExtractedImage self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_prim_u_8_strict(self.data, serializer);
    sse_encode_String(self.format, serializer);
    sse_encode_i_64(self.imageIndex, serializer);
    sse_encode_opt_box_autoadd_i_64(self.pageNumber, serializer);
    sse_encode_opt_box_autoadd_i_64(self.width, serializer);
    sse_encode_opt_box_autoadd_i_64(self.height, serializer);
    sse_encode_opt_String(self.colorspace, serializer);
    sse_encode_opt_box_autoadd_i_64(self.bitsPerComponent, serializer);
    sse_encode_bool(self.isMask, serializer);
    sse_encode_opt_String(self.description, serializer);
    sse_encode_opt_box_autoadd_extraction_result(self.ocrResult, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.boundingBox, serializer);
    sse_encode_opt_String(self.sourcePath, serializer);
    sse_encode_opt_box_autoadd_image_kind(self.imageKind, serializer);
    sse_encode_opt_box_autoadd_f_64(self.kindConfidence, serializer);
    sse_encode_opt_box_autoadd_i_64(self.clusterId, serializer);
  }

  @protected
  void sse_encode_extracted_uri(ExtractedUri self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.url, serializer);
    sse_encode_opt_String(self.label, serializer);
    sse_encode_opt_box_autoadd_i_64(self.page, serializer);
    sse_encode_uri_kind(self.kind, serializer);
  }

  @protected
  void sse_encode_extraction_config(
    ExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.useCache, serializer);
    sse_encode_bool(self.enableQualityProcessing, serializer);
    sse_encode_opt_box_autoadd_ocr_config(self.ocr, serializer);
    sse_encode_bool(self.forceOcr, serializer);
    sse_encode_opt_list_prim_i_64_strict(self.forceOcrPages, serializer);
    sse_encode_bool(self.disableOcr, serializer);
    sse_encode_opt_box_autoadd_chunking_config(self.chunking, serializer);
    sse_encode_opt_box_autoadd_content_filter_config(
      self.contentFilter,
      serializer,
    );
    sse_encode_opt_box_autoadd_image_extraction_config(self.images, serializer);
    sse_encode_opt_box_autoadd_pdf_config(self.pdfOptions, serializer);
    sse_encode_opt_box_autoadd_token_reduction_options(
      self.tokenReduction,
      serializer,
    );
    sse_encode_opt_box_autoadd_language_detection_config(
      self.languageDetection,
      serializer,
    );
    sse_encode_opt_box_autoadd_page_config(self.pages, serializer);
    sse_encode_opt_box_autoadd_keyword_config(self.keywords, serializer);
    sse_encode_opt_box_autoadd_post_processor_config(
      self.postprocessor,
      serializer,
    );
    sse_encode_opt_String(self.htmlOptions, serializer);
    sse_encode_opt_box_autoadd_html_output_config(self.htmlOutput, serializer);
    sse_encode_opt_box_autoadd_i_64(self.extractionTimeoutSecs, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxConcurrentExtractions, serializer);
    sse_encode_result_format(self.resultFormat, serializer);
    sse_encode_opt_box_autoadd_security_limits(self.securityLimits, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxEmbeddedFileBytes, serializer);
    sse_encode_output_format(self.outputFormat, serializer);
    sse_encode_opt_box_autoadd_layout_detection_config(self.layout, serializer);
    sse_encode_bool(self.useLayoutForMarkdown, serializer);
    sse_encode_bool(self.includeDocumentStructure, serializer);
    sse_encode_opt_box_autoadd_acceleration_config(
      self.acceleration,
      serializer,
    );
    sse_encode_opt_String(self.cacheNamespace, serializer);
    sse_encode_opt_box_autoadd_i_64(self.cacheTtlSecs, serializer);
    sse_encode_opt_box_autoadd_email_config(self.email, serializer);
    sse_encode_opt_String(self.concurrency, serializer);
    sse_encode_i_64(self.maxArchiveDepth, serializer);
    sse_encode_opt_box_autoadd_tree_sitter_config(self.treeSitter, serializer);
    sse_encode_opt_box_autoadd_structured_extraction_config(
      self.structuredExtraction,
      serializer,
    );
    sse_encode_opt_String(self.cancelToken, serializer);
  }

  @protected
  void sse_encode_extraction_diff(
    ExtractionDiff self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_diff_hunk(self.contentDiff, serializer);
    sse_encode_list_table(self.tablesAdded, serializer);
    sse_encode_list_table(self.tablesRemoved, serializer);
    sse_encode_list_table_diff(self.tablesChanged, serializer);
    sse_encode_String(self.metadataChanged, serializer);
    sse_encode_embedded_changes(self.embeddedChanges, serializer);
  }

  @protected
  void sse_encode_extraction_method(
    ExtractionMethod self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_extraction_result(
    ExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_String(self.mimeType, serializer);
    sse_encode_metadata(self.metadata, serializer);
    sse_encode_opt_box_autoadd_extraction_method(
      self.extractionMethod,
      serializer,
    );
    sse_encode_list_table(self.tables, serializer);
    sse_encode_opt_list_String(self.detectedLanguages, serializer);
    sse_encode_opt_list_chunk(self.chunks, serializer);
    sse_encode_opt_list_extracted_image(self.images, serializer);
    sse_encode_opt_list_page_content(self.pages, serializer);
    sse_encode_opt_list_element(self.elements, serializer);
    sse_encode_opt_box_autoadd_djot_content(self.djotContent, serializer);
    sse_encode_opt_list_ocr_element(self.ocrElements, serializer);
    sse_encode_opt_box_autoadd_document_structure(self.document, serializer);
    sse_encode_opt_list_keyword(self.extractedKeywords, serializer);
    sse_encode_opt_box_autoadd_f_64(self.qualityScore, serializer);
    sse_encode_list_processing_warning(self.processingWarnings, serializer);
    sse_encode_opt_list_pdf_annotation(self.annotations, serializer);
    sse_encode_opt_list_archive_entry(self.children, serializer);
    sse_encode_opt_list_extracted_uri(self.uris, serializer);
    sse_encode_opt_list_document_revision(self.revisions, serializer);
    sse_encode_opt_String(self.structuredOutput, serializer);
    sse_encode_opt_String(self.codeIntelligence, serializer);
    sse_encode_opt_list_llm_usage(self.llmUsage, serializer);
    sse_encode_opt_String(self.formattedContent, serializer);
    sse_encode_opt_String(self.ocrInternalDocument, serializer);
  }

  @protected
  void sse_encode_f_64(double self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putFloat64(self);
  }

  @protected
  void sse_encode_fiction_book_metadata(
    FictionBookMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_String(self.genres, serializer);
    sse_encode_list_String(self.sequences, serializer);
    sse_encode_opt_String(self.annotation, serializer);
  }

  @protected
  void sse_encode_file_extraction_config(
    FileExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_bool(self.enableQualityProcessing, serializer);
    sse_encode_opt_box_autoadd_ocr_config(self.ocr, serializer);
    sse_encode_opt_box_autoadd_bool(self.forceOcr, serializer);
    sse_encode_opt_list_prim_i_64_strict(self.forceOcrPages, serializer);
    sse_encode_opt_box_autoadd_bool(self.disableOcr, serializer);
    sse_encode_opt_box_autoadd_chunking_config(self.chunking, serializer);
    sse_encode_opt_box_autoadd_content_filter_config(
      self.contentFilter,
      serializer,
    );
    sse_encode_opt_box_autoadd_image_extraction_config(self.images, serializer);
    sse_encode_opt_box_autoadd_pdf_config(self.pdfOptions, serializer);
    sse_encode_opt_box_autoadd_token_reduction_options(
      self.tokenReduction,
      serializer,
    );
    sse_encode_opt_box_autoadd_language_detection_config(
      self.languageDetection,
      serializer,
    );
    sse_encode_opt_box_autoadd_page_config(self.pages, serializer);
    sse_encode_opt_box_autoadd_keyword_config(self.keywords, serializer);
    sse_encode_opt_box_autoadd_post_processor_config(
      self.postprocessor,
      serializer,
    );
    sse_encode_opt_String(self.htmlOptions, serializer);
    sse_encode_opt_box_autoadd_result_format(self.resultFormat, serializer);
    sse_encode_opt_box_autoadd_output_format(self.outputFormat, serializer);
    sse_encode_opt_box_autoadd_bool(self.includeDocumentStructure, serializer);
    sse_encode_opt_box_autoadd_layout_detection_config(self.layout, serializer);
    sse_encode_opt_box_autoadd_i_64(self.timeoutSecs, serializer);
    sse_encode_opt_box_autoadd_tree_sitter_config(self.treeSitter, serializer);
    sse_encode_opt_box_autoadd_structured_extraction_config(
      self.structuredExtraction,
      serializer,
    );
  }

  @protected
  void sse_encode_footnote(Footnote self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.label, serializer);
    sse_encode_list_formatted_block(self.content, serializer);
  }

  @protected
  void sse_encode_format_metadata(
    FormatMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case FormatMetadata_Pdf(field0: final field0):
        sse_encode_i_32(0, serializer);
        sse_encode_box_autoadd_pdf_metadata(field0, serializer);
      case FormatMetadata_Docx(field0: final field0):
        sse_encode_i_32(1, serializer);
        sse_encode_box_autoadd_docx_metadata(field0, serializer);
      case FormatMetadata_Excel(field0: final field0):
        sse_encode_i_32(2, serializer);
        sse_encode_box_autoadd_excel_metadata(field0, serializer);
      case FormatMetadata_Email(field0: final field0):
        sse_encode_i_32(3, serializer);
        sse_encode_box_autoadd_email_metadata(field0, serializer);
      case FormatMetadata_Pptx(field0: final field0):
        sse_encode_i_32(4, serializer);
        sse_encode_box_autoadd_pptx_metadata(field0, serializer);
      case FormatMetadata_Archive(field0: final field0):
        sse_encode_i_32(5, serializer);
        sse_encode_box_autoadd_archive_metadata(field0, serializer);
      case FormatMetadata_Image(field0: final field0):
        sse_encode_i_32(6, serializer);
        sse_encode_box_autoadd_image_metadata(field0, serializer);
      case FormatMetadata_Xml(field0: final field0):
        sse_encode_i_32(7, serializer);
        sse_encode_box_autoadd_xml_metadata(field0, serializer);
      case FormatMetadata_Text(field0: final field0):
        sse_encode_i_32(8, serializer);
        sse_encode_box_autoadd_text_metadata(field0, serializer);
      case FormatMetadata_Html(field0: final field0):
        sse_encode_i_32(9, serializer);
        sse_encode_box_autoadd_html_metadata(field0, serializer);
      case FormatMetadata_Ocr(field0: final field0):
        sse_encode_i_32(10, serializer);
        sse_encode_box_autoadd_ocr_metadata(field0, serializer);
      case FormatMetadata_Csv(field0: final field0):
        sse_encode_i_32(11, serializer);
        sse_encode_box_autoadd_csv_metadata(field0, serializer);
      case FormatMetadata_Bibtex(field0: final field0):
        sse_encode_i_32(12, serializer);
        sse_encode_box_autoadd_bibtex_metadata(field0, serializer);
      case FormatMetadata_Citation(field0: final field0):
        sse_encode_i_32(13, serializer);
        sse_encode_box_autoadd_citation_metadata(field0, serializer);
      case FormatMetadata_FictionBook(field0: final field0):
        sse_encode_i_32(14, serializer);
        sse_encode_box_autoadd_fiction_book_metadata(field0, serializer);
      case FormatMetadata_Dbf(field0: final field0):
        sse_encode_i_32(15, serializer);
        sse_encode_box_autoadd_dbf_metadata(field0, serializer);
      case FormatMetadata_Jats(field0: final field0):
        sse_encode_i_32(16, serializer);
        sse_encode_box_autoadd_jats_metadata(field0, serializer);
      case FormatMetadata_Epub(field0: final field0):
        sse_encode_i_32(17, serializer);
        sse_encode_box_autoadd_epub_metadata(field0, serializer);
      case FormatMetadata_Pst(field0: final field0):
        sse_encode_i_32(18, serializer);
        sse_encode_box_autoadd_pst_metadata(field0, serializer);
      case FormatMetadata_Code(field0: final field0):
        sse_encode_i_32(19, serializer);
        sse_encode_String(field0, serializer);
    }
  }

  @protected
  void sse_encode_formatted_block(
    FormattedBlock self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_block_type(self.blockType, serializer);
    sse_encode_opt_box_autoadd_i_64(self.level, serializer);
    sse_encode_list_inline_element(self.inlineContent, serializer);
    sse_encode_opt_String(self.attributes, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_String(self.code, serializer);
    sse_encode_list_formatted_block(self.children, serializer);
  }

  @protected
  void sse_encode_grid_cell(GridCell self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_i_64(self.row, serializer);
    sse_encode_i_64(self.col, serializer);
    sse_encode_i_64(self.rowSpan, serializer);
    sse_encode_i_64(self.colSpan, serializer);
    sse_encode_bool(self.isHeader, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.bbox, serializer);
  }

  @protected
  void sse_encode_header_metadata(
    HeaderMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.level, serializer);
    sse_encode_String(self.text, serializer);
    sse_encode_opt_String(self.id, serializer);
    sse_encode_i_64(self.depth, serializer);
    sse_encode_i_64(self.htmlOffset, serializer);
  }

  @protected
  void sse_encode_heading_context(
    HeadingContext self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_heading_level(self.headings, serializer);
  }

  @protected
  void sse_encode_heading_level(HeadingLevel self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.level, serializer);
    sse_encode_String(self.text, serializer);
  }

  @protected
  void sse_encode_hierarchical_block(
    HierarchicalBlock self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.text, serializer);
    sse_encode_f_64(self.fontSize, serializer);
    sse_encode_String(self.level, serializer);
    sse_encode_opt_list_prim_f_64_strict(self.bbox, serializer);
  }

  @protected
  void sse_encode_hierarchy_config(
    HierarchyConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.enabled, serializer);
    sse_encode_i_64(self.kClusters, serializer);
    sse_encode_bool(self.includeBbox, serializer);
    sse_encode_opt_box_autoadd_f_64(self.ocrCoverageThreshold, serializer);
  }

  @protected
  void sse_encode_html_metadata(HtmlMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_String(self.description, serializer);
    sse_encode_list_String(self.keywords, serializer);
    sse_encode_opt_String(self.author, serializer);
    sse_encode_opt_String(self.canonicalUrl, serializer);
    sse_encode_opt_String(self.baseHref, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_box_autoadd_text_direction(self.textDirection, serializer);
    sse_encode_Map_String_String_None(self.openGraph, serializer);
    sse_encode_Map_String_String_None(self.twitterCard, serializer);
    sse_encode_Map_String_String_None(self.metaTags, serializer);
    sse_encode_list_header_metadata(self.headers, serializer);
    sse_encode_list_link_metadata(self.links, serializer);
    sse_encode_list_image_metadata_type(self.images, serializer);
    sse_encode_list_structured_data(self.structuredData, serializer);
  }

  @protected
  void sse_encode_html_output_config(
    HtmlOutputConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.css, serializer);
    sse_encode_opt_String(self.cssFile, serializer);
    sse_encode_html_theme(self.theme, serializer);
    sse_encode_String(self.classPrefix, serializer);
    sse_encode_bool(self.embedCss, serializer);
  }

  @protected
  void sse_encode_html_theme(HtmlTheme self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, 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_image_extraction_config(
    ImageExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.extractImages, serializer);
    sse_encode_i_64(self.targetDpi, serializer);
    sse_encode_i_64(self.maxImageDimension, serializer);
    sse_encode_bool(self.injectPlaceholders, serializer);
    sse_encode_bool(self.autoAdjustDpi, serializer);
    sse_encode_i_64(self.minDpi, serializer);
    sse_encode_i_64(self.maxDpi, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxImagesPerPage, serializer);
    sse_encode_bool(self.classify, serializer);
    sse_encode_bool(self.includePageRasters, serializer);
    sse_encode_bool(self.runOcrOnImages, serializer);
    sse_encode_bool(self.ocrTextOnly, serializer);
    sse_encode_bool(self.appendOcrText, serializer);
  }

  @protected
  void sse_encode_image_kind(ImageKind self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_image_metadata(ImageMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.width, serializer);
    sse_encode_i_64(self.height, serializer);
    sse_encode_String(self.format, serializer);
    sse_encode_Map_String_String_None(self.exif, serializer);
  }

  @protected
  void sse_encode_image_metadata_type(
    ImageMetadataType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.src, serializer);
    sse_encode_opt_String(self.alt, serializer);
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_list_prim_i_64_strict(self.dimensions, serializer);
    sse_encode_image_type(self.imageType, serializer);
    sse_encode_list_list_String(self.attributes, serializer);
  }

  @protected
  void sse_encode_image_preprocessing_config(
    ImagePreprocessingConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.targetDpi, serializer);
    sse_encode_bool(self.autoRotate, serializer);
    sse_encode_bool(self.deskew, serializer);
    sse_encode_bool(self.denoise, serializer);
    sse_encode_bool(self.contrastEnhance, serializer);
    sse_encode_String(self.binarizationMethod, serializer);
    sse_encode_bool(self.invertColors, serializer);
  }

  @protected
  void sse_encode_image_preprocessing_metadata(
    ImagePreprocessingMetadata self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_prim_i_64_strict(self.originalDimensions, serializer);
    sse_encode_list_prim_f_64_strict(self.originalDpi, serializer);
    sse_encode_i_64(self.targetDpi, serializer);
    sse_encode_f_64(self.scaleFactor, serializer);
    sse_encode_bool(self.autoAdjusted, serializer);
    sse_encode_i_64(self.finalDpi, serializer);
    sse_encode_opt_list_prim_i_64_strict(self.newDimensions, serializer);
    sse_encode_String(self.resampleMethod, serializer);
    sse_encode_bool(self.dimensionClamped, serializer);
    sse_encode_opt_box_autoadd_i_64(self.calculatedDpi, serializer);
    sse_encode_bool(self.skippedResize, serializer);
    sse_encode_opt_String(self.resizeError, serializer);
  }

  @protected
  void sse_encode_image_type(ImageType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_inline_element(InlineElement self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_inline_type(self.elementType, serializer);
    sse_encode_String(self.content, serializer);
    sse_encode_opt_String(self.attributes, serializer);
    sse_encode_opt_Map_String_String_None(self.metadata, serializer);
  }

  @protected
  void sse_encode_inline_type(InlineType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_internal_document_bridge(
    InternalDocumentBridge self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.json, serializer);
  }

  @protected
  void sse_encode_isize(PlatformInt64 self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    serializer.buffer.putPlatformInt64(self);
  }

  @protected
  void sse_encode_jats_metadata(JatsMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.copyright, serializer);
    sse_encode_opt_String(self.license, serializer);
    sse_encode_Map_String_String_None(self.historyDates, serializer);
    sse_encode_list_contributor_role(self.contributorRoles, serializer);
  }

  @protected
  void sse_encode_keyword(Keyword self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.text, serializer);
    sse_encode_f_64(self.score, serializer);
    sse_encode_keyword_algorithm(self.algorithm, serializer);
    sse_encode_opt_list_prim_i_64_strict(self.positions, serializer);
  }

  @protected
  void sse_encode_keyword_algorithm(
    KeywordAlgorithm self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_keyword_config(KeywordConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_keyword_algorithm(self.algorithm, serializer);
    sse_encode_i_64(self.maxKeywords, serializer);
    sse_encode_f_64(self.minScore, serializer);
    sse_encode_list_prim_i_64_strict(self.ngramRange, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_box_autoadd_yake_params(self.yakeParams, serializer);
    sse_encode_opt_box_autoadd_rake_params(self.rakeParams, serializer);
  }

  @protected
  void sse_encode_language_detection_config(
    LanguageDetectionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.enabled, serializer);
    sse_encode_f_64(self.minConfidence, serializer);
    sse_encode_bool(self.detectMultiple, serializer);
  }

  @protected
  void sse_encode_layout_class(LayoutClass self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_layout_detection(
    LayoutDetection self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_layout_class(self.className, serializer);
    sse_encode_f_64(self.confidence, serializer);
    sse_encode_b_box(self.bbox, serializer);
  }

  @protected
  void sse_encode_layout_detection_config(
    LayoutDetectionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_f_64(self.confidenceThreshold, serializer);
    sse_encode_bool(self.applyHeuristics, serializer);
    sse_encode_table_model(self.tableModel, serializer);
    sse_encode_opt_box_autoadd_acceleration_config(
      self.acceleration,
      serializer,
    );
  }

  @protected
  void sse_encode_layout_region(LayoutRegion self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.className, serializer);
    sse_encode_f_64(self.confidence, serializer);
    sse_encode_bounding_box(self.boundingBox, serializer);
    sse_encode_f_64(self.areaFraction, serializer);
  }

  @protected
  void sse_encode_link_metadata(LinkMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.href, serializer);
    sse_encode_String(self.text, serializer);
    sse_encode_opt_String(self.title, serializer);
    sse_encode_link_type(self.linkType, serializer);
    sse_encode_list_String(self.rel, serializer);
    sse_encode_list_list_String(self.attributes, serializer);
  }

  @protected
  void sse_encode_link_type(LinkType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_list_String(List<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_String(item, serializer);
    }
  }

  @protected
  void sse_encode_list_archive_entry(
    List<ArchiveEntry> 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_archive_entry(item, serializer);
    }
  }

  @protected
  void sse_encode_list_batch_bytes_item(
    List<BatchBytesItem> 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_batch_bytes_item(item, serializer);
    }
  }

  @protected
  void sse_encode_list_batch_file_item(
    List<BatchFileItem> 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_batch_file_item(item, serializer);
    }
  }

  @protected
  void sse_encode_list_cell_change(
    List<CellChange> 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_cell_change(item, serializer);
    }
  }

  @protected
  void sse_encode_list_chunk(List<Chunk> 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_chunk(item, serializer);
    }
  }

  @protected
  void sse_encode_list_contributor_role(
    List<ContributorRole> 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_contributor_role(item, serializer);
    }
  }

  @protected
  void sse_encode_list_dbf_field_info(
    List<DbfFieldInfo> 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_dbf_field_info(item, serializer);
    }
  }

  @protected
  void sse_encode_list_diff_hunk(
    List<DiffHunk> 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_diff_hunk(item, serializer);
    }
  }

  @protected
  void sse_encode_list_diff_line(
    List<DiffLine> 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_diff_line(item, serializer);
    }
  }

  @protected
  void sse_encode_list_djot_image(
    List<DjotImage> 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_djot_image(item, serializer);
    }
  }

  @protected
  void sse_encode_list_djot_link(
    List<DjotLink> 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_djot_link(item, serializer);
    }
  }

  @protected
  void sse_encode_list_document_node(
    List<DocumentNode> 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_document_node(item, serializer);
    }
  }

  @protected
  void sse_encode_list_document_relationship(
    List<DocumentRelationship> 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_document_relationship(item, serializer);
    }
  }

  @protected
  void sse_encode_list_document_revision(
    List<DocumentRevision> 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_document_revision(item, serializer);
    }
  }

  @protected
  void sse_encode_list_element(List<Element> 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_element(item, serializer);
    }
  }

  @protected
  void sse_encode_list_email_attachment(
    List<EmailAttachment> 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_email_attachment(item, serializer);
    }
  }

  @protected
  void sse_encode_list_embedded_diff(
    List<EmbeddedDiff> 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_embedded_diff(item, serializer);
    }
  }

  @protected
  void sse_encode_list_excel_sheet(
    List<ExcelSheet> 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_excel_sheet(item, serializer);
    }
  }

  @protected
  void sse_encode_list_extracted_image(
    List<ExtractedImage> 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_extracted_image(item, serializer);
    }
  }

  @protected
  void sse_encode_list_extracted_uri(
    List<ExtractedUri> 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_extracted_uri(item, serializer);
    }
  }

  @protected
  void sse_encode_list_extraction_result(
    List<ExtractionResult> 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_extraction_result(item, serializer);
    }
  }

  @protected
  void sse_encode_list_footnote(List<Footnote> 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_footnote(item, serializer);
    }
  }

  @protected
  void sse_encode_list_formatted_block(
    List<FormattedBlock> 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_formatted_block(item, serializer);
    }
  }

  @protected
  void sse_encode_list_grid_cell(
    List<GridCell> 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_grid_cell(item, serializer);
    }
  }

  @protected
  void sse_encode_list_header_metadata(
    List<HeaderMetadata> 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_header_metadata(item, serializer);
    }
  }

  @protected
  void sse_encode_list_heading_level(
    List<HeadingLevel> 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_heading_level(item, serializer);
    }
  }

  @protected
  void sse_encode_list_hierarchical_block(
    List<HierarchicalBlock> 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_hierarchical_block(item, serializer);
    }
  }

  @protected
  void sse_encode_list_image_metadata_type(
    List<ImageMetadataType> 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_image_metadata_type(item, serializer);
    }
  }

  @protected
  void sse_encode_list_inline_element(
    List<InlineElement> 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_inline_element(item, serializer);
    }
  }

  @protected
  void sse_encode_list_keyword(List<Keyword> 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_keyword(item, serializer);
    }
  }

  @protected
  void sse_encode_list_layout_detection(
    List<LayoutDetection> 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_layout_detection(item, serializer);
    }
  }

  @protected
  void sse_encode_list_layout_region(
    List<LayoutRegion> 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_layout_region(item, serializer);
    }
  }

  @protected
  void sse_encode_list_link_metadata(
    List<LinkMetadata> 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_link_metadata(item, serializer);
    }
  }

  @protected
  void sse_encode_list_list_String(
    List<List<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_list_String(item, serializer);
    }
  }

  @protected
  void sse_encode_list_list_prim_f_64_strict(
    List<Float64List> 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_list_prim_f_64_strict(item, serializer);
    }
  }

  @protected
  void sse_encode_list_llm_usage(
    List<LlmUsage> 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_llm_usage(item, serializer);
    }
  }

  @protected
  void sse_encode_list_ocr_element(
    List<OcrElement> 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_ocr_element(item, serializer);
    }
  }

  @protected
  void sse_encode_list_ocr_pipeline_stage(
    List<OcrPipelineStage> 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_ocr_pipeline_stage(item, serializer);
    }
  }

  @protected
  void sse_encode_list_ocr_table(
    List<OcrTable> 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_ocr_table(item, serializer);
    }
  }

  @protected
  void sse_encode_list_page_boundary(
    List<PageBoundary> 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_page_boundary(item, serializer);
    }
  }

  @protected
  void sse_encode_list_page_content(
    List<PageContent> 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_page_content(item, serializer);
    }
  }

  @protected
  void sse_encode_list_page_info(
    List<PageInfo> 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_page_info(item, serializer);
    }
  }

  @protected
  void sse_encode_list_pdf_annotation(
    List<PdfAnnotation> 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_pdf_annotation(item, serializer);
    }
  }

  @protected
  void sse_encode_list_prim_f_64_strict(
    Float64List self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    serializer.buffer.putFloat64List(self);
  }

  @protected
  void sse_encode_list_prim_i_64_strict(
    Int64List self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    serializer.buffer.putInt64List(self);
  }

  @protected
  void sse_encode_list_prim_u_8_loose(
    List<int> self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.length, serializer);
    serializer.buffer.putUint8List(
      self is Uint8List ? self : Uint8List.fromList(self),
    );
  }

  @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_processing_warning(
    List<ProcessingWarning> 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_processing_warning(item, serializer);
    }
  }

  @protected
  void sse_encode_list_record_string_i_64(
    List<(String, PlatformInt64)> 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_i_64(item, serializer);
    }
  }

  @protected
  void sse_encode_list_record_string_list_prim_u_8_strict(
    List<(String, Uint8List)> 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_list_prim_u_8_strict(item, serializer);
    }
  }

  @protected
  void sse_encode_list_record_string_list_string(
    List<(String, List<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_list_string(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_structured_data(
    List<StructuredData> 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_structured_data(item, serializer);
    }
  }

  @protected
  void sse_encode_list_table(List<Table> 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_table(item, serializer);
    }
  }

  @protected
  void sse_encode_list_table_diff(
    List<TableDiff> 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_table_diff(item, serializer);
    }
  }

  @protected
  void sse_encode_list_text_annotation(
    List<TextAnnotation> 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_text_annotation(item, serializer);
    }
  }

  @protected
  void sse_encode_llm_config(LlmConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.model, serializer);
    sse_encode_opt_String(self.apiKey, serializer);
    sse_encode_opt_String(self.baseUrl, serializer);
    sse_encode_opt_box_autoadd_i_64(self.timeoutSecs, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxRetries, serializer);
    sse_encode_opt_box_autoadd_f_64(self.temperature, serializer);
    sse_encode_opt_box_autoadd_i_64(self.maxTokens, serializer);
  }

  @protected
  void sse_encode_llm_usage(LlmUsage self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.model, serializer);
    sse_encode_String(self.source, serializer);
    sse_encode_opt_box_autoadd_i_64(self.inputTokens, serializer);
    sse_encode_opt_box_autoadd_i_64(self.outputTokens, serializer);
    sse_encode_opt_box_autoadd_i_64(self.totalTokens, serializer);
    sse_encode_opt_box_autoadd_f_64(self.estimatedCost, serializer);
    sse_encode_opt_String(self.finishReason, serializer);
  }

  @protected
  void sse_encode_metadata(Metadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_String(self.subject, serializer);
    sse_encode_opt_list_String(self.authors, serializer);
    sse_encode_opt_list_String(self.keywords, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_String(self.createdAt, serializer);
    sse_encode_opt_String(self.modifiedAt, serializer);
    sse_encode_opt_String(self.createdBy, serializer);
    sse_encode_opt_String(self.modifiedBy, serializer);
    sse_encode_opt_box_autoadd_page_structure(self.pages, serializer);
    sse_encode_opt_box_autoadd_format_metadata(self.format, serializer);
    sse_encode_opt_box_autoadd_image_preprocessing_metadata(
      self.imagePreprocessing,
      serializer,
    );
    sse_encode_opt_String(self.jsonSchema, serializer);
    sse_encode_opt_box_autoadd_error_metadata(self.error, serializer);
    sse_encode_opt_box_autoadd_i_64(self.extractionDurationMs, serializer);
    sse_encode_opt_String(self.category, serializer);
    sse_encode_opt_list_String(self.tags, serializer);
    sse_encode_opt_String(self.documentVersion, serializer);
    sse_encode_opt_String(self.abstractText, serializer);
    sse_encode_opt_String(self.outputFormat, serializer);
    sse_encode_bool(self.ocrUsed, serializer);
    sse_encode_Map_String_String_None(self.additional, serializer);
  }

  @protected
  void sse_encode_model_paths(ModelPaths self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.detModel, serializer);
    sse_encode_String(self.clsModel, serializer);
    sse_encode_String(self.recModel, serializer);
    sse_encode_String(self.dictFile, serializer);
  }

  @protected
  void sse_encode_node_content(NodeContent self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case NodeContent_Title(text: final text):
        sse_encode_i_32(0, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Heading(level: final level, text: final text):
        sse_encode_i_32(1, serializer);
        sse_encode_i_64(level, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Paragraph(text: final text):
        sse_encode_i_32(2, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_List(ordered: final ordered):
        sse_encode_i_32(3, serializer);
        sse_encode_bool(ordered, serializer);
      case NodeContent_ListItem(text: final text):
        sse_encode_i_32(4, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Table(grid: final grid):
        sse_encode_i_32(5, serializer);
        sse_encode_box_autoadd_table_grid(grid, serializer);
      case NodeContent_Image(
        description: final description,
        imageIndex: final imageIndex,
        src: final src,
      ):
        sse_encode_i_32(6, serializer);
        sse_encode_String(description, serializer);
        sse_encode_i_64(imageIndex, serializer);
        sse_encode_String(src, serializer);
      case NodeContent_Code(text: final text, language: final language):
        sse_encode_i_32(7, serializer);
        sse_encode_String(text, serializer);
        sse_encode_String(language, serializer);
      case NodeContent_Quote():
        sse_encode_i_32(8, serializer);
      case NodeContent_Formula(text: final text):
        sse_encode_i_32(9, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Footnote(text: final text):
        sse_encode_i_32(10, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Group(
        label: final label,
        headingLevel: final headingLevel,
        headingText: final headingText,
      ):
        sse_encode_i_32(11, serializer);
        sse_encode_String(label, serializer);
        sse_encode_i_64(headingLevel, serializer);
        sse_encode_String(headingText, serializer);
      case NodeContent_PageBreak():
        sse_encode_i_32(12, serializer);
      case NodeContent_Slide(number: final number, title: final title):
        sse_encode_i_32(13, serializer);
        sse_encode_i_64(number, serializer);
        sse_encode_String(title, serializer);
      case NodeContent_DefinitionList():
        sse_encode_i_32(14, serializer);
      case NodeContent_DefinitionItem(
        term: final term,
        definition: final definition,
      ):
        sse_encode_i_32(15, serializer);
        sse_encode_String(term, serializer);
        sse_encode_String(definition, serializer);
      case NodeContent_Citation(key: final key, text: final text):
        sse_encode_i_32(16, serializer);
        sse_encode_String(key, serializer);
        sse_encode_String(text, serializer);
      case NodeContent_Admonition(kind: final kind, title: final title):
        sse_encode_i_32(17, serializer);
        sse_encode_String(kind, serializer);
        sse_encode_String(title, serializer);
      case NodeContent_RawBlock(format: final format, content: final content):
        sse_encode_i_32(18, serializer);
        sse_encode_String(format, serializer);
        sse_encode_String(content, serializer);
      case NodeContent_MetadataBlock(entries: final entries):
        sse_encode_i_32(19, serializer);
        sse_encode_list_list_String(entries, serializer);
    }
  }

  @protected
  void sse_encode_ocr_backend_type(
    OcrBackendType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_ocr_bounding_geometry(
    OcrBoundingGeometry self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case OcrBoundingGeometry_Rectangle(
        left: final left,
        top: final top,
        width: final width,
        height: final height,
      ):
        sse_encode_i_32(0, serializer);
        sse_encode_i_64(left, serializer);
        sse_encode_i_64(top, serializer);
        sse_encode_i_64(width, serializer);
        sse_encode_i_64(height, serializer);
      case OcrBoundingGeometry_Quadrilateral(points: final points):
        sse_encode_i_32(1, serializer);
        sse_encode_String(points, serializer);
    }
  }

  @protected
  void sse_encode_ocr_confidence(OcrConfidence self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_f_64(self.detection, serializer);
    sse_encode_f_64(self.recognition, serializer);
  }

  @protected
  void sse_encode_ocr_config(OcrConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.enabled, serializer);
    sse_encode_String(self.backend, serializer);
    sse_encode_String(self.language, serializer);
    sse_encode_opt_box_autoadd_tesseract_config(
      self.tesseractConfig,
      serializer,
    );
    sse_encode_opt_box_autoadd_output_format(self.outputFormat, serializer);
    sse_encode_opt_String(self.paddleOcrConfig, serializer);
    sse_encode_opt_String(self.backendOptions, serializer);
    sse_encode_opt_box_autoadd_ocr_element_config(
      self.elementConfig,
      serializer,
    );
    sse_encode_opt_box_autoadd_ocr_quality_thresholds(
      self.qualityThresholds,
      serializer,
    );
    sse_encode_opt_box_autoadd_ocr_pipeline_config(self.pipeline, serializer);
    sse_encode_bool(self.autoRotate, serializer);
    sse_encode_opt_box_autoadd_llm_config(self.vlmConfig, serializer);
    sse_encode_opt_String(self.vlmPrompt, serializer);
    sse_encode_opt_box_autoadd_acceleration_config(
      self.acceleration,
      serializer,
    );
    sse_encode_opt_Map_String_list_prim_u_8_strict_None(
      self.tessdataBytes,
      serializer,
    );
  }

  @protected
  void sse_encode_ocr_element(OcrElement self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.text, serializer);
    sse_encode_ocr_bounding_geometry(self.geometry, serializer);
    sse_encode_ocr_confidence(self.confidence, serializer);
    sse_encode_ocr_element_level(self.level, serializer);
    sse_encode_opt_box_autoadd_ocr_rotation(self.rotation, serializer);
    sse_encode_i_64(self.pageNumber, serializer);
    sse_encode_opt_String(self.parentId, serializer);
    sse_encode_Map_String_String_None(self.backendMetadata, serializer);
  }

  @protected
  void sse_encode_ocr_element_config(
    OcrElementConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.includeElements, serializer);
    sse_encode_ocr_element_level(self.minLevel, serializer);
    sse_encode_f_64(self.minConfidence, serializer);
    sse_encode_bool(self.buildHierarchy, serializer);
  }

  @protected
  void sse_encode_ocr_element_level(
    OcrElementLevel self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_ocr_extraction_result(
    OcrExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_String(self.mimeType, serializer);
    sse_encode_Map_String_String_None(self.metadata, serializer);
    sse_encode_list_ocr_table(self.tables, serializer);
    sse_encode_opt_list_ocr_element(self.ocrElements, serializer);
    sse_encode_opt_String(self.internalDocument, serializer);
  }

  @protected
  void sse_encode_ocr_metadata(OcrMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.language, serializer);
    sse_encode_i_64(self.psm, serializer);
    sse_encode_String(self.outputFormat, serializer);
    sse_encode_i_64(self.tableCount, serializer);
    sse_encode_opt_box_autoadd_i_64(self.tableRows, serializer);
    sse_encode_opt_box_autoadd_i_64(self.tableCols, serializer);
  }

  @protected
  void sse_encode_ocr_pipeline_config(
    OcrPipelineConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_ocr_pipeline_stage(self.stages, serializer);
    sse_encode_ocr_quality_thresholds(self.qualityThresholds, serializer);
  }

  @protected
  void sse_encode_ocr_pipeline_stage(
    OcrPipelineStage self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.backend, serializer);
    sse_encode_i_64(self.priority, serializer);
    sse_encode_opt_String(self.language, serializer);
    sse_encode_opt_box_autoadd_tesseract_config(
      self.tesseractConfig,
      serializer,
    );
    sse_encode_opt_String(self.paddleOcrConfig, serializer);
    sse_encode_opt_box_autoadd_llm_config(self.vlmConfig, serializer);
    sse_encode_opt_String(self.backendOptions, serializer);
  }

  @protected
  void sse_encode_ocr_quality_thresholds(
    OcrQualityThresholds self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.minTotalNonWhitespace, serializer);
    sse_encode_f_64(self.minNonWhitespacePerPage, serializer);
    sse_encode_i_64(self.minMeaningfulWordLen, serializer);
    sse_encode_i_64(self.minMeaningfulWords, serializer);
    sse_encode_f_64(self.minAlnumRatio, serializer);
    sse_encode_i_64(self.minGarbageChars, serializer);
    sse_encode_f_64(self.maxFragmentedWordRatio, serializer);
    sse_encode_f_64(self.criticalFragmentedWordRatio, serializer);
    sse_encode_f_64(self.minAvgWordLength, serializer);
    sse_encode_i_64(self.minWordsForAvgLengthCheck, serializer);
    sse_encode_f_64(self.minConsecutiveRepeatRatio, serializer);
    sse_encode_i_64(self.minWordsForRepeatCheck, serializer);
    sse_encode_i_64(self.substantiveMinChars, serializer);
    sse_encode_i_64(self.nonTextMinChars, serializer);
    sse_encode_f_64(self.alnumWsRatioThreshold, serializer);
    sse_encode_f_64(self.pipelineMinQuality, serializer);
  }

  @protected
  void sse_encode_ocr_rotation(OcrRotation self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_f_64(self.angleDegrees, serializer);
    sse_encode_opt_box_autoadd_f_64(self.confidence, serializer);
  }

  @protected
  void sse_encode_ocr_table(OcrTable self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_list_String(self.cells, serializer);
    sse_encode_String(self.markdown, serializer);
    sse_encode_i_64(self.pageNumber, serializer);
    sse_encode_opt_box_autoadd_ocr_table_bounding_box(
      self.boundingBox,
      serializer,
    );
  }

  @protected
  void sse_encode_ocr_table_bounding_box(
    OcrTableBoundingBox self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.left, serializer);
    sse_encode_i_64(self.top, serializer);
    sse_encode_i_64(self.right, serializer);
    sse_encode_i_64(self.bottom, serializer);
  }

  @protected
  void sse_encode_opt_Map_String_String_None(
    Map<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_Map_String_String_None(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_Map_String_i_64_None(
    Map<String, 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_Map_String_i_64_None(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_Map_String_list_String_None(
    Map<String, List<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_Map_String_list_String_None(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_Map_String_list_prim_u_8_strict_None(
    Map<String, Uint8List>? self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs

    sse_encode_bool(self != null, serializer);
    if (self != null) {
      sse_encode_Map_String_list_prim_u_8_strict_None(self, 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_acceleration_config(
    AccelerationConfig? 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_acceleration_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_bool(bool? 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_bool(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_bounding_box(
    BoundingBox? 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_bounding_box(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_chunking_config(
    ChunkingConfig? 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_chunking_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_content_filter_config(
    ContentFilterConfig? 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_content_filter_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_core_properties(
    CoreProperties? 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_core_properties(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_djot_content(
    DjotContent? 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_djot_content(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_document_structure(
    DocumentStructure? 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_document_structure(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_docx_app_properties(
    DocxAppProperties? 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_docx_app_properties(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_email_config(
    EmailConfig? 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_email_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_embedding_config(
    EmbeddingConfig? 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_embedding_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_embedding_preset(
    EmbeddingPreset? 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_embedding_preset(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_error_metadata(
    ErrorMetadata? 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_error_metadata(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_extraction_method(
    ExtractionMethod? 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_extraction_method(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_extraction_result(
    ExtractionResult? 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_extraction_result(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_f_64(double? 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_f_64(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_file_extraction_config(
    FileExtractionConfig? 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_file_extraction_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_format_metadata(
    FormatMetadata? 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_format_metadata(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_heading_context(
    HeadingContext? 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_heading_context(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_hierarchy_config(
    HierarchyConfig? 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_hierarchy_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_html_output_config(
    HtmlOutputConfig? 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_html_output_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_image_extraction_config(
    ImageExtractionConfig? 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_image_extraction_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_image_kind(
    ImageKind? 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_image_kind(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_image_preprocessing_config(
    ImagePreprocessingConfig? 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_image_preprocessing_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_image_preprocessing_metadata(
    ImagePreprocessingMetadata? 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_image_preprocessing_metadata(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_keyword_config(
    KeywordConfig? 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_keyword_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_language_detection_config(
    LanguageDetectionConfig? 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_language_detection_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_layout_detection_config(
    LayoutDetectionConfig? 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_layout_detection_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_llm_config(
    LlmConfig? 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_llm_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_config(
    OcrConfig? 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_ocr_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_element_config(
    OcrElementConfig? 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_ocr_element_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_pipeline_config(
    OcrPipelineConfig? 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_ocr_pipeline_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_quality_thresholds(
    OcrQualityThresholds? 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_ocr_quality_thresholds(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_rotation(
    OcrRotation? 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_ocr_rotation(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_ocr_table_bounding_box(
    OcrTableBoundingBox? 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_ocr_table_bounding_box(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_output_format(
    OutputFormat? 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_output_format(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_page_config(
    PageConfig? 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_page_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_page_hierarchy(
    PageHierarchy? 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_page_hierarchy(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_page_structure(
    PageStructure? 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_page_structure(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_pdf_config(
    PdfConfig? 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_pdf_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_post_processor_config(
    PostProcessorConfig? 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_post_processor_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_rake_params(
    RakeParams? 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_rake_params(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_result_format(
    ResultFormat? 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_result_format(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_revision_anchor(
    RevisionAnchor? 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_revision_anchor(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_security_limits(
    SecurityLimits? 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_security_limits(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_structured_extraction_config(
    StructuredExtractionConfig? 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_structured_extraction_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_tesseract_config(
    TesseractConfig? 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_tesseract_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_text_direction(
    TextDirection? 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_text_direction(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_token_reduction_options(
    TokenReductionOptions? 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_token_reduction_options(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_tree_sitter_config(
    TreeSitterConfig? 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_tree_sitter_config(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_yake_params(
    YakeParams? 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_yake_params(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_box_autoadd_year_range(
    YearRange? 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_year_range(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_String(
    List<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_list_String(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_archive_entry(
    List<ArchiveEntry>? 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_archive_entry(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_chunk(List<Chunk>? 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_chunk(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_document_revision(
    List<DocumentRevision>? 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_document_revision(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_element(
    List<Element>? 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_element(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_extracted_image(
    List<ExtractedImage>? 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_extracted_image(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_extracted_uri(
    List<ExtractedUri>? 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_extracted_uri(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_keyword(
    List<Keyword>? 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_keyword(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_layout_region(
    List<LayoutRegion>? 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_layout_region(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_list_String(
    List<List<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_list_list_String(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_llm_usage(
    List<LlmUsage>? 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_llm_usage(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_ocr_element(
    List<OcrElement>? 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_ocr_element(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_page_boundary(
    List<PageBoundary>? 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_page_boundary(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_page_content(
    List<PageContent>? 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_page_content(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_page_info(
    List<PageInfo>? 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_page_info(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_pdf_annotation(
    List<PdfAnnotation>? 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_pdf_annotation(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_prim_f_64_strict(
    Float64List? 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_prim_f_64_strict(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_prim_i_64_strict(
    Int64List? 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_prim_i_64_strict(self, serializer);
    }
  }

  @protected
  void sse_encode_opt_list_prim_u_8_strict(
    Uint8List? 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_prim_u_8_strict(self, serializer);
    }
  }

  @protected
  void sse_encode_orientation_result(
    OrientationResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.degrees, serializer);
    sse_encode_f_64(self.confidence, serializer);
  }

  @protected
  void sse_encode_output_format(OutputFormat self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case OutputFormat_Plain():
        sse_encode_i_32(0, serializer);
      case OutputFormat_Markdown():
        sse_encode_i_32(1, serializer);
      case OutputFormat_Djot():
        sse_encode_i_32(2, serializer);
      case OutputFormat_Html():
        sse_encode_i_32(3, serializer);
      case OutputFormat_Json():
        sse_encode_i_32(4, serializer);
      case OutputFormat_Structured():
        sse_encode_i_32(5, serializer);
      case OutputFormat_Custom(field0: final field0):
        sse_encode_i_32(6, serializer);
        sse_encode_String(field0, serializer);
    }
  }

  @protected
  void sse_encode_paddle_ocr_config(
    PaddleOcrConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.language, serializer);
    sse_encode_opt_String(self.cacheDir, serializer);
    sse_encode_bool(self.useAngleCls, serializer);
    sse_encode_bool(self.enableTableDetection, serializer);
    sse_encode_f_64(self.detDbThresh, serializer);
    sse_encode_f_64(self.detDbBoxThresh, serializer);
    sse_encode_f_64(self.detDbUnclipRatio, serializer);
    sse_encode_i_64(self.detLimitSideLen, serializer);
    sse_encode_i_64(self.recBatchNum, serializer);
    sse_encode_i_64(self.padding, serializer);
    sse_encode_f_64(self.dropScore, serializer);
    sse_encode_String(self.modelTier, serializer);
  }

  @protected
  void sse_encode_page_boundary(PageBoundary self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.byteStart, serializer);
    sse_encode_i_64(self.byteEnd, serializer);
    sse_encode_i_64(self.pageNumber, serializer);
  }

  @protected
  void sse_encode_page_config(PageConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.extractPages, serializer);
    sse_encode_bool(self.insertPageMarkers, serializer);
    sse_encode_String(self.markerFormat, serializer);
  }

  @protected
  void sse_encode_page_content(PageContent self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.pageNumber, serializer);
    sse_encode_String(self.content, serializer);
    sse_encode_list_table(self.tables, serializer);
    sse_encode_list_prim_i_64_strict(self.imageIndices, serializer);
    sse_encode_opt_box_autoadd_page_hierarchy(self.hierarchy, serializer);
    sse_encode_opt_box_autoadd_bool(self.isBlank, serializer);
    sse_encode_opt_list_layout_region(self.layoutRegions, serializer);
    sse_encode_opt_String(self.speakerNotes, serializer);
    sse_encode_opt_String(self.sectionName, serializer);
    sse_encode_opt_String(self.sheetName, serializer);
  }

  @protected
  void sse_encode_page_hierarchy(PageHierarchy self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.blockCount, serializer);
    sse_encode_list_hierarchical_block(self.blocks, serializer);
  }

  @protected
  void sse_encode_page_info(PageInfo self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.number, serializer);
    sse_encode_opt_String(self.title, serializer);
    sse_encode_opt_list_prim_f_64_strict(self.dimensions, serializer);
    sse_encode_opt_box_autoadd_i_64(self.imageCount, serializer);
    sse_encode_opt_box_autoadd_i_64(self.tableCount, serializer);
    sse_encode_opt_box_autoadd_bool(self.hidden, serializer);
    sse_encode_opt_box_autoadd_bool(self.isBlank, serializer);
    sse_encode_bool(self.hasVectorGraphics, serializer);
  }

  @protected
  void sse_encode_page_structure(PageStructure self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.totalCount, serializer);
    sse_encode_page_unit_type(self.unitType, serializer);
    sse_encode_opt_list_page_boundary(self.boundaries, serializer);
    sse_encode_opt_list_page_info(self.pages, serializer);
  }

  @protected
  void sse_encode_page_unit_type(PageUnitType self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_pdf_annotation(PdfAnnotation self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_pdf_annotation_type(self.annotationType, serializer);
    sse_encode_opt_String(self.content, serializer);
    sse_encode_i_64(self.pageNumber, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.boundingBox, serializer);
  }

  @protected
  void sse_encode_pdf_annotation_type(
    PdfAnnotationType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_pdf_config(PdfConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.extractImages, serializer);
    sse_encode_bool(self.extractTables, serializer);
    sse_encode_opt_list_String(self.passwords, serializer);
    sse_encode_bool(self.extractMetadata, serializer);
    sse_encode_opt_box_autoadd_hierarchy_config(self.hierarchy, serializer);
    sse_encode_bool(self.extractAnnotations, serializer);
    sse_encode_opt_box_autoadd_f_64(self.topMarginFraction, serializer);
    sse_encode_opt_box_autoadd_f_64(self.bottomMarginFraction, serializer);
    sse_encode_bool(self.allowSingleColumnTables, serializer);
    sse_encode_bool(self.ocrInlineImages, serializer);
  }

  @protected
  void sse_encode_pdf_metadata(PdfMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.pdfVersion, serializer);
    sse_encode_opt_String(self.producer, serializer);
    sse_encode_opt_box_autoadd_bool(self.isEncrypted, serializer);
    sse_encode_opt_box_autoadd_i_64(self.width, serializer);
    sse_encode_opt_box_autoadd_i_64(self.height, serializer);
    sse_encode_opt_box_autoadd_i_64(self.pageCount, serializer);
  }

  @protected
  void sse_encode_post_processor_config(
    PostProcessorConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.enabled, serializer);
    sse_encode_opt_list_String(self.enabledProcessors, serializer);
    sse_encode_opt_list_String(self.disabledProcessors, serializer);
    sse_encode_opt_list_String(self.enabledSet, serializer);
    sse_encode_opt_list_String(self.disabledSet, serializer);
  }

  @protected
  void sse_encode_pptx_app_properties(
    PptxAppProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.application, serializer);
    sse_encode_opt_String(self.appVersion, serializer);
    sse_encode_opt_box_autoadd_i_64(self.totalTime, serializer);
    sse_encode_opt_String(self.company, serializer);
    sse_encode_opt_box_autoadd_i_64(self.docSecurity, serializer);
    sse_encode_opt_box_autoadd_bool(self.scaleCrop, serializer);
    sse_encode_opt_box_autoadd_bool(self.linksUpToDate, serializer);
    sse_encode_opt_box_autoadd_bool(self.sharedDoc, serializer);
    sse_encode_opt_box_autoadd_bool(self.hyperlinksChanged, serializer);
    sse_encode_opt_box_autoadd_i_64(self.slides, serializer);
    sse_encode_opt_box_autoadd_i_64(self.notes, serializer);
    sse_encode_opt_box_autoadd_i_64(self.hiddenSlides, serializer);
    sse_encode_opt_box_autoadd_i_64(self.multimediaClips, serializer);
    sse_encode_opt_String(self.presentationFormat, serializer);
    sse_encode_list_String(self.slideTitles, serializer);
  }

  @protected
  void sse_encode_pptx_extraction_result(
    PptxExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_pptx_metadata(self.metadata, serializer);
    sse_encode_i_64(self.slideCount, serializer);
    sse_encode_i_64(self.imageCount, serializer);
    sse_encode_i_64(self.tableCount, serializer);
    sse_encode_list_extracted_image(self.images, serializer);
    sse_encode_opt_box_autoadd_page_structure(self.pageStructure, serializer);
    sse_encode_opt_list_page_content(self.pageContents, serializer);
    sse_encode_opt_box_autoadd_document_structure(self.document, serializer);
    sse_encode_list_String(self.hyperlinks, serializer);
    sse_encode_Map_String_String_None(self.officeMetadata, serializer);
    sse_encode_opt_list_document_revision(self.revisions, serializer);
  }

  @protected
  void sse_encode_pptx_metadata(PptxMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.slideCount, serializer);
    sse_encode_list_String(self.slideNames, serializer);
    sse_encode_opt_box_autoadd_i_64(self.imageCount, serializer);
    sse_encode_opt_box_autoadd_i_64(self.tableCount, serializer);
  }

  @protected
  void sse_encode_processing_stage(
    ProcessingStage self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_processing_warning(
    ProcessingWarning self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.source, serializer);
    sse_encode_String(self.message, serializer);
  }

  @protected
  void sse_encode_pst_metadata(PstMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.messageCount, serializer);
  }

  @protected
  void sse_encode_rake_params(RakeParams self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.minWordLength, serializer);
    sse_encode_i_64(self.maxWordsPerPhrase, serializer);
  }

  @protected
  void sse_encode_recognized_table(
    RecognizedTable self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_b_box(self.detectionBbox, serializer);
    sse_encode_list_list_String(self.cells, serializer);
    sse_encode_String(self.markdown, serializer);
  }

  @protected
  void sse_encode_record_string_i_64(
    (String, PlatformInt64) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.$1, serializer);
    sse_encode_i_64(self.$2, serializer);
  }

  @protected
  void sse_encode_record_string_list_prim_u_8_strict(
    (String, Uint8List) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.$1, serializer);
    sse_encode_list_prim_u_8_strict(self.$2, serializer);
  }

  @protected
  void sse_encode_record_string_list_string(
    (String, List<String>) self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.$1, serializer);
    sse_encode_list_String(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_reduction_level(
    ReductionLevel self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_relationship_kind(
    RelationshipKind self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_result_format(ResultFormat self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_revision_anchor(
    RevisionAnchor self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    switch (self) {
      case RevisionAnchor_Paragraph(index: final index):
        sse_encode_i_32(0, serializer);
        sse_encode_i_64(index, serializer);
      case RevisionAnchor_TableCell(
        row: final row,
        col: final col,
        tableIndex: final tableIndex,
      ):
        sse_encode_i_32(1, serializer);
        sse_encode_i_64(row, serializer);
        sse_encode_i_64(col, serializer);
        sse_encode_i_64(tableIndex, serializer);
      case RevisionAnchor_Page(index: final index):
        sse_encode_i_32(2, serializer);
        sse_encode_i_64(index, serializer);
      case RevisionAnchor_Slide(index: final index):
        sse_encode_i_32(3, serializer);
        sse_encode_i_64(index, serializer);
      case RevisionAnchor_Sheet(index: final index, name: final name):
        sse_encode_i_32(4, serializer);
        sse_encode_i_64(index, serializer);
        sse_encode_String(name, serializer);
    }
  }

  @protected
  void sse_encode_revision_delta(RevisionDelta self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_diff_line(self.content, serializer);
    sse_encode_list_cell_change(self.tableChanges, serializer);
  }

  @protected
  void sse_encode_revision_kind(RevisionKind self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_security_limits(
    SecurityLimits self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.maxArchiveSize, serializer);
    sse_encode_i_64(self.maxCompressionRatio, serializer);
    sse_encode_i_64(self.maxFilesInArchive, serializer);
    sse_encode_i_64(self.maxNestingDepth, serializer);
    sse_encode_i_64(self.maxEntityLength, serializer);
    sse_encode_i_64(self.maxContentSize, serializer);
    sse_encode_i_64(self.maxIterations, serializer);
    sse_encode_i_64(self.maxXmlDepth, serializer);
    sse_encode_i_64(self.maxTableCells, serializer);
  }

  @protected
  void sse_encode_server_config(ServerConfig self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.host, serializer);
    sse_encode_i_64(self.port, serializer);
    sse_encode_list_String(self.corsOrigins, serializer);
    sse_encode_i_64(self.maxRequestBodyBytes, serializer);
    sse_encode_i_64(self.maxMultipartFieldBytes, serializer);
  }

  @protected
  void sse_encode_structured_data(
    StructuredData self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_structured_data_type(self.dataType, serializer);
    sse_encode_String(self.rawJson, serializer);
    sse_encode_opt_String(self.schemaType, serializer);
  }

  @protected
  void sse_encode_structured_data_result(
    StructuredDataResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_String(self.format, serializer);
    sse_encode_Map_String_String_None(self.metadata, serializer);
    sse_encode_list_String(self.textFields, serializer);
  }

  @protected
  void sse_encode_structured_data_type(
    StructuredDataType self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_structured_extraction_config(
    StructuredExtractionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.schema, serializer);
    sse_encode_String(self.schemaName, serializer);
    sse_encode_opt_String(self.schemaDescription, serializer);
    sse_encode_bool(self.strict, serializer);
    sse_encode_opt_String(self.prompt, serializer);
    sse_encode_llm_config(self.llm, serializer);
  }

  @protected
  void sse_encode_supported_format(
    SupportedFormat self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.extension_, serializer);
    sse_encode_String(self.mimeType, serializer);
  }

  @protected
  void sse_encode_table(Table self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_list_list_String(self.cells, serializer);
    sse_encode_String(self.markdown, serializer);
    sse_encode_i_64(self.pageNumber, serializer);
    sse_encode_opt_box_autoadd_bounding_box(self.boundingBox, serializer);
  }

  @protected
  void sse_encode_table_cell(TableCell self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_i_64(self.rowSpan, serializer);
    sse_encode_i_64(self.colSpan, serializer);
    sse_encode_bool(self.isHeader, serializer);
  }

  @protected
  void sse_encode_table_diff(TableDiff self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.fromIndex, serializer);
    sse_encode_i_64(self.toIndex, serializer);
    sse_encode_list_cell_change(self.cellChanges, serializer);
  }

  @protected
  void sse_encode_table_grid(TableGrid self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.rows, serializer);
    sse_encode_i_64(self.cols, serializer);
    sse_encode_list_grid_cell(self.cells, serializer);
  }

  @protected
  void sse_encode_table_model(TableModel self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_tesseract_config(
    TesseractConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.language, serializer);
    sse_encode_i_64(self.psm, serializer);
    sse_encode_String(self.outputFormat, serializer);
    sse_encode_i_64(self.oem, serializer);
    sse_encode_f_64(self.minConfidence, serializer);
    sse_encode_opt_box_autoadd_image_preprocessing_config(
      self.preprocessing,
      serializer,
    );
    sse_encode_bool(self.enableTableDetection, serializer);
    sse_encode_f_64(self.tableMinConfidence, serializer);
    sse_encode_i_64(self.tableColumnThreshold, serializer);
    sse_encode_f_64(self.tableRowThresholdRatio, serializer);
    sse_encode_bool(self.useCache, serializer);
    sse_encode_bool(self.classifyUsePreAdaptedTemplates, serializer);
    sse_encode_bool(self.languageModelNgramOn, serializer);
    sse_encode_bool(self.tesseditDontBlkrejGoodWds, serializer);
    sse_encode_bool(self.tesseditDontRowrejGoodWds, serializer);
    sse_encode_bool(self.tesseditEnableDictCorrection, serializer);
    sse_encode_String(self.tesseditCharWhitelist, serializer);
    sse_encode_String(self.tesseditCharBlacklist, serializer);
    sse_encode_bool(self.tesseditUsePrimaryParamsModel, serializer);
    sse_encode_bool(self.textordSpaceSizeIsVariable, serializer);
    sse_encode_bool(self.thresholdingMethod, serializer);
  }

  @protected
  void sse_encode_text_annotation(
    TextAnnotation self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.start, serializer);
    sse_encode_i_64(self.end, serializer);
    sse_encode_annotation_kind(self.kind, serializer);
  }

  @protected
  void sse_encode_text_direction(TextDirection self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, serializer);
  }

  @protected
  void sse_encode_text_extraction_result(
    TextExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_i_64(self.lineCount, serializer);
    sse_encode_i_64(self.wordCount, serializer);
    sse_encode_i_64(self.characterCount, serializer);
    sse_encode_opt_list_String(self.headers, serializer);
    sse_encode_opt_list_list_String(self.links, serializer);
    sse_encode_opt_list_list_String(self.codeBlocks, serializer);
  }

  @protected
  void sse_encode_text_metadata(TextMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.lineCount, serializer);
    sse_encode_i_64(self.wordCount, serializer);
    sse_encode_i_64(self.characterCount, serializer);
    sse_encode_opt_list_String(self.headers, serializer);
    sse_encode_opt_list_list_String(self.links, serializer);
    sse_encode_opt_list_list_String(self.codeBlocks, serializer);
  }

  @protected
  void sse_encode_token_reduction_config(
    TokenReductionConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_reduction_level(self.level, serializer);
    sse_encode_opt_String(self.languageHint, serializer);
    sse_encode_bool(self.preserveMarkdown, serializer);
    sse_encode_bool(self.preserveCode, serializer);
    sse_encode_f_64(self.semanticThreshold, serializer);
    sse_encode_bool(self.enableParallel, serializer);
    sse_encode_bool(self.useSimd, serializer);
    sse_encode_opt_Map_String_list_String_None(
      self.customStopwords,
      serializer,
    );
    sse_encode_list_String(self.preservePatterns, serializer);
    sse_encode_opt_box_autoadd_f_64(self.targetReduction, serializer);
    sse_encode_bool(self.enableSemanticClustering, serializer);
  }

  @protected
  void sse_encode_token_reduction_options(
    TokenReductionOptions self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.mode, serializer);
    sse_encode_bool(self.preserveImportantWords, serializer);
  }

  @protected
  void sse_encode_tree_sitter_config(
    TreeSitterConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.enabled, serializer);
    sse_encode_opt_String(self.cacheDir, serializer);
    sse_encode_opt_list_String(self.languages, serializer);
    sse_encode_opt_list_String(self.groups, serializer);
    sse_encode_tree_sitter_process_config(self.process, serializer);
  }

  @protected
  void sse_encode_tree_sitter_process_config(
    TreeSitterProcessConfig self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_bool(self.structure, serializer);
    sse_encode_bool(self.imports, serializer);
    sse_encode_bool(self.exports, serializer);
    sse_encode_bool(self.comments, serializer);
    sse_encode_bool(self.docstrings, serializer);
    sse_encode_bool(self.symbols, serializer);
    sse_encode_bool(self.diagnostics, serializer);
    sse_encode_opt_box_autoadd_i_64(self.chunkMaxSize, serializer);
    sse_encode_code_content_mode(self.contentMode, serializer);
  }

  @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_uri_kind(UriKind self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_32(self.index, 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_xlsx_app_properties(
    XlsxAppProperties self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_String(self.application, serializer);
    sse_encode_opt_String(self.appVersion, serializer);
    sse_encode_opt_box_autoadd_i_64(self.docSecurity, serializer);
    sse_encode_opt_box_autoadd_bool(self.scaleCrop, serializer);
    sse_encode_opt_box_autoadd_bool(self.linksUpToDate, serializer);
    sse_encode_opt_box_autoadd_bool(self.sharedDoc, serializer);
    sse_encode_opt_box_autoadd_bool(self.hyperlinksChanged, serializer);
    sse_encode_opt_String(self.company, serializer);
    sse_encode_list_String(self.worksheetNames, serializer);
  }

  @protected
  void sse_encode_xml_extraction_result(
    XmlExtractionResult self,
    SseSerializer serializer,
  ) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_String(self.content, serializer);
    sse_encode_i_64(self.elementCount, serializer);
    sse_encode_list_String(self.uniqueElements, serializer);
  }

  @protected
  void sse_encode_xml_metadata(XmlMetadata self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.elementCount, serializer);
    sse_encode_list_String(self.uniqueElements, serializer);
  }

  @protected
  void sse_encode_yake_params(YakeParams self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_i_64(self.windowSize, serializer);
  }

  @protected
  void sse_encode_year_range(YearRange self, SseSerializer serializer) {
    // Codec=Sse (Serialization based), see doc to use other codecs
    sse_encode_opt_box_autoadd_i_64(self.min, serializer);
    sse_encode_opt_box_autoadd_i_64(self.max, serializer);
    sse_encode_list_prim_i_64_strict(self.years, serializer);
  }
}

@sealed
class ArcDocumentExtractorImpl extends RustOpaque
    implements ArcDocumentExtractor {
  // Not to be used by end users
  ArcDocumentExtractorImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcDocumentExtractorImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_increment_strong_count_ArcDocumentExtractor,
    rustArcDecrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ArcDocumentExtractor,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ArcDocumentExtractorPtr,
  );
}

@sealed
class ArcEmbeddingBackendImpl extends RustOpaque
    implements ArcEmbeddingBackend {
  // Not to be used by end users
  ArcEmbeddingBackendImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcEmbeddingBackendImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_increment_strong_count_ArcEmbeddingBackend,
    rustArcDecrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ArcEmbeddingBackend,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ArcEmbeddingBackendPtr,
  );
}

@sealed
class ArcOcrBackendImpl extends RustOpaque implements ArcOcrBackend {
  // Not to be used by end users
  ArcOcrBackendImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcOcrBackendImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative)
    : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_ArcOcrBackend,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcOcrBackend,
    rustArcDecrementStrongCountPtr:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcOcrBackendPtr,
  );
}

@sealed
class ArcPostProcessorImpl extends RustOpaque implements ArcPostProcessor {
  // Not to be used by end users
  ArcPostProcessorImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcPostProcessorImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_ArcPostProcessor,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcPostProcessor,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ArcPostProcessorPtr,
  );
}

@sealed
class ArcRendererImpl extends RustOpaque implements ArcRenderer {
  // Not to be used by end users
  ArcRendererImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcRendererImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative)
    : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_ArcRenderer,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcRenderer,
    rustArcDecrementStrongCountPtr:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcRendererPtr,
  );
}

@sealed
class ArcValidatorImpl extends RustOpaque implements ArcValidator {
  // Not to be used by end users
  ArcValidatorImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ArcValidatorImpl.frbInternalSseDecode(BigInt ptr, int externalSizeOnNative)
    : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_ArcValidator,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcValidator,
    rustArcDecrementStrongCountPtr:
        RustLib.instance.api.rust_arc_decrement_strong_count_ArcValidatorPtr,
  );
}

@sealed
class DocumentExtractorDartImplImpl extends RustOpaque
    implements DocumentExtractorDartImpl {
  // Not to be used by end users
  DocumentExtractorDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  DocumentExtractorDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_increment_strong_count_DocumentExtractorDartImpl,
    rustArcDecrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_DocumentExtractorDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_DocumentExtractorDartImplPtr,
  );

  ArcDocumentExtractor get field0 => RustLib.instance.api
      .crateDocumentExtractorDartImplAutoAccessorGetField0(that: this);

  set field0(ArcDocumentExtractor field0) =>
      RustLib.instance.api.crateDocumentExtractorDartImplAutoAccessorSetField0(
        that: this,
        field0: field0,
      );
}

@sealed
class EmbeddingBackendDartImplImpl extends RustOpaque
    implements EmbeddingBackendDartImpl {
  // Not to be used by end users
  EmbeddingBackendDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  EmbeddingBackendDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_increment_strong_count_EmbeddingBackendDartImpl,
    rustArcDecrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_EmbeddingBackendDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_EmbeddingBackendDartImplPtr,
  );

  ArcEmbeddingBackend get field0 => RustLib.instance.api
      .crateEmbeddingBackendDartImplAutoAccessorGetField0(that: this);

  set field0(ArcEmbeddingBackend field0) =>
      RustLib.instance.api.crateEmbeddingBackendDartImplAutoAccessorSetField0(
        that: this,
        field0: field0,
      );
}

@sealed
class OcrBackendDartImplImpl extends RustOpaque implements OcrBackendDartImpl {
  // Not to be used by end users
  OcrBackendDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  OcrBackendDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_OcrBackendDartImpl,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_OcrBackendDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_OcrBackendDartImplPtr,
  );

  ArcOcrBackend get field0 => RustLib.instance.api
      .crateOcrBackendDartImplAutoAccessorGetField0(that: this);

  set field0(ArcOcrBackend field0) => RustLib.instance.api
      .crateOcrBackendDartImplAutoAccessorSetField0(that: this, field0: field0);
}

@sealed
class PostProcessorDartImplImpl extends RustOpaque
    implements PostProcessorDartImpl {
  // Not to be used by end users
  PostProcessorDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  PostProcessorDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_increment_strong_count_PostProcessorDartImpl,
    rustArcDecrementStrongCount: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_PostProcessorDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_PostProcessorDartImplPtr,
  );

  ArcPostProcessor get field0 => RustLib.instance.api
      .cratePostProcessorDartImplAutoAccessorGetField0(that: this);

  set field0(ArcPostProcessor field0) =>
      RustLib.instance.api.cratePostProcessorDartImplAutoAccessorSetField0(
        that: this,
        field0: field0,
      );
}

@sealed
class RendererDartImplImpl extends RustOpaque implements RendererDartImpl {
  // Not to be used by end users
  RendererDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  RendererDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_RendererDartImpl,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_RendererDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_RendererDartImplPtr,
  );

  ArcRenderer get field0 => RustLib.instance.api
      .crateRendererDartImplAutoAccessorGetField0(that: this);

  set field0(ArcRenderer field0) => RustLib.instance.api
      .crateRendererDartImplAutoAccessorSetField0(that: this, field0: field0);
}

@sealed
class ValidatorDartImplImpl extends RustOpaque implements ValidatorDartImpl {
  // Not to be used by end users
  ValidatorDartImplImpl.frbInternalDcoDecode(List<dynamic> wire)
    : super.frbInternalDcoDecode(wire, _kStaticData);

  // Not to be used by end users
  ValidatorDartImplImpl.frbInternalSseDecode(
    BigInt ptr,
    int externalSizeOnNative,
  ) : super.frbInternalSseDecode(ptr, externalSizeOnNative, _kStaticData);

  static final _kStaticData = RustArcStaticData(
    rustArcIncrementStrongCount:
        RustLib.instance.api.rust_arc_increment_strong_count_ValidatorDartImpl,
    rustArcDecrementStrongCount:
        RustLib.instance.api.rust_arc_decrement_strong_count_ValidatorDartImpl,
    rustArcDecrementStrongCountPtr: RustLib
        .instance
        .api
        .rust_arc_decrement_strong_count_ValidatorDartImplPtr,
  );

  ArcValidator get field0 => RustLib.instance.api
      .crateValidatorDartImplAutoAccessorGetField0(that: this);

  set field0(ArcValidator field0) => RustLib.instance.api
      .crateValidatorDartImplAutoAccessorSetField0(that: this, field0: field0);
}
